--- os2sdk/demos/apps/sse/ssemem.c 2018/08/09 12:25:13 1.1.1.1 +++ os2sdk/demos/apps/sse/ssemem.c 2018/08/09 12:26:05 1.1.1.2 @@ -1,5 +1,9 @@ -#include -#include +/* Created by Microsoft Corp. 1987 */ + +#define INCL_DOSMEMMGR + +#include +#include #include "ssedefs.h" @@ -7,25 +11,25 @@ /*** allocseg - allocates segments. * - * allocseg uses DOSALLOCSEG to allocate segments from DOS. + * allocseg uses DosAllocSeg to allocate segments from OS/2. * * This routine will return an error code if it is unable to * allocate the segment. * - * EXIT rc - return code of DOSALLOCSEG + * EXIT rc - return code of DosAllocSeg * * - * EFFECTS : allocates memory from DOS + * EFFECTS : allocates memory from OS/2 * modifies SegTable (by adding a new segment) * modifies TotalSegs (by incrementing it by one) */ -short allocseg() +SHORT allocseg() { - short rc; /* return code of DOS call */ + SHORT rc; /* return code of OS/2 call */ - rc = DOSALLOCSEG(SEGSIZE, - (unsigned far *)&(SegTable[TotalSegs].segment), + rc = DosAllocSeg(SEGSIZE, + &(SegTable[TotalSegs].segment), NOTSHARED); if (rc == 0) { @@ -41,20 +45,20 @@ short allocseg() /*** freesegs - free segments * - * freesegs uses DOSFREESEG to free all the segments + * freesegs uses DosFreeSeg to free all the segments * allocated by allocseg. * - * EFFECTS: frees all alocated memory (segments) to DOS + * EFFECTS: frees all alocated memory (segments) to OS/2 * sets TotalSegs to zero * makes SegTable invalid */ void freesegs() { - register unsigned short i; + register USHORT i; for (i = 0; i < TotalSegs; i++) { - DOSFREESEG(SegTable[i].segment); + DosFreeSeg(SegTable[i].segment); } TotalSegs = 0; } /* end freesegs */