- /* Create a new export */
- E = NewExport (Type, Name, O);
+ /* Read the constructor/destructor decls if we have any */
+ ConDesCount = GET_EXP_CONDES_COUNT (Type);
+ if (ConDesCount > 0) {
+
+ unsigned char ConDes[CD_TYPE_COUNT];
+ unsigned I;
+
+ /* Read the data into temp storage */
+ ReadData (F, ConDes, ConDesCount);
+
+ /* Re-order the data. In the file, each decl is encoded into a byte
+ * which contains the type and the priority. In memory, we will use
+ * an array of types which contain the priority. This array was
+ * cleared by the constructor (NewExport), so we must only set the
+ * fields that contain values.
+ */
+ for (I = 0; I < ConDesCount; ++I) {
+ unsigned ConDesType = CD_GET_TYPE (ConDes[I]);
+ unsigned ConDesPrio = CD_GET_PRIO (ConDes[I]);
+ E->ConDes[ConDesType] = ConDesPrio;
+ }
+ }
+
+ /* Read the name */
+ E->Name = ReadStr (F);