Files
TeslaRel410/BORLAND/BC45/SOURCE/RTL/RTLINC/COMMON32/_IO.H
T
CydandClaude Fable 5 63312e07f9 source410: literal 4.10 source reconstruction + BC++ 4.52 fleet toolchain archived
- 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>
2026-07-19 07:33:26 -05:00

110 lines
3.2 KiB
C++

/*------------------------------------------------------------------------
* filename - _io.h
*
* Definitions for low level I/O functions.
*
*-----------------------------------------------------------------------*/
/*
* C/C++ Run Time Library - Version 1.5
*
* Copyright (c) 1987, 1994 by Borland International
* All Rights Reserved.
*
*/
#if !defined( __DEFS_H )
#include <_defs.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
void _ErrorMessage(const char *__message);
void _ErrorExit (const char *__message);
int __IOerror (int __doserror); /* returns -1 */
#ifdef __WIN32__
int __NTerror (void); /* returns -1 */
int __DOSerror (void); /* returns _doserrno */
#else
int __DOSerror (int __doserror); /* returns _doserrno */
#endif
/* ANSI-safe entry points for low-level I/O functions.
*/
int _RTLENTRY __access (const char *__path, int __amode);
int _RTLENTRYF __close (int __handle);
int _RTLENTRY __dup (int __handle);
int _RTLENTRY __dup2 (int __oldhandle, int __newhandle);
int _RTLENTRY __eof (int __handle);
int _RTLENTRY __ftruncate(int __handle, long __size);
int _RTLENTRY __isatty (int __handle);
long _RTLENTRYF __lseek (int __handle, long __offset, int __fromwhere);
int __cdecl __open (const char *__path, int __access,... /*unsigned mode*/);
int _RTLENTRYF __read (int __handle, void *__buf, unsigned __len);
int _RTLENTRYF __unlink (const char *__path);
unsigned _RTLENTRY _umask (unsigned __cmask);
int _RTLENTRYF __write (int __handle, void *__buf, unsigned __len);
/* Functions for locking and unlocking file handles.
*/
#ifdef _MT
void _lock_all_handles (void);
void _unlock_all_handles (void);
void _lock_handle (int __handle);
void _unlock_handle (int __handle);
#else
#define _lock_all_handles()
#define _unlock_all_handles()
#define _lock_handle(handle)
#define _unlock_handle(handle)
#endif
/* Functions for allocated and freeing file handle table slots.
*/
#ifdef __WIN32__
int _dup_handle (int oldfd, int newfd, long handle);
void _free_handle (int fd);
int _get_handle (long handle, int oflag);
#endif
/* Functions and variables for handling _C_FILE_INFO environment variable.
*/
extern int (*_cfinfo_get)(char *); /* function to get file info */
extern char *_cfinfo_value; /* value of _C_FILE_INFO env. variable */
#ifdef __OS2__
extern char _cfinfo_name[]; /* name of env. variable */
#endif
extern int _RTLENTRY _EXPDATA _fileinfo; /* true if file info passed to children */
#ifdef __cplusplus
}
#endif
extern unsigned _RTLENTRY _EXPDATA _nfile;
/* Array of open file flags.
*/
extern unsigned int _RTLENTRY _openfd[];
/* Array of open file handles (not used on OS/2).
*/
#ifdef __WIN32__
extern long _RTLENTRY _handles[];
#endif
/* Array of process IDs for _popen/_pclose.
*/
extern unsigned int _RTLENTRY _pidtab[];
/* Pointer to EXE's _fmode variable.
*/
extern int *_fmodeptr;
#define _FMODE (*_fmodeptr)
/* Standard "one entry, one exit" macro for serialization exits.
*/
#define RETURN(code) {rc=(code); goto exit;}