diff options
-rw-r--r-- | action.c | 6 | ||||
-rw-r--r-- | action.h | 3 | ||||
-rw-r--r-- | config.mk | 26 | ||||
-rw-r--r-- | main.c | 8 |
4 files changed, 20 insertions, 23 deletions
@@ -56,7 +56,7 @@ struct action_lookup ac_lookup_table[] = { ev_list *head = NULL; int -new_event(evid) { +new_event(long evid) { ev_list *item, *newitem; if(!head) { @@ -224,9 +224,9 @@ fill_ev_table(char *input) { break; } if(str4 == kommatoken && str4 != token && eid != -1) { - if((ah = (void *)get_action_handler(dptoken))) { + if((ah = (void *)get_action_handler(dptoken)) == NULL) { new_event(eid); - add_handler(eid, i, ah); + add_handler(eid, i, get_action_handler(dptoken)); i++; } } @@ -53,7 +53,8 @@ void do_action(long); int get_ev_id(char *); void * get_action_handler(char *); void fill_ev_table(char *); -void free_ev_table(void); +void free_event_list(void); +int find_event(long); /* action handlers */ int a_print(char **); @@ -11,30 +11,26 @@ X11INC = /usr/X11R6/include X11LIB = /usr/X11R6/lib INCS = -I. -I/usr/include -I${X11INC} -# Uncomment this line to use Xinerama. -# USE_XINERAMA=y - -# (ifdef/else/endif might not be portable; if it doesn't work for you, -# contact the author and we'll work on a better solution.) -ifdef USE_XINERAMA -LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXinerama -CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XINERAMA -else + +# No Xinerama, comment the following two lines for Xinerama LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -endif -LDFLAGS = ${LIBS} +# With Xinerama, uncomment the following two lines for Xinerama +#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXinerama +#CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DDZEN_XINERAMA -# Debugging -#CFLAGS = -g -Wall -O0 ${INCS} -DVERSION=\"${VERSION}\" -DPOSIX_SOURCE -#LDFLAGS = -g ${LIBS} +LDFLAGS = ${LIBS} -# Solaris +# Solaris, uncomment for Solaris #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" #LDFLAGS = ${LIBS} #CFLAGS += -xtarget=ultra +# Debugging +#CFLAGS = -g -Wall -O0 ${INCS} -DVERSION=\"${VERSION}\" -DPOSIX_SOURCE +#LDFLAGS = -g ${LIBS} + # compiler and linker CC = cc LD = ${CC} @@ -51,22 +51,22 @@ clean_up(void) { } static void -catch_sigusr1() { +catch_sigusr1(int s) { do_action(sigusr1); } static void -catch_sigusr2() { +catch_sigusr2(int s) { do_action(sigusr2); } static void -catch_sigterm() { +catch_sigterm(int s) { do_action(onexit); } static void -catch_alrm() { +catch_alrm(int s) { do_action(onexit); clean_up(); exit(0); |