home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / CMTEX330 / SOURCE / STR.H < prev    next >
Text File  |  1992-02-19  |  849b  |  42 lines

  1.  
  2. /*
  3.  * %Y%:%M%:%I%:%Q%
  4.  *
  5.  * Copyright 1987,1988,1991 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    null_str;
  14.  
  15. global    str    ASCII[];
  16.  
  17. global    str    cur_str;
  18. global    str    cur_str_end;
  19. global    str    cur_str_ptr;
  20.  
  21. #define MAX_STR_SIZE        4096
  22.  
  23. str    new_str();
  24. void    free_str();
  25. void    str_room();
  26.  
  27. #define append_char(C)         (*cur_str_ptr++ = C)
  28. #define flush_char()        (decr(cur_str_ptr))
  29. #define cur_length()        (cur_str_ptr - cur_str)
  30. #define flush_str()        (cur_str_ptr = cur_str)
  31. #define print_str()        {*cur_str_ptr = 0; print(cur_str);}
  32.  
  33. str    make_str();
  34.  
  35. #define str_length(S)        (strlen(S))
  36. #define str_eq(S1,S2)        (strcmp(S1,S2)==0)
  37. #define str_eqn(S1,S2,N)    (memcmp(S1,S2,N)==0)
  38. #define make_str_given(S)    (strcpy(new_str(str_length(S)), S))
  39.  
  40. void    _str_init();
  41. void    _str_init_once();
  42.