Port to OSF/1. Gif references moved from /gif/ to /egwgif/.
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 9 Jan 1996 16:16:47 +0000 (16:16 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 9 Jan 1996 16:16:47 +0000 (16:16 +0000)
www/Makefile
www/history.egw
www/mquery.egw
www/msearch.egw
www/mtargets.egw
www/search.egw
www/showfull.egw
www/targets.egw
www/wirtcl.c
www/z39util.tcl

index 8f8307b..72b8528 100644 (file)
@@ -1,94 +1,20 @@
 # Makefile for www gateway utility
 # Europagate, 1995
 #
-# $Log: Makefile,v $
-# Revision 1.21  1996/01/09 10:46:48  adam
-# New defines: LOGDIR/EGWDIR/CGIDIR set in Makefile.
-#
-# Revision 1.20  1996/01/03  15:19:35  adam
-# Improved history.
-# Better working scan.
-# New maintanance function to print contact info, etc.
-#
-# Revision 1.19  1996/01/02  10:52:25  adam
-# In images Alt=... are defined.
-#
-# Revision 1.18  1995/12/20  16:31:30  adam
-# Bug fix: shell might terminate even though new request was initiated
-# by the cgi interface program.
-# Work on more simple user interface and Europagate buttons.
-#
-# Revision 1.17  1995/11/14  16:31:35  adam
-# Temporary remove of ccl entry.
-#
-# Revision 1.16  1995/11/14  16:01:50  adam
-# Bug fix: didn't use correct database(s) when 'all' checkbox was selected.
-#
-# Revision 1.15  1995/11/13  18:17:46  adam
-# Better error handling.
-#
-# Revision 1.14  1995/11/13  15:41:40  adam
-# Arrow gifs.
-# Gateway uses record element set names B(rief) and F(ull).
-# Bug fix. Didn't save idAuthentication correctly.
-#
-# Revision 1.13  1995/11/08  18:07:22  adam
-# Minor changes.
-#
-# Revision 1.12  1995/11/08  16:14:32  adam
-# Many improvements and bug fixes.
-# First version that ran on dtbsun.
-#
-# Revision 1.11  1995/11/07  14:56:58  adam
-# Work on search in multiple targets.
-# New wtcl command: wlog.
-# Optional timeout parameter to zwait.
-#
-# Revision 1.10  1995/11/07  10:44:29  adam
-# Work on search in multiple targets.
-#
-# Revision 1.9  1995/11/06  17:44:20  adam
-# State reestablised when shell restarts. History of previous
-# result sets.
-#
-# Revision 1.8  1995/11/06  10:51:14  adam
-# End of response marker in response from wsh/wproto to wcgi.
-# Shells are respawned when necessary.
-#
-# Revision 1.7  1995/10/31  16:56:23  adam
-# Record presentation.
-#
-# Revision 1.6  1995/10/27  17:30:15  adam
-# First search request/response that works.
-#
-# Revision 1.5  1995/10/27  15:12:02  adam
-# IrTcl incorporated in the gateway.
-# Better separation of script types.
-# Z39.50 gateway scripts entered.
-#
-# Revision 1.4  1995/10/23  17:04:16  adam
-# Added some initial z39 gateway scripts.
-#
-# Revision 1.3  1995/10/23  16:55:33  adam
-# A lot of changes - really.
-#
-# Revision 1.2  1995/10/20  14:02:40  adam
-# First version of WWW gateway with embedded Tcl.
-#
-# Revision 1.1  1995/10/20  11:49:24  adam
-# First version of www gateway.
+# $Id: Makefile,v 1.22 1996/01/09 16:16:47 adam Exp $
 #
 SHELL=/bin/sh
 #
 ZDEFS=
-#ZINC=-I../../yaz/include
+ZINC=-I../../yaz/include
 ZLIB=../../yaz/lib/libyaz.a
-MOSILIB=../../xtimosi/src/libmosi.a -lrfc
-LIBIRTCL=/usr/local/lib/libirtcl.a $(ZLIB) $(MOSILIB)
+#MOSILIB=../../xtimosi/src/libmosi.a -lrfc
+LIBIRTCL=../../ir-tcl/libirtcl.a $(ZLIB) $(MOSILIB)
 #NETLIB=-lnsl -lsocket
 #
 OLIB=../lib/util.a ../lib/libres+log.a 
 TCLLIB=/usr/local/lib/libtcl7.4.a
+TCLINC=-I/usr/local/include
 #
 WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \
  mtargets.egw mquery.egw msearch.egw history.egw
@@ -105,12 +31,18 @@ CPP=$(CC) -E
 HTTPDDIR=/usr/local/etc/httpd
 CGIDIR=$(HTTPDDIR)/cgi-bin
 HTDOCS=$(HTTPDDIR)/htdocs
-CONFDIR=$(HTTPDDIR)/conf
 EGWDIR=$(HTTPDDIR)/egw
-LOGDIR=$(HTTPDDIR)/egw
-GIFDIR=$(HTDOCS)/gif
+LOGDIR=$(HTTPDDIR)/logs
+GIFDIR=$(HTDICS)/egwgif
+
+#HTTPDDIR=/usr/local/www
+#CGIDIR=/usr/local/www/cgi-bin
+#HTDOCS=/data2/html/egw/html
+#EGWDIR=/data2/html/egw/scripts
+#LOGDIR=/data2/html/egw/logs
+#GIFDIR=/data2/html/egw/gif
 
-INCLUDE=-I../include $(ZINC)
+INCLUDE=-I../include $(ZINC) $(TCLINC)
 DEFS=$(INCLUDE) $(ZDEFS) -DCGIDIR=\"$(CGIDIR)\" -DEGWDIR=\"$(EGWDIR)\" \
  -DLOGDIR=\"$(LOGDIR)\"
 
@@ -132,7 +64,7 @@ install.prog: $(TPROG1) $(TPROG2)
        @for x in $(TPROG1) $(TPROG2); do \
                echo Installing $$x; \
                cp $$x $(CGIDIR); \
-               chmod +x $(CGIDIR)/$$x; \
+               chmod a+x $(CGIDIR)/$$x; \
        done; \
        for p in egwtcl egwirtcl egwhtml; do \
                rm -f $(CGIDIR)/$$p; \
@@ -154,7 +86,7 @@ install.script:
        done
        @for x in $(CONFFILES); do \
                echo Installing $$x; \
-               cp $$x $(CONFDIR); \
+               cp $$x $(EGWDIR); \
        done
        @for x in gif/*.gif; do \
                echo Installing $$x; \
index 64f13c7..a0cd7f2 100644 (file)
@@ -4,7 +4,7 @@
 </head>
 <body>
 {
-# $Id: history.egw,v 1.1 1996/01/03 15:19:36 adam Exp $
+# $Id: history.egw,v 1.2 1996/01/09 16:16:47 adam Exp $
 
     if {[info commands saveState] == ""} {
         source z39util.tcl
     z39history
 
     if {$useIcons} {
-        html {<img src="/gif/button-egw.gif" alt="Europagate" border=0></a>}
+        html {<img src="/egwgif/button-egw.gif" alt="Europagate" border=0></a>}
     } else {
         html {Europagate | }
     }
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/targets.egw}
     if {$useIcons} {
-        html {"><img src="/gif/button-new-target.gif" }
+        html {"><img src="/egwgif/button-new-target.gif" }
        html {alt="New Target" border=0></a>}
     } else {
         html {">New Target</a>} "\n"
index 9e76a03..c205519 100644 (file)
@@ -4,7 +4,7 @@
 </head>
 <body>
 {
-# $Id: mquery.egw,v 1.8 1996/01/08 08:42:13 adam Exp $
+# $Id: mquery.egw,v 1.9 1996/01/09 16:16:47 adam Exp $
 
     if {[info commands saveState] == ""} {
         source z39util.tcl
 {
     global useIcons
     if {$useIcons} {
-        html {<img src="/gif/button-egw.gif">}
+        html {<img src="/egwgif/button-egw.gif">}
     }    
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/mtargets.egw}
     if {$useIcons} {
-        html {"><img src="/gif/button-new-target.gif" border=0></a>}
+        html {"><img src="/egwgif/button-new-target.gif" border=0></a>}
     } else {
         html {"> New target </a>}
     }
index 01fa9ab..5c4f410 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
-# $Id: msearch.egw,v 1.10 1996/01/08 08:42:13 adam Exp $
+# $Id: msearch.egw,v 1.11 1996/01/09 16:16:48 adam Exp $
 
     if {[info commands saveState] == ""} {
         source z39util.tcl
     global useIcons
 
     if {$useIcons} {
-        html {<img src="/gif/button-egw.gif">}
+        html {<img src="/egwgif/button-egw.gif">}
     }
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/mtargets.egw}
     if {$useIcons} {
-       html {"><img src="/gif/button-new-target.gif" border=0></a>}
+       html {"><img src="/egwgif/button-new-target.gif" border=0></a>}
     } else {
        html {"> New target </a>} " | \n"
     }
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/mquery.egw/} $setNo
     if {$useIcons} {
-        html {"><img src="/gif/button-new-query.gif" border=0></a>}
+        html {"><img src="/egwgif/button-new-query.gif" border=0></a>}
     } else {
         html {"> New query </a>}
     }
index 9254cad..1967138 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
-# $Id: mtargets.egw,v 1.9 1996/01/08 08:42:14 adam Exp $
+# $Id: mtargets.egw,v 1.10 1996/01/09 16:16:48 adam Exp $
     set setNo 1
     source /usr/local/etc/httpd/conf/ztargets.conf
     if {[info commands saveState] == ""} {
@@ -29,7 +29,7 @@
     }
 }
 <center>
-<img src="/gif/button-egw.gif" Alt="EUROPAGATE">
+<img src="/egwgif/button-egw.gif" Alt="EUROPAGATE">
 </center>
 <h2>Choose one or more Z39.50 targets</h2>
 {
index 587e94d..45589ac 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
-# $Id: search.egw,v 1.25 1996/01/08 08:42:17 adam Exp $
+# $Id: search.egw,v 1.26 1996/01/09 16:16:48 adam Exp $
 
 proc start-scan {scanNo cache dir} {
     global sessionId
@@ -43,7 +43,7 @@ proc start-scan {scanNo cache dir} {
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/search.egw/} $setNo + [expr $scanNo - 1] + b {">}
     if {$useIcons} {
-        html {<img src="/gif/button-previous-terms.gif" }
+        html {<img src="/egwgif/button-previous-terms.gif" }
         html {alt="Next Terms" border=0></a>}
     } else {
         html {Previous Terms</a> | }
@@ -52,7 +52,7 @@ proc start-scan {scanNo cache dir} {
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/search.egw/} $setNo + [expr $scanNo + 1] + f {">}
     if {$useIcons} {
-        html {<img src="/gif/button-next-terms.gif" }
+        html {<img src="/egwgif/button-next-terms.gif" }
         html {alt="Next Terms" border=0></a>}
     } else {
         html {Next Terms</a> | }
@@ -69,7 +69,7 @@ proc start-scan {scanNo cache dir} {
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/search.egw/} $setNo + [expr $scanNo - 1] + b {">}
     if {$useIcons} {
-        html {<img src="/gif/button-previous-terms.gif" }
+        html {<img src="/egwgif/button-previous-terms.gif" }
         html {alt="Next Terms" border=0></a>}
     } else {
         html {Previous Terms</a> | }
@@ -78,7 +78,7 @@ proc start-scan {scanNo cache dir} {
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/search.egw/} $setNo + [expr $scanNo + 1] + f {">}
     if {$useIcons} {
-        html {<img src="/gif/button-next-terms.gif" }
+        html {<img src="/egwgif/button-next-terms.gif" }
         html {alt="Next Terms" border=0></a>}
     } else {
         html {Next Terms</a> | }
@@ -115,7 +115,7 @@ proc buttons {setNo setMax startPos after} {
         html / $sessionId {/search.egw/} $setNo + [expr $setMax + 1]
         html + [expr $setMax + $hist($setNo,maxPresent)]
         if {$useIcons} {
-            html {"><img src="/gif/button-next-records.gif" alt="Next Records"}
+            html {"><img src="/egwgif/button-next-records.gif" alt="Next Records"}
            html { border=0></a>}
         } else {
             html {">Next Records</a>} " | \n"
@@ -127,7 +127,7 @@ proc buttons {setNo setMax startPos after} {
         html + [expr $startPos - $hist($setNo,maxPresent)]
         html + [expr $startPos - 1]
         if {$useIcons} {
-            html {"><img src="/gif/button-previous-records.gif" }
+            html {"><img src="/egwgif/button-previous-records.gif" }
            html {alt="Previous Records" border=0></a>}
         } else {
             html {">Previous Records</a>} " | \n"
index 8679310..3cacea1 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
-# $Id: showfull.egw,v 1.15 1996/01/03 15:19:47 adam Exp $
+# $Id: showfull.egw,v 1.16 1996/01/09 16:16:49 adam Exp $
 
 proc buttons {setNo tno no format count host after} {
     global sessionId
@@ -15,7 +15,7 @@ proc buttons {setNo tno no format count host after} {
         html / $sessionId {/showfull.egw/} $setNo + $tno + 
         html [expr $no + 1] + $format
         if {$useIcons} {
-            html {"><img src="/gif/button-next-record.gif" }
+            html {"><img src="/egwgif/button-next-record.gif" }
            html {alt="Next Record" border=0></a>}
         } else {
             html {">Next Record</a>} " | \n"
@@ -26,7 +26,7 @@ proc buttons {setNo tno no format count host after} {
         html / $sessionId {/showfull.egw/} $setNo + $tno +
         html [expr $no - 1] + $format
         if {$useIcons} {
-            html {"><img src="/gif/button-previous-record.gif" }
+            html {"><img src="/egwgif/button-previous-record.gif" }
            html {alt="Previous Record" border=0></a>}
         } else {
             html {">Previous Record</a>} " | \n"
@@ -38,7 +38,7 @@ proc buttons {setNo tno no format count host after} {
     if {$format == "full"} {
         html raw 
         if {$useIcons} {        
-            html {"><img src="/gif/button-raw-marc.gif" }
+            html {"><img src="/egwgif/button-raw-marc.gif" }
            html {alt="Raw Format" border=0></a>}
         } else {
             html {">Raw Format</a>} " | \n"
@@ -46,7 +46,7 @@ proc buttons {setNo tno no format count host after} {
     } else {
         html full
         if {$useIcons} {
-            html {"><img src="/gif/button-full-format.gif" }
+            html {"><img src="/egwgif/button-full-format.gif" }
            html {alt="Full Format" border=0></a>}
         } else {
             html {">Full Format</a>} " | \n"
@@ -62,7 +62,7 @@ proc buttons {setNo tno no format count host after} {
     html $setNo + 1
     html + $hist($setNo,maxPresent)
     if {$useIcons} {
-        html {"><img src="/gif/button-result-set.gif" }
+        html {"><img src="/egwgif/button-result-set.gif" }
        html {alt="Result Set" border=0></a>}
     } else {
         html {">Result Set</a>} " | \n"
@@ -75,7 +75,7 @@ proc buttons {setNo tno no format count host after} {
     }
     html $host + $setNo 
     if {$useIcons} {
-        html {"><img src="/gif/button-new-query.gif" }
+        html {"><img src="/egwgif/button-new-query.gif" }
        html {alt="New Query" border=0></a>}
     } else {
         html {">New Query</a>} " | \n"
@@ -87,7 +87,7 @@ proc buttons {setNo tno no format count host after} {
         html {/targets.egw} 
     }
     if {$useIcons} {
-        html {"><img src="/gif/button-new-target.gif" }
+        html {"><img src="/egwgif/button-new-target.gif" }
        html {alt="New Target" border=0></a>}
     } else {
         html {">New Target</a>}
index 39e1205..f1cf267 100644 (file)
@@ -1,7 +1,7 @@
 <html>
 {
-# $Id: targets.egw,v 1.13 1996/01/08 19:16:32 adam Exp $
-    source /usr/local/etc/httpd/conf/ztargets.conf
+# $Id: targets.egw,v 1.14 1996/01/09 16:16:49 adam Exp $
+    source ztargets.conf
     if {[info commands saveState] == ""} {
         source z39util.tcl
     }
index 28f9dee..b45ec48 100644 (file)
  * USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * $Log: wirtcl.c,v $
- * Revision 1.10  1996/01/09 10:46:50  adam
+ * Revision 1.11  1996/01/09 16:16:49  adam
+ * Port to OSF/1. Gif references moved from /gif/ to /egwgif/.
+ *
+ * Revision 1.10  1996/01/09  10:46:50  adam
  * New defines: LOGDIR/EGWDIR/CGIDIR set in Makefile.
  *
  * Revision 1.9  1995/11/07  14:56:59  adam
@@ -290,18 +293,18 @@ static int events (struct tcl_info *p, char *waitVar, int tout)
         {
             if (FD_ISSET (i, &fdset_tcl_r))
             {
-                assert (callback_table[i].r_handle);
-                (*callback_table[i].r_handle) (callback_table[i].obj);
+                if (callback_table[i].r_handle);
+                    (*callback_table[i].r_handle) (callback_table[i].obj);
             }
             if (FD_ISSET (i, &fdset_tcl_w))
             {
-                assert (callback_table[i].w_handle);
-                (*callback_table[i].w_handle) (callback_table[i].obj);
+                if (callback_table[i].w_handle)
+                    (*callback_table[i].w_handle) (callback_table[i].obj);
             }
             if (FD_ISSET (i, &fdset_tcl_x))
             {
-                assert (callback_table[i].x_handle);
-                (*callback_table[i].x_handle) (callback_table[i].obj);
+                if (callback_table[i].x_handle)
+                    (*callback_table[i].x_handle) (callback_table[i].obj);
             }
         }
     }
index 4853f0a..e2dca2f 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $Id: z39util.tcl,v 1.18 1996/01/04 13:30:33 adam Exp $
+# $Id: z39util.tcl,v 1.19 1996/01/09 16:16:49 adam Exp $
 #
 proc saveState {} {
     uplevel #0 {
@@ -930,7 +930,7 @@ proc z39history {} {
 
 proc displayError {msga msgb} {
     html "<p><center>\n"
-    html {<img src="/gif/noway.gif" alt="Error">}
+    html {<img src="/egwgif/noway.gif" alt="Error">}
     html "<h2>" $msga "</h2>\n"
     if {$msgb != ""} {
         html "<h3>" $msgb "</h3>\n"
@@ -941,7 +941,7 @@ proc displayError {msga msgb} {
 proc button-europagate {} {
     global useIcons
     if {$useIcons} {
-        html {<img src="/gif/button-egw.gif" alt="Europagate" border=0></a>}
+        html {<img src="/egwgif/button-egw.gif" alt="Europagate" border=0></a>}
     } else {
         html {Europagate | }
     }
@@ -955,7 +955,7 @@ proc button-new-target {more} {
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/targets.egw}
     if {$useIcons} {
-        html {"><img src="/gif/button-new-target.gif" }
+        html {"><img src="/egwgif/button-new-target.gif" }
        html {alt="New Target" border=0></a>}
     } else {
         html {">New Target</a>}
@@ -975,7 +975,7 @@ proc button-view-history {more} {
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/history.egw}
     if {$useIcons} {
-        html {"><img src="/gif/button-view-history.gif" alt="View History" }
+        html {"><img src="/egwgif/button-view-history.gif" alt="View History" }
         html {border=0></a>}
     } else {
         html {">View History</a>}
@@ -996,7 +996,7 @@ proc button-new-query {more setNo} {
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/query.egw/} $hist($setNo,host) + $setNo {">}
     if {$useIcons} {
-        html {<img src="/gif/button-new-query.gif" }
+        html {<img src="/egwgif/button-new-query.gif" }
        html {alt="New Query" border=0></a>}
     } else {
         html {New Query</a>}
@@ -1011,7 +1011,7 @@ proc button-new-query {more setNo} {
 proc maintenance {} {
     html {<hr>This page is maintained by }
     html {<a href="mailto:pwh@dtv.dk"> Peter Wad Hansen </a>.}
-    html {Last modified 3. january 1996. <br>}
+    html {Last modified 9. january 1996. <br>}
     html {<em> This and the following pages are under construction and }
     html {will continue to be so until the end of January 1996.</em>}
 }