source: trunk/third/perl/x2p/str.h @ 14545

Revision 14545, 1.7 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r14544, which included commits to RCS files with non-trunk default branches.
Line 
1/* $RCSfile: str.h,v $$Revision: 1.1.1.3 $$Date: 2000-04-07 20:48:00 $
2 *
3 *    Copyright (c) 1991-1997, 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: not supported by cvs2svn $
9 */
10
11struct string {
12    char *      str_ptr;        /* pointer to malloced string */
13    double      str_nval;       /* numeric value, if any */
14    int         str_len;        /* allocated size */
15    int         str_cur;        /* length of str_ptr as a C string */
16    union {
17        STR *str_next;          /* while free, link to next free str */
18    } str_link;
19    char        str_pok;        /* state of str_ptr */
20    char        str_nok;        /* state of str_nval */
21};
22
23#define Nullstr Null(STR*)
24
25/* the following macro updates any magic values this str is associated with */
26
27#define STABSET(x) (x->str_link.str_magic && stabset(x->str_link.str_magic,x))
28
29EXT STR **tmps_list;
30EXT long tmps_max INIT(-1);
31
32double str_2num ( STR *str );
33char * str_2ptr ( STR *str );
34char * str_append_till ( STR *str, char *from, int delim, char *keeplist );
35void str_cat ( STR *str, char *ptr );
36void str_chop ( STR *str, char *ptr );
37void str_dec ( STR *str );
38void str_free ( STR *str );
39char * str_gets ( STR *str, FILE *fp );
40void str_grow ( STR *str, int len );
41void str_inc ( STR *str );
42int str_len ( STR *str );
43STR * str_make ( char *s );
44STR * str_mortal ( STR *oldstr );
45void str_ncat ( STR *str, char *ptr, int len );
46STR * str_new ( int len );
47STR * str_nmake ( double n );
48void str_nset ( STR *str, char *ptr, int len );
49void str_numset ( STR *str, double num );
50void str_replace ( STR *str, STR *nstr );
51void str_scat ( STR *dstr, STR *sstr );
52void str_set ( STR *str, char *ptr );
53void str_sset ( STR *dstr, STR *sstr );
Note: See TracBrowser for help on using the repository browser.