Commit | Line | Data |
a687059c |
1 | /* $Header: str.h,v 3.0 89/10/18 15:35:27 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. |
8d063cd8 |
7 | * |
8 | * $Log: str.h,v $ |
a687059c |
9 | * Revision 3.0 89/10/18 15:35:27 lwall |
10 | * 3.0 baseline |
8d063cd8 |
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_static(); |
38 | STR *str_make(); |
39 | STR *str_nmake(); |
40 | char *str_gets(); |