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 center
flex flex
left left
right right
topleft
topright

17
mouse.c
View File

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