cvs: php4 /ext/yaz php_yaz.c

From: Date: Thu, 19 Jul 2001 13:27:56 +0000
Subject: cvs: php4 /ext/yaz php_yaz.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6265@lists.php.net to get a copy of this message
dickmeiss Thu Jul 19 09:27:56 2001 EDT Modified files: /php4/ext/yaz php_yaz.c Log: Function yaz_record handles MARC records that have identifers in 00X. Index: php4/ext/yaz/php_yaz.c diff -u php4/ext/yaz/php_yaz.c:1.22 php4/ext/yaz/php_yaz.c:1.23 --- php4/ext/yaz/php_yaz.c:1.22 Sun Jun 24 18:18:50 2001 +++ php4/ext/yaz/php_yaz.c Thu Jul 19 09:27:56 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_yaz.c,v 1.22 2001/06/24 22:18:50 sniper Exp $ */ +/* $Id: php_yaz.c,v 1.23 2001/07/19 13:27:56 dickmeiss Exp $ */ #include "php.h" @@ -1494,6 +1494,7 @@ int end_offset; int i; char tag_str[4]; + int identifier_flag = 1; memcpy (tag_str, buf+entry_p, 3); entry_p += 3; @@ -1544,8 +1545,16 @@ entry_p += length_starting; i = data_offset + base_address; end_offset = i+data_length-1; + + if (indicator_length == 2) + { + if (buf[i + indicator_length] != ISO2709_IDFS) + identifier_flag = 0; + } + else if (!memcmp (tag_str, "00", 2)) + identifier_flag = 0; - if (memcmp (tag_str, "00", 2) && indicator_length) + if (identifier_flag && indicator_length) { /* indicator */ tag->tagValue->u.string = odr_malloc(o, indicator_length+1);

« previous php.cvs (#6265) next »