- BORLAND/: Borland C++ 4.52 (chosen over 4.5 by byte-match: CODE/RP/CW32.LIB
is identical to 4.52's install lib). BCC32/TLINK32/TLIB/MAKE run natively on
Win11; CODE/BT/OPT.MAK is the shipped BTL4OPT.EXE's exact flag recipe
(extender = Borland PowerPack DPMI32, not Phar Lap TNT).
- restoration/source410/: the literal 1995-form reconstruction of the missing
BT game source (never mixed into CODE/). Round 1-3 state:
* 6 of 10 surviving original TUs COMPILE CLEAN under the period toolchain
(BTMSSN, BTCNSL, BTSCNRL, BTTEAM, BTL4MODE, BTL4ARND) - first builds
since 1996.
* BT_L4/BTL4APP.CPP pilot reconstruction: 12/12 functions, Fail() lands on
its binary-recorded line 400 exactly.
* BT/BTCNSL.HPP: console wire IDs recovered from the binary's ctors
(Killed=9, Damaged=10, ScoreUpdate=13, DeathWithoutHonor=15 [T1];
TeamScore=12 flagged [T4]).
* MUNGA/: 8 engine-header backfills back-dated from the BT412 WinTesla tree
(VDATA numbering decomp-verified; AUDREND's OpenAL-era virtual removed -
the period compiler is the drift detector).
* Tooling: backdate.py (WinTesla->1995 header transform), compile410.sh
(per-TU verification sweep under authentic OPT.MAK flags).
* README: corrected roadmap - MECH.HPP is the capstone grown with the mech
TU reconstructions; BTREG.CPP green = the header-family milestone.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
121 lines
4.5 KiB
C++
121 lines
4.5 KiB
C++
// BDE - (C) Copyright 1995 by Borland International
|
|
|
|
// SysInfo.c
|
|
#include "snipit.h"
|
|
|
|
//=====================================================================
|
|
// Function:
|
|
// SysInfo();
|
|
//
|
|
// Description:
|
|
// This example displays information about the system.
|
|
//=====================================================================
|
|
void
|
|
SysInfo (void)
|
|
{
|
|
DBIResult rslt; // Value returned from IDAPI functions
|
|
SYSVersion sysVersion; // Version information
|
|
SYSConfig sysConfig; // Configuration information
|
|
CLIENTInfo clientInfo; // Client information
|
|
SYSInfo sysInfo; // System information
|
|
|
|
CHAR szDate[12]; // String to hold the date
|
|
UINT16 uMonth; // Month of the year
|
|
UINT16 uDay; // Day of the month
|
|
INT16 iYear; // Year
|
|
|
|
CHAR szTime[12]; // String to contain the time
|
|
UINT16 uHour; // Hour
|
|
UINT16 uMin; // Minute
|
|
UINT16 uMilSec; // Millisecond
|
|
|
|
Screen("*** Getting system information ***\r\n");
|
|
|
|
BREAK_IN_DEBUGGER();
|
|
|
|
Screen("\r\n Initializing IDAPI...");
|
|
rslt = DbiInit(NULL);
|
|
if (ChkRslt(rslt, "Init") != DBIERR_NONE)
|
|
{
|
|
Screen("\r\n*** End of Example ***");
|
|
return;
|
|
}
|
|
|
|
// Turn on trace information if the debug layer is anabled (DLLSWAP.EXE).
|
|
DbiDebugLayerOptions(DEBUGON | OUTPUTTOFILE, "SNIPIT.INF");
|
|
|
|
// Specify where temporary files are placed.
|
|
rslt = DbiSetPrivateDir(szPrivDirectory);
|
|
ChkRslt(rslt, "SetPrivateDir");
|
|
|
|
Screen("\r\n Getting system version info...");
|
|
rslt = DbiGetSysVersion(&sysVersion);
|
|
ChkRslt(rslt, "GetSysVersion");
|
|
|
|
// Format the date to MM\DD\YYYY format.
|
|
rslt = DbiDateDecode(sysVersion.dateVer, &uMonth, &uDay, &iYear);
|
|
ChkRslt(rslt, "DateEncode");
|
|
wsprintf(szDate, "%u\\%u\\%u", uMonth, uDay, iYear);
|
|
|
|
// Format the time to HH:MM:SS format.
|
|
rslt = DbiTimeDecode(sysVersion.timeVer, &uHour, &uMin, &uMilSec);
|
|
ChkRslt(rslt, "TimeEncode");
|
|
wsprintf(szTime, "%02u:%02u:%02u", uHour, uMin, (uMilSec / 1000));
|
|
|
|
// Display the version information.
|
|
Screen(" IDAPI Version: %d", sysVersion.iVersion);
|
|
Screen(" Interface Level: %d", sysVersion.iIntfLevel);
|
|
Screen(" Version Date: %s", szDate);
|
|
Screen(" Version Time: %s", szTime);
|
|
|
|
Screen("\r\n Getting system configuration information...");
|
|
rslt = DbiGetSysConfig(&sysConfig);
|
|
ChkRslt(rslt, "GetSysConfig");
|
|
|
|
// Display configuration information.
|
|
Screen(" Share Local Tables : %s",
|
|
(sysConfig.bLocalShare ? "TRUE" : "FALSE"));
|
|
Screen(" Share Network Tables: %s",
|
|
(sysConfig.bNetShare ? "TRUE" : "FALSE"));
|
|
Screen(" Net Protocol: %d", sysConfig.iNetProtocol);
|
|
Screen(" Network Type: %s", sysConfig.szNetType);
|
|
Screen(" User Name: %s", sysConfig.szUserName);
|
|
Screen(" Config File: %s", sysConfig.szIniFile);
|
|
Screen(" Language Driver: %s", sysConfig.szLangDriver);
|
|
|
|
Screen("\r\n Getting Client Information...");
|
|
rslt = DbiGetClientInfo(&clientInfo);
|
|
ChkRslt(rslt, "GetClientInfo");
|
|
|
|
// Display client information.
|
|
Screen(" Documentary name: %s",
|
|
clientInfo.szName);
|
|
Screen(" Number of sessions: %d",
|
|
clientInfo.iSessions);
|
|
Screen(" Working directory: %s",
|
|
clientInfo.szWorkDir);
|
|
Screen(" Client language(for messages): %s",
|
|
clientInfo.szLang);
|
|
|
|
Screen("\r\n Getting system status information...");
|
|
rslt = DbiGetSysInfo(&sysInfo);
|
|
ChkRslt(rslt, "GetSysInfo");
|
|
|
|
// Display system status information.
|
|
Screen(" %dK Buffer Space %dK Heap Space",
|
|
sysInfo.iBufferSpace, sysInfo.iHeapSpace);
|
|
Screen(" Active: %d driver(s), %d client(s), %d session(s)",
|
|
sysInfo.iDrivers, sysInfo.iClients, sysInfo.iSessions);
|
|
Screen(" Open : %d Database(s), %d Cursor(s)",
|
|
sysInfo.iDatabases, sysInfo.iCursors);
|
|
|
|
// Turn off trace information.
|
|
DbiDebugLayerOptions(0, NULL);
|
|
|
|
// Exit IDAPI.
|
|
rslt = DbiExit();
|
|
ChkRslt(rslt, "Exit");
|
|
|
|
Screen("\r\n*** End of example ***");
|
|
}
|