home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 11 / AUCD11B.iso / LANGUAGES / WraithSet / AwkStuff / MawkSrc / h / memory < prev    next >
Text File  |  1993-07-03  |  1KB  |  51 lines

  1.  
  2. /********************************************
  3. memory.h
  4. copyright 1991, Michael D. Brennan
  5.  
  6. This is a source file for mawk, an implementation of
  7. the AWK programming language.
  8.  
  9. Mawk is distributed without warranty under the terms of
  10. the GNU General Public License, version 2, 1991.
  11. ********************************************/
  12.  
  13.  
  14. /* $Log: memory.h,v $
  15.  * Revision 1.1.1.1  1993/07/03  18:58:17  mike
  16.  * move source to cvs
  17.  *
  18.  * Revision 5.2  1993/01/01  21:30:48  mike
  19.  * split new_STRING() into new_STRING and new_STRING0
  20.  *
  21.  * Revision 5.1  1991/12/05  07:59:28  brennan
  22.  * 1.1 pre-release
  23.  *
  24. */
  25.  
  26.  
  27. /*  memory.h  */
  28.  
  29. #ifndef  MEMORY_H
  30. #define  MEMORY_H
  31.  
  32. #include "zmalloc.h"
  33.  
  34.  
  35. STRING *PROTO(new_STRING, (char*)) ;
  36. STRING *PROTO(new_STRING0, (unsigned)) ;
  37.  
  38. #ifdef   DEBUG
  39. void  PROTO( DB_free_STRING , (STRING *) ) ;
  40.  
  41. #define  free_STRING(s)  DB_free_STRING(s)
  42.  
  43. #else
  44.  
  45. #define  free_STRING(sval)   if ( -- (sval)->ref_cnt == 0 )\
  46.                                 zfree(sval, (sval)->len+STRING_OH) ; else
  47. #endif
  48.  
  49.  
  50. #endif   /* MEMORY_H */
  51.