- 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>
240 lines
5.4 KiB
C++
240 lines
5.4 KiB
C++
/*
|
|
* C/C++ Run Time Library - Version 6.5
|
|
*
|
|
* Copyright (c) 1994 by Borland International
|
|
* All Rights Reserved.
|
|
*
|
|
*/
|
|
|
|
#if !defined(__FLAT__)
|
|
|
|
|
|
/*****************************************************************************\
|
|
* *
|
|
* lzexpand.h Public interfaces for LZEXPAND.DLL. *
|
|
* *
|
|
* Version 3.10 *
|
|
* *
|
|
* NOTE: windows.h must be included first if LIB is NOT #defined *
|
|
* *
|
|
*******************************************************************************
|
|
*
|
|
* #define LIB - To be used with LZEXP?.LIB (default is for LZEXPAND.DLL)
|
|
* NOTE: Not compatible with windows.h if LIB is #defined
|
|
*
|
|
\*****************************************************************************/
|
|
|
|
#ifndef __LZEXPAND_H /* prevent multiple includes */
|
|
#define __LZEXPAND_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" { /* Assume C declarations for C++ */
|
|
#endif /* __cplusplus */
|
|
|
|
#if !defined(__WINDOWS_H) && !defined(LIB)
|
|
#include <windows.h> /* <windows.h> must be included */
|
|
#endif /* __WINDOWS_H */
|
|
|
|
/*
|
|
* If .lib version is being used, declare types used in this file.
|
|
*/
|
|
#ifdef LIB
|
|
|
|
#define LZAPI _pascal
|
|
|
|
#ifndef WINAPI /* don't declare if they're already declared */
|
|
#define WINAPI _far _pascal
|
|
#define NEAR _near
|
|
#define FAR _far
|
|
#define PASCAL _pascal
|
|
typedef int BOOL;
|
|
#define TRUE 1
|
|
#define FALSE 0
|
|
typedef unsigned char BYTE;
|
|
typedef unsigned short WORD;
|
|
typedef unsigned int UINT;
|
|
typedef signed long LONG;
|
|
typedef unsigned long DWORD;
|
|
typedef char far* LPSTR;
|
|
typedef const char far* LPCSTR;
|
|
typedef int HFILE;
|
|
#define OFSTRUCT void /* Not used by the .lib version */
|
|
#endif /* WINAPI */
|
|
|
|
#else /* LIB */
|
|
|
|
#define LZAPI _far _pascal
|
|
|
|
/* If included with the 3.0 windows.h, define compatible aliases */
|
|
#if !defined(WINVER) || (WINVER < 0x030a)
|
|
#define UINT WORD
|
|
#define LPCSTR LPSTR
|
|
#define HFILE int
|
|
#endif /* WIN3.0 */
|
|
|
|
#endif /* !LIB */
|
|
|
|
/****** Error return codes ***************************************************/
|
|
|
|
#define LZERROR_BADINHANDLE (-1) /* invalid input handle */
|
|
#define LZERROR_BADOUTHANDLE (-2) /* invalid output handle */
|
|
#define LZERROR_READ (-3) /* corrupt compressed file format */
|
|
#define LZERROR_WRITE (-4) /* out of space for output file */
|
|
#define LZERROR_GLOBALLOC (-5) /* insufficient memory for LZFile struct */
|
|
#define LZERROR_GLOBLOCK (-6) /* bad global handle */
|
|
#define LZERROR_BADVALUE (-7) /* input parameter out of range */
|
|
#define LZERROR_UNKNOWNALG (-8) /* compression algorithm not recognized */
|
|
|
|
/****** Public functions *****************************************************/
|
|
|
|
int LZAPI LZStart(void);
|
|
void LZAPI LZDone(void);
|
|
LONG LZAPI CopyLZFile(HFILE, HFILE);
|
|
LONG LZAPI LZCopy(HFILE, HFILE);
|
|
HFILE LZAPI LZInit(HFILE);
|
|
int LZAPI GetExpandedName(LPCSTR, LPSTR);
|
|
HFILE LZAPI LZOpenFile(LPCSTR, OFSTRUCT FAR*, UINT);
|
|
LONG LZAPI LZSeek(HFILE, LONG, int);
|
|
int LZAPI LZRead(HFILE, void FAR*, int);
|
|
void LZAPI LZClose(HFILE);
|
|
|
|
#ifdef __cplusplus
|
|
} /* End of extern "C" { */
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
#endif // _LZEXPAND_INCLUDED_
|
|
|
|
|
|
#else /* defined __FLAT__ */
|
|
/*
|
|
** lzdos.h - Public interface to LZEXP?.LIB.
|
|
*/
|
|
|
|
#ifndef _LZEXPAND_
|
|
#define _LZEXPAND_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
** Error Return Codes
|
|
*/
|
|
|
|
#define LZERROR_BADINHANDLE (-1) /* invalid input handle */
|
|
#define LZERROR_BADOUTHANDLE (-2) /* invalid output handle */
|
|
#define LZERROR_READ (-3) /* corrupt compressed file format */
|
|
#define LZERROR_WRITE (-4) /* out of space for output file */
|
|
#define LZERROR_GLOBALLOC (-5) /* insufficient memory for LZFile struct */
|
|
#define LZERROR_GLOBLOCK (-6) /* bad global handle */
|
|
#define LZERROR_BADVALUE (-7) /* input parameter out of acceptable range*/
|
|
#define LZERROR_UNKNOWNALG (-8) /* compression algorithm not recognized */
|
|
|
|
|
|
/*
|
|
** Prototypes
|
|
*/
|
|
|
|
INT
|
|
APIENTRY
|
|
LZStart(
|
|
VOID
|
|
);
|
|
|
|
VOID
|
|
APIENTRY
|
|
LZDone(
|
|
VOID
|
|
);
|
|
|
|
LONG
|
|
APIENTRY
|
|
CopyLZFile(
|
|
INT,
|
|
INT
|
|
);
|
|
|
|
LONG
|
|
APIENTRY
|
|
LZCopy(
|
|
INT,
|
|
INT
|
|
);
|
|
|
|
INT
|
|
APIENTRY
|
|
LZInit(
|
|
INT
|
|
);
|
|
|
|
INT
|
|
APIENTRY
|
|
GetExpandedNameA(
|
|
LPSTR,
|
|
LPSTR
|
|
);
|
|
INT
|
|
APIENTRY
|
|
GetExpandedNameW(
|
|
LPWSTR,
|
|
LPWSTR
|
|
);
|
|
#ifdef UNICODE
|
|
#define GetExpandedName GetExpandedNameW
|
|
#else
|
|
#define GetExpandedName GetExpandedNameA
|
|
#endif // !UNICODE
|
|
|
|
INT
|
|
APIENTRY
|
|
LZOpenFileA(
|
|
LPSTR,
|
|
LPOFSTRUCT,
|
|
WORD
|
|
);
|
|
INT
|
|
APIENTRY
|
|
LZOpenFileW(
|
|
LPWSTR,
|
|
LPOFSTRUCT,
|
|
WORD
|
|
);
|
|
#ifdef UNICODE
|
|
#define LZOpenFile LZOpenFileW
|
|
#else
|
|
#define LZOpenFile LZOpenFileA
|
|
#endif // !UNICODE
|
|
|
|
LONG
|
|
APIENTRY
|
|
LZSeek(
|
|
INT,
|
|
LONG,
|
|
INT
|
|
);
|
|
|
|
INT
|
|
APIENTRY
|
|
LZRead(
|
|
INT,
|
|
LPSTR,
|
|
INT
|
|
);
|
|
|
|
VOID
|
|
APIENTRY
|
|
LZClose(
|
|
INT
|
|
);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif // _LZEXPAND_
|
|
|
|
|
|
#endif /* __FLAT__ */
|