Move the remainder of the constants in X.h into XML enumerations.

Fix xcb_auth to use one of the new enumerations.
This commit is contained in:
Ian Osgood 2006-04-28 15:27:09 -07:00
parent 162c7593ad
commit e6132aff2f
2 changed files with 14 additions and 8 deletions

View File

@ -83,13 +83,6 @@ extern "C" {
#define XCB_TYPE_PAD(T,I) (-(I) & (sizeof(T) > 4 ? 3 : sizeof(T) - 1)) #define XCB_TYPE_PAD(T,I) (-(I) & (sizeof(T) > 4 ? 3 : sizeof(T) - 1))
/** XCBNone is the universal null resource or null atom parameter value for many core X requests */
#define XCBNone 0L
/** XCBCopyFromParent can be used for many CreateWindow parameters */
#define XCBCopyFromParent 0L
/* Opaque structures */ /* Opaque structures */
/** /**
@ -166,6 +159,19 @@ typedef struct {
#include "xproto.h" #include "xproto.h"
/** XCBNone is the universal null resource or null atom parameter value for many core X requests */
#define XCBNone 0L
/** XCBCopyFromParent can be used for many CreateWindow parameters */
#define XCBCopyFromParent 0L
/** XCBCurrentTime can be used in most requests that take an XCBTIMESTAMP */
#define XCBCurrentTime 0L
/** XCBNoSymbol fills in unused entries in XCBKEYSYM tables */
#define XCBNoSymbol 0L
/* xcb_auth.c */ /* xcb_auth.c */
/** /**

View File

@ -105,7 +105,7 @@ static Xauth *get_authptr(struct sockaddr *sockname, unsigned int socknamelen)
addr = (char *) &si->sin_addr; addr = (char *) &si->sin_addr;
addrlen = 4; addrlen = 4;
if (ntohl(si->sin_addr.s_addr) != 0x7f000001) if (ntohl(si->sin_addr.s_addr) != 0x7f000001)
family = 0; /* X.h: FamilyInternet */ family = XCBFamilyInternet;
snprintf(dispbuf, sizeof(dispbuf), "%d", ntohs(si->sin_port) - X_TCP_PORT); snprintf(dispbuf, sizeof(dispbuf), "%d", ntohs(si->sin_port) - X_TCP_PORT);
display = dispbuf; display = dispbuf;
} }