removed trailing whitespace in *.c, code cleanup finished

This commit is contained in:
Anthony Martin 2006-03-23 07:12:06 -08:00
parent a9ad74533e
commit 5cee0164e6
13 changed files with 23 additions and 23 deletions

View File

@ -126,7 +126,7 @@ attach_toarea(Area *a, Client *c)
{
static unsigned short id = 1;
Frame *f;
if(clientofview(a->view, c))
return;
f = cext_emallocz(sizeof(Frame));
@ -207,7 +207,7 @@ mode2str(int mode)
case Colmax: return "max"; break;
default: break;
}
return nil;
return nil;
}
int
@ -359,7 +359,7 @@ arrange_tag(View *v, Bool updategeometry)
if(v->narea == 1)
return;
width = rect.width / (v->narea - 1);
for(i = 1; i < v->narea; i++) {
Area *a = v->area[i];

View File

@ -166,7 +166,7 @@ name2label(const char *name)
char buf[256];
unsigned int i;
cext_strlcpy(buf, name, sizeof(buf));
cext_strlcpy(buf, name, sizeof(buf));
for(i = 0; i < nlabel; i++)
if(!strncmp(label[i]->name, name, sizeof(label[i]->name)))
return label[i];

View File

@ -95,7 +95,7 @@ handle_buttonpress(XEvent *e)
write_event(buf, True);
}
}
}
static void

View File

@ -205,7 +205,7 @@ handle_key_seq(Window w, Key **done, unsigned int ndone)
unsigned long mod;
KeyCode key;
Key **found = nil;
unsigned int nfound = 0;
unsigned int nfound = 0;
char buf[128];
next_keystroke(&mod, &key);
@ -218,7 +218,7 @@ handle_key_seq(Window w, Key **done, unsigned int ndone)
case 0:
XBell(dpy, 0);
return; /* grabbed but not found */
case 1:
case 1:
if(!found[0]->next) {
snprintf(buf, sizeof(buf), "Key %s\n", found[0]->name);
write_event(buf, True);
@ -242,7 +242,7 @@ handle_key(Window w, unsigned long mod, KeyCode keycode)
case 0:
XBell(dpy, 0);
return; /* grabbed but not found */
case 1:
case 1:
if(!found[0]->next) {
snprintf(buf, sizeof(buf), "Key %s\n", found[0]->name);
write_event(buf, True);

View File

@ -9,10 +9,10 @@
#include <regex.h>
#include "wm.h"
/*
/*
* basic rule matching language
*
* /regex/ -> tag [tag ...]
* /regex/ -> tag [tag ...]
*
* regex might contain POSIX regex syntax defined in regex(3)
*/

View File

@ -106,7 +106,7 @@ update_tags()
if(!nview && ntag)
select_view(tag[0]);
}
unsigned int
str2tags(char tags[MAX_TAGS][MAX_TAGLEN], const char *stags)
{

View File

@ -35,7 +35,7 @@ destroy_view(View *v)
if(sel >= nview)
sel = 0;
free(v);
free(v);
}
int
@ -101,7 +101,7 @@ rectangles(View *v, Bool isfloat, unsigned int *num)
{
XRectangle *result = nil;
unsigned int i;
*num = 0;
if(isfloat)
*num = v->area[0]->nframe;

View File

@ -310,7 +310,7 @@ main(int argc, char *argv[])
def.keys = nil;
def.keyssz = 0;
def.font = strdup(BLITZ_FONT);
def.border = 2;
def.border = 2;
if(!strlen(def.tag))
cext_strlcpy(def.tag, "1", sizeof(def.tag));
cext_strlcpy(def.selcolor, BLITZ_SELCOLORS, sizeof(def.selcolor));
@ -327,7 +327,7 @@ main(int argc, char *argv[])
wa.event_mask = SubstructureRedirectMask;
wa.cursor = cursor[CurNormal];
XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
wa.override_redirect = 1;
wa.background_pixmap = ParentRelative;
wa.event_mask = ExposureMask | ButtonPressMask

View File

@ -80,7 +80,7 @@ update_offsets()
prevoff = i;
}
static unsigned int
static unsigned int
update_items(char *pattern)
{
unsigned int plen = strlen(pattern);
@ -111,7 +111,7 @@ update_items(char *pattern)
}
if(nitem)
sel = 0;
update_offsets();
return nitem;
}

View File

@ -40,7 +40,7 @@ write_data(unsigned int fid)
}
if(offset == 0) /* do an explicit empty write when no writing has been done yet */
if(ixp_client_write(&c, fid, offset, 0, 0) != 0)
fprintf(stderr, "wmiir: cannot write file: %s\n", c.errstr);
fprintf(stderr, "wmiir: cannot write file: %s\n", c.errstr);
free(data);
}
@ -189,7 +189,7 @@ xread(char *file)
free(tmp);
}
}
memcpy(dircontent + ndircontent, result, count);
memcpy(dircontent + ndircontent, result, count);
ndircontent += count;
}
else {
@ -275,6 +275,6 @@ main(int argc, char *argv[])
/* close socket */
ixp_client_hangup(&c);
return ret;
}

View File

@ -212,7 +212,7 @@ ixp_msg2fcall(Fcall *fcall, void *msg, unsigned int msglen)
unsigned int i, msize;
unsigned short len;
void *p = ixp_dec_prefix(msg, &msize, &fcall->id, &fcall->tag);
if(msize > msglen) /* bad message */
return 0;
switch (fcall->id) {

View File

@ -127,7 +127,7 @@ ixp_server_respond_fcall(IXPConn *c, Fcall *fcall)
}
return 0;
}
int
ixp_server_respond_error(IXPConn *c, Fcall *fcall, char *errstr)
{

View File

@ -73,7 +73,7 @@ ixp_recv_message(int fd, void *msg, unsigned int msglen, char **errstr)
}
/* receive message */
if(ixp_recv_data(fd, msg + sizeof(unsigned int),
msize - sizeof(unsigned int), errstr)
msize - sizeof(unsigned int), errstr)
!= msize - sizeof(unsigned int))
return 0;
return msize;