X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=marc.c;h=d98ecd53bce7e21ff65ffe657dfb3d5d2537cef4;hb=522ba942f671244430c51362a06d2de6871de94a;hp=d3ba72fce989ebf7283225ec29b43bcce58cd25d;hpb=1b15670e090677122c83f162a446efa5495e6235;p=ir-tcl-moved-to-github.git diff --git a/marc.c b/marc.c index d3ba72f..d98ecd5 100644 --- a/marc.c +++ b/marc.c @@ -5,7 +5,17 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: marc.c,v $ - * Revision 1.4 1995-06-22 13:15:09 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. + * New interactive script: shell.tcl. + * + * Revision 1.4 1995/06/22 13:15:09 adam * Feature: SUTRS. Setting getSutrs implemented. * Work on display formats. * Preferred record syntax can be set by the user. @@ -37,12 +47,12 @@ static int atoi_n (const char *buf, int len) { int val = 0; + if (!isdigit (buf[len-1])) + return 0; while (--len >= 0) { if (isdigit (*buf)) val = val*10 + (*buf - '0'); - else if (*buf != ' ') - return 0; buf++; } return val; @@ -103,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 {