-/*
- * Copyright (C) 1995-2007, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
- *
- * $Id: charneg.c,v 1.8 2007-04-12 13:52:57 adam Exp $
*/
/**
p->descriptor = 0;
p->indirect_reference = 0;
- p->direct_reference = yaz_string_to_oid_odr(yaz_oid_std(),
- CLASS_NEGOT,
- OID_STR_ID_CHARSET,
- o);
+ p->direct_reference = odr_oiddup(o, yaz_oid_negot_charset_id);
p->which = Z_External_octet;
if (!(p->u.octet_aligned = (Odr_oct *)odr_malloc(o, sizeof(Odr_oct)))) {
p->descriptor = 0;
p->indirect_reference = 0;
- p->direct_reference = yaz_string_to_oid_odr(yaz_oid_std(),
- CLASS_NEGOT,
- OID_STR_CHARNEG_3,
- o);
+ p->direct_reference = odr_oiddup(o, yaz_oid_negot_charset_3);
p->which = Z_External_charSetandLanguageNegotiation;
p->u.charNeg3 = z_get_CharSetandLanguageNegotiation(o);
p->descriptor = 0;
p->indirect_reference = 0;
- p->direct_reference = yaz_string_to_oid_odr(yaz_oid_std(),
- CLASS_NEGOT,
- OID_STR_CHARNEG_3,
- o);
+ p->direct_reference = odr_oiddup(o, yaz_oid_negot_charset_3);
p->which = Z_External_charSetandLanguageNegotiation;
p->u.charNeg3 = z_get_CharSetandLanguageNegotiation(o);
Z_External *pext;
if ((p->list[i]->which == Z_OtherInfo_externallyDefinedInfo) &&
(pext = p->list[i]->information.externallyDefinedInfo)) {
-
- int oclass;
- const char *name = yaz_oid_to_string(yaz_oid_std(),
- pext->direct_reference,
- &oclass);
-
- if (oclass == CLASS_NEGOT
- && name && !strcmp(name, OID_STR_CHARNEG_3)
+
+ if (!oid_oidcmp(pext->direct_reference, yaz_oid_negot_charset_3)
&& pext->which == Z_External_charSetandLanguageNegotiation)
{
return pext->u.charNeg3;
if (((*p)->list[i]->which == Z_OtherInfo_externallyDefinedInfo) &&
(pext = (*p)->list[i]->information.externallyDefinedInfo))
{
- int oclass;
- const char *name = yaz_oid_to_string(yaz_oid_std(),
- pext->direct_reference,
- &oclass);
-
- if (oclass == CLASS_NEGOT
- && name && !strcmp(name, OID_STR_CHARNEG_3)
+ if (!oid_oidcmp(pext->direct_reference, yaz_oid_negot_charset_3)
&& pext->which == Z_External_charSetandLanguageNegotiation)
{
if ((*p)->num_elements <= 1)
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab