- added an errorlog option.

This cuts down on as much message noise as possible, outputs everything to a file specified as a parameter and then quits immediately, allowing this to run from a batch that's supposed to check a larger list of files for errors.
Multiple outputs get appended if the file already exists.
This commit is contained in:
Christoph Oelckers 2016-02-09 14:20:49 +01:00
parent 6c92525fcd
commit 4d2a52418f
22 changed files with 96 additions and 70 deletions

1
.gitignore vendored
View file

@ -40,3 +40,4 @@
/jpeg-6b/x64/ /jpeg-6b/x64/
/lzma/x64/ /lzma/x64/
/zlib/x64/ /zlib/x64/
/build_vc2015

View file

@ -456,9 +456,9 @@ CCMD (exec)
} }
} }
void execLogfile(const char *fn) void execLogfile(const char *fn, bool append)
{ {
if ((Logfile = fopen(fn, "w"))) if ((Logfile = fopen(fn, append? "a" : "w")))
{ {
const char *timestr = myasctime(); const char *timestr = myasctime();
Printf("Log started: %s\n", timestr); Printf("Log started: %s\n", timestr);
@ -482,7 +482,7 @@ CCMD (logfile)
if (argv.argc() >= 2) if (argv.argc() >= 2)
{ {
execLogfile(argv[1]); execLogfile(argv[1], argv.argc() >=3? !!argv[2]:false);
} }
} }

View file

@ -182,6 +182,6 @@ extern unsigned int MakeKey (const char *s);
extern unsigned int MakeKey (const char *s, size_t len); extern unsigned int MakeKey (const char *s, size_t len);
extern unsigned int SuperFastHash (const char *data, size_t len); extern unsigned int SuperFastHash (const char *data, size_t len);
void execLogfile(const char *fn); void execLogfile(const char *fn, bool append = false);
#endif //__C_DISPATCH_H__ #endif //__C_DISPATCH_H__

View file

@ -2495,7 +2495,7 @@ bool D_LoadDehFile(const char *patchfile)
static bool DoDehPatch() static bool DoDehPatch()
{ {
Printf("Adding dehacked patch %s\n", PatchName); if (!batchrun) Printf("Adding dehacked patch %s\n", PatchName);
int cont; int cont;
@ -2586,7 +2586,7 @@ static bool DoDehPatch()
UnloadDehSupp (); UnloadDehSupp ();
delete[] PatchName; delete[] PatchName;
delete[] PatchFile; delete[] PatchFile;
Printf ("Patch installed\n"); if (!batchrun) Printf ("Patch installed\n");
return true; return true;
} }

View file

@ -228,6 +228,7 @@ bool nospriterename;
FStartupInfo DoomStartupInfo; FStartupInfo DoomStartupInfo;
FString lastIWAD; FString lastIWAD;
int restart = 0; int restart = 0;
bool batchrun; // just run the startup and collect all error messages in a logfile, then quit without any interaction
cycle_t FrameCycles; cycle_t FrameCycles;
@ -1868,7 +1869,6 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
static FString CheckGameInfo(TArray<FString> & pwads) static FString CheckGameInfo(TArray<FString> & pwads)
{ {
DWORD t = I_FPSTime();
// scan the list of WADs backwards to find the last one that contains a GAMEINFO lump // scan the list of WADs backwards to find the last one that contains a GAMEINFO lump
for(int i=pwads.Size()-1; i>=0; i--) for(int i=pwads.Size()-1; i>=0; i--)
{ {
@ -1920,8 +1920,6 @@ static FString CheckGameInfo(TArray<FString> & pwads)
delete resfile; delete resfile;
} }
} }
t = I_FPSTime() - t;
Printf("Gameinfo scan took %d ms\n", t);
return ""; return "";
} }
@ -2002,7 +2000,7 @@ static void D_DoomInit()
{ {
rngseed = staticrngseed = atoi(v); rngseed = staticrngseed = atoi(v);
use_staticrng = true; use_staticrng = true;
Printf("D_DoomInit: Static RNGseed %d set.\n", rngseed); if (!batchrun) Printf("D_DoomInit: Static RNGseed %d set.\n", rngseed);
} }
else else
{ {
@ -2012,7 +2010,7 @@ static void D_DoomInit()
FRandom::StaticClearRandom (); FRandom::StaticClearRandom ();
Printf ("M_LoadDefaults: Load system defaults.\n"); if (!batchrun) Printf ("M_LoadDefaults: Load system defaults.\n");
M_LoadDefaults (); // load before initing other systems M_LoadDefaults (); // load before initing other systems
} }
@ -2080,7 +2078,7 @@ static void CheckCmdLine()
int p; int p;
const char *v; const char *v;
Printf ("Checking cmd-line parameters...\n"); if (!batchrun) Printf ("Checking cmd-line parameters...\n");
if (Args->CheckParm ("-nomonsters")) flags |= DF_NO_MONSTERS; if (Args->CheckParm ("-nomonsters")) flags |= DF_NO_MONSTERS;
if (Args->CheckParm ("-respawn")) flags |= DF_MONSTERS_RESPAWN; if (Args->CheckParm ("-respawn")) flags |= DF_MONSTERS_RESPAWN;
if (Args->CheckParm ("-fast")) flags |= DF_FAST_MONSTERS; if (Args->CheckParm ("-fast")) flags |= DF_FAST_MONSTERS;
@ -2222,6 +2220,7 @@ void D_DoomMain (void)
FString *args; FString *args;
int argcount; int argcount;
FIWadManager *iwad_man; FIWadManager *iwad_man;
const char *batchout = Args->CheckValue("-errorlog");
// +logfile gets checked too late to catch the full startup log in the logfile so do some extra check for it here. // +logfile gets checked too late to catch the full startup log in the logfile so do some extra check for it here.
FString logfile = Args->TakeValue("+logfile"); FString logfile = Args->TakeValue("+logfile");
@ -2229,6 +2228,17 @@ void D_DoomMain (void)
{ {
execLogfile(logfile); execLogfile(logfile);
} }
else if (batchout != NULL && *batchout != 0)
{
batchrun = true;
execLogfile(batchout, true);
Printf("Command line: ");
for (int i = 0; i < Args->NumArgs(); i++)
{
Printf("%s ", Args->GetArg(i));
}
Printf("\n");
}
if (Args->CheckParm("-hashfiles")) if (Args->CheckParm("-hashfiles"))
{ {
@ -2339,7 +2349,7 @@ void D_DoomMain (void)
Printf("Notice: File hashing is incredibly verbose. Expect loading files to take much longer than usual.\n"); Printf("Notice: File hashing is incredibly verbose. Expect loading files to take much longer than usual.\n");
} }
Printf ("W_Init: Init WADfiles.\n"); if (!batchrun) Printf ("W_Init: Init WADfiles.\n");
Wads.InitMultipleFiles (allwads); Wads.InitMultipleFiles (allwads);
allwads.Clear(); allwads.Clear();
allwads.ShrinkToFit(); allwads.ShrinkToFit();
@ -2370,21 +2380,21 @@ void D_DoomMain (void)
if (!restart) if (!restart)
{ {
Printf ("I_Init: Setting up machine state.\n"); if (!batchrun) Printf ("I_Init: Setting up machine state.\n");
I_Init (); I_Init ();
I_CreateRenderer(); I_CreateRenderer();
} }
Printf ("V_Init: allocate screen.\n"); if (!batchrun) Printf ("V_Init: allocate screen.\n");
V_Init (!!restart); V_Init (!!restart);
// Base systems have been inited; enable cvar callbacks // Base systems have been inited; enable cvar callbacks
FBaseCVar::EnableCallbacks (); FBaseCVar::EnableCallbacks ();
Printf ("S_Init: Setting up sound.\n"); if (!batchrun) Printf ("S_Init: Setting up sound.\n");
S_Init (); S_Init ();
Printf ("ST_Init: Init startup screen.\n"); if (!batchrun) Printf ("ST_Init: Init startup screen.\n");
if (!restart) if (!restart)
{ {
StartScreen = FStartupScreen::CreateInstance (TexMan.GuesstimateNumTextures() + 5); StartScreen = FStartupScreen::CreateInstance (TexMan.GuesstimateNumTextures() + 5);
@ -2402,23 +2412,23 @@ void D_DoomMain (void)
S_ParseReverbDef (); S_ParseReverbDef ();
// [RH] Parse any SNDINFO lumps // [RH] Parse any SNDINFO lumps
Printf ("S_InitData: Load sound definitions.\n"); if (!batchrun) Printf ("S_InitData: Load sound definitions.\n");
S_InitData (); S_InitData ();
// [RH] Parse through all loaded mapinfo lumps // [RH] Parse through all loaded mapinfo lumps
Printf ("G_ParseMapInfo: Load map definitions.\n"); if (!batchrun) Printf ("G_ParseMapInfo: Load map definitions.\n");
G_ParseMapInfo (iwad_info->MapInfo); G_ParseMapInfo (iwad_info->MapInfo);
ReadStatistics(); ReadStatistics();
// MUSINFO must be parsed after MAPINFO // MUSINFO must be parsed after MAPINFO
S_ParseMusInfo(); S_ParseMusInfo();
Printf ("Texman.Init: Init texture manager.\n"); if (!batchrun) Printf ("Texman.Init: Init texture manager.\n");
TexMan.Init(); TexMan.Init();
C_InitConback(); C_InitConback();
// [CW] Parse any TEAMINFO lumps. // [CW] Parse any TEAMINFO lumps.
Printf ("ParseTeamInfo: Load team definitions.\n"); if (!batchrun) Printf ("ParseTeamInfo: Load team definitions.\n");
TeamLibrary.ParseTeamInfo (); TeamLibrary.ParseTeamInfo ();
PClassActor::StaticInit (); PClassActor::StaticInit ();
@ -2437,11 +2447,11 @@ void D_DoomMain (void)
StartScreen->Progress (); StartScreen->Progress ();
Printf ("R_Init: Init %s refresh subsystem.\n", gameinfo.ConfigName.GetChars()); if (!batchrun) Printf ("R_Init: Init %s refresh subsystem.\n", gameinfo.ConfigName.GetChars());
StartScreen->LoadingStatus ("Loading graphics", 0x3f); StartScreen->LoadingStatus ("Loading graphics", 0x3f);
R_Init (); R_Init ();
Printf ("DecalLibrary: Load decals.\n"); if (!batchrun) Printf ("DecalLibrary: Load decals.\n");
DecalLibrary.ReadAllDecals (); DecalLibrary.ReadAllDecals ();
// [RH] Add any .deh and .bex files on the command line. // [RH] Add any .deh and .bex files on the command line.
@ -2458,7 +2468,7 @@ void D_DoomMain (void)
{ {
if (stricmp (key, "Path") == 0 && FileExists (value)) if (stricmp (key, "Path") == 0 && FileExists (value))
{ {
Printf ("Applying patch %s\n", value); if (!batchrun) Printf ("Applying patch %s\n", value);
D_LoadDehFile(value); D_LoadDehFile(value);
} }
} }
@ -2483,10 +2493,10 @@ void D_DoomMain (void)
bglobal.spawn_tries = 0; bglobal.spawn_tries = 0;
bglobal.wanted_botnum = bglobal.getspawned.Size(); bglobal.wanted_botnum = bglobal.getspawned.Size();
Printf ("M_Init: Init menus.\n"); if (!batchrun) Printf ("M_Init: Init menus.\n");
M_Init (); M_Init ();
Printf ("P_Init: Init Playloop state.\n"); if (!batchrun) Printf ("P_Init: Init Playloop state.\n");
StartScreen->LoadingStatus ("Init game engine", 0x3f); StartScreen->LoadingStatus ("Init game engine", 0x3f);
AM_StaticInit(); AM_StaticInit();
P_Init (); P_Init ();
@ -2497,22 +2507,25 @@ void D_DoomMain (void)
SBarInfo::Load(); SBarInfo::Load();
HUD_InitHud(); HUD_InitHud();
// [RH] User-configurable startup strings. Because BOOM does. if (!batchrun)
static const char *startupString[5] = {
"STARTUP1", "STARTUP2", "STARTUP3", "STARTUP4", "STARTUP5"
};
for (p = 0; p < 5; ++p)
{ {
const char *str = GStrings[startupString[p]]; // [RH] User-configurable startup strings. Because BOOM does.
if (str != NULL && str[0] != '\0') static const char *startupString[5] = {
"STARTUP1", "STARTUP2", "STARTUP3", "STARTUP4", "STARTUP5"
};
for (p = 0; p < 5; ++p)
{ {
Printf ("%s\n", str); const char *str = GStrings[startupString[p]];
if (str != NULL && str[0] != '\0')
{
Printf("%s\n", str);
}
} }
} }
if (!restart) if (!restart)
{ {
Printf ("D_CheckNetGame: Checking network game status.\n"); if (!batchrun) Printf ("D_CheckNetGame: Checking network game status.\n");
StartScreen->LoadingStatus ("Checking network game status.", 0x3f); StartScreen->LoadingStatus ("Checking network game status.", 0x3f);
D_CheckNetGame (); D_CheckNetGame ();
} }
@ -2545,7 +2558,7 @@ void D_DoomMain (void)
StartScreen = NULL; StartScreen = NULL;
S_Sound (CHAN_BODY, "misc/startupdone", 1, ATTN_NONE); S_Sound (CHAN_BODY, "misc/startupdone", 1, ATTN_NONE);
if (Args->CheckParm("-norun")) if (Args->CheckParm("-norun") || batchrun)
{ {
throw CNoRunExit(); throw CNoRunExit();
} }

View file

@ -1739,7 +1739,7 @@ void D_CheckNetGame (void)
Printf("Arbitrator selected " TEXTCOLOR_BLUE "%s" TEXTCOLOR_NORMAL " networking mode.\n", NetMode == NET_PeerToPeer ? "peer to peer" : "packet server"); Printf("Arbitrator selected " TEXTCOLOR_BLUE "%s" TEXTCOLOR_NORMAL " networking mode.\n", NetMode == NET_PeerToPeer ? "peer to peer" : "packet server");
} }
Printf ("player %i of %i (%i nodes)\n", if (!batchrun) Printf ("player %i of %i (%i nodes)\n",
consoleplayer+1, doomcom.numplayers, doomcom.numnodes); consoleplayer+1, doomcom.numplayers, doomcom.numnodes);
} }

