case R_EOF:
case R_EOLN:
+ case R_GET:
case R_PAGE: {
int st_out;
st_out = 1;
}
else {
- expp->nd_type = bool_type;
st_out = 0;
+ if (req == R_GET) {
+ expp->nd_type = NULLTYPE;
+ }
+ else expp->nd_type = bool_type;
}
if( !arg->nd_right ) {
struct node *nd;
else {
if( !(left = getarg(&arg, T_FILE, 1, name, NULLTYPE)) )
return 0;
- if( req != R_EOF && left->nd_type != text_type ) {
+ if( (req == R_PAGE || req == R_EOLN)
+ && left->nd_type != text_type ) {
Xerror(name, "textfile expected");
return 0;
}
case R_REWRITE:
case R_PUT:
case R_RESET:
- case R_GET:
if( !(left = getarg(&arg, T_FILE, 1, name, NULLTYPE)) )
return 0;
expp->nd_type = NULLTYPE;