2 Copyright © 2002, The AROS Development Team.
12 /**************************************************************************
13 This file builds the libraries/mui.h file. It outputs 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
))
37 static void readfile(FILE *in
)
39 while (fgets(linebuf
, 2048, in
))
41 if (!strstr(linebuf
, "PRIV"))
43 if (strchr(linebuf
, '#') && strstr(linebuf
, "include"))
45 char *start
= strchr(linebuf
, '"');
50 end
= strchr(start
, '"');
54 if (need_to_be_included(start
))
59 sizeof(char *) * (included_num
+
62 included
[included_num
++] = strdup(start
);
63 if ((in2
= fopen(start
, "r")))
72 printf("%s", linebuf
);
75 printf("%s", linebuf
);
84 /* Open the mui.h file */
85 FILE *in
= fopen("mui.h", "r");