Bug fixes from Scott Schwartz.
Try to make 9term not crash when X errors happen.
This commit is contained in:
parent
eeb7312231
commit
6b2d0fd946
4 changed files with 9 additions and 1 deletions
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
#define GSHORT(p) (((p)[0]<<8)|(p)[1])
|
#define GSHORT(p) (((p)[0]<<8)|(p)[1])
|
||||||
|
|
||||||
|
#define putchar dictputchar
|
||||||
|
|
||||||
static void putchar(int, int*);
|
static void putchar(int, int*);
|
||||||
|
|
||||||
#define NONE 0xffff
|
#define NONE 0xffff
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@
|
||||||
#include <bio.h>
|
#include <bio.h>
|
||||||
#include <regexp.h>
|
#include <regexp.h>
|
||||||
|
|
||||||
|
#undef EOF /* stdio? */
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
FNSIZE = 128, /* file name */
|
FNSIZE = 128, /* file name */
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,11 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <u.h>
|
#include <u.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/termios.h>
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include <draw.h>
|
#include <draw.h>
|
||||||
#include <bio.h>
|
#include <bio.h>
|
||||||
#include <sys/ioctl.h>
|
|
||||||
|
|
||||||
#define WIDTH 80
|
#define WIDTH 80
|
||||||
#define TAB 4
|
#define TAB 4
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,9 @@ xerror(XDisplay *d, XErrorEvent *e)
|
||||||
|
|
||||||
if(e->request_code == 42) /* XSetInputFocus */
|
if(e->request_code == 42) /* XSetInputFocus */
|
||||||
return 0;
|
return 0;
|
||||||
|
if(e->request_code == 18) /* XChangeProperty */
|
||||||
|
return 0;
|
||||||
|
|
||||||
print("X error: error_code=%d, request_code=%d, minor=%d disp=%p\n",
|
print("X error: error_code=%d, request_code=%d, minor=%d disp=%p\n",
|
||||||
e->error_code, e->request_code, e->minor_code, d);
|
e->error_code, e->request_code, e->minor_code, d);
|
||||||
XGetErrorText(d, e->error_code, buf, sizeof buf);
|
XGetErrorText(d, e->error_code, buf, sizeof buf);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue