X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fstarwars.c;h=5e41af2a7c8ab386ad8dfba8919fcf026b7258c0;hb=96a411663168b0ba5432b407a83be55f3df0c802;hp=3853007f449f2afd4bf731fc687bf7b03f0b6fdb;hpb=6a1da724858673ac40aa13a9612340d8bed8c7b9;p=xscreensaver diff --git a/hacks/glx/starwars.c b/hacks/glx/starwars.c index 3853007f..5e41af2a 100644 --- a/hacks/glx/starwars.c +++ b/hacks/glx/starwars.c @@ -285,6 +285,13 @@ launch_text_generator (sws_configuration *sc) sprintf (cmd, "cat /usr/src/linux-%s/README", uts.release); if (!stat (cmd+4, &st)) oprogram = cmd; + else + { + /* kernel source not installed? try X... */ + strcpy (cmd, "cat /usr/X11R6/lib/X11/doc/README"); + if (!stat (cmd+4, &st)) + oprogram = cmd; + } } } } @@ -436,7 +443,7 @@ get_more_lines (sws_configuration *sc) if (sc->buf_tail > (s - sc->buf)) { int i = sc->buf_tail - (s - sc->buf); - memcpy (sc->buf, s, i); + memmove (sc->buf, s, i); sc->buf_tail = i; sc->buf[sc->buf_tail] = 0; }