perl 5.0 alpha 2
[p5sagit/p5-mst-13.2.git] / x2p / str.h
CommitLineData
79072805 1/* $RCSfile: str.h,v $$Revision: 4.1 $$Date: 92/08/07 18:29:27 $
a687059c 2 *
d48672a2 3 * Copyright (c) 1991, Larry Wall
a687059c 4 *
d48672a2 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.
8d063cd8 7 *
8 * $Log: str.h,v $
79072805 9 * Revision 4.1 92/08/07 18:29:27 lwall
10 *
d48672a2 11 * Revision 4.0.1.1 91/06/07 12:20:22 lwall
12 * patch4: new copyright notice
13 *
fe14fcc3 14 * Revision 4.0 91/03/20 01:58:21 lwall
15 * 4.0 baseline.
8d063cd8 16 *
17 */
18
19struct string {
20 char * str_ptr; /* pointer to malloced string */
21 double str_nval; /* numeric value, if any */
22 int str_len; /* allocated size */
23 int str_cur; /* length of str_ptr as a C string */
24 union {
25 STR *str_next; /* while free, link to next free str */
26 } str_link;
27 char str_pok; /* state of str_ptr */
28 char str_nok; /* state of str_nval */
29};
30
31#define Nullstr Null(STR*)
32
33/* the following macro updates any magic values this str is associated with */
34
35#define STABSET(x) (x->str_link.str_magic && stabset(x->str_link.str_magic,x))
36
37EXT STR **tmps_list;
38EXT long tmps_max INIT(-1);
39
40char *str_2ptr();
41double str_2num();
fe14fcc3 42STR *str_mortal();
8d063cd8 43STR *str_make();
44STR *str_nmake();
45char *str_gets();