projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.14.tar.gz
[xscreensaver]
/
hacks
/
glx
/
starwars.c
diff --git
a/hacks/glx/starwars.c
b/hacks/glx/starwars.c
index 1f27a7ebf26e1e67d635dd573b616974a3ede196..5e41af2a7c8ab386ad8dfba8919fcf026b7258c0 100644
(file)
--- 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;
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);
if (sc->buf_tail > (s - sc->buf))
{
int i = sc->buf_tail - (s - sc->buf);
- mem
cpy
(sc->buf, s, i);
+ mem
move
(sc->buf, s, i);
sc->buf_tail = i;
sc->buf[sc->buf_tail] = 0;
}
sc->buf_tail = i;
sc->buf[sc->buf_tail] = 0;
}
@@
-898,7
+905,9
@@
draw_sws (ModeInfo *mi)
}
if (alignment >= 0)
}
if (alignment >= 0)
- xoff = 1.0 - (glutStrokeLength(GLUT_FONT, line) * sc->font_scale);
+ xoff = 1.0 - (glutStrokeLength(GLUT_FONT,
+ (unsigned char *) line)
+ * sc->font_scale);
if (alignment == 0)
xoff /= 2;
if (alignment == 0)
xoff /= 2;