2 Copyright © 1995-2005, The AROS Development Team. All rights reserved.
5 Desc: global include for genmodule. Defines global variables and
6 the function prototypes.
16 #include "stringlist.h"
18 enum libcall
{ STACK
, REGISTER
, MIXED
, REGISTERMACRO
, AUTOREGISTER
};
21 struct functionarg
*next
;
27 struct functionhead
*next
;
31 unsigned int argcount
;
32 struct functionarg
*arguments
;
33 struct stringlist
*aliases
;
34 unsigned int lvo
; /* Only for library functions, not methods */
35 struct stringlist
*interface
; /* Only for HIDD class */
36 char *method
; /* Only for HIID class */
37 int novararg
: 1; /* Are varargs allowed for this function ? */
38 int priv
: 1; /* Is function private */
41 struct functionhead
*newfunctionhead(const char *name
, enum libcall libcall
);
42 struct functionarg
*funcaddarg
44 struct functionhead
*funchead
,
45 const char *arg
, const char *reg
47 struct stringlist
*funcaddalias(struct functionhead
*funchead
, const char *alias
);
49 /* Write out the function prototypes for the functions in the given
50 * cfg may be NULL if the list only contains functions with STACK libcall
53 void writefuncdefs(FILE *out
, struct config
*cfg
, struct functionhead
*funclist
);
54 void writefuncprotos(FILE *out
, struct config
*cfg
, struct functionhead
*funclist
);
55 void writefuncinlines(FILE *out
, struct config
*cfg
, struct functionhead
*funclist
);
57 /* getargtype remove the variable name from a variable definition and leave return
58 * the type of the variable
59 * [] at the end will be added as * in the variable type
60 * e.g. char *var[] => type: char **, name: var
61 * This is a destructive function and will change to string pointed to by def
62 * to only contain the type afterwards.
63 * Function return 0 when it did not understand the input, 1 otherwise
65 char *getargtype(const struct functionarg
*funcarg
);
66 char *getargname(const struct functionarg
*funcarg
);
68 #endif //FUNCTIONHEAD_H