From 6a1da724858673ac40aa13a9612340d8bed8c7b9 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Mon, 2 Mar 2009 00:43:11 -0500 Subject: [PATCH] http://svn.poeml.de/viewvc/ppc/src-unpacked/xscreensaver/xscreensaver-4.12.tar.bz2?view=co -rw-r--r-- 1 zblaxell zblaxell 2888853 Mar 1 22:01 xscreensaver-4.12.tar.bz2?view=co d515a35765428b26097e20ac46f1d373510ee9c2 xscreensaver-4.12.tar.bz2?view=co --- README | 14 +- README.debugging | 16 +- configure | 15 +- configure.in | 13 +- driver/XScreenSaver.ad.in | 14 +- driver/XScreenSaver_ad.h | 10 +- driver/demo-Gtk-conf.c | 119 +- driver/demo-Gtk-widgets.c | 24 +- driver/demo-Gtk.c | 33 +- driver/demo-Xm.c | 13 +- driver/passwd-pam.c | 1 + driver/xscreensaver-command.c | 5 + driver/xscreensaver-command.man | 2 +- driver/xscreensaver-demo.man | 2 +- driver/xscreensaver-getimage-file | 36 +- driver/xscreensaver-getimage-file.man | 2 +- driver/xscreensaver-getimage-video.man | 2 +- driver/xscreensaver-getimage.c | 25 +- driver/xscreensaver-getimage.man | 2 +- driver/xscreensaver.c | 17 +- driver/xscreensaver.h | 4 + driver/xscreensaver.man | 2 +- hacks/barcode.c | 4 +- hacks/bsod.c | 242 +- hacks/bubbles.man | 19 +- hacks/bumps.c | 6 +- hacks/config/README | 4 +- hacks/config/antspotlight.xml | 18 + hacks/config/bouboule.xml | 2 +- hacks/config/bsod.xml | 1 + hacks/config/engine.xml | 19 +- hacks/config/fireflies.xml | 327 +++ hacks/config/flipflop.xml | 23 + hacks/config/hyperball.xml | 6 +- hacks/config/hypercube.xml | 3 + hacks/config/polytopes.xml | 105 + hacks/config/shadebobs.xml | 2 +- hacks/config/spotlight.xml | 2 +- hacks/epicycle.c | 1 - hacks/eruption.c | 2 +- hacks/glx/Makefile.in | 35 +- hacks/glx/ants.h | 45 + hacks/glx/antspotlight.c | 763 ++++++ hacks/glx/antspotlight.man | 54 + hacks/glx/atlantis.c | 18 +- hacks/glx/blocktube.c | 2 +- hacks/glx/boxed.c | 2 +- hacks/glx/boxed.h | 5 + hacks/glx/cage.c | 2 +- hacks/glx/circuit.c | 8 +- hacks/glx/cubenetic.c | 4 +- hacks/glx/extrusion.c | 4 +- hacks/glx/flipflop.c | 588 +++++ hacks/glx/flipflop.man | 61 + hacks/glx/flipscreen3d.c | 2 +- hacks/glx/flurry-smoke.c | 4 + hacks/glx/flurry-spark.c | 4 + hacks/glx/flurry-star.c | 4 + hacks/glx/flurry-texture.c | 4 + hacks/glx/flurry.h | 2 +- hacks/glx/font-ximage.c | 10 +- hacks/glx/gflux.c | 6 +- hacks/glx/glknots.c | 2 +- hacks/glx/glmatrix.c | 15 +- hacks/glx/glplanet.c | 6 + hacks/glx/glslideshow.c | 18 +- hacks/glx/glslideshow.man | 2 +- hacks/glx/grab-ximage.c | 22 +- hacks/glx/jigglypuff.c | 21 +- hacks/glx/klein.c | 4 +- hacks/glx/lament.c | 2 +- hacks/glx/moebius.c | 2 +- hacks/glx/molecule.c | 5 + hacks/glx/polytopes.c | 3007 ++++++++++++++++++++++++ hacks/glx/polytopes.man | 196 ++ hacks/glx/pulsar.c | 4 +- hacks/glx/queens.c | 119 +- hacks/glx/sballs.c | 29 +- hacks/glx/stairs.c | 2 +- hacks/glx/starwars.c | 4 +- hacks/glx/xpm-ximage.c | 8 + hacks/greynetic.c | 14 +- hacks/halftone.c | 6 +- hacks/halo.c | 4 +- hacks/images/atari.xbm | 2 +- hacks/images/blocktube.xpm | 2 +- hacks/images/macbomb.xbm | 2 +- hacks/juggle.c | 1 - hacks/kumppa.c | 2 +- hacks/metaballs.c | 2 +- hacks/phosphor.man | 4 +- hacks/rd-bomb.c | 24 +- hacks/shadebobs.man | 4 +- hacks/slidescreen.c | 18 +- hacks/sonar.c | 12 +- hacks/webcollage | 10 +- hacks/webcollage-helper.c | 6 +- hacks/xlockmore.c | 1 - hacks/xmatrix.c | 28 +- hacks/xrayswarm.c | 2 +- hacks/xsublim.c | 9 +- po/POTFILES.in | 6 +- po/fr.po | 2123 ++++++++++------- utils/colorbars.c | 14 +- utils/grabclient.c | 2 +- utils/images/logo-180.xpm | 2 +- utils/images/logo-50.xpm | 2 +- utils/logo.c | 11 +- utils/resources.c | 4 +- utils/version.h | 2 +- utils/visual.c | 5 +- utils/yarandom.h | 1 + xscreensaver.lsm | 16 +- xscreensaver.spec | 2 +- 114 files changed, 7437 insertions(+), 1158 deletions(-) create mode 100644 hacks/config/antspotlight.xml create mode 100644 hacks/config/fireflies.xml create mode 100644 hacks/config/flipflop.xml create mode 100644 hacks/config/polytopes.xml create mode 100644 hacks/glx/ants.h create mode 100644 hacks/glx/antspotlight.c create mode 100644 hacks/glx/antspotlight.man create mode 100644 hacks/glx/flipflop.c create mode 100644 hacks/glx/flipflop.man create mode 100644 hacks/glx/polytopes.c create mode 100644 hacks/glx/polytopes.man diff --git a/README b/README index 7f656b94..b3422d9c 100644 --- a/README +++ b/README @@ -18,10 +18,16 @@ Makefiles for you. Run `configure --help' to see how to override these choices, or to specify things like the default installation directory. The file `INSTALL' gives a general overview of use of these sorts of configure scripts (those generated by the GNU autoconf system.) -The most important hint is probably this: + +If you have libraries in non-standard places, you can specify their +locations with options like this: ./configure --with-motif=/opt/Motif --with-xpm=/usr/local +On MacOS X, it is strongly recommended that you install Fink first +(http://fink.sourceforge.net/). With Fink installed, you probably want +to pass --prefix=/sw to configure. + To build on VMS, see README.VMS. If you think you've found a bug, please let me know! No bug report is too @@ -70,6 +76,12 @@ the XScreenSaver FAQ about that: http://www.jwz.org/xscreensaver/faq.html ============ +Changes since 4.11: * New GL hacks, `flipflop', `antspotlight', and + `polytopes'. + * Added VMS to `bsod'. + * Compile without warnings in "gcc -pedantic". + * Updates to `webcollage' and `queens'. + * Fixed a bug that could cause PAM to hang. Changes since 4.10: * New hacks, `hypertorus', `cubestorm', `glknots', `blocktube', and `glmatrix'. * Updates to `cloudlife', `engine', `xmatrix', and diff --git a/README.debugging b/README.debugging index 9c847673..6afb2421 100644 --- a/README.debugging +++ b/README.debugging @@ -54,15 +54,9 @@ COMPILATION PROBLEMS: Before doing this, you'll need to nuke `config.cache'. - If you get errors about not being able to find Gtk or Motif (the - gtk/ or Xm/ header files), and you can't find them on your system, - then your system is horked and your vendor is lame. Perhaps the - problem is that you don't have some kind of ``development option'' - installed. Xt/ is free and available on all systems; Xm/ (Motif) - is available on all commercial systems except SunOS 4.x and some - early releases of Solaris. Linux and other free Unixes systems - usually come with Gtk, but a Motif clone is also available from - http://www.lesstif.org/. + If you get errors about not being able to find Gtk, then perhaps + the problem is that you don't have some kind of ``development + option'' installed. RUN-TIME PROBLEMS: @@ -81,8 +75,8 @@ RUN-TIME PROBLEMS: * Is the problem in the driver (`xscreensaver'), the GUI (`xscreensaver-demo'), or in the graphics hacks? - * If the problem is in the GUI, was it built using - Motif, Lesstif, or Gtk? Which version? + * If the problem is in the GUI, was it built using Gtk, Motif, + or Lesstif? Which version? * If the problem is in one (or more) of the hacks, which ones? If you're not sure, try running `xscreensaver-demo' to go diff --git a/configure b/configure index fc5b9fdd..085a7f01 100755 --- a/configure +++ b/configure @@ -1306,6 +1306,15 @@ done # gcc. Old gcc doesn't support -std, and new gcc doesn't support -lang. # so much for compatibility!) # +# UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that +# declarations preceed statements, without resorting to "-pedantic". +# This means that there is no way to get gcc3 to issue warnings that +# ensure that your code complies with the ANSI/ISO C89 standard, without +# also drowning in totally useless warnings. Thank you master may I +# have another. +# +# So, I give up, let's just use -pedantic. +# ############################################################################### @@ -2371,7 +2380,9 @@ fi if test -n "$GCC"; then echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5 echo "${ECHO_T}Turning on gcc compiler warnings." >&6 - CC="$CC -Wall -Wstrict-prototypes -Wnested-externs" + CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs" + # supposedly gcc 3.4 will have "-Wdeclaration-after-statement" + # and then perhaps we can do without -pedantic? else case "$host" in *-irix5* |*-irix6.0-3* ) @@ -14869,7 +14880,7 @@ if test "${ac_cv_mesagl_version_string+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat > conftest.$ac_ext < #ifndef MESA_MAJOR_VERSION diff --git a/configure.in b/configure.in index 411df4ac..4df13b8e 100644 --- a/configure.in +++ b/configure.in @@ -65,7 +65,9 @@ AC_DEFUN(AC_PROG_CC_ANSI, if test -n "$GCC"; then AC_MSG_RESULT(Turning on gcc compiler warnings.) - CC="$CC -Wall -Wstrict-prototypes -Wnested-externs" + CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs" + # supposedly gcc 3.4 will have "-Wdeclaration-after-statement" + # and then perhaps we can do without -pedantic? else case "$host" in *-irix5* |*-irix6.[0-3]* ) @@ -92,6 +94,15 @@ AC_DEFUN(AC_PROG_CC_ANSI, # gcc. Old gcc doesn't support -std, and new gcc doesn't support -lang. # so much for compatibility!) # +# UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that +# declarations preceed statements, without resorting to "-pedantic". +# This means that there is no way to get gcc3 to issue warnings that +# ensure that your code complies with the ANSI/ISO C89 standard, without +# also drowning in totally useless warnings. Thank you master may I +# have another. +# +# So, I give up, let's just use -pedantic. +# ############################################################################### AC_DEFUN(AC_GCC_ACCEPTS_STD, diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in index 47c798f0..d78f5e33 100644 --- a/driver/XScreenSaver.ad.in +++ b/driver/XScreenSaver.ad.in @@ -4,8 +4,8 @@ ! a screen saver and locker for the X window system ! by Jamie Zawinski ! -! version 4.11 -! 23-Jun-2003 +! version 4.12 +! 14-Aug-2003 ! ! See "man xscreensaver" for more info. The latest version is always ! available at http://www.jwz.org/xscreensaver/ @@ -177,7 +177,7 @@ "Ripples (stir)" ripples -root -oily -light 2 -stir \n\ "Ripples (desktop)" ripples -root -water -light 6 \n\ hypercube -root \n\ - hyperball -root \n\ +- hyperball -root \n\ halo -root \n\ maze -root \n\ noseguy -root \n\ @@ -354,6 +354,9 @@ @GL_KLUDGE@ GL: cubestorm -root \n\ @GL_KLUDGE@ GL: glknots -root \n\ @GL_KLUDGE@ GL: blocktube -root \n\ +@GL_KLUDGE@ GL: flipflop -root \n\ +@GL_KLUDGE@ GL: antspotlight -root \n\ +@GL_KLUDGE@ GL: polytopes -root \n\ - GL: glslideshow -root \n\ \ - xdaliclock -root -builtin3 -cycle \n\ @@ -372,7 +375,8 @@ - goban -root \n\ - electricsheep \n\ - cosmos -root \n\ -- GL: sphereEversion --root \n +- GL: sphereEversion --root \n\ +- GL: fireflies -root \n ! To display a randomized slideshow of images, you can do something like this: @@ -651,6 +655,8 @@ XScreenSaver*doc.fontList: *-helvetica-medium-r-*-*-*-100-*-*-*-iso8859-1 *hacks.hypertorus.name: HyperTorus *hacks.cubestorm.name: CubeStorm *hacks.blocktube.name: BlockTube +*hacks.flipflop.name: FlipFlop +*hacks.antspotlight.name: AntSpotlight ! obsolete, but still used by xscreensaver-demo-Xm. *hacks.documentation.isInstalled: True diff --git a/driver/XScreenSaver_ad.h b/driver/XScreenSaver_ad.h index 5a6ffa97..42d7cea2 100644 --- a/driver/XScreenSaver_ad.h +++ b/driver/XScreenSaver_ad.h @@ -79,7 +79,7 @@ \"Ripples (stir)\" ripples -root -oily -light 2 -stir \\n\ \"Ripples (desktop)\" ripples -root -water -light 6 \\n\ hypercube -root \\n\ - hyperball -root \\n\ +- hyperball -root \\n\ halo -root \\n\ maze -root \\n\ noseguy -root \\n\ @@ -256,6 +256,9 @@ GL: cubestorm -root \\n\ GL: glknots -root \\n\ GL: blocktube -root \\n\ + GL: flipflop -root \\n\ + GL: antspotlight -root \\n\ + GL: polytopes -root \\n\ - GL: glslideshow -root \\n\ \ - xdaliclock -root -builtin3 -cycle \\n\ @@ -274,7 +277,8 @@ - goban -root \\n\ - electricsheep \\n\ - cosmos -root \\n\ -- GL: sphereEversion --root \\n", +- GL: sphereEversion --root \\n\ +- GL: fireflies -root \\n", "XScreenSaver.pointerPollTime: 0:00:05", "XScreenSaver.initialDelay: 0:00:00", "XScreenSaver.windowCreationTimeout: 0:00:30", @@ -462,4 +466,6 @@ "*hacks.hypertorus.name: HyperTorus", "*hacks.cubestorm.name: CubeStorm", "*hacks.blocktube.name: BlockTube", +"*hacks.flipflop.name: FlipFlop", +"*hacks.antspotlight.name: AntSpotlight", "*hacks.documentation.isInstalled: True", diff --git a/driver/demo-Gtk-conf.c b/driver/demo-Gtk-conf.c index 23f5944d..608e488c 100644 --- a/driver/demo-Gtk-conf.c +++ b/driver/demo-Gtk-conf.c @@ -91,30 +91,30 @@ typedef struct { parameter_type type; - char *id; /* widget name */ - char *label; /* heading label, or null */ + xmlChar *id; /* widget name */ + xmlChar *label; /* heading label, or null */ /* command, fake, description, fakepreview, string, file */ - char *string; /* file name, description, whatever. */ + xmlChar *string; /* file name, description, whatever. */ /* slider, spinbutton */ - char *low_label; /* label for the left side */ - char *high_label; /* label for the right side */ + xmlChar *low_label; /* label for the left side */ + xmlChar *high_label; /* label for the right side */ float low; /* minimum value */ float high; /* maximum value */ float value; /* default value */ gboolean integer_p; /* whether the range is integral, or real */ - char *arg; /* command-line option to set (substitute "%") */ + xmlChar *arg; /* command-line option to set (substitute "%") */ gboolean invert_p; /* whether to flip the value and pretend the range goes from hi-low instead of low-hi. */ /* boolean, select-option */ - char *arg_set; /* command-line option to set for "yes", or null */ - char *arg_unset; /* command-line option to set for "no", or null */ - char *test; /* #### no idea - enablement? */ + xmlChar *arg_set; /* command-line option to set for "yes", or null */ + xmlChar *arg_unset; /* command-line option to set for "no", or null */ + xmlChar *test; /* #### no idea - enablement? */ /* select */ @@ -246,9 +246,9 @@ describe_parameter (FILE *out, parameter *p) `floatp' is set to TRUE. Otherwise, it is unchanged. */ static float -xml_get_float (xmlNodePtr node, const char *name, gboolean *floatpP) +xml_get_float (xmlNodePtr node, const xmlChar *name, gboolean *floatpP) { - const char *s = xmlGetProp (node, name); + const char *s = (char *) xmlGetProp (node, name); float f; char c; if (!s || 1 != sscanf (s, "%f %c", &f, &c)) @@ -262,7 +262,7 @@ xml_get_float (xmlNodePtr node, const char *name, gboolean *floatpP) static void sanity_check_parameter (const char *filename, - const char *node_name, + const xmlChar *node_name, parameter *p); /* Allocates and returns a new `parameter' object based on the @@ -273,7 +273,7 @@ static parameter * make_parameter (const char *filename, xmlNodePtr node) { parameter *p; - const char *name = node->name; + const char *name = (char *) node->name; const char *convert; gboolean floatp = FALSE; @@ -304,7 +304,7 @@ make_parameter (const char *filename, xmlNodePtr node) if (p->type == SPINBUTTON) { - const char *type = xmlGetProp (node, "type"); + const char *type = (char *) xmlGetProp (node, (xmlChar *) "type"); if (!type || !strcmp (type, "spinbutton")) p->type = SPINBUTTON; else if (!strcmp (type, "slider")) p->type = SLIDER; else @@ -321,23 +321,24 @@ make_parameter (const char *filename, xmlNodePtr node) if (node->xmlChildrenNode && node->xmlChildrenNode->type == XML_TEXT_NODE && !node->xmlChildrenNode->next) - p->string = strdup (node->xmlChildrenNode->content); + p->string = (xmlChar *) + strdup ((char *) node->xmlChildrenNode->content); } - p->id = xmlGetProp (node, "id"); - p->label = xmlGetProp (node, "_label"); - p->low_label = xmlGetProp (node, "_low-label"); - p->high_label = xmlGetProp (node, "_high-label"); - p->low = xml_get_float (node, "low", &floatp); - p->high = xml_get_float (node, "high", &floatp); - p->value = xml_get_float (node, "default", &floatp); + p->id = xmlGetProp (node, (xmlChar *) "id"); + p->label = xmlGetProp (node, (xmlChar *) "_label"); + p->low_label = xmlGetProp (node, (xmlChar *) "_low-label"); + p->high_label = xmlGetProp (node, (xmlChar *) "_high-label"); + p->low = xml_get_float (node, (xmlChar *) "low", &floatp); + p->high = xml_get_float (node, (xmlChar *) "high", &floatp); + p->value = xml_get_float (node, (xmlChar *) "default", &floatp); p->integer_p = !floatp; - convert = xmlGetProp (node, "convert"); + convert = (char *) xmlGetProp (node, (xmlChar *) "convert"); p->invert_p = (convert && !strcmp (convert, "invert")); - p->arg = xmlGetProp (node, "arg"); - p->arg_set = xmlGetProp (node, "arg-set"); - p->arg_unset = xmlGetProp (node, "arg-unset"); - p->test = xmlGetProp (node, "test"); + p->arg = xmlGetProp (node, (xmlChar *) "arg"); + p->arg_set = xmlGetProp (node, (xmlChar *) "arg-set"); + p->arg_unset = xmlGetProp (node, (xmlChar *) "arg-unset"); + p->test = xmlGetProp (node, (xmlChar *) "test"); /* Check for missing decimal point */ if (debug_p && @@ -360,7 +361,7 @@ make_parameter (const char *filename, xmlNodePtr node) } } - sanity_check_parameter (filename, name, p); + sanity_check_parameter (filename, (const xmlChar *) name, p); return p; } @@ -383,7 +384,7 @@ make_select_option (const char *filename, xmlNodePtr node) blurb(), filename, node->name, (int)node->type); return 0; } - else if (strcmp (node->name, "option")) + else if (strcmp ((char *) node->name, "option")) { if (debug_p) fprintf (stderr, @@ -397,12 +398,12 @@ make_select_option (const char *filename, xmlNodePtr node) char *enable, *e; s->type = SELECT_OPTION; - s->id = xmlGetProp (node, "id"); - s->label = xmlGetProp (node, "_label"); - s->arg_set = xmlGetProp (node, "arg-set"); - s->arg_unset = xmlGetProp (node, "arg-unset"); - s->test = xmlGetProp (node, "test"); - enable = xmlGetProp (node, "enable"); + s->id = xmlGetProp (node, (xmlChar *) "id"); + s->label = xmlGetProp (node, (xmlChar *) "_label"); + s->arg_set = xmlGetProp (node, (xmlChar *) "arg-set"); + s->arg_unset = xmlGetProp (node, (xmlChar *) "arg-unset"); + s->test = xmlGetProp (node, (xmlChar *) "test"); + enable = (char*)xmlGetProp (node, (xmlChar *) "enable"); if (enable) { @@ -426,7 +427,7 @@ make_select_option (const char *filename, xmlNodePtr node) when they should have typed "arg=", etc. */ static void -sanity_check_parameter (const char *filename, const char *node_name, +sanity_check_parameter (const char *filename, const xmlChar *node_name, parameter *p) { struct { @@ -530,10 +531,10 @@ sanity_check_parameter (const char *filename, const char *node_name, # define WARN(STR) \ fprintf (stderr, "%s: %s: " STR " in <%s%s id=\"%s\">\n", \ blurb(), filename, node_name, \ - (!strcmp(node_name, "number") \ + (!strcmp((char *) node_name, "number") \ ? (p->type == SPINBUTTON ? " type=spinbutton" : " type=slider")\ : ""), \ - (p->id ? p->id : "")) + (p->id ? (char *) p->id : "")) # define CHECK(SLOT,NAME) \ if (p->SLOT && !allowed.SLOT) \ WARN ("\"" NAME "\" is not a valid option"); \ @@ -568,7 +569,7 @@ make_parameters_1 (const char *filename, xmlNodePtr node, for (; node; node = node->next) { - const char *name = node->name; + const char *name = (char *) node->name; if (!strcmp (name, "hgroup") || !strcmp (name, "vgroup")) { @@ -616,7 +617,7 @@ make_parameters (const char *filename, xmlNodePtr node, GtkWidget *parent) for (; node; node = node->next) { if (node->type == XML_ELEMENT_NODE && - !strcmp (node->name, "screensaver")) + !strcmp ((char *) node->name, "screensaver")) return make_parameters_1 (filename, node->xmlChildrenNode, parent, &row); } return 0; @@ -693,7 +694,7 @@ static void make_parameter_widget (const char *filename, parameter *p, GtkWidget *parent, int *row) { - const char *label = p->label; + const char *label = (char *) p->label; if (p->widget) return; switch (p->type) @@ -715,7 +716,7 @@ make_parameter_widget (const char *filename, p->widget = gtk_entry_new (); if (p->string) - gtk_entry_set_text (GTK_ENTRY (p->widget), p->string); + gtk_entry_set_text (GTK_ENTRY (p->widget), (char *) p->string); if (row) gtk_table_attach (GTK_TABLE (parent), p->widget, 1, 3, *row, *row + 1, @@ -742,7 +743,7 @@ make_parameter_widget (const char *filename, gtk_widget_show (L); if (p->string) - gtk_entry_set_text (GTK_ENTRY (entry), p->string); + gtk_entry_set_text (GTK_ENTRY (entry), (char *) p->string); if (row) { @@ -828,7 +829,7 @@ make_parameter_widget (const char *filename, if (p->low_label) { - GtkWidget *w = gtk_label_new (_(p->low_label)); + GtkWidget *w = gtk_label_new (_((char *) p->low_label)); gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment (GTK_MISC (w), 1.0, 0.5); gtk_widget_show (w); @@ -853,7 +854,7 @@ make_parameter_widget (const char *filename, if (p->high_label) { - GtkWidget *w = gtk_label_new (_(p->high_label)); + GtkWidget *w = gtk_label_new (_((char *) p->high_label)); gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5); gtk_widget_show (w); @@ -935,7 +936,7 @@ make_parameter_widget (const char *filename, for (opts = p->options; opts; opts = opts->next) { parameter *s = (parameter *) opts->data; - GtkWidget *i = gtk_menu_item_new_with_label (_(s->label)); + GtkWidget *i = gtk_menu_item_new_with_label (_((char *) s->label)); gtk_widget_show (i); gtk_menu_append (GTK_MENU (menu), i); } @@ -962,7 +963,7 @@ make_parameter_widget (const char *filename, if (p->widget) { - gtk_widget_set_name (p->widget, p->id); + gtk_widget_set_name (p->widget, (char *) p->id); gtk_widget_show (p->widget); if (row) (*row)++; @@ -1124,7 +1125,7 @@ de_stringify (char *s) static char * format_switch (parameter *p, const char *value) { - char *fmt = p->arg; + char *fmt = (char *) p->arg; char *v2; char *result, *s; if (!fmt || !value) return 0; @@ -1156,7 +1157,7 @@ parameter_to_switch (parameter *p) { case COMMAND: if (p->arg) - return strdup (p->arg); + return strdup ((char *) p->arg); else return 0; break; @@ -1167,7 +1168,7 @@ parameter_to_switch (parameter *p) const char *s = gtk_entry_get_text (GTK_ENTRY (p->widget)); char *v; if (!strcmp ((s ? s : ""), - (p->string ? p->string : ""))) + (p->string ? (char *) p->string : ""))) v = 0; /* same as default */ else v = format_switch (p, s); @@ -1213,8 +1214,8 @@ parameter_to_switch (parameter *p) { GtkToggleButton *b = GTK_TOGGLE_BUTTON (p->widget); const char *s = (gtk_toggle_button_get_active (b) - ? p->arg_set - : p->arg_unset); + ? (char *) p->arg_set + : (char *) p->arg_unset); if (s) return strdup (s); else @@ -1233,7 +1234,7 @@ parameter_to_switch (parameter *p) const char *s; if (!o) abort(); if (o->type != SELECT_OPTION) abort(); - s = o->arg_set; + s = (char *) o->arg_set; if (s) return strdup (s); else @@ -1453,7 +1454,7 @@ parse_command_line_into_parameters_1 (const char *filename, } else if (pp->arg) { - if (compare_opts (option, value, pp->arg)) + if (compare_opts (option, value, (char *) pp->arg)) { which = -1; match = pp; @@ -1461,7 +1462,7 @@ parse_command_line_into_parameters_1 (const char *filename, } else if (pp->arg_set) { - if (compare_opts (option, value, pp->arg_set)) + if (compare_opts (option, value, (char *) pp->arg_set)) { which = 1; match = pp; @@ -1469,7 +1470,7 @@ parse_command_line_into_parameters_1 (const char *filename, } else if (pp->arg_unset) { - if (compare_opts (option, value, pp->arg_unset)) + if (compare_opts (option, value, (char *) pp->arg_unset)) { which = 0; match = pp; @@ -1580,7 +1581,7 @@ restore_defaults (const char *progname, GList *parms) case FILENAME: { gtk_entry_set_text (GTK_ENTRY (p->widget), - (p->string ? p->string : "")); + (p->string ? (char *) p->string : "")); break; } case SLIDER: @@ -1658,7 +1659,7 @@ get_description (GList *parms) return 0; else { - char *d = strdup (doc->string); + char *d = strdup ((char *) doc->string); char *s; for (s = d; *s; s++) if (s[0] == '\n') @@ -1781,7 +1782,7 @@ load_configurator_1 (const char *program, const char *arguments, p = calloc (1, sizeof(*p)); p->type = COMMAND; - p->arg = strdup (arguments); + p->arg = (xmlChar *) strdup (arguments); data->parameters = g_list_append (0, (gpointer) p); } diff --git a/driver/demo-Gtk-widgets.c b/driver/demo-Gtk-widgets.c index e2c9be77..3ac260ae 100644 --- a/driver/demo-Gtk-widgets.c +++ b/driver/demo-Gtk-widgets.c @@ -18,6 +18,12 @@ #include "demo-Gtk-widgets.h" #include "demo-Gtk-support.h" +# ifdef __GNUC__ +# define STFU __extension__ /* ignore gcc -pendantic warnings in next sexp */ +# else +# define STFU /* */ +# endif + GtkWidget* create_xscreensaver_demo (void) { @@ -480,7 +486,7 @@ create_xscreensaver_demo (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (demo); gtk_container_add (GTK_CONTAINER (demo_manual_hbbox), demo); - GTK_WIDGET_SET_FLAGS (demo, GTK_CAN_DEFAULT); + STFU GTK_WIDGET_SET_FLAGS (demo, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, demo, _("Demo the selected screen saver in full-screen mode (click the mouse to return.)"), NULL); settings = gtk_button_new_with_label (_("Settings...")); @@ -490,7 +496,7 @@ create_xscreensaver_demo (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (settings); gtk_container_add (GTK_CONTAINER (demo_manual_hbbox), settings); - GTK_WIDGET_SET_FLAGS (settings, GTK_CAN_DEFAULT); + STFU GTK_WIDGET_SET_FLAGS (settings, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, settings, _("Customization and explanation of the selected screen saver."), NULL); list_vbox = gtk_vbox_new (FALSE, 0); @@ -642,7 +648,7 @@ create_xscreensaver_demo (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (next); gtk_box_pack_start (GTK_BOX (next_prev_hbox), next, FALSE, FALSE, 0); - GTK_WIDGET_SET_FLAGS (next, GTK_CAN_DEFAULT); + STFU GTK_WIDGET_SET_FLAGS (next, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, next, _("Run the next screen saver in the list in full-screen mode (click the mouse to return.)"), NULL); prev = gtk_button_new_with_label (_("/\\")); @@ -652,7 +658,7 @@ create_xscreensaver_demo (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (prev); gtk_box_pack_start (GTK_BOX (next_prev_hbox), prev, FALSE, FALSE, 0); - GTK_WIDGET_SET_FLAGS (prev, GTK_CAN_DEFAULT); + STFU GTK_WIDGET_SET_FLAGS (prev, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, prev, _("Run the previous screen saver in the list in full-screen mode (click the mouse to return.)"), NULL); preview_frame = gtk_frame_new (_("Description")); @@ -1645,7 +1651,7 @@ create_xscreensaver_settings_dialog (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (manual); gtk_container_add (GTK_CONTAINER (doc_hbuttonbox), manual); - GTK_WIDGET_SET_FLAGS (manual, GTK_CAN_DEFAULT); + STFU GTK_WIDGET_SET_FLAGS (manual, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, manual, _("Click here to read the manual for this display mode, if it has one."), NULL); dialog_action_area = GTK_DIALOG (xscreensaver_settings_dialog)->action_area; @@ -1678,7 +1684,7 @@ create_xscreensaver_settings_dialog (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (adv_button); gtk_container_add (GTK_CONTAINER (dialog_hbuttonbox), adv_button); - GTK_WIDGET_SET_FLAGS (adv_button, GTK_CAN_DEFAULT); + STFU GTK_WIDGET_SET_FLAGS (adv_button, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, adv_button, _("Edit the command line directly."), NULL); std_button = gtk_button_new_with_label (_("Standard <<")); @@ -1688,7 +1694,7 @@ create_xscreensaver_settings_dialog (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (std_button); gtk_container_add (GTK_CONTAINER (dialog_hbuttonbox), std_button); - GTK_WIDGET_SET_FLAGS (std_button, GTK_CAN_DEFAULT); + STFU GTK_WIDGET_SET_FLAGS (std_button, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, std_button, _("Back to the graphical configuration options."), NULL); ok_cancel_hbuttonbox = gtk_hbutton_box_new (); @@ -1707,7 +1713,7 @@ create_xscreensaver_settings_dialog (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (ok_button); gtk_container_add (GTK_CONTAINER (ok_cancel_hbuttonbox), ok_button); - GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT); + STFU GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT); cancel_button = gtk_button_new_with_label (_("Cancel")); gtk_widget_set_name (cancel_button, "cancel_button"); @@ -1716,7 +1722,7 @@ create_xscreensaver_settings_dialog (void) (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (cancel_button); gtk_container_add (GTK_CONTAINER (ok_cancel_hbuttonbox), cancel_button); - GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT); + STFU GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT); gtk_signal_connect (GTK_OBJECT (opt_notebook), "switch_page", GTK_SIGNAL_FUNC (settings_switch_page_cb), diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c index b2620a4f..715ca393 100644 --- a/driver/demo-Gtk.c +++ b/driver/demo-Gtk.c @@ -24,6 +24,13 @@ # include #endif +# ifdef __GNUC__ +# define STFU __extension__ /* ignore gcc -pendantic warnings in next sexp */ +# else +# define STFU /* */ +# endif + + #ifdef ENABLE_NLS # include #endif /* ENABLE_NLS */ @@ -515,13 +522,13 @@ warning_dialog (GtkWidget *parent, const char *message, gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_container_set_border_width (GTK_CONTAINER (dialog), 10); gtk_window_set_title (GTK_WINDOW (dialog), progclass); - GTK_WIDGET_SET_FLAGS (ok, GTK_CAN_DEFAULT); + STFU GTK_WIDGET_SET_FLAGS (ok, GTK_CAN_DEFAULT); gtk_widget_show (ok); gtk_widget_grab_focus (ok); if (cancel) { - GTK_WIDGET_SET_FLAGS (cancel, GTK_CAN_DEFAULT); + STFU GTK_WIDGET_SET_FLAGS (cancel, GTK_CAN_DEFAULT); gtk_widget_show (cancel); } gtk_widget_show (label); @@ -850,6 +857,12 @@ await_xscreensaver (state *s) "\n")); if (root_p) + +# ifdef __GNUC__ + __extension__ /* don't warn about "string length is greater than + the length ISO C89 compilers are required to + support" in the following expression... */ +# endif strcat (buf, _("You are running as root. This usually means that xscreensaver\n" "was unable to contact your X server because access control is\n" @@ -988,7 +1001,7 @@ force_list_select_item (state *s, GtkWidget *list, int list_elt, Bool scroll_p) if (!was) gtk_widget_set_sensitive (parent, True); #ifdef HAVE_GTK2 model = gtk_tree_view_get_model (GTK_TREE_VIEW (list)); - g_assert (model); + STFU g_assert (model); gtk_tree_model_iter_nth_child (model, &iter, NULL, list_elt); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list)); gtk_tree_selection_select_iter (selection, &iter); @@ -1136,7 +1149,7 @@ hack_time_text (state *s, const char *line, Time *store, Bool sec_p) else { char c; - if (sscanf (line, "%u%c", &value, &c) != 1) + if (sscanf (line, "%d%c", &value, &c) != 1) value = -1; if (!sec_p) value *= 60; @@ -1506,7 +1519,7 @@ flush_popup_changes_and_save (state *s) else if (!strcasecmp (visual, "greyscale")) visual = "GrayScale"; else if (!strcasecmp (visual, "pseudocolor")) visual = "PseudoColor"; else if (!strcasecmp (visual, "directcolor")) visual = "DirectColor"; - else if (1 == sscanf (visual, " %ld %c", &id, &c)) ; + else if (1 == sscanf (visual, " %lu %c", &id, &c)) ; else if (1 == sscanf (visual, " 0x%lx %c", &id, &c)) ; else { @@ -1630,7 +1643,7 @@ list_activated_cb (GtkTreeView *list, char *str; int list_elt; - g_return_if_fail (!gdk_pointer_is_grabbed ()); + STFU g_return_if_fail (!gdk_pointer_is_grabbed ()); str = gtk_tree_path_to_string (path); list_elt = strtol (str, NULL, 10); @@ -3899,6 +3912,12 @@ g_log_handler (const gchar *log_domain, GLogLevelFlags log_level, } +#ifdef __GNUC__ + __extension__ /* shut up about "string length is greater than the length + ISO C89 compilers are required to support" when including + the .ad file... */ +#endif + static char *defaults[] = { #include "XScreenSaver_ad.h" 0 @@ -4442,7 +4461,7 @@ main (int argc, char **argv) gtk_widget_ref (outer_vbox); gtk_container_remove (GTK_CONTAINER (s->toplevel_widget), outer_vbox); - GTK_OBJECT_SET_FLAGS (outer_vbox, GTK_FLOATING); + STFU GTK_OBJECT_SET_FLAGS (outer_vbox, GTK_FLOATING); gtk_container_add (GTK_CONTAINER (capplet), outer_vbox); /* Find the window above us, and set the title and close handler. */ diff --git a/driver/demo-Xm.c b/driver/demo-Xm.c index f8d0de28..c0f72e3a 100644 --- a/driver/demo-Xm.c +++ b/driver/demo-Xm.c @@ -467,6 +467,11 @@ await_xscreensaver (Widget widget) "\n"); if (root_p) +# ifdef __GNUC__ + __extension__ /* don't warn about "string length is greater than + the length ISO C89 compilers are required to + support" in the following expression... */ +# endif strcat (buf, "You are running as root. This usually means that xscreensaver\n" "was unable to contact your X server because access control is\n" @@ -599,7 +604,7 @@ apply_changes_and_save (Widget widget) else if (!strcasecmp (visual, "greyscale")) visual = "GrayScale"; else if (!strcasecmp (visual, "pseudocolor")) visual = "PseudoColor"; else if (!strcasecmp (visual, "directcolor")) visual = "DirectColor"; - else if (1 == sscanf (visual, " %ld %c", &id, &c)) ; + else if (1 == sscanf (visual, " %lu %c", &id, &c)) ; else if (1 == sscanf (visual, " 0x%lx %c", &id, &c)) ; else { @@ -1677,6 +1682,12 @@ demo_ehandler (Display *dpy, XErrorEvent *error) +#ifdef __GNUC__ + __extension__ /* shut up about "string length is greater than the length + ISO C89 compilers are required to support" when including + the .ad file... */ +#endif + static char *defaults[] = { #include "XScreenSaver_ad.h" 0 diff --git a/driver/passwd-pam.c b/driver/passwd-pam.c index 7560d1a4..a5abb806 100644 --- a/driver/passwd-pam.c +++ b/driver/passwd-pam.c @@ -246,6 +246,7 @@ pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p) PAM_NO_DELAY(pamh); + timeout.tv_sec = 0; timeout.tv_nsec = 1; set = block_sigchld(); status = pam_authenticate (pamh, 0); diff --git a/driver/xscreensaver-command.c b/driver/xscreensaver-command.c index 41613c7d..ed10dc64 100644 --- a/driver/xscreensaver-command.c +++ b/driver/xscreensaver-command.c @@ -48,6 +48,11 @@ static Atom XA_ACTIVATE, XA_DEACTIVATE, XA_CYCLE, XA_NEXT, XA_PREV; static Atom XA_RESTART, XA_PREFS, XA_THROTTLE, XA_UNTHROTTLE; static char *screensaver_version; +# ifdef __GNUC__ + __extension__ /* don't warn about "string length is greater than the + length ISO C89 compilers are required to support" in the + usage string... */ +# endif static char *usage = "\n\ usage: %s -