Removed codesetslib because we have now external repo.
[cake.git] / tools / genmodule / writeincclib.c
blob6e2582ba660df1f769f235f74e63b55de7e0a228
1 /*
2 Copyright © 1995-2005, The AROS Development Team. All rights reserved.
3 $Id$
5 Function to write clib/modulename_protos.h. Part of genmodule.
6 */
7 #include "genmodule.h"
9 void writeincclib(struct config *cfg)
11 FILE *out;
12 char line[256];
13 struct functionhead *funclistit;
14 struct functionarg *arglistit;
15 struct stringlist *linelistit;
17 snprintf(line, 255, "%s/clib/%s_protos.h", cfg->gendir, cfg->modulename);
19 out = fopen(line, "w");
21 if (out == NULL)
23 perror(line);
24 exit(20);
27 fprintf(out,
28 "#ifndef CLIB_%s_PROTOS_H\n"
29 "#define CLIB_%s_PROTOS_H\n"
30 "\n"
31 "%s"
32 "\n"
33 "#include <aros/libcall.h>\n",
34 cfg->modulenameupper, cfg->modulenameupper, getBanner(cfg)
36 for (linelistit = cfg->cdeflines; linelistit!=NULL; linelistit = linelistit->next)
37 fprintf(out, "%s\n", linelistit->s);
39 if (cfg->command!=DUMMY)
40 writefuncprotos(out, cfg, cfg->funclist);
42 fprintf(out, "\n#endif /* CLIB_%s_PROTOS_H */\n", cfg->modulenameupper);