http://se.aminet.net/pub/X11/ftp.x.org/contrib/vms/xscreensaver-124.zip
[xscreensaver] / hacks / screenhack.h
old mode 100644 (file)
new mode 100755 (executable)
index bca3bcc..9737f65
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992, 1993 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992, 1993 Jamie Zawinski <jwz@mcom.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -64,6 +64,7 @@
 #include <X11/Xos.h>
 #include "vroot.h"
 
+
 extern Bool mono_p;
 extern char *progname;
 extern char *progclass;
@@ -72,22 +73,32 @@ extern XrmOptionDescRec options [];
 extern int options_size;
 extern char *defaults [];
 
-#if __STDC__
-
-# define bcopy(from,to,size) memcpy((to),(from),(size))
-# define bzero(addr,size) memset((addr),0,(size))
-
+#if xxx__STDC__
 # if defined(SVR4) || defined(SYSV)
-extern int rand (void);
-extern void srand (unsigned int);
-#  define random() rand()
-#  define srandom(i) srand((unsigned int)(i))
+#  ifndef random
+    extern int rand (void);
+#   define random() rand()
+#  endif
+#  ifndef srandom
+    extern void srand (unsigned int);
+#   define srandom(i) srand((unsigned int)(i))
+#  endif
 # else /* !totally-losing-SYSV */
-extern long random (void);
-extern void srandom (int);
+#  ifndef random
+    extern long random (void);
+#  endif
+#  ifndef srandom
+    extern void srandom (int);
+#  endif
 # endif /* !totally-losing-SYSV */
 #endif /* __STDC__ */
 
+
+#ifdef VMS
+#define random rand
+#define srandom srand
+#endif
+
 #if __STDC__
 # define P(x)x
 #else
@@ -121,6 +132,8 @@ extern void make_color_ramp P((int h1, double s1, double v1,
                               XColor *pixels, int npixels));
 
 extern Pixmap grab_screen_image P((Display *dpy, Window window, int root_p));
+extern void copy_default_colormap_contents P((Display *dpy, Colormap to_cmap,
+                                             Visual *to_visual));
 
 static double _frand_tmp_;
 #define frand(f)                                                       \