View file

@ -125,6 +125,8 @@ typedef TMap<int, PClassActor *> FClassMap;
#include "basictypes.h" #include "basictypes.h"
extern bool batchrun;
// Bounding box coordinate storage. // Bounding box coordinate storage.
enum enum
{ {

View file

@ -434,7 +434,7 @@ void SBarInfo::Load()
int lump = Wads.CheckNumForFullName(gameinfo.statusbar, true); int lump = Wads.CheckNumForFullName(gameinfo.statusbar, true);
if(lump != -1) if(lump != -1)
{ {
Printf ("ParseSBarInfo: Loading default status bar definition.\n"); if (!batchrun) Printf ("ParseSBarInfo: Loading default status bar definition.\n");
if(SBarInfoScript[SCRIPT_DEFAULT] == NULL) if(SBarInfoScript[SCRIPT_DEFAULT] == NULL)
SBarInfoScript[SCRIPT_DEFAULT] = new SBarInfo(lump); SBarInfoScript[SCRIPT_DEFAULT] = new SBarInfo(lump);
else else
@ -444,7 +444,7 @@ void SBarInfo::Load()
if(Wads.CheckNumForName("SBARINFO") != -1) if(Wads.CheckNumForName("SBARINFO") != -1)
{ {
Printf ("ParseSBarInfo: Loading custom status bar definition.\n"); if (!batchrun) Printf ("ParseSBarInfo: Loading custom status bar definition.\n");
int lastlump, lump; int lastlump, lump;
lastlump = 0; lastlump = 0;
while((lump = Wads.FindLump("SBARINFO", &lastlump)) != -1) while((lump = Wads.FindLump("SBARINFO", &lastlump)) != -1)

View file

@ -152,7 +152,7 @@ void PClassActor::StaticInit()
sprites.Push (temp); sprites.Push (temp);
} }
Printf ("LoadActors: Load actor definitions.\n"); if (!batchrun) Printf ("LoadActors: Load actor definitions.\n");
ClearStrifeTypes(); ClearStrifeTypes();
LoadActors (); LoadActors ();
InitBotStuff(); InitBotStuff();

View file

@ -55,11 +55,11 @@ bool UseKnownFolders()
if (file != INVALID_HANDLE_VALUE) if (file != INVALID_HANDLE_VALUE)
{ {
CloseHandle(file); CloseHandle(file);
Printf("Using program directory for storage\n"); if (!batchrun) Printf("Using program directory for storage\n");
iswritable = true; iswritable = true;
return false; return false;
} }
Printf("Using known folders for storage\n"); if (!batchrun) Printf("Using known folders for storage\n");
iswritable = false; iswritable = false;
return true; return true;
} }

View file

@ -316,7 +316,7 @@ bool F7ZFile::Open(bool quiet)
} }
} }
if (!quiet) Printf(", %d lumps\n", NumLumps); if (!quiet && !batchrun) Printf(", %d lumps\n", NumLumps);
PostProcessArchive(&Lumps[0], sizeof(F7ZLump)); PostProcessArchive(&Lumps[0], sizeof(F7ZLump));
return true; return true;

