Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
authorSebastian Hammer <quinn@indexdata.com>
Tue, 2 Jan 1996 08:57:19 +0000 (08:57 +0000)
committerSebastian Hammer <quinn@indexdata.com>
Tue, 2 Jan 1996 08:57:19 +0000 (08:57 +0000)
18 files changed:
CHANGELOG
asn/zget.c
client/client.c
comstack/xmosi.c
include/oid.h
include/proto.h
include/prt-acc.h
include/prt-dia.h
include/prt-esp.h
include/prt-exd.h
include/prt-exp.h
include/prt-ext.h
include/prt-grs.h
retrieval/d1_espec.c
server/seshigh.c
tab/gils-variant.est
tab/tagsetm.tag
util/oid.c

index ab3ab6c..b3ca156 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,14 @@
 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.
index aeed16d..72b67a1 100644 (file)
@@ -4,7 +4,10 @@
  * 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
@@ -354,7 +357,7 @@ Z_Close *zget_Close(ODR o)
     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));
     
index 9f24bd4..f153700 100644 (file)
@@ -4,7 +4,10 @@
  * 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
@@ -145,6 +148,8 @@ static ODR_MEM session_mem;                /* memory handle for init-response */
 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 */
@@ -448,7 +453,7 @@ static void display_diagrec(Z_DiagRec *p)
         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)
@@ -538,7 +543,7 @@ static int send_searchRequest(char *arg)
         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 =
@@ -563,7 +568,7 @@ static int send_searchRequest(char *arg)
     }
 #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;
@@ -696,7 +701,7 @@ static int send_presentRequest(char *arg)
     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)
@@ -790,7 +795,7 @@ int send_scanrequest(char *string, int pp, int num)
     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);
@@ -924,6 +929,26 @@ int cmd_elements(char *arg)
     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);
@@ -989,6 +1014,7 @@ static int client(void)
         {"format", cmd_format, "<recordsyntax>"},
         {"elements", cmd_elements, "<elementSetName>"},
         {"close", cmd_close, ""},
+       {"attributeset", cmd_attributeset, "<attrset>"},
         {0,0}
     };
     char *netbuffer= 0;
index 4a94c62..cad3978 100644 (file)
@@ -4,7 +4,10 @@
  * 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
@@ -141,7 +144,7 @@ static int addopt(struct netbuf *optbuf, unsigned long level, unsigned long
     char *str;
 
     ent.proto = proto;
-    ent.class = class;
+    ent.oclass = class;
     ent.value = value;
     if (!(oid = oid_getoidbyent(&ent)))
        return -1;
index e38b8cc..8feb61c 100644 (file)
  * 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);
index 1d3d89f..2366c90 100644 (file)
  * 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
@@ -177,13 +180,11 @@ typedef struct Z_InfoCategory
 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; 
@@ -201,11 +202,9 @@ typedef struct Z_OtherInformation
 
 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;
@@ -240,13 +239,11 @@ typedef struct
 
 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;
@@ -364,11 +361,9 @@ typedef struct Z_AttributeElement
 #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;
@@ -381,17 +376,15 @@ typedef struct Z_AttributeElement
 
 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 */
@@ -431,11 +424,9 @@ typedef struct Z_ProximityOperator
 #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
@@ -452,13 +443,11 @@ typedef struct Z_ProximityOperator
 
 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. */
@@ -470,12 +459,10 @@ typedef struct Z_Operator
 
 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;
@@ -493,11 +480,9 @@ typedef struct Z_Complex
 
 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;
@@ -515,13 +500,10 @@ typedef struct Z_RPNQuery
 
 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;
@@ -562,21 +544,17 @@ typedef struct Z_DefaultDiagFormat
     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;
@@ -604,12 +582,9 @@ typedef struct Z_DiagRecs
 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;
@@ -625,12 +600,10 @@ typedef struct Z_NamePlusRecordList
 
 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;
@@ -670,11 +643,9 @@ typedef struct Z_SearchResponse
 
 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;
@@ -706,11 +677,9 @@ typedef struct Z_CompSpec
 
 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;
@@ -806,11 +775,9 @@ typedef struct Z_ResourceControlResponse
 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;
@@ -824,11 +791,9 @@ typedef struct Z_AccessControlRequest
 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;
