--- os2sdk/demos/examples/realloc/realloc.c 2018/08/09 12:25:13 1.1.1.1 +++ os2sdk/demos/examples/realloc/realloc.c 2018/08/09 12:26:08 1.1.1.2 @@ -1,29 +1,32 @@ /* - * Example of DOSREALLOCSEG. + * Example of DosReallocSeg. * * Shows how to allocate a segment, then change - * it's size. DOSREALLOCSEG can be used to grow or + * it's size. DosReallocSeg can be used to grow or * shrink a segment. Works Family API. * - * Compile as: cl -AL -G2 realloc.c + * Compile as: cl -AL -G0 -Lp realloc.c * - * Copyright (C) Microsoft Corp. 1986 + * Created by Microsoft Corp. 1986 */ -#include +#define INCL_DOSMEMMGR + +#include +#include #define NOTSHARED 0 main() { - unsigned segment; + SEL segment; /* allocate a segment, 1024 bytes big */ - DOSALLOCSEG(1024, &segment, NOTSHARED); + DosAllocSeg(1024, &segment, NOTSHARED); /* now grow it to 4000 bytes */ - DOSREALLOCSEG(4000, segment); + DosReallocSeg(4000, segment); /* now shrink it to 20 bytes */ - DOSREALLOCSEG(20, segment); + DosReallocSeg(20, segment); }