From 297a057b70eb2747f46b5fe216984394cde6ea8b Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Tue, 20 Feb 1996 12:50:45 +0000 Subject: [PATCH] Various --- CHANGELOG | 22 +++++++++++++++++++++- include/oid.h | 8 ++++++-- include/proto.h | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- include/prt-ext.h | 13 +++++++++++++ include/prt.h | 1 + 5 files changed, 90 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index fd70d2b..1592b07 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,7 +2,27 @@ Possible compatibility problems with earlier versions marked with '*'. --- XXXXX XXXX/XX/XX -Front-end can now start from the inetd in TCP mode. Doc updated. +z_External() now won't break if a known, ASN.1 value comes encapsulated +in an octet-string. The value will pass through unmodified in an Odr_oct. + +Added a bit of code to the demo client to decode & display +ASN.1-structured records represented in the octet-aligned branch of +the EXTERNAL CHOICE. Thanks to CAS for prodding us to finally do this. + +Added z_ext_getentbyref() to the ASN module. Doc updated. + +* Completed the SCAN definition in the ASN module. This may break SCAN +code based on older YAZ-versions at compile-time. The fix is easy - +look in proto.h. + +* Added 'displayTerm' and OtherInformation to the TermInfo structure +under the SCAN definition. Remember to initialize this, server-people. + +Comstack allows insertion of established socket (primarily for +inetd-operation of servers). Doc updated. + +Front-end server can now start from the inetd in TCP mode. Doc +updated. --- 1.0pl4 1996/1/24 diff --git a/include/oid.h b/include/oid.h index 8feb61c..64af528 100644 --- a/include/oid.h +++ b/include/oid.h @@ -24,7 +24,10 @@ * OF THIS SOFTWARE. * * $Log: oid.h,v $ - * Revision 1.11 1996-01-02 08:57:30 quinn + * Revision 1.12 1996-02-20 12:52:37 quinn + * Various + * + * 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 @@ -74,7 +77,8 @@ typedef enum oid_proto { PROTO_Z3950, PROTO_SR, - PROTO_GENERAL + PROTO_GENERAL, + PROTO_WAIS } oid_proto; typedef enum oid_class diff --git a/include/proto.h b/include/proto.h index 2f77eea..c4ed95c 100644 --- a/include/proto.h +++ b/include/proto.h @@ -24,7 +24,10 @@ * OF THIS SOFTWARE. * * $Log: proto.h,v $ - * Revision 1.31 1996-01-22 09:46:45 quinn + * Revision 1.32 1996-02-20 12:52:39 quinn + * Various + * + * Revision 1.31 1996/01/22 09:46:45 quinn * Added Sort PDU. Moved StringList to main protocol file. * * Revision 1.30 1996/01/10 15:21:32 quinn @@ -835,6 +838,47 @@ typedef struct Z_AlternativeTerm Z_AttributesPlusTerm **terms; } Z_AlternativeTerm; +#if 1 + +typedef struct Z_ByDatabase +{ + char *db; + int *num; /* OPTIONAL */ + Z_OtherInformation *otherDbInfo; /* OPTIONAL */ +} Z_ByDatabase; + +typedef struct Z_ByDatabaseList +{ + int num_elements; + Z_ByDatabase **elements; +} Z_ByDatabaseList; + +typedef struct Z_ScanOccurrences +{ + int which; +#define Z_ScanOccurrences_global 0 +#define Z_ScanOccurrences_byDatabase 1 + union + { + int *global; + Z_ByDatabaseList *byDatabase; + } u; + +} Z_ScanOccurrences; + +typedef struct Z_OccurrenceByAttributes +{ + Z_AttributeList *attributes; + Z_ScanOccurrences *occurrences; /* OPTIONAL */ + Z_OtherInformation *otherOccurInfo; /* OPTIONAL */ +} Z_OccurrenceByAttributes; + +#else + +/* + * Old, incomplete definition of OccurrenceByAttributes. + */ + typedef struct Z_OccurrenceByAttributes { Z_AttributeList *attributes; @@ -852,13 +896,17 @@ typedef struct Z_OccurrenceByAttributes #endif } Z_OccurrenceByAttributes; +#endif + typedef struct Z_TermInfo { Z_Term *term; + char *displayTerm; /* OPTIONAL */ Z_AttributeList *suggestedAttributes; /* OPTIONAL */ Z_AlternativeTerm *alternativeTerm; /* OPTIONAL */ int *globalOccurrences; /* OPTIONAL */ Z_OccurrenceByAttributes *byAttributes; /* OPTIONAL */ + Z_OtherInformation *otherTermInfo; /* OPTIONAL */ } Z_TermInfo; typedef struct Z_Entry diff --git a/include/prt-ext.h b/include/prt-ext.h index 9e1f48f..25ffa42 100644 --- a/include/prt-ext.h +++ b/include/prt-ext.h @@ -34,6 +34,18 @@ #include +/* + * Used to keep track of known External definitions (a loose approach + * to DEFINED_BY). + */ + +typedef struct Z_ext_typeent +{ + oid_value dref; /* the direct-reference OID value. */ + int what; /* discriminator value for the external CHOICE */ + Odr_fun fun; /* decoder function */ +} Z_ext_typeent; + struct Z_External { Odr_oid *direct_reference; @@ -77,5 +89,6 @@ struct Z_External }; int z_External(ODR o, Z_External **p, int opt); +Z_ext_typeent *z_ext_getentbyref(oid_value val); #endif diff --git a/include/prt.h b/include/prt.h index 6158275..fd7dc73 100644 --- a/include/prt.h +++ b/include/prt.h @@ -51,5 +51,6 @@ int odr_total(ODR o); char *odr_errmsg(int n); Odr_oid *odr_getoidbystr(ODR o, char *str); int odr_initmember(ODR o, void *p, int size); +int odr_peektag(ODR o, int *class, int *tag, int *cons); #endif -- 1.7.10.4