62 lines
953 B
C
62 lines
953 B
C
|
/* void FreeDecimalArray(pSrc1)
|
||
|
*
|
||
|
* ARGUMENT
|
||
|
* pSrc1 is a ptr to an array of source DEC pointers.
|
||
|
*
|
||
|
* DESCRIPTION
|
||
|
* Returns storage to DOS via free().
|
||
|
*
|
||
|
* SIDE EFFECTS
|
||
|
* Does NOT CHECK to see if spaces was allocated via malloc().
|
||
|
* Therefore, DOS will lock up cause cold reboot if unallocated
|
||
|
* space is freed
|
||
|
*
|
||
|
* RETURNS
|
||
|
* None.
|
||
|
*
|
||
|
* POSSIBLE ERROR CODES
|
||
|
*
|
||
|
* GM_NULLPOINTER
|
||
|
*
|
||
|
* AUTHOR
|
||
|
* Andy Anderson 17-JAN-1987 14:35
|
||
|
* Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved.
|
||
|
*
|
||
|
* MODIFICATIONS
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include <malloc.h>
|
||
|
#include "gm.h"
|
||
|
#include "gmsystem.h"
|
||
|
|
||
|
void FreeDecimalArray(pSrc1)
|
||
|
DEC **pSrc1;
|
||
|
{
|
||
|
#ifdef LATTICE
|
||
|
void free();
|
||
|
#else
|
||
|
void free(void*);
|
||
|
#endif
|
||
|
|
||
|
DEC *p;
|
||
|
_MacStart(GM_DARFREE);
|
||
|
|
||
|
/* Can't free null pointers */
|
||
|
if(!pSrc1) {
|
||
|
_MacErr(GM_NULLPOINTER);
|
||
|
_MacRetV;
|
||
|
}
|
||
|
|
||
|
p = *pSrc1;
|
||
|
#ifdef LATTICE
|
||
|
free((char *) p);
|
||
|
#else
|
||
|
free((char *) p);
|
||
|
#endif
|
||
|
|
||
|
_MacRetV;
|
||
|
}
|