fix parse.c

This commit is contained in:
Liam Waldron 2023-05-04 12:17:31 -04:00
parent c18e1d9857
commit 0a70e16685

View File

@ -74,11 +74,15 @@ char includeConfig() {
FILE *emkconfig, *emkfile, *emkfile_new;
char filename[100], contents;
printf(COL_BLUE "INF" COL_RESET " | parsing config.emk\n");
emkconfig = fopen(EMKCONFIG, "r");
printf(COL_BLUE "INF" COL_RESET " | parsing emkfile\n");
emkfile = fopen(EMKFILE, "r");
printf(COL_BLUE "INF" COL_RESET " | creating new emkfile\n");
emkfile_new = fopen(EMKFILE_NEW, "a+");
printf(COL_BLIE "INF" COL_RESET " | running preprocessing tasks...\n");
/* write emkconfig to new emkfile */
contents = fgetc(emkconfig);
while (contents != EOF) {
@ -93,6 +97,7 @@ char includeConfig() {
contents = fgetc(emkfile);
}
printf(COL_BLUE "INF" COL_RESET " | closing files\n");
fclose(emkconfig);
fclose(emkfile);
fclose(emkfile_new);