DEVTOOLS: Improved logging for create_engine

This commit is contained in:
Eugene Sandulenko
2022-05-18 17:41:21 +02:00
parent e95fb37ffa
commit f0ecb4145a
+10
View File
@@ -95,6 +95,9 @@ void process_file(const char *filename) {
sprintf(destFilename, "../../engines/%s/%s",
engineLowercase, filename);
printf("Creating file %s...", destFilename);
fflush(stdout);
FILE *in, *out;
if (!(in = fopen(srcFilename, "r"))) {
printf("Could not locate file - %s\n", srcFilename);
@@ -108,6 +111,8 @@ void process_file(const char *filename) {
process_file(in, out);
printf("done\n");
fclose(in);
fclose(out);
}
@@ -164,10 +169,15 @@ int main(int argc, char *argv[]) {
// Create a directory for the new engine
char folder[MAX_LINE_LENGTH];
sprintf(folder, "../../engines/%s", engineLowercase);
printf("Creating directory ../../engines/%s...", engineLowercase);
fflush(stdout);
if (mkdir(folder, 0755)) {
printf("Could not create engine folder.\n");
return 0;
}
printf("done\n");
// Process the files
for (const char *const *filename = FILENAMES; *filename; ++filename)