/* stderr.c --- capturing stdout/stderr output onto the screensaver window.
- * xscreensaver, Copyright (c) 1991-1998 Jamie Zawinski <jwz@netscape.com>
+ * xscreensaver, Copyright (c) 1991-1998 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
if (si->prefs.debug_p)
fprintf ((real_stderr ? real_stderr : stderr),
- "%s: resetting stderr\n", progname);
+ "%s: resetting stderr\n", blurb());
ssi->stderr_text_x = 0;
ssi->stderr_text_y = 0;
if (si->prefs.debug_p)
fprintf(real_stderr,
"%s: using overlay visual 0x%0x for stderr text layer.\n",
- progname, (int) XVisualIDFromVisual (visual));
+ blurb(), (int) XVisualIDFromVisual (visual));
ssi->stderr_cmap = XCreateColormap(si->dpy,
RootWindowOfScreen(ssi->screen),
int stdout_fd = 1;
int stderr_fd = 2;
int flags = 0;
- Boolean stderr_dialog_p, stdout_dialog_p;
+ Boolean stderr_dialog_p;
if (done) return;
done = True;
real_stdout = stdout;
stderr_dialog_p = get_boolean_resource ("captureStderr", "Boolean");
- stdout_dialog_p = get_boolean_resource ("captureStdout", "Boolean");
- if (!stderr_dialog_p && !stdout_dialog_p)
+ if (!stderr_dialog_p)
return;
if (pipe (fds))
if (stderr_dialog_p)
{
FILE *new_stderr_file;
+ FILE *new_stdout_file;
+
new_stderr = dup (stderr_fd);
if (new_stderr < 0)
{
perror ("could not dup() a new stderr:");
return;
}
- }
- if (stdout_dialog_p)
- {
- FILE *new_stdout_file;
+
new_stdout = dup (stdout_fd);
if (new_stdout < 0)
{