- 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>
101 lines
3.4 KiB
C++
101 lines
3.4 KiB
C++
// BDE - (C) Copyright 1994 by Borland International
|
|
|
|
#ifndef __QUERY_H
|
|
#define __QUERY_H
|
|
|
|
#include <windows.h>
|
|
#include <stdarg.h>
|
|
#include <malloc.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
#include <idapi.h>
|
|
#include <ctl3d.h>
|
|
#include <commdlg.h>
|
|
#include <io.h>
|
|
#include <direct.h>
|
|
#include "macro.h"
|
|
#include "query.rh"
|
|
|
|
#define WM_MYSETUP WM_USER + 1
|
|
#define MAX_DATABASE_HANDLES 10
|
|
|
|
// Common dialog defines
|
|
#define FILE_OPEN_DIALOG 0
|
|
#define FILE_SAVE_DIALOG 1
|
|
|
|
typedef struct {
|
|
hDBIDb hdb;
|
|
char szDatabaseName[81];
|
|
}DBStruct;
|
|
|
|
typedef DBStruct DBStructArray[MAX_DATABASE_HANDLES];
|
|
|
|
extern HWND hMainWnd;
|
|
extern const char szAppName[];
|
|
extern const char szDialogName[];
|
|
extern const char szConnectDialogName[];
|
|
extern HWND hMainWnd;
|
|
extern HINSTANCE hInst;
|
|
extern char far szMainHelpText[];
|
|
extern char far szConnectHelpText[];
|
|
extern WNDPROC _wpOrigWndProc;
|
|
extern WNDPROC _wpOrigWndProc1;
|
|
|
|
// Directory in which the tables exist. Full path name will be generated
|
|
// by the application
|
|
extern char far szTblDirectory[];
|
|
extern char far szPrivDirectory[];
|
|
|
|
//
|
|
// Function prototypes for DISPLAY.C
|
|
//
|
|
DBIResult DisplayTable(hDBICur hCur, UINT32 uDisplayNRecs);
|
|
void Screen(pCHAR pszMsg);
|
|
void Cls (void);
|
|
void DisplayProgress(char * szProgress);
|
|
|
|
//
|
|
// Function prototypes for QUERY.C
|
|
//
|
|
|
|
UINT16 SaveQuery(DBIQryLang QryType);
|
|
UINT16 LoadQuery(DBIQryLang QryType);
|
|
UINT16 SaveResultSet(hDBICur hCur, hDBIDb hDb);
|
|
BOOL InitApp (int nCmdShow);
|
|
BOOL CALLBACK _export ConnectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
|
BOOL CALLBACK HourGlassCursor(BOOL turnOn);
|
|
CBRType DBIFN _export GenProgCallBack(CBType ecbType, UINT32 iClientData, pVOID pCbInfo);
|
|
UINT16 RemoveConnection(HWND hDlg, DBStructArray array, int nIndex);
|
|
long FAR _pascal _export MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
|
BOOL FAR _pascal _export AboutDlg (HWND hWnd, WORD msg, WORD wParam, LONG lParam);
|
|
long FAR _pascal _export EditSubClassProc(HWND hWnd, WORD msg, WORD wParam, LONG lParam);
|
|
int MakeFullPath(pCHAR pszDirectory, pCHAR pszRelativeDirectory);
|
|
|
|
//
|
|
// Function prototypes for ENGINE.C
|
|
//
|
|
DBIResult QueryDbiInit(void);
|
|
DBIResult QueryDbiExit(void);
|
|
void QueryDbiCloseDatabase(phDBIDb phDb);
|
|
hDBIDb QueryConnectToDatabase(HWND hWnd);
|
|
hDBIDb QueryGetStandardConnection(void);
|
|
void QueryResetConnectDialog(HWND hWnd, const DBStructArray dbarray,
|
|
const int iSelected);
|
|
DBIResult QueryQExec(hDBIDb hDb, DBIQryLang eQryLang,
|
|
char* szQuery, char *szOutputErrorString, phDBICur phCur);
|
|
BOOL QuerySaveResultSet(hDBICur hCur, hDBIDb hDb, char* szFileName);
|
|
DBIResult GetWorkingDirectory(hDBIDb hDb, pCHAR szDirctory);
|
|
DBIResult SetWorkingDirectory(hDBIDb hDb, pCHAR szDirctory);
|
|
DBIResult RegisterCallBack(hDBICur hCur, CBType ecbType, UINT32 iClientData,
|
|
UINT16 iCbBufLen, pVOID pCbBuf, pfDBICallBack pfCb);
|
|
void GetErrorInformation(char *szOutputErrorString);
|
|
DBIResult CleanUpAnswer(hDBICur *hCur);
|
|
|
|
// Macro for Subclassing the edit control.
|
|
#define SubClassWindow(hWnd, lpfn) \
|
|
((WNDPROC)SetWindowLong((hWnd), GWL_WNDPROC, \
|
|
(LPARAM)(WNDPROC)(lpfn)))
|
|
|
|
#endif
|