Lines Matching refs:was
670 // newline was seen
747 // newline was seen
1135 * set_redirection - Set up I/O Redirection for handle, was, to refer to
1139 static void set_redirection(int was, int willbe)
1141 // Nothing to do if `was' and `willbe' already have same handle.
1142 if (was != willbe) {
1144 if (dup2 (willbe, was) < 0) {
1146 fprintf(stderr, "failed to replace fd=%d with %d\n", was, willbe);
1149 "likely that stdout should be opened before %d\n", was);
1162 * save_and_redirect - Get duplicate handle for stream, was, then
1163 * redirect, was, to refer to, willbe.
1166 static int save_and_redirect(int was, int willbe)
1168 if (was == willbe)
1170 return (was);
1173 // handle for `was'.
1174 int saved = dup(was);
1176 fprintf(stderr, "unable to get duplicate handle for %d\n", was);
1181 set_redirection(was, willbe);
1184 // original `was' stream.