1 /********************************************
2 bi_vars.h
3 copyright 2010, Thomas E. Dickey
4 copyright 1993, Michael D. Brennan
5 
6 This is a source file for mawk, an implementation of
7 the AWK programming language.
8 
9 Mawk is distributed without warranty under the terms of
10 the GNU General Public License, version 2, 1991.
11 ********************************************/
12 
13 /*
14  * $MawkId: bi_vars.h,v 1.8 2010/12/10 17:00:00 tom Exp $
15  * @Log: bi_vars.h,v @
16  * Revision 1.1.1.1  1993/07/03  18:58:09  mike
17  * move source to cvs
18  *
19  * Revision 5.2  1992/07/10  16:17:10  brennan
20  * MsDOS: remove NO_BINMODE macro
21  *
22  * Revision 5.1  1991/12/05  07:59:05  brennan
23  * 1.1 pre-release
24  *
25  */
26 
27 /* bi_vars.h */
28 
29 #ifndef  BI_VARS_H
30 #define  BI_VARS_H  1
31 
32 #include "types.h"
33 
34 /* builtin variables NF, RS, FS, OFMT are stored
35    internally in field[], so side effects of assignment can
36    be handled
37 */
38 
39 /* NR and FNR must be next to each other */
40 #define  NR	   bi_vars
41 #define  FNR	   (bi_vars+1)
42 #define  ARGC      (bi_vars+2)
43 #define  FILENAME  (bi_vars+3)
44 #define  OFS       (bi_vars+4)
45 #define  ORS       (bi_vars+5)
46 #define  RLENGTH   (bi_vars+6)
47 #define  RSTART    (bi_vars+7)
48 #define  SUBSEP    (bi_vars+8)
49 
50 #if USE_BINMODE
51 #define  BINMODE   (bi_vars+9)
52 #define  NUM_BI_VAR  10
53 #else
54 #define  NUM_BI_VAR  9
55 #endif
56 
57 extern CELL bi_vars[NUM_BI_VAR];
58 
59 #endif
60