[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] Changes to qemacs/x11.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] Changes to qemacs/x11.c |
Date: |
Fri, 08 Jul 2005 05:30:52 -0400 |
Index: qemacs/x11.c
diff -u qemacs/x11.c:1.6 qemacs/x11.c:1.7
--- qemacs/x11.c:1.6 Fri May 13 10:05:24 2005
+++ qemacs/x11.c Fri Jul 8 09:30:44 2005
@@ -63,7 +63,8 @@
static XftDraw *renderDraw;
#endif
#ifdef CONFIG_XV
-static unsigned int xv_nb_formats, xv_nb_adaptors, xv_port, xv_format,
xv_open_count;
+static unsigned int xv_nb_adaptors, xv_port, xv_format, xv_open_count;
+static int xv_nb_formats;
static XvAdaptorInfo *xv_ai;
static XvImageFormatValues *xv_fo;
#endif
@@ -76,7 +77,7 @@
static CSSRect update_rects[UPDATE_MAX_REGIONS];
#endif
-extern QEDisplay x11_dpy;
+static QEDisplay x11_dpy;
static int visual_depth;
static int force_tty = 0;
@@ -1061,11 +1062,11 @@
{
Window w;
Atom prop;
- long nread, bytes_after;
+ long nread;
unsigned char *data;
Atom actual_type;
int actual_fmt;
- long nitems;
+ unsigned long nitems, bytes_after;
EditBuffer *b;
XEvent xev;
@@ -1138,10 +1139,10 @@
target_list[0] = xa_targets;
target_list[1] = XA_STRING;
- XChangeProperty (display, rq->requestor, rq->property,
- xa_targets, 8*sizeof(target_list[0]), PropModeReplace,
- (char *)target_list,
- sizeof(target_list)/sizeof(target_list[0]));
+ XChangeProperty(display, rq->requestor, rq->property,
+ xa_targets, 8*sizeof(target_list[0]), PropModeReplace,
+ (unsigned char *)target_list,
+ sizeof(target_list)/sizeof(target_list[0]));
} else if (rq->target == XA_STRING) {
/* get qemacs yank buffer */
@@ -1179,7 +1180,7 @@
static void x11_handle_event(void *opaque)
{
QEditScreen *s = opaque;
- unsigned char buf[16];
+ char buf[16];
XEvent xev;
KeySym keysym;
int shift, ctrl, meta, len, key;
@@ -1293,7 +1294,7 @@
goto got_key;
default:
if (len > 0) {
- key = buf[0];
+ key = buf[0] & 0xff;
goto got_key;
}
break;
@@ -1371,7 +1372,7 @@
key = utf8_decode(&p);
}
#else
- key = buf[0];
+ key = buf[0] & 0xff;
#endif
got_key:
ev->key_event.type = QE_KEY_EVENT;
@@ -1618,7 +1619,7 @@
ximage = XCreateImage(display, None, attr.depth, ZPixmap, 0,
NULL, w1, h1, 8, 0);
ximage->data = malloc(h1 * ximage->bytes_per_line);
- pict->data[0] = ximage->data;
+ pict->data[0] = (unsigned char *)ximage->data;
pict->linesize[0] = ximage->bytes_per_line;
xb->ximage_lock = ximage;
xb->x_lock = x1;
@@ -1628,8 +1629,8 @@
case BMP_XIMAGE:
case BMP_XSHMIMAGE:
bpp = (xb->u.ximage->bits_per_pixel + 7) >> 3;
- pict->data[0] = xb->u.ximage->data +
- y1 * xb->u.ximage->bytes_per_line + x1 * bpp;
+ pict->data[0] = (unsigned char *)xb->u.ximage->data +
+ y1 * xb->u.ximage->bytes_per_line + x1 * bpp;
pict->linesize[0] = xb->u.ximage->bytes_per_line;
break;
#ifdef CONFIG_XV
@@ -1648,8 +1649,9 @@
yy >>= 1;
j = 3 - i; /* don't know why they inverted Cb and Cr! */
}
- pict->data[j] = xvimage->data + xvimage->offsets[i] +
- yy * xvimage->pitches[i] + xx;
+ pict->data[j] = (unsigned char *)xvimage->data +
+ xvimage->offsets[i] +
+ yy * xvimage->pitches[i] + xx;
pict->linesize[j] = xvimage->pitches[i];
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemacs-commit] Changes to qemacs/x11.c,
Charlie Gordon <=