-#define PROGRAM(Y,Z,D,B,S) \
-char *progclass = Y; \
+#if defined(__STDC__) || defined(__ANSI_CPP__)
+# define XLOCK_INIT(Z) init##Z
+# define XLOCK_DRAW(Z) draw##Z
+#else /* K&R CPP */
+# define XLOCK_INIT(Z) init/**/Z
+# define XLOCK_DRAW(Z) draw/**/Z
+#endif /* K&R CPP */
+
+#ifdef __STDC__
+# define XLOCK_SCREENHACK_PROTOTYPE() \
+ screenhack(Display *dpy, Window window)
+# define XLOCK_PROTOS(Z) /* */
+#else /* K&R C */
+# define XLOCK_SCREENHACK_PROTOTYPE() \
+ screenhack(dpy, window) \
+ Display *dpy; \
+ Window window;
+# define XLOCK_PROTOS(Z) \
+ void init##Z(Window); \
+ void draw##Z(Window); \
+
+#endif /* K&R C */
+
+#define PROGRAM(Y,Z,D,B,C,S) \
+ char *progclass = Y; \
+ XLOCK_PROTOS(Z) \