2 /********************************************
4 copyright 1991, 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 ********************************************/
13 /* $Log: bi_vars.c,v $
14 * Revision 1.1.1.1 1993/07/03 18:58:09 mike
17 * Revision 5.2 1992/07/10 16:17:10 brennan
18 * MsDOS: remove NO_BINMODE macro
20 * Revision 5.1 1991/12/05 07:55:38 brennan
35 /* the builtin variables */
36 CELL bi_vars[NUM_BI_VAR] ;
38 /* the order here must match the order in bi_vars.h */
40 static char *bi_var_names[NUM_BI_VAR] = {
55 /* insert the builtin vars in the hash table */
62 for ( i = 0 ; i < NUM_BI_VAR ; i++ )
63 { s = insert( bi_var_names[i] ) ;
64 s->type = i <= 1 ? ST_NR : ST_VAR ;
65 s->stval.cp = bi_vars + i ;
66 /* bi_vars[i].type = 0 which is C_NOINIT */
69 s = insert("ENVIRON") ;
74 FILENAME->type = C_STRING ;
75 FILENAME->ptr = (PTR) new_STRING( "" ) ;
77 OFS->type = C_STRING ;
78 OFS->ptr = (PTR) new_STRING( " " ) ;
80 ORS->type = C_STRING ;
81 ORS->ptr = (PTR) new_STRING( "\n" ) ;
83 SUBSEP->type = C_STRING ;
84 SUBSEP->ptr = (PTR) new_STRING( "\034" ) ;
86 NR->type = FNR->type = C_DOUBLE ;
87 /* dval is already 0.0 */
90 BINMODE->type = C_DOUBLE ;