wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 41f9a57ba6dd7df43ae1fe0c06e128992d90153d
parent 2dee3984ea24e356fd1256098b66665bb862405a
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Mon,  3 Apr 2006 15:52:05 +0200

prepared cext_array_* removal in libixp


Diffstat:
cmd/wm/wm.h | 20+++++++++-----------
cmd/wmiimenu.c | 5+++--
cmd/wmiir.c | 1-
libcext/cext.h | 4++--
libixp/client.c | 1-
libixp/ixp.h | 61++++---------------------------------------------------------
libixp/server.c | 1-
libixp/socket.c | 1-
libixp/transport.c | 2--
liblitz/blitz.h | 1-
liblitz/draw.c | 2++
liblitz/geometry.c | 1+
12 files changed, 21 insertions(+), 79 deletions(-)

diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h @@ -7,8 +7,8 @@ #include <X11/Xlib.h> #include <X11/Xutil.h> -#include "ixp.h" -#include "blitz.h" +#include <ixp.h> +#include <blitz.h> /* WM atoms */ enum { @@ -73,8 +73,7 @@ typedef struct Area Area; typedef struct Frame Frame; typedef struct Client Client; -EVECTOR(AreaVector, Area *); - +VECTOR(AreaVector, Area *); struct View { char tag[MAX_TAGS][MAX_TAGLEN]; unsigned int ntag; @@ -84,8 +83,7 @@ struct View { unsigned int revert; }; -EVECTOR(FrameVector, Frame *); - +VECTOR(FrameVector, Frame *); struct Area { unsigned short id; FrameVector frame; @@ -158,20 +156,20 @@ typedef struct { } Default; /* global variables */ -EVECTOR(ViewVector, View *); +VECTOR(ViewVector, View *); ViewVector view; unsigned int sel; -EVECTOR(ClientVector, Client *); +VECTOR(ClientVector, Client *); ClientVector client; -EVECTOR(KeyVector, Key *); +VECTOR(KeyVector, Key *); KeyVector key; -EVECTOR(LabelVector, Label *); +VECTOR(LabelVector, Label *); LabelVector label; -EVECTOR(TagVector, char *); +VECTOR(TagVector, char *); TagVector tag; Display *dpy; diff --git a/cmd/wmiimenu.c b/cmd/wmiimenu.c @@ -17,7 +17,8 @@ #include <X11/Xutil.h> #include <X11/keysym.h> -#include "blitz.h" +#include <blitz.h> +#include <cext.h> static Bool done = False; static int ret = 0; @@ -30,7 +31,7 @@ static Window win; static XRectangle mrect; static int screen; -EVECTOR(ItemVector, char *); +VECTOR(ItemVector, char *); static ItemVector allitem = {0}; static ItemVector item = {0}; diff --git a/cmd/wmiir.c b/cmd/wmiir.c @@ -11,7 +11,6 @@ #include <time.h> #include <ixp.h> -#include <cext.h> static IXPClient c = { 0 }; diff --git a/libcext/cext.h b/libcext/cext.h @@ -33,13 +33,13 @@ long long cext_strtonum(const char *numstr, long long minval, unsigned int cext_tokenize(char **result, unsigned int reslen, char *str, char delim); /* vector.c */ -#define EVECTOR(name, type) \ +#define VECTOR(name, type) \ typedef struct { \ unsigned int size; \ type *data; \ } name -EVECTOR(Vector, void*); +VECTOR(Vector, void*); void cext_vattach(Vector *v, void *p); void cext_vdetach(Vector *v, void *p); diff --git a/libixp/client.c b/libixp/client.c @@ -10,7 +10,6 @@ #include <sys/types.h> #include <unistd.h> -#include "cext.h" #include "ixp.h" int diff --git a/libixp/ixp.h b/libixp/ixp.h @@ -4,10 +4,7 @@ */ #include <sys/types.h> - -#ifndef nil -#define nil 0 -#endif +#include <cext.h> #define IXP_VERSION "9P2000" #define IXP_MAX_VERSION 32 @@ -17,62 +14,12 @@ #define IXP_MAX_FLEN 128 #define IXP_MAX_ULEN 32 #define IXP_MAX_STAT 64 -#define IXP_MAX_WELEM 16 /*MAXWELEM */ +#define IXP_MAX_WELEM 16 /* MAXWELEM */ #define IXP_MAX_TFUNCS 14 -#define IXP_PORT 564 - - -/* - size[4] Tversion tag[2] msize[4] version[s] - size[4] Rversion tag[2] msize[4] version[s] - size[4] Tauth tag[2] afid[4] uname[s] aname[s] - size[4] Rauth tag[2] aqid[13] - size[4] Rerror tag[2] ename[s] - size[4] Tflush tag[2] oldtag[2] - size[4] Rflush tag[2] - size[4] Tattach tag[2] fid[4] afid[4] uname[s] aname[s] - size[4] Rattach tag[2] qid[13] - size[4] Twalk tag[2] fid[4] newfid[4] nwname[2] nwname*(wname[s]) - size[4] Rwalk tag[2] nwqid[2] nwqid*(wqid[13]) - size[4] Topen tag[2] fid[4] mode[1] - size[4] Ropen tag[2] qid[13] iounit[4] - size[4] Tcreate tag[2] fid[4] name[s] perm[4] mode[1] - size[4] Rcreate tag[2] qid[13] iounit[4] - size[4] Tread tag[2] fid[4] offset[8] count[4] - size[4] Rread tag[2] count[4] data[count] - size[4] Twrite tag[2] fid[4] offset[8] count[4] data[count] - size[4] Rwrite tag[2] count[4] - size[4] Tclunk tag[2] fid[4] - size[4] Rclunk tag[2] - size[4] Tremove tag[2] fid[4] - size[4] Rremove tag[2] - size[4] Tstat tag[2] fid[4] - size[4] Rstat tag[2] stat[n] - size[4] Twstat tag[2] fid[4] stat[n] - size[4] Rwstat tag[2] - - stat[n]: - size[2] total byte count of the following data - type[2] for kernel use - dev[4] for kernel use - qid.type[1] the type of the file (directory, etc.), - represented as a bit vector corresponding to the high 8 - bits of the file's mode word. - qid.vers[4] version number for given path - qid.path[8] the file server's unique identification for the file - mode[4] permissions and flags - atime[4] last access time - mtime[4] last modification time - length[8] length of file in bytes - name[ s ] file name; must be / if the file is the root directory of - the server - uid[ s ] owner name - gid[ s ] group name - muid[ s ] -*/ +#define IXP_PORT 5640 -/*9P message types */ +/* 9P message types */ enum { TVERSION = 100, RVERSION, diff --git a/libixp/server.c b/libixp/server.c @@ -15,7 +15,6 @@ #include <unistd.h> #include "ixp.h" -#include "cext.h" static unsigned char *msg[IXP_MAX_MSG]; diff --git a/libixp/socket.c b/libixp/socket.c @@ -15,7 +15,6 @@ #include <sys/un.h> #include <unistd.h> -#include "cext.h" #include "ixp.h" static int diff --git a/libixp/transport.c b/libixp/transport.c @@ -15,8 +15,6 @@ #include "ixp.h" -#include <cext.h> - unsigned int ixp_send_message(int fd, void *msg, unsigned int msize, char **errstr) { diff --git a/liblitz/blitz.h b/liblitz/blitz.h @@ -4,7 +4,6 @@ */ #include <X11/Xlib.h> -#include <cext.h> #define BLITZ_FONT "fixed" #define BLITZ_SELCOLORS "#ffffff #285577 #4c7899" diff --git a/liblitz/draw.c b/liblitz/draw.c @@ -5,6 +5,8 @@ #include <stdio.h> #include <string.h> +#include <cext.h> + #include "blitz.h" XFontStruct * diff --git a/liblitz/geometry.c b/liblitz/geometry.c @@ -6,6 +6,7 @@ #include <math.h> #include <string.h> #include <stdlib.h> +#include <cext.h> #include "blitz.h"