Add options to write to a log and be quiet.

This commit is contained in:
2021-03-14 22:55:55 +00:00
parent f4ebb40f33
commit d65be35f01
62 changed files with 1152 additions and 885 deletions

View File

@@ -32,6 +32,7 @@ Copyright (C) 2011-2021 Natalia Portillo
#include "../include/consts.h"
#include "../include/defs.h"
#include "../log.h"
#include "os2.h"
void DirectoryDepth(const char* path)
@@ -50,7 +51,7 @@ void DirectoryDepth(const char* path)
if(rc)
{
printf("Cannot change to specified path, not continuing.\n");
log_write("Cannot change to specified path, not continuing.\n");
return;
}
@@ -58,13 +59,13 @@ void DirectoryDepth(const char* path)
if(rc)
{
printf("Cannot create working directory.\n");
log_write("Cannot create working directory.\n");
return;
}
rc = __os2_chdir("DEPTH");
printf("Creating deepest directory tree.\n");
log_write("Creating deepest directory tree.\n");
while(!rc)
{
@@ -77,5 +78,5 @@ void DirectoryDepth(const char* path)
pos++;
}
printf("\tCreated %d levels of directory hierarchy\n", pos);
log_write("\tCreated %d levels of directory hierarchy\n", pos);
}