summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/colors.c6
-rw-r--r--utils/erase.c2
-rw-r--r--utils/font-retry.c53
-rw-r--r--utils/thread_util.c2
-rw-r--r--utils/version.h2
5 files changed, 40 insertions, 25 deletions
diff --git a/utils/colors.c b/utils/colors.c
index 5445cd6..01f8fc6 100644
--- a/utils/colors.c
+++ b/utils/colors.c
@@ -393,11 +393,13 @@ make_color_path (Screen *screen, Visual *visual, Colormap cmap,
if (k <= 0)
return;
# else
- for (i = k+1; i < *ncolorsP; i++)
+ if (k <= 0)
+ return;
+ for (i = k; i < *ncolorsP; i++)
/* #### Should duplicate the allocation of the color cell here
to avoid a double-color-free on PseudoColor, but it's 2018
and I don't care, */
- colors[i] = colors[k];
+ colors[i] = colors[i-1];
# endif
}
diff --git a/utils/erase.c b/utils/erase.c
index fdf7496..7e1cbc9 100644
--- a/utils/erase.c
+++ b/utils/erase.c
@@ -396,7 +396,7 @@ fizzle (eraser_state *st)
unsigned int i;
st->fizzle_rnd =
- (unsigned short *) malloc (sizeof(unsigned short) * chunks);
+ (unsigned short *) calloc (sizeof(unsigned short), chunks);
if (! st->fizzle_rnd)
return;
diff --git a/utils/font-retry.c b/utils/font-retry.c
index ab999e2..f8e6507 100644
--- a/utils/font-retry.c
+++ b/utils/font-retry.c
@@ -107,26 +107,39 @@ load_font_retry_1 (Display *dpy, int screen, const char *xlfd, Bool xft_p)
}
else
{
- const char *fixed[] = { "courier",
- "courier new",
- "courier 10 pitch",
- "lucidatypewriter",
- "american typewriter",
- "fixed",
- "ocr a std",
- "*" };
- const char *variable[] = { "helvetica",
- "arial",
- "bitstream vera sans",
- "gill sans",
- "times",
- "times new roman",
- "new century schoolbook",
- "utopia",
- "palatino",
- "lucida",
- "bitstream charter",
- "*" };
+ const char *variable[] = {
+ "helvetica",
+ "arial",
+ "bitstream vera sans",
+ "gill sans",
+ "times",
+ "times new roman",
+ "new century schoolbook",
+ "utopia",
+ "palatino",
+ "lucida",
+ "bitstream charter",
+
+ /* Don't use a wildcard family. If none of the above worked, then
+ then almost none of the X11 fonts are installed, and it's not
+ unlikely that "-*-*-medium-r-*-*-*-140-*-*-*-10646-1" will
+ match an Arabic or or Japanese font that contains no Latin
+ glyphs at all, even in a Latin locale. So in that case, just
+ let "helvetica" fall back to "fixed".
+ */
+ /* "*" */
+ };
+ const char *fixed[] = {
+ "courier",
+ "courier new",
+ "courier 10 pitch",
+ "lucidatypewriter",
+ "american typewriter",
+ "fixed",
+ "ocr a std",
+ /* As above, but "can't happen" because we already tried fixed? */
+ /* "*" */
+ };
const char *charsets[] = { "iso10646-1", "iso8859-1", "*-*" };
const char *weights[] = { "bold", "medium" };
const char *slants[] = { "o", "i", "r" };
diff --git a/utils/thread_util.c b/utils/thread_util.c
index 5ad5d47..71c8633 100644
--- a/utils/thread_util.c
+++ b/utils/thread_util.c
@@ -960,7 +960,7 @@ void *io_thread_create(struct io_thread *self, void *parent, void *(*start_routi
attr_ptr = &attr;
if(pthread_attr_init(&attr))
return NULL;
-# if defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || defined _XOPEN_SOURCE
+# if (defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || defined _XOPEN_SOURCE) && !defined __GNU__
/* PTHREAD_STACK_MIN needs the above test. */
assert(stacksize >= PTHREAD_STACK_MIN);
# endif
diff --git a/utils/version.h b/utils/version.h
index 7bdae95..b01396c 100644
--- a/utils/version.h
+++ b/utils/version.h
@@ -1,2 +1,2 @@
static const char screensaver_id[] =
- "@(#)xscreensaver 5.42 (28-Dec-2018), by Jamie Zawinski (jwz@jwz.org)";
+ "@(#)xscreensaver 5.43 (09-Jul-2019), by Jamie Zawinski (jwz@jwz.org)";