* Sebastian Hammer, Adam Dickmeiss
*
* $Log: proto.c,v $
- * Revision 1.30 1995-06-15 15:42:01 quinn
+ * Revision 1.31 1995-06-16 13:15:56 quinn
+ * Fixed Defaultdiagformat.
+ *
+ * Revision 1.30 1995/06/15 15:42:01 quinn
* Fixed some v3 bugs
*
* Revision 1.29 1995/06/15 07:44:49 quinn
11, opt);
}
+int z_InternationalString(ODR o, char **p, int opt)
+{
+ return odr_generalstring(o, p, opt);
+}
+
int z_InfoCategory(ODR o, Z_InfoCategory **p, int opt)
{
if (!odr_sequence_begin(o, p, sizeof(**p)))
int z_DefaultDiagFormat(ODR o, Z_DefaultDiagFormat **p, int opt)
{
+ static Odr_arm arm[] =
+ {
+ {-1, -1, -1, Z_DiagForm_v2AddInfo, odr_visiblestring},
+ {-1, -1, -1, Z_DiagForm_v3AddInfo, z_InternationalString},
+ {ODR_IMPLICIT, ODR_CONTEXT, ODR_VISIBLESTRING, Z_DiagForm_v2AddInfo,
+ odr_visiblestring}, /* to match some weird server.. */
+ {-1, -1, -1, -1, 0}
+ };
if (!odr_sequence_begin(o, p, sizeof(**p)))
return opt && odr_ok(o);
return
* We need to turn it into a choice, or something, because of
* that damn generalstring in v3.
*/
- (odr_visiblestring(o, &(*p)->addinfo, 0) ||
- odr_implicit(o, odr_cstring, &(*p)->addinfo, ODR_CONTEXT,
- ODR_VISIBLESTRING, 1)) &&
+ odr_choice(o, arm, &(*p)->addinfo, &(*p)->which) &&
odr_sequence_end(o);
}
* OF THIS SOFTWARE.
*
* $Log: odr.h,v $
- * Revision 1.7 1995-05-29 08:11:32 quinn
+ * Revision 1.8 1995-06-16 13:16:04 quinn
+ * Fixed Defaultdiagformat.
+ *
+ * Revision 1.7 1995/05/29 08:11:32 quinn
* Moved oid from odr/asn to util.
*
* Revision 1.6 1995/05/22 14:47:00 quinn
#define ODR_PRINTABLESTRING 19
#define ODR_GRAPHICSTRING 25
#define ODR_VISIBLESTRING 26
+#define ODR_GENERALSTRING 27
/*
* odr stream directions
* OF THIS SOFTWARE.
*
* $Log: proto.h,v $
- * Revision 1.17 1995-06-15 15:42:05 quinn
+ * Revision 1.18 1995-06-16 13:16:05 quinn
+ * Fixed Defaultdiagformat.
+ *
+ * Revision 1.17 1995/06/15 15:42:05 quinn
* Fixed some v3 bugs
*
* Revision 1.16 1995/06/15 07:45:06 quinn
{
Odr_oid *diagnosticSetId; /* This is opt'l to interwork with bad targets */
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;
char *addinfo;
} Z_DefaultDiagFormat;
int odr_constructed_more(ODR o);
int odr_bitstring(ODR o, Odr_bitmask **p, int opt);
int ber_bitstring(ODR o, Odr_bitmask *p, int cons);
-int odr_visiblestring(ODR o, char **p, int opt);
+int odr_generalstring(ODR o, char **p, int opt);
int ber_oidc(ODR o, Odr_oid *p);
int odr_oid(ODR o, Odr_oid **p, int opt);
int odr_choice(ODR o, Odr_arm arm[], void *p, void *whichp);
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr_use.c,v $
- * Revision 1.3 1995-05-16 08:51:00 quinn
+ * Revision 1.4 1995-06-16 13:16:12 quinn
+ * Fixed Defaultdiagformat.
+ *
+ * Revision 1.3 1995/05/16 08:51:00 quinn
* License, documentation, and memory fixes
*
* Revision 1.2 1995/02/09 15:51:50 quinn
opt);
}
+/*
+ * a char may not be sufficient to hold a general string, but we'll deal
+ * with that once we start looking more closely at UniCode & co.
+ */
+int odr_generalstring(ODR o, char **p, int opt)
+{
+ return odr_implicit(o, odr_cstring, p, ODR_UNIVERSAL, ODR_GENERALSTRING,
+ opt);
+}
+
int odr_graphicstring(ODR o, char **p, int opt)
{
return odr_implicit(o, odr_cstring, p, ODR_UNIVERSAL, ODR_GRAPHICSTRING,
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: seshigh.c,v $
- * Revision 1.36 1995-06-16 10:31:36 quinn
+ * Revision 1.37 1995-06-16 13:16:14 quinn
+ * Fixed Defaultdiagformat.
+ *
+ * Revision 1.36 1995/06/16 10:31:36 quinn
* Added session timeout.
*
* Revision 1.35 1995/06/15 07:45:14 quinn
#endif
dr.diagnosticSetId = oid_getoidbyent(&bib1);
dr.condition = &err;
+ dr.which = Z_DiagForm_v2AddInfo;
dr.addinfo = addinfo ? addinfo : "";
return &rec;
}
#endif
dr.diagnosticSetId = oid_getoidbyent(&bib1);
dr.condition = &err;
+ dr.which = Z_DiagForm_v2AddInfo;
dr.addinfo = addinfo ? addinfo : "";
return &rec;
}
#endif
rec.diagnosticSetId = oid_getoidbyent(&bib1);
rec.condition = &err;
+ rec.which = Z_DiagForm_v2AddInfo;
rec.addinfo = addinfo ? addinfo : "";
return &recs;
}