Module Name: xsrc
Committed By: mrg
Date: Sat Jul 23 11:11:58 UTC 2011
Modified Files:
xsrc/external/mit/libX11/dist/modules/lc/gen: lcGenConv.c
xsrc/external/mit/libX11/dist/src: XlibInt.c
Removed Files:
xsrc/external/mit/libX11/dist/src: XrmI.h
Log Message:
merge libX11 1.4.3.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/libX11/dist/src/XlibInt.c
cvs rdiff -u -r1.1.1.3 -r0 xsrc/external/mit/libX11/dist/src/XrmI.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c
diff -u xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c:1.2 xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c:1.3
--- xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c:1.2 Sun Oct 3 22:10:48 2010
+++ xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c Sat Jul 23 11:11:58 2011
@@ -2670,7 +2670,7 @@
XlcConv conv;
State state;
- conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
+ conv = (XlcConv) Xcalloc(1, sizeof(XlcConvRec));
if (conv == NULL)
return (XlcConv) NULL;
Index: xsrc/external/mit/libX11/dist/src/XlibInt.c
diff -u xsrc/external/mit/libX11/dist/src/XlibInt.c:1.3 xsrc/external/mit/libX11/dist/src/XlibInt.c:1.4
--- xsrc/external/mit/libX11/dist/src/XlibInt.c:1.3 Wed Feb 23 08:04:04 2011
+++ xsrc/external/mit/libX11/dist/src/XlibInt.c Sat Jul 23 11:11:58 2011
@@ -662,6 +662,7 @@
UnlockDisplay(dpy);
return 0;
}
+ info_list->watch_data = wd_array;
wd_array[dpy->watcher_count] = NULL; /* for cleanliness */
}
@@ -777,10 +778,10 @@
head = (struct stored_event**)&dpy->cookiejar;
DL_FOREACH_SAFE(*head, e, tmp) {
- XFree(e->ev.data);
- XFree(e);
if (dpy->cookiejar == e)
dpy->cookiejar = NULL;
+ XFree(e->ev.data);
+ XFree(e);
}
}
@@ -1438,9 +1439,10 @@
ext && (ext->codes.major_opcode != event->request_code);
ext = ext->next)
;
- if (ext)
- strcpy(buffer, ext->name);
- else
+ if (ext) {
+ strncpy(buffer, ext->name, BUFSIZ);
+ buffer[BUFSIZ - 1] = '\0';
+ } else
buffer[0] = '\0';
}
(void) fprintf(fp, " (%s)\n", buffer);
@@ -1572,7 +1574,19 @@
!(*dpy->error_vec[rep->errorCode])(dpy, &event.xerror, rep))
return 0;
if (_XErrorFunction != NULL) {
- return (*_XErrorFunction)(dpy, (XErrorEvent *)&event); /* upcall */
+ int rtn_val;
+#ifdef XTHREADS
+ if (dpy->lock)
+ (*dpy->lock->user_lock_display)(dpy);
+ UnlockDisplay(dpy);
+#endif
+ rtn_val = (*_XErrorFunction)(dpy, (XErrorEvent *)&event); /* upcall */
+#ifdef XTHREADS
+ LockDisplay(dpy);
+ if (dpy->lock)
+ (*dpy->lock->user_unlock_display)(dpy);
+#endif
+ return rtn_val;
} else {
return _XDefaultError(dpy, (XErrorEvent *)&event);
}