149 lines
3.6 KiB
Diff
149 lines
3.6 KiB
Diff
--- draw.c
|
|
+++ draw.c
|
|
@@ -1127,7 +1127,7 @@
|
|
u_int step, x, xoff, yoff;
|
|
int i, sx, round;
|
|
int root_x, root_y, use_copy;
|
|
- Window cutinWin, junkwin;
|
|
+ Window cutinWin = 0, junkwin;
|
|
XImage *copywin;
|
|
static XWindowAttributes xa;
|
|
XWindowAttributes wa;
|
|
@@ -2884,7 +2884,7 @@
|
|
fprintf(stderr, "X11 font %s:%d:%s has bogus "
|
|
"font metric for glyph 0x%04x\n"
|
|
"\tcs->width=%d, source=%s, coffset=0x%04x\n",
|
|
- seed, char_size, registry?registry:"NULL",
|
|
+ seed, char_size[caching], registry?registry:"NULL",
|
|
code, cs->width, metricsource, coffset);
|
|
}
|
|
cs = &xfontstruct->max_bounds;
|
|
@@ -2935,7 +2935,6 @@
|
|
int hquality, vquality;
|
|
|
|
Image *myimage, *image;
|
|
- Pixmap mypixmap;
|
|
XImageInfo *ximageinfo;
|
|
byte *pic;
|
|
int private = mgp_flag & FL_PRIVATE;
|
|
@@ -3059,7 +3058,7 @@
|
|
xzoomrate, yzoomrate);
|
|
fprintf(stderr, "background zoom mode %d: "
|
|
"(%d, %d)->(%d, %d)[%d]\n", cg->ct_zoomflag,
|
|
- srcwidth, srcheight, dstwidth, dstheight, b_quality);
|
|
+ srcwidth, srcheight, dstwidth, dstheight, b_quality[caching]);
|
|
}
|
|
|
|
if (xzoomrate != 100.0 || yzoomrate != 100.0) {
|
|
@@ -3312,7 +3311,7 @@
|
|
image = myimage;
|
|
myimage = zoom(image, xzoomrate, yzoomrate, verbose);
|
|
if (!image) {
|
|
- fprintf(stderr, "image zoom (%dx%d) failed in image_load\n",
|
|
+ fprintf(stderr, "image zoom (%gx%g) failed in image_load\n",
|
|
xzoomrate, yzoomrate);
|
|
exit(1);
|
|
}
|
|
@@ -4327,7 +4326,6 @@
|
|
char *cp;
|
|
int scale = 1;
|
|
struct stat stbuf;
|
|
- XColor back;
|
|
char geom[32], device[64], scalebuf[32];
|
|
static char imagefile[MAXPATHLEN];
|
|
void (*sigpipe_handler)();
|
|
@@ -5077,7 +5075,7 @@
|
|
Drawable target;
|
|
{
|
|
int i;
|
|
- int x, y, width, height;
|
|
+ int x, y;
|
|
XImage *xim;
|
|
|
|
switch(bg_ctl->ct_op){
|
|
@@ -5154,6 +5152,9 @@
|
|
return 1;
|
|
}
|
|
|
|
+extern void mngload(char *mngfile, int x, int y, int width, int height);
|
|
+extern void mngpreload(struct render_state *state, char *mngfile, int *width, int *height);
|
|
+
|
|
static void
|
|
obj_draw_anim(state, x, y, obj)
|
|
struct render_state *state;
|
|
@@ -5268,7 +5269,7 @@
|
|
if (!strncmp(registry, rtab[i], 3)) break;
|
|
}
|
|
if (i == 3) return NULL; /* cannot find codeset */
|
|
- sprintf(buf16, "%s%s\0", prefix[i], p);
|
|
+ sprintf(buf16, "%s%s", prefix[i], p);
|
|
if (icv[i] == (iconv_t)0) icv[i] = iconv_open("UTF-8", etab[i]);
|
|
if (icv[i] == (iconv_t)-1) {
|
|
fprintf(stderr, "your iconv doesn't support %s\n",
|
|
--- mgp.c
|
|
+++ mgp.c
|
|
@@ -764,6 +764,8 @@
|
|
XBell(display, 0);
|
|
}
|
|
|
|
+extern void reset_background_pixmap(void);
|
|
+
|
|
static void
|
|
main_loop(start_page)
|
|
u_int start_page;
|
|
--- mng.c
|
|
+++ mng.c
|
|
@@ -249,7 +249,7 @@
|
|
exit(0);
|
|
}
|
|
|
|
-int checkevents(mng_handle mng)
|
|
+void checkevents(mng_handle mng)
|
|
{
|
|
/* not implemented yet */
|
|
}
|
|
--- parse.c
|
|
+++ parse.c
|
|
@@ -1254,7 +1254,7 @@
|
|
*/
|
|
{
|
|
int textseen;
|
|
- int contseen;
|
|
+ int contseen = 0;
|
|
for (page = 1; page <= maxpage; page++) {
|
|
line = page_attribute[page].pg_linenum;
|
|
for (l = 0; l <= line; l++) {
|
|
--- x11.c
|
|
+++ x11.c
|
|
@@ -218,7 +218,6 @@
|
|
struct gcconf *pc;
|
|
u_long color;
|
|
XClassHint res = { "MagicPoint", "MagicPoint" };
|
|
- int i;
|
|
|
|
xsa.border_pixel = fore_color[0];
|
|
xsa.background_pixel = back_color[0];
|
|
@@ -355,10 +354,11 @@
|
|
void
|
|
toggle_fullscreen()
|
|
{
|
|
- static fullscreen = 0;
|
|
+ static int fullscreen = 0;
|
|
XClientMessageEvent xev;
|
|
|
|
- fullscreen = ++fullscreen % 2;
|
|
+ ++fullscreen;
|
|
+ fullscreen %= 2;
|
|
memset(&xev, 0, sizeof(xev));
|
|
xev.type=ClientMessage;
|
|
xev.message_type=XInternAtom(display, "_NET_WM_STATE", False);
|
|
@@ -457,8 +457,6 @@
|
|
void
|
|
reset_cache_pixmap()
|
|
{
|
|
- int i;
|
|
-
|
|
XFreePixmap(display, cachewin);
|
|
XFreePixmap(display, cachetmp);
|
|
cachewin = XCreatePixmap(display, window, xa.width, xa.height, depth);
|