* Sebastian Hammer, Adam Dickmeiss
*
* $Log: proto.c,v $
- * Revision 1.29 1995-06-15 07:44:49 quinn
+ * Revision 1.30 1995-06-15 15:42:01 quinn
+ * Fixed some v3 bugs
+ *
+ * Revision 1.29 1995/06/15 07:44:49 quinn
* Moving to v3.
*
* Revision 1.28 1995/06/14 15:26:35 quinn
#endif
+int z_DiagRecs(ODR o, Z_DiagRecs **p, int opt)
+{
+ if (o->direction == ODR_DECODE)
+ *p = odr_malloc(o, sizeof(**p));
+ else if (!*p)
+ return opt;
+
+ if (odr_sequence_of(o, z_DiagRec, &(*p)->diagRecs,
+ &(*p)->num_diagRecs))
+ return 1;
+ *p = 0;
+ return 0;
+}
+
int z_NamePlusRecord(ODR o, Z_NamePlusRecord **p, int opt)
{
static Odr_arm arm[] =
int z_Records(ODR o, Z_Records **p, int opt)
{
- Odr_arm arm[] =
+ static Odr_arm arm[] =
{
{ODR_IMPLICIT, ODR_CONTEXT, 28, Z_Records_DBOSD, z_NamePlusRecordList},
{ODR_IMPLICIT, ODR_CONTEXT, 130, Z_Records_NSD, z_DiagRec},
+ {ODR_IMPLICIT, ODR_CONTEXT, 205, Z_Records_multipleNSD,
+ z_DiagRecs},
{-1, -1, -1, -1, 0}
};
return 0;
}
-int z_DiagRecs(ODR o, Z_DiagRecs **p, int opt)
-{
- if (o->direction == ODR_DECODE)
- *p = odr_malloc(o, sizeof(**p));
- else if (!*p)
- return opt;
-
- if (odr_sequence_of(o, z_DiagRec, &(*p)->diagRecs,
- &(*p)->num_diagRecs))
- return 1;
- *p = 0;
- return 0;
-}
-
int z_ListEntries(ODR o, Z_ListEntries **p, int opt)
{
static Odr_arm arm[] =
* OF THIS SOFTWARE.
*
* $Log: proto.h,v $
- * Revision 1.16 1995-06-15 07:45:06 quinn
+ * Revision 1.17 1995-06-15 15:42:05 quinn
+ * Fixed some v3 bugs
+ *
+ * Revision 1.16 1995/06/15 07:45:06 quinn
* Moving to v3.
*
* Revision 1.15 1995/06/14 15:26:43 quinn
#endif
-typedef struct Z_DiagRecList
+typedef struct Z_DiagRecs
{
- int num;
- Z_DiagRec **list;
-} Z_DiagRecList;
+ int num_diagRecs;
+ Z_DiagRec **diagRecs;
+} Z_DiagRecs;
typedef struct Z_NamePlusRecord
{
enum
{
Z_NamePlusRecord_databaseRecord,
- Z_NamePlusRecord_surrogateDiagnostic,
- Z_NamePlusRecord_multipleNonSurDiagnostics
+ Z_NamePlusRecord_surrogateDiagnostic
}
which;
union
{
Z_DatabaseRecord *databaseRecord;
Z_DiagRec *surrogateDiagnostic;
- Z_DiagRecList *multipleNonSurDiagnostics;
} u;
} Z_NamePlusRecord;
{
Z_NamePlusRecordList *databaseOrSurDiagnostics;
Z_DiagRec *nonSurrogateDiagnostic;
- Z_DiagRecList *multipleNonSurDiagnostics;
+ Z_DiagRecs *multipleNonSurDiagnostics;
} u;
} Z_Records;
Z_Entry **entries;
} Z_Entries;
-typedef struct Z_DiagRecs
-{
- int num_diagRecs;
- Z_DiagRec **diagRecs;
-} Z_DiagRecs;
-
typedef struct Z_ListEntries
{
enum