goinfre/libs/libevent/find.c

goinfre/libs/libevent/find.c

  _____________________________________________________________________________ 
 /   / Index / Goinfre / Resume / Links / Contact / Sitemap /    .: v0.6.1.0 |^|
|\__/-------+         +--------+-------+---------+---------+-----------------+#|
|  1| /goinfre/libs/libevent/find.c                                          |#|
|  2| ==========================================                             |#|
|  3|                                                                        |#|
|  4|                                                   [ raw ] [ download ] |#|
|  5|                                             ` `` ````````````````````` |#|
|  6|                                                                        |#|
|  7| /**                                                                    |#|
|  8|  * libevent/find.c                                                     |#|
|  9|  *                                                                     |#|
| 10|  * Copyright (c) Manfred Touron 2008                                   |#|
| 11|  */                                                                    |#|
| 12|                                                                        |#|
| 13| #include <stdlib.h>                                                    |#|
| 14| #include <unistd.h>                                                    |#|
| 15| #include <stdio.h>                                                     |#|
| 16| #include <string.h>                                                    |#|
| 17|                                                                        |#|
| 18| #include <liblc/liblc.h>                                               |#|
| 19|                                                                        |#|
| 20| #include "core.h"                                                      |#|
| 21|                                                                        |#|
| 22| int      event_funcptr_cmpfn(void *a, void *b)                         |#|
| 23| {                                                                      | |
| 24|   return (a > b ? 1 : (a == b ? 0 : -1));                              | |
| 25| }                                                                      | |
| 26|                                                                        | |
| 27| int      event_callback_exists(event event, cllbck callback)           | |
| 28| {                                                                      | |
| 29|   return ((lc_find_cmpfn(event->lc, (void *)(uintptr_t)callback,       | |
| 30|                    event_funcptr_cmpfn)) != NULL);                     | |
| 31| }                                                                      | |
| 32|                                                                        | |
+---+                                                                        | |
\_   \______ mo5.so - normal - 1337.so - rev.so - video_r.so +---------------+ |
  |__       \_____   plain.so - color.so - comment.so       /  moul 2008 (c) |V|
     \-----\______\________________________________________/-----------------+-+