revert between 56095 -> 55830 in arch
[AROS.git] / tools / genmodule / writeend.c
blobe0b47e7b9a27f20db9254a366690976b91d6fa81
1 /*
2 Copyright © 1995-2019, The AROS Development Team. All rights reserved.
4 Desc: function to write modulename_end.c. Part of genmodule.
5 */
6 #include "genmodule.h"
8 void writeend(struct config *cfg)
10 FILE *out;
11 char line[256];
13 snprintf(line, 255, "%s/%s_end.c", cfg->gendir, cfg->modulename);
14 out = fopen(line, "w");
15 if (out==NULL)
17 fprintf(stderr, "Could not write %s\n", line);
18 exit(20);
21 if (!cfg->flavour)
23 fprintf(out,
24 "#include \"%s_libdefs.h\"\n",
25 cfg->modulename
28 else
30 fprintf(out,
31 "#include \"%s_%s_libdefs.h\"\n",
32 cfg->modulename, cfg->flavour
36 fprintf(out,
37 "int GM_UNIQUENAME(End)(void) {return 0;}\n"
39 fclose(out);