Possible compatibility problems with earlier versions marked with '*'.
+--- XXXXXX XXXX/XX/XX
+
+Various changes to retrieval module.
+
+Changed the union discriminators of the protocol files from enums to
+ints paired with #defines.
+
+Improved Explain decoders/encoders.
+
--- 1.0pl2 1995/12/6
Memory bug in log module fixed.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zget.c,v $
- * Revision 1.9 1995-09-29 17:11:55 quinn
+ * Revision 1.10 1996-01-02 08:57:23 quinn
+ * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
+ *
+ * Revision 1.9 1995/09/29 17:11:55 quinn
* Smallish
*
* Revision 1.8 1995/09/27 15:02:43 quinn
return r;
}
-Z_APDU *zget_APDU(ODR o, enum Z_APDU_which which)
+Z_APDU *zget_APDU(ODR o, int which)
{
Z_APDU *r = odr_malloc(o, sizeof(*r));
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: client.c,v $
- * Revision 1.28 1995-12-14 11:09:31 quinn
+ * Revision 1.29 1996-01-02 08:57:25 quinn
+ * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
+ *
+ * Revision 1.28 1995/12/14 11:09:31 quinn
* Added Explain record syntax to the format command.
*
* Revision 1.27 1995/12/12 16:37:02 quinn
static Z_InitResponse *session = 0; /* session parameters */
static char last_scan[512] = "0";
static char last_cmd[100] = "?";
+static oid_value attributeset = VAL_BIB1;
+
#ifdef RPN_QUERY
#ifndef PREFIX_QUERY
static CCL_bibset bibset; /* CCL bibset handle */
r = p->u.defaultFormat;
#endif
if (!(ent = oid_getentbyoid(r->diagnosticSetId)) ||
- ent->class != CLASS_DIAGSET || ent->value != VAL_BIB1)
+ ent->oclass != CLASS_DIAGSET || ent->value != VAL_BIB1)
printf("Missing or unknown diagset\n");
printf(" [%d] %s", *r->condition, diagbib1_str(*r->condition));
if (r->addinfo && *r->addinfo)
oident prefsyn;
prefsyn.proto = protocol;
- prefsyn.class = CLASS_RECSYN;
+ prefsyn.oclass = CLASS_RECSYN;
prefsyn.value = recordsyntax;
req->preferredRecordSyntax = odr_oiddup(out, oid_getoidbyent(&prefsyn));
req->smallSetElementSetNames =
}
#endif
bib1.proto = protocol;
- bib1.class = CLASS_ATTSET;
+ bib1.oclass = CLASS_ATTSET;
bib1.value = VAL_BIB1;
RPNquery->attributeSetId = oid_getoidbyent(&bib1);
query.u.type_1 = RPNquery;
req->resultSetStartPoint = &setno;
req->numberOfRecordsRequested = &nos;
prefsyn.proto = protocol;
- prefsyn.class = CLASS_RECSYN;
+ prefsyn.oclass = CLASS_RECSYN;
prefsyn.value = recordsyntax;
req->preferredRecordSyntax = oid_getoidbyent(&prefsyn);
if (elementSetNames)
req->num_databaseNames = 1;
req->databaseNames = &db;
attset.proto = protocol;
- attset.class = CLASS_ATTSET;
+ attset.oclass = CLASS_ATTSET;
attset.value = VAL_BIB1;
req->attributeSet = oid_getoidbyent(&attset);
req->termListAndStartPoint = p_query_scan(out, string);
return 1;
}
+int cmd_attributeset(char *arg)
+{
+ char what[100];
+ oid_value v;
+
+ if (!arg || !*arg)
+ {
+ printf("Usage: attributeset <setname>\n");
+ return 0;
+ }
+ sscanf(arg, "%s", what);
+ if ((v = oid_getvalbyname(what)) == VAL_NONE)
+ {
+ printf("Unknown attribute set name\n");
+ return 0;
+ }
+ attributeset = v;
+ return 1;
+}
+
int cmd_close(char *arg)
{
Z_APDU *apdu = zget_APDU(out, Z_APDU_close);
{"format", cmd_format, "<recordsyntax>"},
{"elements", cmd_elements, "<elementSetName>"},
{"close", cmd_close, ""},
+ {"attributeset", cmd_attributeset, "<attrset>"},
{0,0}
};
char *netbuffer= 0;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: xmosi.c,v $
- * Revision 1.8 1995-11-01 13:54:29 quinn
+ * Revision 1.9 1996-01-02 08:57:28 quinn
+ * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
+ *
+ * Revision 1.8 1995/11/01 13:54:29 quinn
* Minor adjustments
*
* Revision 1.7 1995/10/30 12:41:17 quinn
char *str;
ent.proto = proto;
- ent.class = class;
+ ent.oclass = class;
ent.value = value;
if (!(oid = oid_getoidbyent(&ent)))
return -1;
* OF THIS SOFTWARE.
*
* $Log: oid.h,v $
- * Revision 1.10 1995-11-13 09:27:31 quinn
+ * Revision 1.11 1996-01-02 08:57:30 quinn
+ * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
+ *
+ * Revision 1.10 1995/11/13 09:27:31 quinn
* Fiddling with the variant stuff.
*
* Revision 1.9 1995/10/12 10:34:45 quinn
#include <yconfig.h>
#define OID_SIZE 100
+
+typedef enum oid_proto
+{
+ PROTO_Z3950,
+ PROTO_SR,
+ PROTO_GENERAL
+} oid_proto;
+
+typedef enum oid_class
+{
+ CLASS_APPCTX,
+ CLASS_ABSYN,
+ CLASS_ATTSET,
+ CLASS_TRANSYN,
+ CLASS_DIAGSET,
+ CLASS_RECSYN,
+ CLASS_RESFORM,
+ CLASS_ACCFORM,
+ CLASS_EXTSERV,
+ CLASS_USERINFO,
+ CLASS_ELEMSPEC,
+ CLASS_VARSET,
+ CLASS_SCHEMA,
+ CLASS_TAGSET
+} oid_class;
+
+typedef enum oid_value
+{
+ VAL_APDU,
+ VAL_BER,
+ VAL_BASIC_CTX,
+ VAL_BIB1,
+ VAL_EXP1,
+ VAL_EXT1,
+ VAL_CCL1,
+ VAL_GILS,
+ VAL_WAIS,
+ VAL_STAS,
+ VAL_DIAG1,
+ VAL_ISO2709,
+ VAL_UNIMARC,
+ VAL_INTERMARC,
+ VAL_CCF,
+ VAL_USMARC,
+ VAL_UKMARC,
+ VAL_NORMARC,
+ VAL_LIBRISMARC,
+ VAL_DANMARC,
+ VAL_FINMARC,
+ VAL_MAB,
+ VAL_CANMARC,
+ VAL_SBN,
+ VAL_PICAMARC,
+ VAL_AUSMARC,
+ VAL_IBERMARC,
+ VAL_EXPLAIN,
+ VAL_SUTRS,
+ VAL_OPAC,
+ VAL_SUMMARY,
+ VAL_GRS0,
+ VAL_GRS1,
+ VAL_EXTENDED,
+ VAL_RESOURCE1,
+ VAL_RESOURCE2,
+ VAL_PROMPT1,
+ VAL_DES1,
+ VAL_KRB1,
+ VAL_PRESSET,
+ VAL_PQUERY,
+ VAL_PCQUERY,
+ VAL_ITEMORDER,
+ VAL_DBUPDATE,
+ VAL_EXPORTSPEC,
+ VAL_EXPORTINV,
+ VAL_NONE,
+ VAL_SETM,
+ VAL_SETG,
+ VAL_VAR1,
+ VAL_ESPEC1
+} oid_value;
typedef struct oident
{
- enum oid_proto
- {
- PROTO_Z3950,
- PROTO_SR,
- PROTO_GENERAL
- } proto;
- enum oid_class
- {
- CLASS_APPCTX,
- CLASS_ABSYN,
- CLASS_ATTSET,
- CLASS_TRANSYN,
- CLASS_DIAGSET,
- CLASS_RECSYN,
- CLASS_RESFORM,
- CLASS_ACCFORM,
- CLASS_EXTSERV,
- CLASS_USERINFO,
- CLASS_ELEMSPEC,
- CLASS_VARSET,
- CLASS_SCHEMA,
- CLASS_TAGSET
- } class;
- enum oid_value
- {
- VAL_APDU,
- VAL_BER,
- VAL_BASIC_CTX,
- VAL_BIB1,
- VAL_EXP1,
- VAL_EXT1,
- VAL_CCL1,
- VAL_GILS,
- VAL_WAIS,
- VAL_STAS,
- VAL_DIAG1,
- VAL_ISO2709,
- VAL_UNIMARC,
- VAL_INTERMARC,
- VAL_CCF,
- VAL_USMARC,
- VAL_UKMARC,
- VAL_NORMARC,
- VAL_LIBRISMARC,
- VAL_DANMARC,
- VAL_FINMARC,
- VAL_MAB,
- VAL_CANMARC,
- VAL_SBN,
- VAL_PICAMARC,
- VAL_AUSMARC,
- VAL_IBERMARC,
- VAL_EXPLAIN,
- VAL_SUTRS,
- VAL_OPAC,
- VAL_SUMMARY,
- VAL_GRS0,
- VAL_GRS1,
- VAL_EXTENDED,
- VAL_RESOURCE1,
- VAL_RESOURCE2,
- VAL_PROMPT1,
- VAL_DES1,
- VAL_KRB1,
- VAL_PRESSET,
- VAL_PQUERY,
- VAL_PCQUERY,
- VAL_ITEMORDER,
- VAL_DBUPDATE,
- VAL_EXPORTSPEC,
- VAL_EXPORTINV,
- VAL_NONE,
- VAL_SETM,
- VAL_SETG,
- VAL_VAR1,
- VAL_ESPEC1
- } value;
+ oid_proto proto;
+ oid_class oclass;
+ oid_value value;
int oidsuffix[20];
char *desc;
} oident;
-typedef enum oid_proto oid_proto;
-typedef enum oid_class oid_class;
-typedef enum oid_value oid_value;
-
int *oid_getoidbyent(struct oident *ent);
struct oident *oid_getentbyoid(int *o);
void oid_oidcpy(int *t, int *s);
* OF THIS SOFTWARE.
*
* $Log: proto.h,v $
- * Revision 1.27 1995-10-12 10:34:46 quinn
+ * Revision 1.28 1996-01-02 08:57:32 quinn
+ * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
+ *
+ * Revision 1.27 1995/10/12 10:34:46 quinn
* Added Espec-1.
*
* Revision 1.26 1995/09/29 17:12:08 quinn
typedef struct Z_OtherInformationUnit
{
Z_InfoCategory *category; /* OPTIONAL */
- enum
- {
- Z_OtherInfo_characterInfo,
- Z_OtherInfo_binaryInfo,
- Z_OtherInfo_externallyDefinedInfo,
- Z_OtherInfo_oid
- } which;
+ int which;
+#define Z_OtherInfo_characterInfo 0
+#define Z_OtherInfo_binaryInfo 1
+#define Z_OtherInfo_externallyDefinedInfo 2
+#define Z_OtherInfo_oid 3
union
{
char *characterInfo;
typedef struct Z_StringOrNumeric
{
- enum
- {
- Z_StringOrNumeric_string,
- Z_StringOrNumeric_numeric
- } which;
+ int which;
+#define Z_StringOrNumeric_string 0
+#define Z_StringOrNumeric_numeric 1
union
{
char *string;
typedef struct Z_IdAuthentication
{
- enum
- {
- Z_IdAuthentication_open,
- Z_IdAuthentication_idPass,
- Z_IdAuthentication_anonymous,
- Z_IdAuthentication_other
- } which;
+ int which;
+#define Z_IdAuthentication_open 0
+#define Z_IdAuthentication_idPass 1
+#define Z_IdAuthentication_anonymous 2
+#define Z_IdAuthentication_other 3
union
{
char *open;
#endif
int *attributeType;
#ifdef Z_95
- enum
- {
- Z_AttributeValue_numeric,
- Z_AttributeValue_complex
- } which;
+ int which;
+#define Z_AttributeValue_numeric 0
+#define Z_AttributeValue_complex 1
union
{
int *numeric;
typedef struct Z_Term
{
- enum
- {
- Z_Term_general,
- Z_Term_numeric,
- Z_Term_characterString,
- Z_Term_oid,
- Z_Term_dateTime,
- Z_Term_external,
- Z_Term_integerAndUnit,
- Z_Term_null
- } which;
+ int which;
+#define Z_Term_general 0
+#define Z_Term_numeric 1
+#define Z_Term_characterString 2
+#define Z_Term_oid 3
+#define Z_Term_dateTime 4
+#define Z_Term_external 5
+#define Z_Term_integerAndUnit 6
+#define Z_Term_null 7
union
{
Odr_oct *general; /* this is required for v2 */
#define Z_Prox_greaterThanOrEqual 4
#define Z_Prox_greaterThan 5
#define Z_Prox_notEqual 6
- enum
- {
- Z_ProxCode_known,
- Z_ProxCode_private
- } which;
+ int which;
+#define Z_ProxCode_known 0
+#define Z_ProxCode_private 1
int *proximityUnitCode;
#define Z_ProxUnit_character 1
#define Z_ProxUnit_word 2
typedef struct Z_Operator
{
- enum
- {
- Z_Operator_and,
- Z_Operator_or,
- Z_Operator_and_not,
- Z_Operator_prox
- } which;
+ int which;
+#define Z_Operator_and 0
+#define Z_Operator_or 1
+#define Z_Operator_and_not 2
+#define Z_Operator_prox 3
union
{
Odr_null *and; /* these guys are nulls. */
typedef struct Z_Operand
{
- enum
- {
- Z_Operand_APT,
- Z_Operand_resultSetId,
- Z_Operand_resultAttr /* v3 only */
- } which;
+ int which;
+#define Z_Operand_APT 0
+#define Z_Operand_resultSetId 1
+#define Z_Operand_resultAttr /* v3 only */ 2
union
{
Z_AttributesPlusTerm *attributesPlusTerm;
typedef struct Z_RPNStructure
{
- enum
- {
- Z_RPNStructure_simple,
- Z_RPNStructure_complex
- } which;
+ int which;
+#define Z_RPNStructure_simple 0
+#define Z_RPNStructure_complex 1
union
{
Z_Operand *simple;
typedef struct Z_Query
{
- enum
- {
- Z_Query_type_1 = 1,
- Z_Query_type_2,
- Z_Query_type_101
- }
- which;
+ int which;
+#define Z_Query_type_1 1
+#define Z_Query_type_2 2
+#define Z_Query_type_101 3
union
{
Z_RPNQuery *type_1;
int *condition;
/* until the whole character set issue becomes more definite,
* you can probably ignore this on input. */
- enum
- {
- Z_DiagForm_v2AddInfo,
- Z_DiagForm_v3AddInfo
- } which;
+ int which;
+#define Z_DiagForm_v2AddInfo 0
+#define Z_DiagForm_v3AddInfo 1
char *addinfo;
} Z_DefaultDiagFormat;
typedef struct Z_DiagRec
{
- enum
- {
- Z_DiagRec_defaultFormat,
- Z_DiagRec_externallyDefined
- } which;
+ int which;
+#define Z_DiagRec_defaultFormat 0
+#define Z_DiagRec_externallyDefined 1
union
{
Z_DefaultDiagFormat *defaultFormat;
typedef struct Z_NamePlusRecord
{
char *databaseName; /* OPTIONAL */
- enum
- {
- Z_NamePlusRecord_databaseRecord,
- Z_NamePlusRecord_surrogateDiagnostic
- }
- which;
+ int which;
+#define Z_NamePlusRecord_databaseRecord 0
+#define Z_NamePlusRecord_surrogateDiagnostic 1
union
{
Z_DatabaseRecord *databaseRecord;
typedef struct Z_Records
{
- enum
- {
- Z_Records_DBOSD,
- Z_Records_NSD,
- Z_Records_multipleNSD
- } which;
+ int which;
+#define Z_Records_DBOSD 0
+#define Z_Records_NSD 1
+#define Z_Records_multipleNSD 2
union
{
Z_NamePlusRecordList *databaseOrSurDiagnostics;
typedef struct Z_ElementSpec
{
- enum
- {
- Z_ElementSpec_elementSetName,
- Z_ElementSpec_externalSpec
- } which;
+ int which;
+#define Z_ElementSpec_elementSetName 0
+#define Z_ElementSpec_externalSpec 1
union
{
char *elementSetName;
typedef struct Z_RecordComposition
{
- enum
- {
- Z_RecordComp_simple,
- Z_RecordComp_complex
- } which;
+ int which;
+#define Z_RecordComp_simple 0
+#define Z_RecordComp_complex 1
union
{
Z_ElementSetNames *simple;
typedef struct Z_AccessControlRequest
{
Z_ReferenceId *referenceId; /* OPTIONAL */
- enum
- {
- Z_AccessRequest_simpleForm,
- Z_AccessRequest_externallyDefined
- } which;
+ int which;
+#define Z_AccessRequest_simpleForm 0
+#define Z_AccessRequest_externallyDefined 1
union
{
Odr_oct *simpleForm;
typedef struct Z_AccessControlResponse
{
Z_ReferenceId *referenceId; /* OPTIONAL */
- enum
- {
- Z_AccessResponse_simpleForm,
- Z_AccessResponse_externallyDefined
- } which;
+ int which;
+#define Z_AccessResponse_simpleForm 0
+#define Z_AccessResponse_externallyDefined 1
union
{
Odr_oct *simpleForm;
{
Z_AttributeList *attributes;
#if 0
- enum
- {
- Z_OByAtt_global,
- Z_ObyAtt_byDatabase
- } which;
+ int which;
+#define Z_OByAtt_global 0
+#define Z_ObyAtt_byDatabase 1
union
{
#endif
typedef struct Z_Entry
{
- enum
- {
- Z_Entry_termInfo,
- Z_Entry_surrogateDiagnostic
- } which;
+ int which;
+#define Z_Entry_termInfo 0
+#define Z_Entry_surrogateDiagnostic 1
union
{
Z_TermInfo *termInfo;
typedef struct Z_ListEntries
{
- enum
- {
- Z_ListEntries_entries,
- Z_ListEntries_nonSurrogateDiagnostics
- } which;
+ int which;
+#define Z_ListEntries_entries 0
+#define Z_ListEntries_nonSurrogateDiagnostics 1
union
{
Z_Entries *entries;
typedef struct Z_APDU
{
- enum Z_APDU_which
- {
- Z_APDU_initRequest,
- Z_APDU_initResponse,
- Z_APDU_searchRequest,
- Z_APDU_searchResponse,
- Z_APDU_presentRequest,
- Z_APDU_presentResponse,
- Z_APDU_deleteResultSetRequest,
- Z_APDU_deleteResultSetResponse,
- Z_APDU_resourceControlRequest,
- Z_APDU_resourceControlResponse,
- Z_APDU_triggerResourceControlRequest,
- Z_APDU_scanRequest,
- Z_APDU_scanResponse,
- Z_APDU_segmentRequest,
- Z_APDU_extendedServicesRequest,
- Z_APDU_extendedServicesResponse,
- Z_APDU_close
- } which;
+ int which;
+#define Z_APDU_initRequest 0
+#define Z_APDU_initResponse 1
+#define Z_APDU_searchRequest 2
+#define Z_APDU_searchResponse 3
+#define Z_APDU_presentRequest 4
+#define Z_APDU_presentResponse 5
+#define Z_APDU_deleteResultSetRequest 6
+#define Z_APDU_deleteResultSetResponse 7
+#define Z_APDU_resourceControlRequest 8
+#define Z_APDU_resourceControlResponse 9
+#define Z_APDU_triggerResourceControlRequest 10
+#define Z_APDU_scanRequest 11
+#define Z_APDU_scanResponse 12
+#define Z_APDU_segmentRequest 13
+#define Z_APDU_extendedServicesRequest 14
+#define Z_APDU_extendedServicesResponse 15
+#define Z_APDU_close 16
union
{
Z_InitRequest *initRequest;
int z_DiagRec(ODR o, Z_DiagRec **p, int opt);
int z_AttributeList(ODR o, Z_AttributeList **p, int opt);
int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt);
-Z_APDU *zget_APDU(ODR o, enum Z_APDU_which which);
+Z_APDU *zget_APDU(ODR o, int which);
#include <prt-rsc.h>
#include <prt-acc.h>
* OF THIS SOFTWARE.
*
* $Log: prt-acc.h,v $
- * Revision 1.5 1995-09-29 17:12:09 quinn
+ * Revision 1.6 1996-01-02 08:57:35 quinn
+ * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
+ *
+ * Revision 1.5 1995/09/29 17:12:09 quinn
* Smallish
*
* Revision 1.4 1995/09/27 15:02:49 quinn
typedef struct Z_PromptId1
{
- enum
- {
- Z_PromptId1_enumeratedPrompt,
- Z_PromptId1_nonEnumeratedPrompt
- } which;
+ int which;
+#define Z_PromptId1_enumeratedPrompt 0
+#define Z_PromptId1_nonEnumeratedPrompt 1
union
{
Z_EnumeratedPrompt1 *enumeratedPrompt;
typedef struct Z_PromptInfo1
{
- enum
- {
- Z_Challenge1_character,
- Z_Challenge1_encrypted
- } which;
+ int which;
+#define Z_Challenge1_character 0
+#define Z_Challenge1_encrypted 1
union
{
char *character;
typedef struct Z_ResponseUnit1
{
Z_PromptId1 *promptId;
- enum
- {
- Z_Response1_string,
- Z_Response1_accept,
- Z_Response1_acknowledge,
- Z_Response1_diagnostic,
- Z_Response1_encrypted
- } which;
+ int which;
+#define Z_Response1_string 0
+#define Z_Response1_accept 1
+#define Z_Response1_acknowledge 2
+#define Z_Response1_diagnostic 3
+#define Z_Response1_encrypted 4
union
{
char *string;
typedef struct Z_PromptObject1
{
- enum
- {
- Z_PromptObject1_challenge,
- Z_PromptObject1_response
- } which;
+ int which;
+#define Z_PromptObject1_challenge 0
+#define Z_PromptObject1_response 1
union
{
Z_Challenge1 *challenge;
typedef struct Z_Proximity
{
- enum
- {
- Z_Proximity_resultSets,
- Z_Proximity_badSet,
- Z_Proximity_relation,
- Z_Proximity_unit,
- Z_Proximity_distance,
- Z_Proximity_attributes,
- Z_Proximity_ordered,
- Z_Proximity_exclusion
- } which;
+ int which;
+#define Z_Proximity_resultSets 0
+#define Z_Proximity_badSet 1
+#define Z_Proximity_relation 2
+#define Z_Proximity_unit 3
+#define Z_Proximity_distance 4
+#define Z_Proximity_attributes 5
+#define Z_Proximity_ordered 6
+#define Z_Proximity_exclusion 7
union
{
Odr_null *resultSets;
typedef struct Z_Scan
{
- enum
- {
- Z_ScanD_nonZeroStepSize,
- Z_ScanD_specifiedStepSize,
- Z_ScanD_termList1,
- Z_ScanD_termList2,
- Z_ScanD_posInResponse,
- Z_ScanD_resources,
- Z_ScanD_endOfList
- } which;
+ int which;
+#define Z_ScanD_nonZeroStepSize 0
+#define Z_ScanD_specifiedStepSize 1
+#define Z_ScanD_termList1 2
+#define Z_ScanD_termList2 3
+#define Z_ScanD_posInResponse 4
+#define Z_ScanD_resources 5
+#define Z_ScanD_endOfList 6
union
{
Odr_null *nonZeroStepSize;
typedef struct Z_Sort
{
- enum
- {
- Z_SortD_sequence,
- Z_SortD_noRsName,
- Z_SortD_tooMany,
- Z_SortD_incompatible,
- Z_SortD_generic,
- Z_SortD_dbSpecific,
- Z_SortD_sortElement,
- Z_SortD_key,
- Z_SortD_action,
- Z_SortD_illegal,
- Z_SortD_inputTooLarge,
- Z_SortD_aggregateTooLarge
- } which;
+ int which;
+#define Z_SortD_sequence 0
+#define Z_SortD_noRsName 1
+#define Z_SortD_tooMany 2
+#define Z_SortD_incompatible 3
+#define Z_SortD_generic 4
+#define Z_SortD_dbSpecific 5
+#define Z_SortD_sortElement 6
+#define Z_SortD_key 7
+#define Z_SortD_action 8
+#define Z_SortD_illegal 9
+#define Z_SortD_inputTooLarge 10
+#define Z_SortD_aggregateTooLarge 11
union
{
Odr_null *sequence;
typedef struct Z_Segmentation
{
- enum
- {
- Z_SegmentationD_segments
- } which;
+ int which;
+#define Z_SegmentationD_segments 0
union
{
Odr_null *segments;
typedef struct Z_ExtServices
{
- enum
- {
- Z_ExtServicesD_req,
- Z_ExtServicesD_permission,
- Z_ExtServicesD_immediate
- } which;
+ int which;
+#define Z_ExtServicesD_req 0
+#define Z_ExtServicesD_permission 1
+#define Z_ExtServicesD_immediate 2
union
{
int *req;
typedef struct Z_AccessCtrl
{
- enum
- {
- Z_AccessCtrlD_noUser,
- Z_AccessCtrlD_refused,
- Z_AccessCtrlD_simple,
- Z_AccessCtrlD_oid,
- Z_AccessCtrlD_alternative,
- Z_AccessCtrlD_pwdInv,
- Z_AccessCtrlD_pwdExp
- } which;
+ int which;
+#define Z_AccessCtrlD_noUser 0
+#define Z_AccessCtrlD_refused 1
+#define Z_AccessCtrlD_simple 2
+#define Z_AccessCtrlD_oid 3
+#define Z_AccessCtrlD_alternative 4
+#define Z_AccessCtrlD_pwdInv 5
+#define Z_AccessCtrlD_pwdExp 6
union
{
Odr_null *noUser;
typedef struct Z_DiagFormat
{
- enum
- {
- Z_DiagFormat_tooMany,
- Z_DiagFormat_badSpec,
- Z_DiagFormat_dbUnavail,
- Z_DiagFormat_unSupOp,
- Z_DiagFormat_attribute,
- Z_DiagFormat_attCombo,
- Z_DiagFormat_term,
- Z_DiagFormat_proximity,
- Z_DiagFormat_scan,
- Z_DiagFormat_sort,
- Z_DiagFormat_segmentation,
- Z_DiagFormat_extServices,
- Z_DiagFormat_accessCtrl,
- Z_DiagFormat_recordSyntax
- } which;
+ int which;
+#define Z_DiagFormat_tooMany 0
+#define Z_DiagFormat_badSpec 1
+#define Z_DiagFormat_dbUnavail 2
+#define Z_DiagFormat_unSupOp 3
+#define Z_DiagFormat_attribute 4
+#define Z_DiagFormat_attCombo 5
+#define Z_DiagFormat_term 6
+#define Z_DiagFormat_proximity 7
+#define Z_DiagFormat_scan 8
+#define Z_DiagFormat_sort 9
+#define Z_DiagFormat_segmentation 10
+#define Z_DiagFormat_extServices 11
+#define Z_DiagFormat_accessCtrl 12
+#define Z_DiagFormat_recordSyntax 13
union
{
Z_TooMany *tooMany;
typedef struct Z_Diagnostic
{
- enum
- {
- Z_Diagnostic_defaultDiagRec,
- Z_Diagnostic_explicitDiagnostic
- } which;
+ int which;
+#define Z_Diagnostic_defaultDiagRec 0
+#define Z_Diagnostic_explicitDiagnostic 1
union
{
Z_DefaultDiagFormat *defaultDiagRec;
typedef struct Z_Occurrences
{
- enum
- {
- Z_Occurrences_all,
- Z_Occurrences_last,
- Z_Occurrences_values
- } which;
+ int which;
+#define Z_Occurrences_all 0
+#define Z_Occurrences_last 1
+#define Z_Occurrences_values 2
union
{
Odr_null *all;
typedef struct Z_ETagUnit
{
- enum
- {
- Z_ETagUnit_specificTag,
- Z_ETagUnit_wildThing,
- Z_ETagUnit_wildPath
- } which;
+ int which;
+#define Z_ETagUnit_specificTag 0
+#define Z_ETagUnit_wildThing 1
+#define Z_ETagUnit_wildPath 2
union
{
Z_SpecificTag *specificTag;
typedef struct Z_CompositeElement
{
- enum
- {
- Z_CompoElement_primitives,
- Z_CompoElement_specs
- } which;
+ int which;
+#define Z_CompoElement_primitives 0
+#define Z_CompoElement_specs 1
union
{
Z_CompoPrimitives *primitives;
typedef struct Z_ElementRequest
{
- enum
- {
- Z_ERequest_simpleElement,
- Z_ERequest_compositeElement
- } which;
+ int which;
+#define Z_ERequest_simpleElement 0
+#define Z_ERequest_compositeElement 1
union
{
Z_SimpleElement *simpleElement;
typedef struct Z_IOBilling
{
- enum
- {
- Z_IOBilling_billInvoice,
- Z_IOBilling_prepay,
- Z_IOBilling_depositAccount,
- Z_IOBilling_creditCard,
- Z_IOBilling_cardInfoPreviouslySupplied,
- Z_IOBilling_privateKnown,
- Z_IOBilling_privateNotKnown
- } which;
+ int which;
+#define Z_IOBilling_billInvoice 0
+#define Z_IOBilling_prepay 1
+#define Z_IOBilling_depositAccount 2
+#define Z_IOBilling_creditCard 3
+#define Z_IOBilling_cardInfoPreviouslySupplied 4
+#define Z_IOBilling_privateKnown 5
+#define Z_IOBilling_privateNotKnown 6
union
{
Odr_null *noinfo;
typedef struct Z_ItemOrder
{
- enum
- {
- Z_ItemOrder_esRequest,
- Z_ItemOrder_taskPackage
- } which;
+ int which;
+#define Z_ItemOrder_esRequest 0
+#define Z_ItemOrder_taskPackage 1
union
{
Z_IORequest *esRequest;
typedef struct Z_IconObjectUnit
{
- enum
- {
- Z_IconObject_ianaType,
- Z_IconObject_z3950type,
- Z_IconObject_otherType
- } which;
+ int which;
+#define Z_IconObject_ianaType 0
+#define Z_IconObject_z3950type 1
+#define Z_IconObject_otherType 2
char *bodyType;
Odr_oct *content;
} Z_IconObjectUnit;
typedef struct Z_NetworkAddress
{
- enum
- {
- Z_NetworkAddress_iA,
- Z_NetworkAddress_oPA,
- Z_NetworkAddress_other
- } which;
+ int which;
+#define Z_NetworkAddress_iA 0
+#define Z_NetworkAddress_oPA 1
+#define Z_NetworkAddress_other 2
union
{
Z_NetworkAddressIA *internetAddress;
typedef struct Z_ProxSupportUnit
{
- enum
- {
- Z_ProxSupportUnit_known,
- Z_ProxSupportUnit_private
- } which;
+ int which;
+#define Z_ProxSupportUnit_known 0
+#define Z_ProxSupportUnit_private 1
union
{
int known;
typedef struct Z_QueryTypeDetails
{
- enum
- {
- Z_QueryTypeDetails_private,
- Z_QueryTypeDetails_rpn,
- Z_QueryTypeDetails_iso8777,
- Z_QueryTypeDetails_z3958,
- Z_QueryTypeDetails_erpn,
- Z_QueryTypeDetails_rankedList
- } which;
+ int which;
+#define Z_QueryTypeDetails_private 0
+#define Z_QueryTypeDetails_rpn 1
+#define Z_QueryTypeDetails_iso8777 2
+#define Z_QueryTypeDetails_z3958 3
+#define Z_QueryTypeDetails_erpn 4
+#define Z_QueryTypeDetails_rankedList 5
union
{
Z_PrivateCapabilities *private;
Odr_oid *attributeSet; /* OPTIONAL */
int *attributeType;
Odr_null *mustBeSupplied; /* OPTIONAL */
- enum
- {
- Z_AttributeOcc_anyOrNone,
- Z_AttributeOcc_specific
- } which;
+ int which;
+#define Z_AttributeOcc_anyOrNone 0
+#define Z_AttributeOcc_specific 1
union
{
Odr_null *anyOrNone;
Z_DatabaseList *subDbs; /* OPTIONAL */
Z_HumanString *disclaimers; /* OPTIONAL */
Z_HumanString *news; /* OPTIONAL */
- enum
- {
- Z_Exp_RecordCount_actualNumber,
- Z_Exp_RecordCount_approxNumber
- } recordCount_which;
+ int recordCount_which;
+#define Z_Exp_RecordCount_actualNumber 0
+#define Z_Exp_RecordCount_approxNumber 1
int *recordCount; /* OPTIONAL */
Z_HumanString *defaultOrder; /* OPTIONAL */
int *avRecordSize; /* OPTIONAL */
struct Z_ElementDataType
{
- enum
- {
- Z_ElementDataType_primitive,
- Z_ElementDataType_structured
- } which;
+ int which;
+#define Z_ElementDataType_primitive 0
+#define Z_ElementDataType_structured 1
union
{
int *primitive;
typedef struct Z_SortKeyDetailsSortType
{
- enum
- {
- Z_SortKeyDetailsSortType_character,
- Z_SortKeyDetailsSortType_numeric,
- Z_SortKeyDetailsSortType_structured
- } which;
+ int which;
+#define Z_SortKeyDetailsSortType_character 0
+#define Z_SortKeyDetailsSortType_numeric 1
+#define Z_SortKeyDetailsSortType_structured 2
union
{
Odr_null *character;
typedef struct Z_ValueDescription
{
- enum
- {
- Z_ValueDescription_integer,
- Z_ValueDescription_string,
- Z_ValueDescription_octets,
- Z_ValueDescription_oid,
- Z_ValueDescription_unit,
- Z_ValueDescription_valueAndUnit
- } which;
+ int which;
+#define Z_ValueDescription_integer 0
+#define Z_ValueDescription_string 1
+#define Z_ValueDescription_octets 2
+#define Z_ValueDescription_oid 3
+#define Z_ValueDescription_unit 4
+#define Z_ValueDescription_valueAndUnit 5
union
{
int *integer;
typedef struct Z_ValueSet
{
- enum
- {
- Z_ValueSet_range,
- Z_ValueSet_enumerated
- } which;
+ int which;
+#define Z_ValueSet_range 0
+#define Z_ValueSet_enumerated 1
union
{
Z_ValueRange *range;
typedef struct Z_ExplainRecord
{
- enum
- {
- Z_Explain_targetInfo,
- Z_Explain_databaseInfo,
- Z_Explain_schemaInfo,
- Z_Explain_tagSetInfo,
- Z_Explain_recordSyntaxInfo,
- Z_Explain_attributeSetInfo,
- Z_Explain_termListInfo,
- Z_Explain_extendedServicesInfo,
- Z_Explain_attributeDetails,
- Z_Explain_termListDetails,
- Z_Explain_elementSetDetails,
- Z_Explain_retrievalRecordDetails,
- Z_Explain_sortDetails,
- Z_Explain_processing,
- Z_Explain_variants,
- Z_Explain_units,
- Z_Explain_categoryList
- } which;
+ int which;
+#define Z_Explain_targetInfo 0
+#define Z_Explain_databaseInfo 1
+#define Z_Explain_schemaInfo 2
+#define Z_Explain_tagSetInfo 3
+#define Z_Explain_recordSyntaxInfo 4
+#define Z_Explain_attributeSetInfo 5
+#define Z_Explain_termListInfo 6
+#define Z_Explain_extendedServicesInfo 7
+#define Z_Explain_attributeDetails 8
+#define Z_Explain_termListDetails 9
+#define Z_Explain_elementSetDetails 10
+#define Z_Explain_retrievalRecordDetails 11
+#define Z_Explain_sortDetails 12
+#define Z_Explain_processing 13
+#define Z_Explain_variants 14
+#define Z_Explain_units 15
+#define Z_Explain_categoryList 16
union
{
Z_TargetInfo *targetInfo;
Odr_oid *direct_reference;
int *indirect_reference;
char *descriptor;
- enum
- {
- /* Generic types */
- Z_External_single = 0,
- Z_External_octet,
- Z_External_arbitrary,
-
- /* Specific types */
- Z_External_sutrs,
- Z_External_explainRecord,
- Z_External_resourceReport1,
- Z_External_resourceReport2,
- Z_External_promptObject1,
- Z_External_grs1,
- Z_External_extendedService,
- Z_External_itemOrder,
- Z_External_diag1,
- Z_External_espec1
- } which;
+ int which;
+/* Generic types */
+#define Z_External_single 0
+#define Z_External_octet 1
+#define Z_External_arbitrary 2
+/* Specific types */
+#define Z_External_sutrs 3
+#define Z_External_explainRecord 4
+#define Z_External_resourceReport1 5
+#define Z_External_resourceReport2 6
+#define Z_External_promptObject1 7
+#define Z_External_grs1 8
+#define Z_External_extendedService 9
+#define Z_External_itemOrder 10
+#define Z_External_diag1 11
+#define Z_External_espec1 12
union
{
/* Generic types */
typedef struct Z_ElementData
{
- enum
- {
- Z_ElementData_octets,
- Z_ElementData_numeric,
- Z_ElementData_date,
- Z_ElementData_ext,
- Z_ElementData_string,
- Z_ElementData_trueOrFalse,
- Z_ElementData_oid,
- Z_ElementData_intUnit,
- Z_ElementData_elementNotThere,
- Z_ElementData_elementEmpty,
- Z_ElementData_noDataRequested,
- Z_ElementData_diagnostic,
- Z_ElementData_subtree
- } which;
+ int which;
+#define Z_ElementData_octets 0
+#define Z_ElementData_numeric 1
+#define Z_ElementData_date 2
+#define Z_ElementData_ext 3
+#define Z_ElementData_string 4
+#define Z_ElementData_trueOrFalse 5
+#define Z_ElementData_oid 6
+#define Z_ElementData_intUnit 7
+#define Z_ElementData_elementNotThere 8
+#define Z_ElementData_elementEmpty 9
+#define Z_ElementData_noDataRequested 10
+#define Z_ElementData_diagnostic 11
+#define Z_ElementData_subtree 12
union
{
Odr_oct *octets;
Odr_oid *variantSetId; /* OPTIONAL */
int *class;
int *type;
- enum
- {
- Z_Triple_integer,
- Z_Triple_internationalString,
- Z_Triple_octetString,
- Z_Triple_oid,
- Z_Triple_boolean,
- Z_Triple_null,
- Z_Triple_unit,
- Z_Triple_valueAndUnit
- } which;
+ int which;
+#define Z_Triple_integer 0
+#define Z_Triple_internationalString 1
+#define Z_Triple_octetString 2
+#define Z_Triple_oid 3
+#define Z_Triple_boolean 4
+#define Z_Triple_null 5
+#define Z_Triple_unit 6
+#define Z_Triple_valueAndUnit 7
union
{
int *integer;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: d1_espec.c,v $
- * Revision 1.4 1995-12-05 11:16:10 quinn
+ * Revision 1.5 1996-01-02 08:57:44 quinn
+ * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
+ *
+ * Revision 1.4 1995/12/05 11:16:10 quinn
* Fixed malloc of 0.
*
* Revision 1.3 1995/11/13 09:27:34 quinn
int i;
var1.proto = PROTO_Z3950;
- var1.class = CLASS_VARSET;
+ var1.oclass = CLASS_VARSET;
var1.value = VAL_VAR1;
r->globalVariantSetId = odr_oiddup(o, oid_getoidbyent(&var1));
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: seshigh.c,v $
- * Revision 1.56 1995-12-14 11:09:57 quinn
+ * Revision 1.57 1996-01-02 08:57:47 quinn
+ * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
+ *
+ * Revision 1.56 1995/12/14 11:09:57 quinn
* Work on Explain
*
* Revision 1.55 1995/11/08 17:41:37 quinn
#endif
bib1.proto = proto;
- bib1.class = CLASS_DIAGSET;
+ bib1.oclass = CLASS_DIAGSET;
bib1.value = VAL_BIB1;
logf(LOG_DEBUG, "Diagnostic: %d -- %s", error, addinfo ? addinfo :
#endif
bib1.proto = proto;
- bib1.class = CLASS_DIAGSET;
+ bib1.oclass = CLASS_DIAGSET;
bib1.value = VAL_BIB1;
logf(LOG_DEBUG, "SurrogateDiagnotic: %d -- %s", error, addinfo);
logf(LOG_DEBUG, "DiagRecs: %d -- %s", error, addinfo);
bib1.proto = proto;
- bib1.class = CLASS_DIAGSET;
+ bib1.oclass = CLASS_DIAGSET;
bib1.value = VAL_BIB1;
err = error;
sizeof(Z_DatabaseRecord))))
return 0;
recform.proto = a->proto;
- recform.class = CLASS_RECSYN;
+ recform.oclass = CLASS_RECSYN;
recform.value = fres->format;
thisext->direct_reference = odr_oiddup(a->encode,
oid_getoidbyent(&recform));
oid_value form;
if (!(prefformat = oid_getentbyoid(req->preferredRecordSyntax)) ||
- prefformat->class != CLASS_RECSYN)
+ prefformat->oclass != CLASS_RECSYN)
form = VAL_NONE;
else
form = prefformat->value;
#endif
if (!(prefformat = oid_getentbyoid(req->preferredRecordSyntax)) ||
- prefformat->class != CLASS_RECSYN)
+ prefformat->oclass != CLASS_RECSYN)
form = VAL_NONE;
else
form = prefformat->value;
#endif
if (req->attributeSet && (!(attent = oid_getentbyoid(req->attributeSet)) ||
- attent->class != CLASS_ATTSET || attent->value != VAL_BIB1))
+ attent->oclass != CLASS_ATTSET || attent->value != VAL_BIB1))
ents.u.nonSurrogateDiagnostics = diagrecs(assoc->proto, 121, 0);
else if (req->stepSize && *req->stepSize > 0)
ents.u.nonSurrogateDiagnostics = diagrecs(assoc->proto, 205, 0);
#
# This is the WAIS VARIANT element set description.
+# The empty variant parameters to the simpleelement statements simply
+# override the default.
#
defaultvariantrequest (9,1,@) (6,5,@) # No data; variant list.
-simpleelement (1,10)
-simpleelement (1,12)
+simpleelement (1,10) variant
+simpleelement (1,12) variant
simpleelement (2,1) variant
simpleelement (2,6)
simpleelement (1,14) variant
tag 13 record structured
tag 14 local-control-number string
tag 15 creation-date generalizedtime
-tag 16 dateOfLastModification generalizedtime
+tag 16 dateOfLastModification/lastModified generalizedtime
tag 17 dateOfLastReview generalizedtime
tag 18 score int
tag 19 wellKnown string
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: oid.c,v $
- * Revision 1.11 1995-12-13 16:03:35 quinn
+ * Revision 1.12 1996-01-02 08:57:53 quinn
+ * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
+ *
+ * Revision 1.11 1995/12/13 16:03:35 quinn
* *** empty log message ***
*
* Revision 1.10 1995/11/28 09:30:44 quinn
for (p = oids; *p->oidsuffix >= 0; p++)
if (ent->proto == p->proto &&
- ent->class == p->class &&
+ ent->oclass == p->oclass &&
ent->value == p->value)
{
if (ent->proto == PROTO_Z3950)