/********************************************
copyright 1991, Michael D. Brennan
This is a source file for mawk, an implementation of
the AWK programming language.
Mawk is distributed without warranty under the terms of
the GNU General Public License, version 2, 1991.
********************************************/
* Revision 5.2 92/01/06 08:10:24 brennan
* set_binmode() proto for MSDOS
* Revision 5.1 91/12/05 07:59:16 brennan
void PROTO( set_field0
, (char *, unsigned) ) ;
void PROTO( split_field0
, (void) ) ;
int PROTO( space_split
, (char *, unsigned) ) ;
void PROTO( field_assign
, (CELL
*, CELL
*) ) ;
char *PROTO( is_string_split
, (PTR
, unsigned *) ) ;
void PROTO( slow_cell_assign
, (CELL
*, CELL
*)) ;
CELL
*PROTO( slow_field_ptr
, (int)) ;
int PROTO( field_addr_to_index
, (CELL
*)) ;
void PROTO( set_binmode
, (int)) ;
extern CELL field
[FBANK_SZ
+NUM_PFIELDS
] ;
/* $0, $1 ... $(MAX_SPLIT), NF, RS, RS, CONVFMT, OFMT */
/* more fields if needed go here */
extern CELL
*fbank
[NUM_FBANK
] ; /* fbank[0] == field */
/* index to CELL * for a field */
#define field_ptr(i) ((i)<=MAX_SPLIT?field+(i):slow_field_ptr(i))
/* the pseudo fields, assignment has side effects */
#define NF (field+MAX_SPLIT+1) /* must be first */
#define RS (field+MAX_SPLIT+2)
#define FS (field+MAX_SPLIT+3)
#define CONVFMT (field+MAX_SPLIT+4)
#define OFMT (field+MAX_SPLIT+5) /* must be last */
/* some compilers choke on (NF-field) in a case statement
even though it's constant so ...
#define NF_field (MAX_SPLIT+1)
#define RS_field (MAX_SPLIT+2)
#define FS_field (MAX_SPLIT+3)
#define CONVFMT_field (MAX_SPLIT+4)
#define OFMT_field (MAX_SPLIT+5)
extern int nf
; /* shadows NF */
/* a shadow type for RS and FS */
PTR ptr
; /* STRING* or RE machine* */
extern SEPARATOR rs_shadow
;
/* types for splitting overflow */
extern SPLIT_OV
*split_ov_list
;