}
/* Get type and name of the struct field */
- ParseDecl (&Spec, &Decl, 0);
+ ParseDecl (&Spec, &Decl, DM_NEED_IDENT);
/* Get the offset of this field */
Offs = (StructType == T_STRUCT)? StructSize : 0;
-static void Declarator (const DeclSpec* Spec, Declaration* D, unsigned Mode)
+static void Declarator (const DeclSpec* Spec, Declaration* D, declmode_t Mode)
/* Recursively process declarators. Build a type array in reverse order. */
{
/* Read optional function or pointer qualifiers. These modify the
-void ParseDecl (const DeclSpec* Spec, Declaration* D, unsigned Mode)
+void ParseDecl (const DeclSpec* Spec, Declaration* D, declmode_t Mode)
/* Parse a variable, type or function declaration */
{
/* Initialize the Declaration struct */
};
/* Modes for ParseDecl */
-#define DM_NEED_IDENT 0U /* We must have an identifier */
-#define DM_NO_IDENT 1U /* We won't read an identifier */
-#define DM_ACCEPT_IDENT 2U /* We will accept an id if there is one */
+typedef enum {
+ DM_NEED_IDENT, /* We must have an identifier */
+ DM_NO_IDENT, /* We won't read an identifier */
+ DM_ACCEPT_IDENT, /* We will accept an id if there is one */
+} declmode_t;
Type* ParseType (Type* Type);
/* Parse a complete type specification */
-void ParseDecl (const DeclSpec* Spec, Declaration* D, unsigned Mode);
+void ParseDecl (const DeclSpec* Spec, Declaration* D, declmode_t Mode);
/* Parse a variable, type or function declaration */
void ParseDeclSpec (DeclSpec* D, unsigned DefStorage, long DefType);