View file

@ -121,7 +121,7 @@ bool FGrpFile::Open(bool quiet)
fileinfo[i].NameWithZero[12] = '\0'; // Be sure filename is null-terminated fileinfo[i].NameWithZero[12] = '\0'; // Be sure filename is null-terminated
Lumps[i].LumpNameSetup(fileinfo[i].NameWithZero); Lumps[i].LumpNameSetup(fileinfo[i].NameWithZero);
} }
if (!quiet) Printf(", %d lumps\n", NumLumps); if (!quiet && !batchrun) Printf(", %d lumps\n", NumLumps);
delete[] fileinfo; delete[] fileinfo;
return true; return true;

View file

@ -104,7 +104,7 @@ bool FPakFile::Open(bool quiet)
Lumps = new FUncompressedLump[NumLumps]; Lumps = new FUncompressedLump[NumLumps];
if (!quiet) Printf(", %d lumps\n", NumLumps); if (!quiet && !batchrun) Printf(", %d lumps\n", NumLumps);
for(DWORD i = 0; i < NumLumps; i++) for(DWORD i = 0; i < NumLumps; i++)
{ {

View file

@ -152,7 +152,7 @@ bool FRFFFile::Open(bool quiet)
Lumps = new FRFFLump[NumLumps]; Lumps = new FRFFLump[NumLumps];
if (!quiet) Printf(", %d lumps\n", NumLumps); if (!quiet && !batchrun) Printf(", %d lumps\n", NumLumps);
for (DWORD i = 0; i < NumLumps; ++i) for (DWORD i = 0; i < NumLumps; ++i)
{ {
Lumps[i].Position = LittleLong(lumps[i].FilePos); Lumps[i].Position = LittleLong(lumps[i].FilePos);

View file

@ -370,7 +370,7 @@ bool FWadFile::Open(bool quiet)
if (!quiet) if (!quiet)
{ {
Printf(", %d lumps\n", NumLumps); if (!batchrun) Printf(", %d lumps\n", NumLumps);
// don't bother with namespaces here. We won't need them. // don't bother with namespaces here. We won't need them.
SetNamespace("S_START", "S_END", ns_sprites); SetNamespace("S_START", "S_END", ns_sprites);

View file

@ -268,7 +268,7 @@ bool FZipFile::Open(bool quiet)
NumLumps -= skipped; NumLumps -= skipped;
free(directory); free(directory);
if (!quiet) Printf(TEXTCOLOR_NORMAL ", %d lumps\n", NumLumps); if (!quiet && !batchrun) Printf(TEXTCOLOR_NORMAL ", %d lumps\n", NumLumps);
PostProcessArchive(&Lumps[0], sizeof(FZipLump)); PostProcessArchive(&Lumps[0], sizeof(FZipLump));
return true; return true;

View file

@ -259,7 +259,7 @@ void I_InitSound ()
nosfx = !!Args->CheckParm ("-nosfx"); nosfx = !!Args->CheckParm ("-nosfx");
GSnd = NULL; GSnd = NULL;
if (nosound) if (nosound || batchrun)
{ {
GSnd = new NullSoundRenderer; GSnd = new NullSoundRenderer;
I_InitMusic (); I_InitMusic ();

View file

@ -444,7 +444,7 @@ void LoadActors ()
} }
FinishThingdef(); FinishThingdef();
timer.Unclock(); timer.Unclock();
Printf("DECORATE parsing took %.2f ms\n", timer.TimeMS()); if (!batchrun) Printf("DECORATE parsing took %.2f ms\n", timer.TimeMS());
// Base time: ~52 ms // Base time: ~52 ms
} }

View file

@ -256,7 +256,7 @@ void FWadCollection::AddFile (const char *filename, FileReader *wadinfo)
} }
} }
Printf (" adding %s", filename); if (!batchrun) Printf (" adding %s", filename);
startlump = NumLumps; startlump = NumLumps;
FResourceFile *resfile; FResourceFile *resfile;

