2 Copyright © 2002, The AROS Development Team.
12 /**************************************************************************
13 This file build the libraries/mui.h file it output it to stdout
14 so you can redirect them
16 Currently it merges some files but later version might do more
18 **************************************************************************/
20 static char linebuf
[2048];
22 /* array of already included files */
26 static int need_to_be_included(char *filename
)
29 for (i
=0;i
<included_num
;i
++)
31 if (!strcmp(included
[i
],filename
)) return 0;
36 static void readfile(FILE *in
)
38 while (fgets(linebuf
,2048,in
))
40 if (!strstr(linebuf
,"PRIV"))
42 if (strchr(linebuf
,'#') && strstr(linebuf
,"include"))
44 char *start
= strchr(linebuf
,'"');
49 end
= strchr(start
,'"');
53 if (need_to_be_included(start
))
56 if (!(included
= realloc(included
,sizeof(char*)*(included_num
+1)))) return;
57 included
[included_num
++] = strdup(start
);
58 if ((in2
= fopen(start
,"r")))
66 else printf("%s", linebuf
);
67 } else printf("%s",linebuf
);
76 /* Open the mui.h file */
77 FILE *in
= fopen("mui.h","r");