home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Tex / Tex29 / StTeXsrc.zoo / src / str.h < prev    next >
Text File  |  1988-03-13  |  849b  |  40 lines

  1.  
  2. /*
  3.  * @(#)str.h 2.5 EPA
  4.  *
  5.  * Copyright 1987,1988 Pat J Monardo
  6.  *
  7.  * Redistribution of this file is permitted through
  8.  * the specifications in the file COPYING.
  9.  *
  10.  * 
  11.  */
  12.  
  13. global  str     str_ptr;
  14. global  ptr     str_start[];
  15. global  ascii   str_pool[];
  16. global  ptr     pool_ptr;
  17.  
  18. global  str     null_str;
  19.  
  20. #define length(S)           (str_start[S + 1] - str_start[S])
  21. #define cur_length()        (pool_ptr - str_start[str_ptr])
  22.  
  23. #define append_char(C)      {str_pool[pool_ptr] = C; incr(pool_ptr);}
  24. #define flush_char()        {decr(pool_ptr);}
  25.  
  26. #define str_room(S) \
  27.     {if (pool_ptr + S >= POOL_SIZE) \
  28.         overflow("pool_size", POOL_SIZE);}
  29.  
  30. str     make_str();
  31. str     make_str_given();
  32.  
  33. #define flush_string() \
  34.     {decr(str_ptr); pool_ptr = str_start[str_ptr];}
  35.  
  36. bool    str_eq_buf();
  37. bool    str_eq_str();
  38.  
  39. int     init_strings();
  40.