dickmeiss Mon Oct 28 05:56:23 2002 EDT
Modified files:
/php4/ext/yaz php_yaz.c
Log:
Raw records for yaz_record
Index: php4/ext/yaz/php_yaz.c
diff -u php4/ext/yaz/php_yaz.c:1.54 php4/ext/yaz/php_yaz.c:1.55
--- php4/ext/yaz/php_yaz.c:1.54 Thu Sep 19 08:20:06 2002
+++ php4/ext/yaz/php_yaz.c Mon Oct 28 05:56:23 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_yaz.c,v 1.54 2002/09/19 12:20:06 dickmeiss Exp $ */
+/* $Id: php_yaz.c,v 1.55 2002/10/28 10:56:23 dickmeiss Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -344,7 +344,7 @@
option_set (as, "otherInfo1", otherInfo[1]);
option_set (as, "otherInfo2", otherInfo[2]);
option_set (as, "piggyback", piggyback ? "1" : "0");
- ZOOM_connection_connect (as->zoom_conn, zurl_str, 0);
+ ZOOM_connection_connect (as->zoom_conn, zurl_str, 0);
break;
}
}
@@ -936,19 +936,7 @@
type = "render";
if (r)
{
- if (!strcmp (type, "syntax") ||
- !strcmp (type, "database") ||
- !strcmp (type, "render") ||
- !strcmp (type, "xml"))
- {
- const char *info = ZOOM_record_get (r, type, 0);
-
- return_value->value.str.len = strlen(info);
- return_value->value.str.val =
- estrndup(info, return_value->value.str.len);
- return_value->type = IS_STRING;
- }
- else if (!strcmp (type, "array"))
+ if (!strcmp (type, "array"))
{
Z_External *ext = (Z_External *) ZOOM_record_get (r,
"ext", 0);
oident *ent = oid_getentbyoid(ext->direct_reference);
@@ -979,6 +967,24 @@
retval_grs1 (return_value, rec);
odr_destroy (odr);
}
+ }
+ else
+ {
+ int rlen;
+ const char *info = ZOOM_record_get (r, type, &rlen);
+
+ if (rlen <= 0)
+ {
+ return_value->value.str.len = 0;
+ return_value->value.str.val = "";
+ }
+ else
+ {
+ return_value->value.str.len = rlen;
+ return_value->value.str.val =
+ estrndup(info, return_value->value.str.len);
+ }
+ return_value->type = IS_STRING;
}
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php