From 4b96df0e1f1db0983dff2d019373fea918b8b6ec Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 28 Aug 1995 12:21:21 +0000 Subject: [PATCH] Removed lines and list as synonyms of list in MARC extractron. Configure searches also for tk4.0 / tcl7.4. --- configure.in | 10 +++++++--- display.tcl | 4 ++-- marc.c | 8 ++++++-- shell.tcl | 16 +++++++++++++--- tclmain.c | 7 +++++-- 5 files changed, 33 insertions(+), 12 deletions(-) diff --git a/configure.in b/configure.in index c43e153..8cb371f 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl IR toolkit for tcl/tk dnl (c) Index Data 1995 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.8 1995-08-28 09:43:24 adam Exp $ +dnl $Id: configure.in,v 1.9 1995-08-28 12:21:21 adam Exp $ AC_INIT(ir-tcl.h) CC=${CC-cc} AC_SUBST(CC) @@ -22,7 +22,9 @@ AC_STDC_HEADERS AC_SUBST(TCLLIB) AC_CHECK_LIB(tcl, Tcl_Eval, tclFound=1, tclFound=0, -lm) if test "$tclFound" = 1; then - TCLLIB=-ltcl + TCLLIB=-ltcl +elif test -r /usr/local/lib/libtcl7.4.a; then + TCLLIB=/usr/local/lib/libtcl7.4.a else TCLLIB=/usr/local/lib/libtcl.a fi @@ -33,7 +35,7 @@ AC_SUBST(MOSIDIR) AC_MSG_CHECKING(for YAZ directory) AC_ARG_WITH(yazdir,[ --with-yazdir Yaz directory], [YAZDIR=$withval]) if test "$YAZDIR" = "yes"; then - YAZDIR="../yaz-1.0b" + YAZDIR="../yaz-1.0b3" elif test "$YAZDIR" = ""; then YAZDIR="../yaz" for i in ../yaz-1.0b3 ../yaz-1.0b4 ../yaz-1.0 ../yaz; do @@ -129,6 +131,8 @@ AC_SUBST(TKLIB) AC_CHECK_LIB(tk, main, tkFound=1, tkFound=0, $TCLLIB $XLIBSW -lm) if test "$tkFound" = 1; then TKLIB=-ltk +elif test -r /usr/local/lib/libtk4.0.a; then + TKLIB=/usr/local/lib/libtk4.0.a else TKLIB=/usr/local/lib/libtk.a fi diff --git a/display.tcl b/display.tcl index ac03832..69b1445 100644 --- a/display.tcl +++ b/display.tcl @@ -1,4 +1,4 @@ -# $Id: display.tcl,v 1.1 1995-06-30 12:39:16 adam Exp $ +# $Id: display.tcl,v 1.2 1995-08-28 12:21:21 adam Exp $ # # Record display proc display {zset no} { @@ -20,7 +20,7 @@ proc display {zset no} { puts [join [$zset getSutrs $no]] return } - if {[catch {set r [$zset getMarc $no list * * *]}]} { + if {[catch {set r [$zset getMarc $no line * * *]}]} { puts "Unknown record type: $rtype" return } diff --git a/marc.c b/marc.c index 9320d40..d98ecd5 100644 --- a/marc.c +++ b/marc.c @@ -5,7 +5,11 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: marc.c,v $ - * Revision 1.5 1995-06-30 12:39:26 adam + * Revision 1.6 1995-08-28 12:21:22 adam + * Removed lines and list as synonyms of list in MARC extractron. + * Configure searches also for tk4.0 / tcl7.4. + * + * Revision 1.5 1995/06/30 12:39:26 adam * Bug fix: loadFile didn't set record type. * The MARC routines are a little less strict in the interpretation. * Script display.tcl replaces the old marc.tcl. @@ -109,7 +113,7 @@ int ir_tcl_get_marc (Tcl_Interp *interp, const char *buf, *ptag = '\0'; if (!strcmp (argv[3], "field")) mode = 'f'; - else if (!strcmp (argv[3], "lines") || !strcmp (argv[3], "list")) + else if (!strcmp (argv[3], "line")) mode = 'l'; else { diff --git a/shell.tcl b/shell.tcl index 5a9161a..d9d32d8 100644 --- a/shell.tcl +++ b/shell.tcl @@ -1,9 +1,19 @@ -# $Id: shell.tcl,v 1.1 1995-06-30 12:39:27 adam Exp $ +# $Id: shell.tcl,v 1.2 1995-08-28 12:21:22 adam Exp $ # source display.tcl +ir z + +proc help {} { + puts "Commands:" + puts " target " + puts " find " + puts " show " + puts "" +} + proc target {name database} { - ir z + z disconnect z failback {puts "Connection failed"} z callback {connect-response} z databaseNames $database @@ -17,7 +27,7 @@ proc connect-response {} { } proc init-response {} { - puts "Connect and initalized. ok" + puts "Connect and initialized." } proc find-response {z} { diff --git a/tclmain.c b/tclmain.c index 377e87b..3168bc6 100644 --- a/tclmain.c +++ b/tclmain.c @@ -5,7 +5,11 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: tclmain.c,v $ - * Revision 1.12 1995-08-28 11:07:16 adam + * Revision 1.13 1995-08-28 12:21:22 adam + * Removed lines and list as synonyms of list in MARC extractron. + * Configure searches also for tk4.0 / tcl7.4. + * + * Revision 1.12 1995/08/28 11:07:16 adam * Minor changes. * * Revision 1.11 1995/08/03 13:23:02 adam @@ -87,7 +91,6 @@ int main (int argc, char **argv) if (argc == 2) fileName = argv[1]; - log_init (LOG_ALL, "", NULL); if (Tcl_AppInit(interp) != TCL_OK) { fprintf(stderr, "Tcl_AppInit failed: %s\n", interp->result); } -- 1.7.10.4