-/* xscreensaver, Copyright (c) 1998-2004 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1998-2005 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
#include <X11/keysymdef.h>
#ifdef HAVE_FORKPTY
-# include <pty.h>
+# ifdef HAVE_PTY_H
+# include <pty.h>
+# endif
+# ifdef HAVE_UTIL_H
+# include <util.h>
+# endif
#endif /* HAVE_FORKPTY */
#undef countof
XGetWindowAttributes (dpy, window, &xgwa);
p = XCreatePixmap (dpy, window, xgwa.width, xgwa.height, xgwa.depth);
- load_random_image (xgwa.screen, window, p, image_filename_r);
+ load_random_image (xgwa.screen, window, p, image_filename_r, NULL);
image = XGetImage (dpy, p, 0, 0, xgwa.width, xgwa.height, ~0, ZPixmap);
XFreePixmap (dpy, p);
p = 0;
if (dot) *dot=0;
}
if (strlen(basename)>20) basename[20]=0;
- for (s=basename; *s; s++) *s = toupper (*s);
+ for (s=basename; *s; s++) {
+ *s = toupper (*s);
+ if (*s <= ' ') *s = '_';
+ }
sprintf(sim->typing_buf, "BLOAD %s\n", basename);
sim->typing = sim->typing_buf;