2 Copyright © 1995-2009, 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
;
28 char *name
, *internalname
;
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 version
; /* First library version number this appeared in*/
38 int novararg
: 1; /* Are varargs allowed for this function ? */
39 int priv
: 1; /* Is function private */
42 struct functionhead
*newfunctionhead(const char *name
, enum libcall libcall
);
43 struct functionarg
*funcaddarg
45 struct functionhead
*funchead
,
46 const char *arg
, const char *reg
48 struct stringlist
*funcaddalias(struct functionhead
*funchead
, const char *alias
);
49 void funcsetinternalname(struct functionhead
*funchead
, const char *intername
);
51 /* Write out the function prototypes for the functions in the given
52 * cfg may be NULL if the list only contains functions with STACK libcall
55 void writefuncdefs(FILE *out
, struct config
*cfg
, struct functionhead
*funclist
);
56 void writefuncprotos(FILE *out
, struct config
*cfg
, struct functionhead
*funclist
);
57 void writefuncinlines(FILE *out
, struct config
*cfg
, struct functionhead
*funclist
);
58 void writefuncinternalstubs(FILE *out
, struct config
*cfg
, struct functionhead
*funclist
);
60 /* getargtype remove the variable name from a variable definition and leave return
61 * the type of the variable
62 * [] at the end will be added as * in the variable type
63 * e.g. char *var[] => type: char **, name: var
64 * This is a destructive function and will change to string pointed to by def
65 * to only contain the type afterwards.
66 * Function return 0 when it did not understand the input, 1 otherwise
68 char *getargtype(const struct functionarg
*funcarg
);
69 char *getargname(const struct functionarg
*funcarg
);
71 #endif //FUNCTIONHEAD_H