X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fmarc_read_line.c;h=d6695765076c467d570962547cd3319232cf6ad0;hp=8dcf9c6ccff7396b1bb6721747ade0740d6e5c76;hb=30a1eadf63ab5d1357d10847f905243a250703b8;hpb=77c5a4fca8b516fd39b8ba213daed17a465a6b2a diff --git a/src/marc_read_line.c b/src/marc_read_line.c index 8dcf9c6..d669576 100644 --- a/src/marc_read_line.c +++ b/src/marc_read_line.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2012 Index Data + * Copyright (C) 1995-2013 Index Data * See the file LICENSE for details. */ @@ -24,10 +24,10 @@ #include #include -int yaz_gets(int (*getbyte)(void *client_data), - void (*ungetbyte)(int b, void *client_data), - void *client_data, - WRBUF w) +static int yaz_gets(int (*getbyte)(void *client_data), + void (*ungetbyte)(int b, void *client_data), + void *client_data, + WRBUF w) { size_t sz = 0; int ch = getbyte(client_data); @@ -91,7 +91,7 @@ static int yaz_marc_line_gets(int (*getbyte)(void *client_data), return 1; } - + int yaz_marc_read_line(yaz_marc_t mt, int (*getbyte)(void *client_data), void (*ungetbyte)(int b, void *client_data), @@ -195,14 +195,15 @@ int yaz_marc_read_line(yaz_marc_t mt, { const char *next; size_t len; - + assert(cp[0] == marker_ch); cp++; next = cp; while ((next = strchr(next, marker_ch))) { if ((next[1] >= 'A' && next[1] <= 'Z') - ||(next[1] >= 'a' && next[1] <= 'z')) + ||(next[1] >= 'a' && next[1] <= 'z') + ||(next[1] >= '0' && next[1] <= '9')) { if (!marker_skip) break;