2 /********************************************
4 copyright 1991, 1992 Michael D. Brennan
6 This is a source file for mawk, an implementation of
7 the AWK programming language.
9 Mawk is distributed without warranty under the terms of
10 the GNU General Public License, version 2, 1991.
11 ********************************************/
15 * Revision 1.2 1993/07/17 13:23:08 mike
16 * indent and general code cleanup
18 * Revision 1.1.1.1 1993/07/03 18:58:17 mike
21 * Revision 5.2 1993/01/01 21:30:48 mike
22 * split new_STRING() into new_STRING and new_STRING0
24 * Revision 5.1 1991/12/05 07:56:21 brennan
35 static STRING *PROTO(xnew_STRING, (unsigned)) ;
45 STRING *sval = (STRING *) zmalloc(len + STRING_OH) ;
52 /* allocate space for a STRING */
65 STRING *sval = xnew_STRING(len) ;
71 /* convert char* to STRING* */
85 STRING *sval = xnew_STRING(strlen(s)) ;
86 strcpy(sval->str, s) ;
96 register STRING *sval ;
98 if (--sval->ref_cnt == 0) zfree(sval, sval->len + STRING_OH) ;