use gperf

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
This commit is contained in:
Pierre Habouzit 2008-06-23 00:17:26 +02:00 committed by Julien Danjou
parent c2df807ede
commit f423719bd6
2 changed files with 12 additions and 9 deletions

View File

@ -1,4 +1,8 @@
bottomleft
bottomright
center
flex
left
right
topleft
topright

17
mouse.c
View File

@ -25,6 +25,7 @@
#include <xcb/xcb.h>
#include <xcb/xcb_aux.h>
#include "common/tokenize.h"
#include "mouse.h"
#include "screen.h"
#include "tag.h"
@ -62,15 +63,13 @@ typedef enum
static corner_t
a_strtocorner(const char *str)
{
if(!a_strcmp(str, "bottomright"))
return BottomRightCorner;
else if(!a_strcmp(str, "bottomleft"))
return BottomLeftCorner;
else if(!a_strcmp(str, "topleft"))
return TopLeftCorner;
else if(!a_strcmp(str, "topright"))
return TopRightCorner;
return AutoCorner;
switch (a_tokenize(str, -1)) {
case A_TK_BOTTOMRIGHT: return BottomRightCorner;
case A_TK_BOTTOMLEFT: return BottomLeftCorner;
case A_TK_TOPLEFT: return TopLeftCorner;
case A_TK_TOPRIGHT: return TopRightCorner;
default: return AutoCorner;
}
}
/** Snap an area to the outside of an area.