View file

@ -1005,20 +1005,23 @@ void DoMain (HINSTANCE hInstance)
catch (class CNoRunExit &) catch (class CNoRunExit &)
{ {
I_ShutdownGraphics(); I_ShutdownGraphics();
if (FancyStdOut && !AttachedStdOut) if (!batchrun)
{ // Outputting to a new console window: Wait for a keypress before quitting.
DWORD bytes;
HANDLE stdinput = GetStdHandle(STD_INPUT_HANDLE);
ShowWindow (Window, SW_HIDE);
WriteFile(StdOut, "Press any key to exit...", 24, &bytes, NULL);
FlushConsoleInputBuffer(stdinput);
SetConsoleMode(stdinput, 0);
ReadConsole(stdinput, &bytes, 1, &bytes, NULL);
}
else if (StdOut == NULL)
{ {
ShowErrorPane(NULL); if (FancyStdOut && !AttachedStdOut)
{ // Outputting to a new console window: Wait for a keypress before quitting.
DWORD bytes;
HANDLE stdinput = GetStdHandle(STD_INPUT_HANDLE);
ShowWindow(Window, SW_HIDE);
WriteFile(StdOut, "Press any key to exit...", 24, &bytes, NULL);
FlushConsoleInputBuffer(stdinput);
SetConsoleMode(stdinput, 0);
ReadConsole(stdinput, &bytes, 1, &bytes, NULL);
}
else if (StdOut == NULL)
{
ShowErrorPane(NULL);
}
} }
exit(0); exit(0);
} }
@ -1028,7 +1031,14 @@ void DoMain (HINSTANCE hInstance)
RestoreConView (); RestoreConView ();
if (error.GetMessage ()) if (error.GetMessage ())
{ {
ShowErrorPane (error.GetMessage()); if (!batchrun)
{
ShowErrorPane(error.GetMessage());
}
else
{
Printf("%s\n", error.GetMessage());
}
} }
exit (-1); exit (-1);
} }

