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

@@ -30,9 +30,10 @@ Copyright (C) 2011-2021 Natalia Portillo
#include <stdlib.h>
#include <string.h>
#include "../os2.h"
#include "../../include/consts.h"
#include "../../include/defs.h"
#include "../../log.h"
#include "../os2.h"
void GetOsInfo()
{
@@ -46,7 +47,7 @@ void GetOsInfo()
if(rc)
{
printf("Error %d querying OS/2 version.\n", rc);
log_write("Error %d querying OS/2 version.\n", rc);
return;
}
@@ -61,13 +62,13 @@ void GetOsInfo()
MinorVer = aulBuffer[1];
}
printf("OS information:\n");
log_write("OS information:\n");
if(aulBuffer[2] > 0x20) printf("\tRunning under OS/2 %d.%d revision %c.\n", MajorVer, MinorVer, aulBuffer[2]);
if(aulBuffer[2] > 0x20) log_write("\tRunning under OS/2 %d.%d revision %c.\n", MajorVer, MinorVer, aulBuffer[2]);
else
printf("\tRunning under OS/2 %d.%d\n", MajorVer, MinorVer);
log_write("\tRunning under OS/2 %d.%d\n", MajorVer, MinorVer);
rc = DosQuerySysInfo(QSV_MAX_PATH_LENGTH, QSV_MAX_PATH_LENGTH, (PVOID)pathLen, sizeof(ULONG));
printf("\tMaximum path is %lu bytes.\n", pathLen[0]);
log_write("\tMaximum path is %lu bytes.\n", pathLen[0]);
}