-/* $OpenBSD: io.c,v 1.24 2019/06/28 13:41:42 deraadt Exp $ */
+/* $OpenBSD: io.c,v 1.25 2022/11/18 14:52:03 millert Exp $ */
/* $NetBSD: io.c,v 1.2 1995/03/21 09:04:43 cgd Exp $ */
/* io.c: This file contains the i/o routines for the ed line editor */
return ERR;
}
if (!scripted)
- fprintf(stderr, "%d\n", size);
+ printf("%d\n", size);
return current_addr - n;
}
return ERR;
}
if (!scripted)
- fprintf(stderr, "%d\n", size);
+ printf("%d\n", size);
return n ? m - n + 1 : 0;
}
-/* $OpenBSD: main.c,v 1.67 2022/01/22 23:22:11 millert Exp $ */
+/* $OpenBSD: main.c,v 1.68 2022/11/18 14:52:03 millert Exp $ */
/* $NetBSD: main.c,v 1.3 1995/03/21 09:04:44 cgd Exp $ */
/* main.c: This file contains the main control and user-interface routines
signal(SIGINT, signal_int);
if (sigsetjmp(env, 1)) {
status = -1;
- fputs("\n?\n", stderr);
+ fputs("\n?\n", stdout);
seterrmsg("interrupt");
} else {
init_buffers();
strlcpy(old_filename, *argv,
sizeof old_filename);
} else if (argc) {
- fputs("?\n", stderr);
+ fputs("?\n", stdout);
if (**argv == '\0')
seterrmsg("invalid filename");
if (!interactive)
continue;
} else if (n == 0) {
if (modified && !scripted) {
- fputs("?\n", stderr);
+ fputs("?\n", stdout);
seterrmsg("warning: file modified");
if (!interactive) {
if (garrulous)
break;
case EMOD:
modified = 0;
- fputs("?\n", stderr); /* give warning */
+ fputs("?\n", stdout); /* give warning */
seterrmsg("warning: file modified");
if (!interactive) {
if (garrulous)
quit(3);
break;
default:
- fputs("?\n", stderr);
+ fputs("?\n", stdout);
if (!interactive) {
if (garrulous)
fprintf(stderr,