summaryrefslogtreecommitdiff
path: root/lib/libXScrnSaver/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-05-24 09:17:12 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-05-24 09:17:12 +0000
commitc6fdbd6ef4b2d347e735995b16ab0ad13e00244f (patch)
tree3f4a8edeb2007a69d4e4da3cf9695e9836eb8947 /lib/libXScrnSaver/src
parent71afd3aab24f28d51ec9bc7db22a801b32b3d8a3 (diff)
update to libXScrnSaver 1.1.3
Diffstat (limited to 'lib/libXScrnSaver/src')
-rw-r--r--lib/libXScrnSaver/src/Makefile.am15
-rw-r--r--lib/libXScrnSaver/src/Makefile.in67
-rw-r--r--lib/libXScrnSaver/src/XScrnSaver.c138
3 files changed, 147 insertions, 73 deletions
diff --git a/lib/libXScrnSaver/src/Makefile.am b/lib/libXScrnSaver/src/Makefile.am
index 10f8eea5f..3430a278a 100644
--- a/lib/libXScrnSaver/src/Makefile.am
+++ b/lib/libXScrnSaver/src/Makefile.am
@@ -8,4 +8,19 @@ libXss_la_LIBADD = $(XSCRNSAVER_LIBS)
libXss_la_LDFLAGS = -version-info 1:0:0 -no-undefined
+if LINT
+ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
+lint:
+ $(LINT) $(ALL_LINT_FLAGS) $(libXss_la_SOURCES)
+endif LINT
+
+if MAKE_LINT_LIB
+lintlibdir = $(libdir)
+
+lintlib_DATA = $(LINTLIB)
+
+$(LINTLIB): $(libXss_la_SOURCES)
+ $(LINT) -y -oXss -x $(ALL_LINT_FLAGS) $(libXss_la_SOURCES)
+endif MAKE_LINT_LIB
diff --git a/lib/libXScrnSaver/src/Makefile.in b/lib/libXScrnSaver/src/Makefile.in
index aa44c68e3..8f12efca4 100644
--- a/lib/libXScrnSaver/src/Makefile.in
+++ b/lib/libXScrnSaver/src/Makefile.in
@@ -14,6 +14,7 @@
@SET_MAKE@
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -51,7 +52,7 @@ am__vpath_adj = case $$p in \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(libdir)"
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(lintlibdir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
@@ -71,6 +72,8 @@ LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libXss_la_SOURCES)
DIST_SOURCES = $(libXss_la_SOURCES)
+lintlibDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(lintlib_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -101,6 +104,7 @@ DEFS = @DEFS@
DEPDIR = @DEPDIR@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
@@ -121,15 +125,23 @@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
+LINT = @LINT@
+LINTLIB = @LINTLIB@
+LINT_FALSE = @LINT_FALSE@
+LINT_FLAGS = @LINT_FLAGS@
+LINT_TRUE = @LINT_TRUE@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MAKE_LINT_LIB_FALSE = @MAKE_LINT_LIB_FALSE@
+MAKE_LINT_LIB_TRUE = @MAKE_LINT_LIB_TRUE@
MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -140,6 +152,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -151,7 +164,9 @@ XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
+ac_ct_NMEDIT = @ac_ct_NMEDIT@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
@@ -199,6 +214,11 @@ libXss_la_SOURCES = \
libXss_la_LIBADD = $(XSCRNSAVER_LIBS)
libXss_la_LDFLAGS = -version-info 1:0:0 -no-undefined
+@LINT_TRUE@ALL_LINT_FLAGS = $(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+@LINT_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
+
+@MAKE_LINT_LIB_TRUE@lintlibdir = $(libdir)
+@MAKE_LINT_LIB_TRUE@lintlib_DATA = $(LINTLIB)
all: all-am
.SUFFIXES:
@@ -300,6 +320,23 @@ clean-libtool:
distclean-libtool:
-rm -f libtool
uninstall-info-am:
+install-lintlibDATA: $(lintlib_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(lintlibdir)" || $(mkdir_p) "$(DESTDIR)$(lintlibdir)"
+ @list='$(lintlib_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(lintlibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(lintlibdir)/$$f'"; \
+ $(lintlibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(lintlibdir)/$$f"; \
+ done
+
+uninstall-lintlibDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lintlib_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(lintlibdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(lintlibdir)/$$f"; \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -378,9 +415,9 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
-all-am: Makefile $(LTLIBRARIES)
+all-am: Makefile $(LTLIBRARIES) $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(libdir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(lintlibdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
@@ -428,7 +465,7 @@ info: info-am
info-am:
-install-data-am:
+install-data-am: install-lintlibDATA
install-exec-am: install-libLTLIBRARIES
@@ -456,7 +493,8 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
+uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
+ uninstall-lintlibDATA
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags distclean \
@@ -464,13 +502,20 @@ uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am \
- install-libLTLIBRARIES install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am \
- uninstall-libLTLIBRARIES
+ install-libLTLIBRARIES install-lintlibDATA install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-info-am uninstall-libLTLIBRARIES \
+ uninstall-lintlibDATA
+
+
+@LINT_TRUE@lint:
+@LINT_TRUE@ $(LINT) $(ALL_LINT_FLAGS) $(libXss_la_SOURCES)
+@MAKE_LINT_LIB_TRUE@$(LINTLIB): $(libXss_la_SOURCES)
+@MAKE_LINT_LIB_TRUE@ $(LINT) -y -oXss -x $(ALL_LINT_FLAGS) $(libXss_la_SOURCES)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/lib/libXScrnSaver/src/XScrnSaver.c b/lib/libXScrnSaver/src/XScrnSaver.c
index d6ed0f46c..8ccc44b2a 100644
--- a/lib/libXScrnSaver/src/XScrnSaver.c
+++ b/lib/libXScrnSaver/src/XScrnSaver.c
@@ -47,9 +47,23 @@ static /* const */ char *screen_saver_extension_name = ScreenSaverName;
#define ScreenSaverSimpleCheckExtension(dpy,i) \
XextSimpleCheckExtension (dpy, i, screen_saver_extension_name)
-static int close_display();
-static Bool wire_to_event();
-static Status event_to_wire();
+static int close_display(
+ Display * /* dpy */,
+ XExtCodes * /* codes */
+);
+
+static Bool wire_to_event(
+ Display * /* dpy */,
+ XEvent * /* re */,
+ xEvent * /* event */
+);
+
+static Status event_to_wire(
+ Display * /* dpy */,
+ XEvent * /* re */,
+ xEvent * /* event */
+);
+
static /* const */ XExtensionHooks screen_saver_extension_hooks = {
NULL, /* create_gc */
NULL, /* copy_gc */
@@ -72,10 +86,10 @@ static XEXT_GENERATE_FIND_DISPLAY (find_display, screen_saver_info,
static XEXT_GENERATE_CLOSE_DISPLAY (close_display, screen_saver_info)
-static Bool wire_to_event (dpy, re, event)
- Display *dpy;
- XEvent *re;
- xEvent *event;
+static Bool wire_to_event (
+ Display *dpy,
+ XEvent *re,
+ xEvent *event)
{
XExtDisplayInfo *info = find_display (dpy);
XScreenSaverNotifyEvent *se;
@@ -104,10 +118,10 @@ static Bool wire_to_event (dpy, re, event)
return False;
}
-static Status event_to_wire (dpy, re, event)
- Display *dpy;
- XEvent *re;
- xEvent *event;
+static Status event_to_wire (
+ Display *dpy,
+ XEvent *re,
+ xEvent *event)
{
XExtDisplayInfo *info = find_display (dpy);
XScreenSaverNotifyEvent *se;
@@ -140,9 +154,10 @@ static Status event_to_wire (dpy, re, event)
* *
****************************************************************************/
-Bool XScreenSaverQueryExtension (dpy, event_basep, error_basep)
- Display *dpy;
- int *event_basep, *error_basep;
+Bool XScreenSaverQueryExtension (
+ Display *dpy,
+ int *event_basep,
+ int *error_basep)
{
XExtDisplayInfo *info = find_display (dpy);
@@ -156,9 +171,10 @@ Bool XScreenSaverQueryExtension (dpy, event_basep, error_basep)
}
-Status XScreenSaverQueryVersion(dpy, major_versionp, minor_versionp)
- Display *dpy;
- int *major_versionp, *minor_versionp;
+Status XScreenSaverQueryVersion(
+ Display *dpy,
+ int *major_versionp,
+ int *minor_versionp)
{
XExtDisplayInfo *info = find_display (dpy);
xScreenSaverQueryVersionReply rep;
@@ -184,15 +200,15 @@ Status XScreenSaverQueryVersion(dpy, major_versionp, minor_versionp)
return 1;
}
-XScreenSaverInfo *XScreenSaverAllocInfo ()
+XScreenSaverInfo *XScreenSaverAllocInfo (void)
{
return (XScreenSaverInfo *) Xmalloc (sizeof (XScreenSaverInfo));
}
-Status XScreenSaverQueryInfo (dpy, drawable, saver_info)
- Display *dpy;
- Drawable drawable;
- XScreenSaverInfo *saver_info;
+Status XScreenSaverQueryInfo (
+ Display *dpy,
+ Drawable drawable,
+ XScreenSaverInfo *saver_info)
{
XExtDisplayInfo *info = find_display (dpy);
xScreenSaverQueryInfoReply rep;
@@ -221,10 +237,10 @@ Status XScreenSaverQueryInfo (dpy, drawable, saver_info)
return 1;
}
-void XScreenSaverSelectInput (dpy, drawable, mask)
- register Display *dpy;
- Drawable drawable;
- unsigned long mask;
+void XScreenSaverSelectInput (
+ register Display *dpy,
+ Drawable drawable,
+ unsigned long mask)
{
XExtDisplayInfo *info = find_display (dpy);
register xScreenSaverSelectInputReq *req;
@@ -242,11 +258,11 @@ void XScreenSaverSelectInput (dpy, drawable, mask)
}
static void
-XScreenSaverProcessWindowAttributes (dpy, req, valuemask, attributes)
- register Display *dpy;
- xChangeWindowAttributesReq *req;
- register unsigned long valuemask;
- register XSetWindowAttributes *attributes;
+XScreenSaverProcessWindowAttributes (
+ register Display *dpy,
+ xChangeWindowAttributesReq *req,
+ register unsigned long valuemask,
+ register XSetWindowAttributes *attributes)
{
unsigned long values[32];
register unsigned long *value = values;
@@ -304,21 +320,19 @@ XScreenSaverProcessWindowAttributes (dpy, req, valuemask, attributes)
}
-void XScreenSaverSetAttributes (dpy, drawable, x, y, width, height,
- border_width, depth, class, visual,
- valuemask, attributes)
- Display* dpy;
- Drawable drawable;
- int x;
- int y;
- unsigned int width;
- unsigned int height;
- unsigned int border_width;
- int depth;
- unsigned int class;
- Visual * visual;
- unsigned long valuemask;
- XSetWindowAttributes *attributes;
+void XScreenSaverSetAttributes (
+ Display *dpy,
+ Drawable drawable,
+ int x,
+ int y,
+ unsigned int width,
+ unsigned int height,
+ unsigned int border_width,
+ int depth,
+ unsigned int class,
+ Visual *visual,
+ unsigned long valuemask,
+ XSetWindowAttributes *attributes)
{
XExtDisplayInfo *info = find_display (dpy);
register xScreenSaverSetAttributesReq *req;
@@ -351,9 +365,9 @@ void XScreenSaverSetAttributes (dpy, drawable, x, y, width, height,
}
-void XScreenSaverUnsetAttributes (dpy, drawable)
- register Display *dpy;
- Drawable drawable;
+void XScreenSaverUnsetAttributes (
+ register Display *dpy,
+ Drawable drawable)
{
XExtDisplayInfo *info = find_display (dpy);
register xScreenSaverUnsetAttributesReq *req;
@@ -370,11 +384,11 @@ void XScreenSaverUnsetAttributes (dpy, drawable)
}
-Status XScreenSaverRegister (dpy, screen, xid, type)
- Display *dpy;
- int screen;
- XID xid;
- Atom type;
+Status XScreenSaverRegister (
+ Display *dpy,
+ int screen,
+ XID xid,
+ Atom type)
{
Atom prop;
unsigned long ul;
@@ -391,9 +405,9 @@ Status XScreenSaverRegister (dpy, screen, xid, type)
-Status XScreenSaverUnregister (dpy, screen)
- Display *dpy;
- int screen;
+Status XScreenSaverUnregister (
+ Display *dpy,
+ int screen)
{
Atom prop;
@@ -407,11 +421,11 @@ Status XScreenSaverUnregister (dpy, screen)
-Status XScreenSaverGetRegistered (dpy, screen, xid, type)
- Display *dpy;
- int screen;
- XID *xid;
- Atom *type;
+Status XScreenSaverGetRegistered (
+ Display *dpy,
+ int screen,
+ XID *xid,
+ Atom *type)
{
Atom actual_type = None;
int actual_format;