* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
}
p->u.octet_aligned->len = p->u.octet_aligned->size = len;
memcpy(p->u.octet_aligned->buf, buf, len);
}
p->u.octet_aligned->len = p->u.octet_aligned->size = len;
memcpy(p->u.octet_aligned->buf, buf, len);
pc->which = Z_PrivateCharacterSet_externallySpecified;
pc->u.externallySpecified =
z_ext_record2(o, CLASS_NEGOT, VAL_ID_CHARSET, charset);
pc->which = Z_PrivateCharacterSet_externallySpecified;
pc->u.externallySpecified =
z_ext_record2(o, CLASS_NEGOT, VAL_ID_CHARSET, charset);
static Z_OriginProposal *z_get_OriginProposal(
ODR o, const char **charsets, int num_charsets,
const char **langs, int num_langs, int selected)
static Z_OriginProposal *z_get_OriginProposal(
ODR o, const char **charsets, int num_charsets,
const char **langs, int num_langs, int selected)
memset(p, 0, sizeof(*p));
p->recordsInSelectedCharSets = (bool_t *)odr_malloc(o, sizeof(bool_t));
*p->recordsInSelectedCharSets = (selected) ? 1:0;
memset(p, 0, sizeof(*p));
p->recordsInSelectedCharSets = (bool_t *)odr_malloc(o, sizeof(bool_t));
*p->recordsInSelectedCharSets = (selected) ? 1:0;
z_get_OriginProposal_0(o, charsets[i]);
}
if (langs && num_langs) {
z_get_OriginProposal_0(o, charsets[i]);
}
if (langs && num_langs) {
(Z_CharSetandLanguageNegotiation *) odr_malloc(o, sizeof(*p));
memset(p, 0, sizeof(*p));
(Z_CharSetandLanguageNegotiation *) odr_malloc(o, sizeof(*p));
memset(p, 0, sizeof(*p));
/* used by yaz_set_response_charneg */
static Z_TargetResponse *z_get_TargetResponse(ODR o, const char *charset,
const char *lang, int selected)
/* used by yaz_set_response_charneg */
static Z_TargetResponse *z_get_TargetResponse(ODR o, const char *charset,
const char *lang, int selected)
Z_TargetResponse *p = (Z_TargetResponse *) odr_malloc(o, sizeof(*p));
int form = get_form(charset);
Z_TargetResponse *p = (Z_TargetResponse *) odr_malloc(o, sizeof(*p));
int form = get_form(charset);
(Z_PrivateCharacterSet *)odr_malloc(o, sizeof(*pc));
memset(pc, 0, sizeof(*pc));
(Z_PrivateCharacterSet *)odr_malloc(o, sizeof(*pc));
memset(pc, 0, sizeof(*pc));
- z_ext_record2(o, CLASS_NEGOT, VAL_ID_CHARSET, charset);
+ z_ext_record2(o, CLASS_NEGOT, VAL_ID_CHARSET, charset);
}
p->recordsInSelectedCharSets = (bool_t *)odr_malloc(o, sizeof(bool_t));
*p->recordsInSelectedCharSets = (selected) ? 1:0;
}
p->recordsInSelectedCharSets = (bool_t *)odr_malloc(o, sizeof(bool_t));
*p->recordsInSelectedCharSets = (selected) ? 1:0;
if ((p->list[i]->which == Z_OtherInfo_externallyDefinedInfo) &&
(pext = p->list[i]->information.externallyDefinedInfo)) {
if ((p->list[i]->which == Z_OtherInfo_externallyDefinedInfo) &&
(pext = p->list[i]->information.externallyDefinedInfo)) {
if (((*p)->list[i]->which == Z_OtherInfo_externallyDefinedInfo) &&
(pext = (*p)->list[i]->information.externallyDefinedInfo)) {
if (((*p)->list[i]->which == Z_OtherInfo_externallyDefinedInfo) &&
(pext = (*p)->list[i]->information.externallyDefinedInfo)) {
- && ent->oclass == CLASS_NEGOT
- && pext->which == Z_External_charSetandLanguageNegotiation)
- {
- --((*p)->num_elements);
- if ((*p)->num_elements == 0)
- *p = 0;
- else
- {
- for(; i < (*p)->num_elements; i++)
- (*p)->list[i] = (*p)->list[i+1];
- }
- return 1;
+ && ent->oclass == CLASS_NEGOT
+ && pext->which == Z_External_charSetandLanguageNegotiation)
+ {
+ --((*p)->num_elements);
+ if ((*p)->num_elements == 0)
+ *p = 0;
+ else
+ {
+ for(; i < (*p)->num_elements; i++)
+ (*p)->list[i] = (*p)->list[i+1];
+ }
+ return 1;
char **charset, char **lang, int *selected)
{
Z_TargetResponse *res = p->u.response;
char **charset, char **lang, int *selected)
{
Z_TargetResponse *res = p->u.response;
if (charset && res->which == Z_TargetResponse_private &&
res->u.zprivate->which == Z_PrivateCharacterSet_externallySpecified) {
if (charset && res->which == Z_TargetResponse_private &&
res->u.zprivate->which == Z_PrivateCharacterSet_externallySpecified) {
memcpy (*charset, pext->u.octet_aligned->buf,
pext->u.octet_aligned->len);
(*charset)[pext->u.octet_aligned->len] = 0;
memcpy (*charset, pext->u.octet_aligned->buf,
pext->u.octet_aligned->len);
(*charset)[pext->u.octet_aligned->len] = 0;
}
if (charset && res->which == Z_TargetResponse_iso10646)
*charset = set_form (res->u.iso10646->encodingLevel);
}
if (charset && res->which == Z_TargetResponse_iso10646)
*charset = set_form (res->u.iso10646->encodingLevel);