--- /dev/null
+/*
+ * NWI - Nordic Web Index
+ * Technical Knowledge Centre & Library of Denmark (DTV)
+ *
+ * Shell program for the Wais extension to Europagate/IrTcl
+ *
+ * $Log: waissh.c,v $
+ * Revision 1.1 1996/02/29 15:32:21 adam
+ * First kick of NWI extension to the Europgate WWW-Z39.50 gateway.
+ *
+ */
+
+#include <stdio.h>
+
+#include "wwaistcl.h"
+
+int main (int argc, char **argv)
+{
+ wshmain (argc, argv, w_interp_waistcl);
+ exit (0);
+}
+
+
--- /dev/null
+/*
+ * NWI - Nordic Web Index
+ * Technical Knowledge Centre & Library of Denmark (DTV)
+ *
+ * Wais extension to Europagate/IrTcl
+ *
+ * $Log: wwaistcl.c,v $
+ * Revision 1.1 1996/02/29 15:32:21 adam
+ * First kick of NWI extension to the Europgate WWW-Z39.50 gateway.
+ *
+ */
+
+#include <log.h>
+#include "wirtcl.h"
+#include "wwaistcl.h"
+
+static void *do_create (WCLIENT wcl, void *args);
+static int do_exec (const char *fname, char *parms, void *mydata);
+static int do_load (char *parms, void *mydata);
+static int do_save (char *parms, void *mydata);
+
+static struct w_interp_type w_interp_t = {
+ "waistcl",
+ do_create,
+ do_exec,
+ do_load,
+ do_save
+};
+
+W_Interp_Type w_interp_waistcl = &w_interp_t;
+
+static char *mod = "wwaistcl";
+
+struct waistcl_info {
+ W_Interp w_interp;
+ Tcl_Interp *interp;
+ WCLIENT wcl;
+};
+
+static void *do_create (WCLIENT wcl, void *args)
+{
+ struct waistcl_info *p;
+
+ if (!(p = malloc (sizeof(*p))))
+ {
+ gw_log (GW_LOG_FATAL|GW_LOG_ERRNO, mod, "malloc: waistcl_info");
+ exit (1);
+ }
+ if (!(p->w_interp = w_interp_create (w_interp_irtcl, wcl, NULL)))
+ {
+ gw_log (GW_LOG_FATAL, mod, "Cannot make IrTcl_Interp");
+ exit (1);
+ }
+ p->wcl = wcl;
+ p->interp = w_interp_irtcl_get (p->w_interp);
+ if (Waistcl_Init(p->interp) == TCL_ERROR)
+ {
+ gw_log (GW_LOG_FATAL, mod, "Cannot make Waistcl_Interp");
+ exit (1);
+ }
+ return p;
+}
+
+static int do_exec (const char *fname, char *parms, void *mydata)
+{
+ struct waistcl_info *p = mydata;
+ int r;
+ if ((r = w_interp_exec (p->w_interp, fname, parms)))
+ return r;
+ return 0;
+}
+
+static int do_load (char *parms, void *mydata)
+{
+ struct waistcl_info *p = mydata;
+
+ return w_interp_load_state (p->w_interp, parms);
+}
+
+static int do_save (char *parms, void *mydata)
+{
+ struct waistcl_info *p = mydata;
+
+ return w_interp_save_state (p->w_interp, parms);
+}
+
+
+
+