View file

@ -595,14 +595,14 @@ void I_DetectOS(void)
if (OSPlatform == os_Win95) if (OSPlatform == os_Win95)
{ {
Printf ("OS: Windows %s %lu.%lu.%lu %s\n", if (!batchrun) Printf ("OS: Windows %s %lu.%lu.%lu %s\n",
osname, osname,
info.dwMajorVersion, info.dwMinorVersion, info.dwMajorVersion, info.dwMinorVersion,
info.dwBuildNumber & 0xffff, info.szCSDVersion); info.dwBuildNumber & 0xffff, info.szCSDVersion);
} }
else else
{ {
Printf ("OS: Windows %s (NT %lu.%lu) Build %lu\n %s\n", if (!batchrun) Printf ("OS: Windows %s (NT %lu.%lu) Build %lu\n %s\n",
osname, osname,
info.dwMajorVersion, info.dwMinorVersion, info.dwMajorVersion, info.dwMinorVersion,
info.dwBuildNumber, info.szCSDVersion); info.dwBuildNumber, info.szCSDVersion);
@ -610,7 +610,7 @@ void I_DetectOS(void)
if (OSPlatform == os_unknown) if (OSPlatform == os_unknown)
{ {
Printf ("(Assuming Windows 2000)\n"); if (!batchrun) Printf ("(Assuming Windows 2000)\n");
OSPlatform = os_Win2k; OSPlatform = os_Win2k;
} }
} }
@ -727,7 +727,7 @@ void CalculateCPUSpeed()
PerfToMillisec = PerfToSec * 1000.0; PerfToMillisec = PerfToSec * 1000.0;
} }
Printf ("CPU Speed: %.0f MHz\n", 0.001 / PerfToMillisec); if (!batchrun) Printf ("CPU Speed: %.0f MHz\n", 0.001 / PerfToMillisec);
} }
//========================================================================== //==========================================================================

View file

@ -195,7 +195,7 @@ void DumpCPUInfo(const CPUInfo *cpu)
} }
*t = '\0'; *t = '\0';
if (cpu->VendorID[0]) if (cpu->VendorID[0] && !batchrun)
{ {
Printf("CPU Vendor ID: %s\n", cpu->VendorID); Printf("CPU Vendor ID: %s\n", cpu->VendorID);
if (cpustring[0]) if (cpustring[0])