Remove debugging statement from util/compile.

This commit is contained in:
Kris Maglione 2007-04-22 00:31:47 -04:00
parent d03fe86b7a
commit da1c99c630
3 changed files with 91 additions and 91 deletions

View File

@ -12,6 +12,8 @@
#include "fns.h"
static void place_frame(Frame *f);
static char Ebadcmd[] = "bad command",
Ebadvalue[] = "bad value";
Client *
area_selclient(Area *a) {
@ -421,7 +423,6 @@ focus_area(Area *a) {
char *
select_area(Area *a, char *arg) {
static char Ebadvalue[] = "bad value";
uint i;
Frame *p, *f;
Area *ap;
@ -483,3 +484,92 @@ focus_frame:
restack_view(v);
return nil;
}
char *
send_client(Frame *f, char *arg, Bool swap) {
Area *to, *a;
Client *c;
Frame *tf;
View *v;
Bool before;
int j;
a = f->area;
v = a->view;
c = f->client;
if(!strncmp(arg, "toggle", 7)) {
if(!a->floating)
to = v->area;
else if(c->revert && !c->revert->floating)
to = c->revert;
else
to = v->area->next;
goto send_area;
}else if(!a->floating) {
if(!strncmp(arg, "left", 5)) {
if(a->floating)
return Ebadvalue;
for(to=v->area->next; to; to=to->next)
if(a == to->next) break;
if(!to && !swap && (f->anext || f != a->frame))
to=new_column(v, v->area, 0);
goto send_area;
}
else if(!strncmp(arg, "right", 5)) {
if(a->floating)
return Ebadvalue;
to = a->next;
if(!to && !swap && (f->anext || f != a->frame))
to = new_column(v, a, 0);
goto send_area;
}
else if(!strncmp(arg, "up", 3)) {
for(tf=a->frame; tf; tf=tf->anext)
if(tf->anext == f) break;
before = True;
goto send_frame;
}
else if(!strncmp(arg, "down", 5)) {
tf = f->anext;
before = False;
goto send_frame;
}
else {
if(sscanf(arg, "%d", &j) != 1)
return Ebadvalue;
for(to=v->area; to; to=to->next)
if(!--j) break;
goto send_area;
}
}
return Ebadvalue;
send_frame:
if(!tf)
return Ebadvalue;
if(!swap) {
remove_frame(f);
insert_frame(tf, f, before);
}else
swap_frames(f, tf);
arrange_column(a, False);
flushevents(EnterWindowMask, False);
focus_frame(f, True);
update_views();
return nil;
send_area:
if(!to)
return Ebadvalue;
if(!swap)
send_to_area(to, f);
else if(to->sel)
swap_frames(f, to->sel);
flushevents(EnterWindowMask, False);
focus_frame(f, True);
update_views();
return nil;
}

View File

@ -748,95 +748,6 @@ newcol_client(Client *c, char *arg) {
flushevents(EnterWindowMask, False);
}
char *
send_client(Frame *f, char *arg, Bool swap) {
Area *to, *a;
Client *c;
Frame *tf;
View *v;
Bool before;
int j;
a = f->area;
v = a->view;
c = f->client;
if(!strncmp(arg, "toggle", 7)) {
if(!a->floating)
to = v->area;
else if(c->revert && !c->revert->floating)
to = c->revert;
else
to = v->area->next;
goto send_area;
}else if(!a->floating) {
if(!strncmp(arg, "left", 5)) {
if(a->floating)
return Ebadvalue;
for(to=v->area->next; to; to=to->next)
if(a == to->next) break;
if(!to && !swap && (f->anext || f != a->frame))
to=new_column(v, v->area, 0);
goto send_area;
}
else if(!strncmp(arg, "right", 5)) {
if(a->floating)
return Ebadvalue;
to = a->next;
if(!to && !swap && (f->anext || f != a->frame))
to = new_column(v, a, 0);
goto send_area;
}
else if(!strncmp(arg, "up", 3)) {
for(tf=a->frame; tf; tf=tf->anext)
if(tf->anext == f) break;
before = True;
goto send_frame;
}
else if(!strncmp(arg, "down", 5)) {
tf = f->anext;
before = False;
goto send_frame;
}
else {
if(sscanf(arg, "%d", &j) != 1)
return Ebadvalue;
for(to=v->area; to; to=to->next)
if(!--j) break;
goto send_area;
}
}
return Ebadvalue;
send_frame:
if(!tf)
return Ebadvalue;
if(!swap) {
remove_frame(f);
insert_frame(tf, f, before);
}else
swap_frames(f, tf);
arrange_column(a, False);
flushevents(EnterWindowMask, False);
focus_frame(f, True);
update_views();
return nil;
send_area:
if(!to)
return Ebadvalue;
if(!swap)
send_to_area(to, f);
else if(to->sel)
swap_frames(f, to->sel);
flushevents(EnterWindowMask, False);
focus_frame(f, True);
update_views();
return nil;
}
void
update_client_views(Client *c, char **tags) {
Frame **fp, *f;

View File

@ -7,7 +7,6 @@ outfile="$1"; shift
xtmp=/tmp/cc.$$.$USER.out
echo CC ${BASE}$outfile
echo $CC -o $outfile $CFLAGS $@ 2>$xtmp
$CC -o $outfile $CFLAGS $@ 2>$xtmp
status=$?