@@ -858,11 +823,9 @@ typedef struct Z_OccurrenceByAttributes
 {
     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
@@ -884,11 +847,9 @@ typedef struct Z_TermInfo
 
 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;
@@ -904,11 +865,9 @@ typedef struct Z_Entries
 
 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;
@@ -1090,26 +1049,24 @@ typedef struct Z_ExtendedServicesResponse
 
 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;
@@ -1163,7 +1120,7 @@ int z_Permissions(ODR o, Z_Permissions **p, int opt);
 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>
index 23b1987..deca70d 100644 (file)
  * 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
@@ -65,11 +68,9 @@ typedef struct Z_EnumeratedPrompt1
 
 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;
@@ -79,11 +80,9 @@ typedef struct Z_PromptId1
 
 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;
@@ -120,14 +119,12 @@ typedef struct Z_Challenge1
 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;
@@ -146,11 +143,9 @@ typedef struct Z_Response1
 
 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;
index 5c07fba..356afd1 100644 (file)
@@ -96,17 +96,15 @@ typedef struct Z_DiagTerm
 
 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;
@@ -128,16 +126,14 @@ typedef struct Z_AttrListList
 
 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;
@@ -162,21 +158,19 @@ typedef struct Z_StringList
 
 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;
@@ -204,10 +198,8 @@ typedef struct Z_Sort
 
 typedef struct Z_Segmentation
 {
-    enum
-    {
-       Z_SegmentationD_segments
-    } which;
+    int which;
+#define Z_SegmentationD_segments 0
     union
     {
        Odr_null *segments;
@@ -216,12 +208,10 @@ typedef struct Z_Segmentation
 
 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;
@@ -247,16 +237,14 @@ typedef struct Z_OidList
 
 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;
@@ -278,23 +266,21 @@ typedef struct Z_RecordSyntax
 
 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;
@@ -320,11 +306,9 @@ typedef struct Z_DiagFormat
 
 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;
index 26e947b..c1c7c56 100644 (file)
@@ -38,12 +38,10 @@ typedef struct Z_OccurValues
 
 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;
@@ -61,12 +59,10 @@ typedef struct Z_SpecificTag
 
 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;
@@ -101,11 +97,9 @@ typedef struct Z_CompoSpecs
 
 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;
@@ -117,11 +111,9 @@ typedef struct Z_CompositeElement
 
 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;
index a25feb2..97531b9 100644 (file)
@@ -94,16 +94,14 @@ typedef struct Z_IOCreditCardInfo
 
 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;
@@ -135,11 +133,9 @@ typedef struct Z_IOTaskPackage
 
 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;
index 57e8e81..9fdd806 100644 (file)
@@ -55,12 +55,10 @@ typedef struct Z_HumanString
 
 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;
@@ -102,12 +100,10 @@ typedef struct Z_NetworkAddressOther
 
 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;
@@ -146,11 +142,9 @@ typedef struct Z_ProxSupportPrivate
 
 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;
@@ -183,15 +177,13 @@ typedef struct Z_Iso8777Capabilities
 
 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;
@@ -288,11 +280,9 @@ typedef struct Z_AttributeOccurrence
     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;
@@ -387,11 +377,9 @@ typedef struct Z_DatabaseInfo
     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 */
@@ -450,11 +438,9 @@ typedef struct Z_ElementInfoList
 
 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;
@@ -774,12 +760,10 @@ typedef struct Z_RetrievalRecordDetails
 
 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;
@@ -840,15 +824,13 @@ typedef struct Z_ProcessingInformation
 
 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;
@@ -874,11 +856,9 @@ typedef struct Z_ValueSetEnumerated
 
 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;
@@ -975,26 +955,24 @@ typedef struct Z_CategoryList
 
 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;
index 3ef41bc..9e1f48f 100644 (file)
@@ -39,25 +39,22 @@ struct Z_External
     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 */
index e6ad783..7983a63 100644 (file)
@@ -35,22 +35,20 @@ typedef struct Z_GenericRecord Z_GenericRecord;
 
 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;                      
@@ -98,17 +96,15 @@ typedef struct Z_Triple
     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;
index 3fdbca6..9758079 100644 (file)
@@ -4,7 +4,10 @@
  * 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
@@ -39,7 +42,7 @@ static Z_Variant *read_variant(int argc, char **argv, ODR o)
     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));
 
index 6866f98..f05c050 100644 (file)
@@ -4,7 +4,10 @@
  * 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
@@ -732,7 +735,7 @@ static Z_Records *diagrec(oid_proto proto, int error, char *addinfo)
 #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 :
@@ -770,7 +773,7 @@ static Z_NamePlusRecord *surrogatediagrec(oid_proto proto, char *dbname,
 #endif
 
     bib1.proto = proto;
-    bib1.class = CLASS_DIAGSET;
+    bib1.oclass = CLASS_DIAGSET;
     bib1.value = VAL_BIB1;
 
     logf(LOG_DEBUG, "SurrogateDiagnotic: %d -- %s", error, addinfo);
@@ -808,7 +811,7 @@ static Z_DiagRecs *diagrecs(oid_proto proto, int error, char *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;
@@ -935,7 +938,7 @@ static Z_Records *pack_records(association *a, char *setname, int start,
            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));
@@ -1092,7 +1095,7 @@ static Z_APDU *response_searchRequest(association *assoc, request *reqb,
            oid_value form;
 
            if (!(prefformat = oid_getentbyoid(req->preferredRecordSyntax)) ||
-               prefformat->class != CLASS_RECSYN)
+               prefformat->oclass != CLASS_RECSYN)
                form = VAL_NONE;
            else
                form = prefformat->value;
@@ -1155,7 +1158,7 @@ static Z_APDU *process_presentRequest(association *assoc, request *reqb,
 #endif
 
     if (!(prefformat = oid_getentbyoid(req->preferredRecordSyntax)) ||
-       prefformat->class != CLASS_RECSYN)
+       prefformat->oclass != CLASS_RECSYN)
        form = VAL_NONE;
     else
        form = prefformat->value;
@@ -1206,7 +1209,7 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb, int *fd)
 #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);
index d2d2504..cb91cbd 100644 (file)
@@ -1,11 +1,13 @@
 #
 # 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
index 0f04b94..5abb690 100644 (file)
@@ -17,7 +17,7 @@ tag   12      url                     string
 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
index 6251102..4c45984 100644 (file)
@@ -4,7 +4,10 @@
  * 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
@@ -278,7 +281,7 @@ int *oid_getoidbyent(struct oident *ent)
 
     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)