X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zoom%2Fzrec.cpp;h=8537718f6644e92651ed0f27c85640cd1e0bf5d9;hb=6f5ccb50083cdd9e1fd3dd136f22751f24c5839e;hp=18e34be431ef823b94451b90f55e6e568579e30f;hpb=8e0f7888835eb1a84882b440209ec125ce5856c1;p=yazpp-moved-to-github.git diff --git a/zoom/zrec.cpp b/zoom/zrec.cpp index 18e34be..8537718 100644 --- a/zoom/zrec.cpp +++ b/zoom/zrec.cpp @@ -1,9 +1,9 @@ -// $Header: /home/cvsroot/yaz++/zoom/zrec.cpp,v 1.1 2002-08-08 13:31:54 mike Exp $ +// $Header: /home/cvsroot/yaz++/zoom/zrec.cpp,v 1.4 2002-10-09 09:07:10 mike Exp $ // Z39.50 Record class -#include "zoom++.h" -#include // for strcasecmp() +#include "zoom.h" +#include // for yaz_matchstr() namespace ZOOM { @@ -23,7 +23,7 @@ namespace ZOOM { record *rec = new record(0, 0); if ((rec->r = ZOOM_record_clone(r)) == 0) { // Presumably an out-of-memory error - throw systemError(); + throw systemException(); } return rec; @@ -39,19 +39,19 @@ namespace ZOOM { const char *syn = ZOOM_record_get(r, "syntax", 0); // These string constants are from yaz/util/oid.c - if (!strcasecmp(syn, "xml")) + if (!yaz_matchstr(syn, "xml")) return XML; - else if (!strcasecmp(syn, "GRS-1")) + else if (!yaz_matchstr(syn, "GRS-1")) return GRS1; - else if (!strcasecmp(syn, "SUTRS")) + else if (!yaz_matchstr(syn, "SUTRS")) return SUTRS; - else if (!strcasecmp(syn, "USmarc")) + else if (!yaz_matchstr(syn, "USmarc")) return USMARC; - else if (!strcasecmp(syn, "UKmarc")) + else if (!yaz_matchstr(syn, "UKmarc")) return UKMARC; - else if (!strcasecmp(syn, "XML") || - !strcasecmp(syn, "text-XML") || - !strcasecmp(syn, "application-XML")) + else if (!yaz_matchstr(syn, "XML") || + !yaz_matchstr(syn, "text-XML") || + !yaz_matchstr(syn, "application-XML")) return XML; return UNKNOWN;