home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_10
/
1010033a
< prev
next >
Wrap
Text File
|
1992-08-10
|
1KB
|
46 lines
/* Listing 2 */
/*****************************************************
Name: DBG_STAK.C
Description: Library of functions to support
bidirection communications with
PC parallel port.
Global Function List: get_min_stackavail
check_min_stackavail
Portability: MS-DOS Microsoft C or Borland C
*****************************************************/
#include <<limits.h>>
#include <<malloc.h>>
#include <<stdlib.h>>
static size_t _MinStackAvail = UINT_MAX;
/*****************************************************
Name: check_min_stackavail
Return: Minimum stack space up to the point this
function is called.
Description: Keeps track of the minimum stack space
available.
*****************************************************/
size_t check_min_stackavail( void )
{
_MinStackAvail = min( _MinStackAvail,
stackavail() );
return ( _MinStackAvail );
}
/*****************************************************
Name: get_min_stackavail
Return: Minimum stack space up to the point this
function is called.
Description: Retrieves the minimum stack space
available.
*****************************************************/
size_t get_min_stackavail( void )
{
return ( _MinStackAvail );
}
/* End of File */