2 Copyright © 1995-2009, The AROS Development Team. All rights reserved.
5 The code for creating skeleton files for the functions present in the module
9 #include "functionhead.h"
12 static void writeskelfunc(struct config
*cfg
, struct functionhead
*funclist
)
15 char line
[256], *banner
;
16 struct functionarg
*arglistit
;
20 snprintf(line
, 255, "%s/%s.c", cfg
->gendir
, funclist
->internalname
);
21 out
= fopen(line
, "w");
31 " Copyright © <year>, The AROS Development Team. All rights reserved.\n"
36 if (funclist
->libcall
== REGISTERMACRO
)
39 "/*****************************************************************************\n\n"
41 " AROS_LH%d(%s, %s,\n\n"
43 funclist
->argcount
, funclist
->type
, funclist
->internalname
46 for (arglistit
= funclist
->arguments
;
48 arglistit
= arglistit
->next
51 type
= getargtype(arglistit
);
52 name
= getargname(arglistit
);
53 assert(name
!= NULL
&& type
!= NULL
);
56 " AROS_LHA(%s, %s, %s),\n",
57 type
, name
, arglistit
->reg
65 " %s, %s, %u, %s)\n\n"
75 "*****************************************************************************/\n"
77 " AROS_LIBFUNC_INIT\n\n"
78 " AROS_LIBFUNC_EXIT\n"
80 cfg
->libbasetypeptrextern
, cfg
->libbase
, funclist
->lvo
, cfg
->basename
85 void writeskel(struct config
*cfg
)
87 struct functionhead
*funclistit
;
89 for(funclistit
= cfg
->funclist
; funclistit
!= NULL
; funclistit
= funclistit
->next
)
91 writeskelfunc(cfg
, funclistit
);