--- edit.c.orig 2005-02-22 19:14:40.000000000 -0800 +++ edit.c 2005-02-22 19:15:21.000000000 -0800 @@ -30,6 +30,11 @@ extern char closequote; #endif +extern int file_errors; +extern int unix2003_compat; +extern char * active_dashp_command; +extern char * dashp_commands; + #if LOGFILE extern int logfile; extern int force_logfile; @@ -367,6 +372,12 @@ curr_altfilename = alt_filename; curr_altpipe = alt_pipe; set_open(curr_ifile); /* File has been opened */ + if (unix2003_compat) { + /* support the -p command line option */ + if (dashp_commands) { + active_dashp_command = dashp_commands; + } + } get_pos(curr_ifile, &initial_scrpos); new_file = TRUE; ch_init(f, chflags); @@ -518,6 +529,7 @@ { if (edit_ifile(h) == 0) break; + file_errors++; } if (next == NULL_IFILE) {