perl 4.0.00: (no release announcement available)
[p5sagit/p5-mst-13.2.git] / x2p / str.h
1 /* $Header: str.h,v 4.0 91/03/20 01:58:21 lwall Locked $
2  *
3  *    Copyright (c) 1989, Larry Wall
4  *
5  *    You may distribute under the terms of the GNU General Public License
6  *    as specified in the README file that comes with the perl 3.0 kit.
7  *
8  * $Log:        str.h,v $
9  * Revision 4.0  91/03/20  01:58:21  lwall
10  * 4.0 baseline.
11  * 
12  */
13
14 struct string {
15     char *      str_ptr;        /* pointer to malloced string */
16     double      str_nval;       /* numeric value, if any */
17     int         str_len;        /* allocated size */
18     int         str_cur;        /* length of str_ptr as a C string */
19     union {
20         STR *str_next;          /* while free, link to next free str */
21     } str_link;
22     char        str_pok;        /* state of str_ptr */
23     char        str_nok;        /* state of str_nval */
24 };
25
26 #define Nullstr Null(STR*)
27
28 /* the following macro updates any magic values this str is associated with */
29
30 #define STABSET(x) (x->str_link.str_magic && stabset(x->str_link.str_magic,x))
31
32 EXT STR **tmps_list;
33 EXT long tmps_max INIT(-1);
34
35 char *str_2ptr();
36 double str_2num();
37 STR *str_mortal();
38 STR *str_make();
39 STR *str_nmake();
40 char *str_gets();