/* ****************************************************** Swallow Borland C Adapter v0.1a You do not need this unit to work wit Swallow! All functions are normally declared by the start-up code of Swallow and can be accessed by Swallow.H. To make sure the start-up code of Swallow is used you have to add at Options|Directories|Librarys... at _first_ the path of Swallow's c0?.obj files, e.g. "d:\swallow\clib;c:\tc\lib;". Then you have to enable the creation of a map-file by setting "Map file:segments" at Linker|Settings|Mapfile... Now you link your program again and execute the enclosed SegReg.Exe (calling convention: "SEGREG programname") and the program is ready to run. Never forget to call SegReg.Exe after _each_ linking! If you want to spread your program to someone, please don't forget to enclose "programname.SEG" and "SWALLOW.DRV". For debug purposes you can use the command line switch "/Real" which forces the start-up code of Swallow to load its Real Mode emulator for simplier debugging. If your debugger makes trouble with the emulator and you cannot simply remove Swallow's c0?.obj from your library because you use any Swallow function, you can include Swallow.C to your project and define "__NOSWALLOW" during compiling. Now Swallow.C emulates all Swallow functions and you can remove the path of Swallow's c0?.obj from your library path. So you can debug your program without Swallow. (c) 1995 by Topical Software ****************************************************** */ #include "Swallow.h" #include #ifdef __NOSWALLOW void *GetLockedMem(int Size) { return((void *) malloc(Size)); } #pragma argsused void InitSwapFile(int Drive, long int LeftSpace) {} void far * Seg2Sel(int Segment) { return(MK_FP(Segment, 0)); } #pragma argsused int SetBreakCheck(int CheckBreak) { return(0); } #pragma argsused void ShrinkMem(long int LeftSpace) {} void UseBaseMem(void) {} // flag, whether Swallow is active int SwallowIsActive = swa_inactive; // selectors of most important segments int Seg0040 = 0x40; int SegA000 = 0xa000; int SegB000 = 0xb000; int SegB800 = 0xb800; #endif