home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perlkt40.zip / STR.H < prev    next >
C/C++ Source or Header  |  1996-06-13  |  1KB  |  44 lines

  1. /* $RCSfile: str.h,v $$Revision: 4.0.1.1 $$Date: 91/06/07 12:20:22 $
  2.  *
  3.  *    Copyright (c) 1991, Larry Wall
  4.  *
  5.  *    You may distribute under the terms of either the GNU General Public
  6.  *    License or the Artistic License, as specified in the README file.
  7.  *
  8.  * $Log:    str.h,v $
  9.  * Revision 4.0.1.1  91/06/07  12:20:22  lwall
  10.  * patch4: new copyright notice
  11.  * 
  12.  * Revision 4.0  91/03/20  01:58:21  lwall
  13.  * 4.0 baseline.
  14.  * 
  15.  */
  16.  
  17. struct string {
  18.     char *    str_ptr;    /* pointer to malloced string */
  19.     double    str_nval;    /* numeric value, if any */
  20.     int        str_len;    /* allocated size */
  21.     int        str_cur;    /* length of str_ptr as a C string */
  22.     union {
  23.     STR *str_next;        /* while free, link to next free str */
  24.     } str_link;
  25.     char    str_pok;    /* state of str_ptr */
  26.     char    str_nok;    /* state of str_nval */
  27. };
  28.  
  29. #define Nullstr Null(STR*)
  30.  
  31. /* the following macro updates any magic values this str is associated with */
  32.  
  33. #define STABSET(x) (x->str_link.str_magic && stabset(x->str_link.str_magic,x))
  34.  
  35. EXT STR **tmps_list;
  36. EXT long tmps_max INIT(-1);
  37.  
  38. char *str_2ptr();
  39. double str_2num();
  40. STR *str_mortal();
  41. STR *str_make();
  42. STR *str_nmake();
  43. char *str_gets();
  44.