2 Copyright © 1995-2009, The AROS Development Team. All rights reserved.
4 Desc: Function to write proto/modulename.h. Part of genmodule.
8 void writeincproto(struct config
*cfg
)
11 char line
[256], *banner
;
12 struct linelist
*linelistit
;
14 snprintf(line
, 255, "%s/proto/%s.h", cfg
->gendir
, cfg
->modulename
);
15 out
= fopen(line
, "w");
23 banner
= getBanner(cfg
);
25 "#ifndef PROTO_%s_H\n"
26 "#define PROTO_%s_H\n"
30 "#include <exec/types.h>\n"
31 "#include <aros/system.h>\n"
33 "#include <clib/%s_protos.h>\n"
35 "#if !defined(%s) && !defined(__NOLIBBASE__) && !defined(__%s_NOLIBBASE__)\n"
36 " #ifdef __%s_STDLIBBASE__\n"
37 " extern struct Library *%s;\n"
43 cfg
->modulenameupper
, cfg
->modulenameupper
, banner
,
45 cfg
->libbase
, cfg
->modulenameupper
,
48 cfg
->libbasetypeptrextern
, cfg
->libbase
53 "#if !defined(NOLIBDEFINES) && !defined(%s_NOLIBDEFINES)\n"
54 "# include <defines/%s.h>\n"
57 "#endif /* PROTO_%s_H */\n",
58 cfg
->modulenameupper
, cfg
->modulename
, cfg
->modulenameupper