home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / compat / stdlib / xrealloc.txh < prev   
Encoding:
Text File  |  1995-07-10  |  531 b   |  26 lines

  1. @node xrealloc, memory
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <stdlib.h>
  6.  
  7. void *xrealloc(void *ptr, size_t size);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function is just like @code{realloc} (@pxref{realloc}), except that
  13. if there is no more memory, it prints an error message and exits.  It
  14. can also properly handle @var{ptr} being @code{NULL}. 
  15.  
  16. @subheading Return Value
  17.  
  18. A pointer to a possibly new block.
  19.  
  20. @subheading Example
  21.  
  22. @example
  23. char *buf;
  24. buf = (char *)xrealloc(buf, new_size);
  25. @end example
  26.