forked from enlightenment/efl
parent
3974364a5b
commit
d0e6540f88
|
@ -2,6 +2,9 @@
|
||||||
#include "e_ev_x.h"
|
#include "e_ev_x.h"
|
||||||
#include "e_mem.h"
|
#include "e_mem.h"
|
||||||
#include "e_util.h"
|
#include "e_util.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
/* private funtion prototypes */
|
/* private funtion prototypes */
|
||||||
static void e_ev_x_handle_events(int fd);
|
static void e_ev_x_handle_events(int fd);
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
#include "e_ev_signal.h"
|
#include "e_ev_signal.h"
|
||||||
#include <Edb.h>
|
#include <Edb.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
/* glocal (yes global/local) variabels for events */
|
/* glocal (yes global/local) variabels for events */
|
||||||
Ev_Fd_Handler *fd_handlers = NULL;
|
Ev_Fd_Handler *fd_handlers = NULL;
|
||||||
|
@ -248,7 +251,7 @@ e_event_loop(void)
|
||||||
/* error */
|
/* error */
|
||||||
if ((errno == ENOMEM) || (errno == EINVAL) || (errno == EBADF))
|
if ((errno == ENOMEM) || (errno == EINVAL) || (errno == EBADF))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "EEEEEEEEEEEEEEEEEEEEK\n");
|
fprintf(stderr, "Lost connection to X display.\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#define NEW(dat, num) malloc(sizeof(dat) * (num))
|
#define NEW(dat, num) malloc(sizeof(dat) * (num))
|
||||||
#define NEW_PTR(num) malloc(sizeof(void *) * (num))
|
#define NEW_PTR(num) malloc(sizeof(void *) * (num))
|
||||||
#define FREE(dat) {if (dat) {free(dat); dat = NULL;} else {printf("eek - NULL free\n");sleep(30);}}
|
#define FREE(dat) {free(dat); dat = NULL;}
|
||||||
#define IF_FREE(dat) {if (dat) FREE(dat);}
|
#define IF_FREE(dat) {if (dat) FREE(dat);}
|
||||||
#define REALLOC(dat, type, num) {if (dat) dat = realloc(dat, sizeof(type) * (num)); else dat = malloc(sizeof(type) * (num));}
|
#define REALLOC(dat, type, num) {if (dat) dat = realloc(dat, sizeof(type) * (num)); else dat = malloc(sizeof(type) * (num));}
|
||||||
#define REALLOC_PTR(dat, num) {if (dat) dat = realloc(dat, sizeof(void *) * (num)); else dat = malloc(sizeof(void *) * (num));}
|
#define REALLOC_PTR(dat, num) {if (dat) dat = realloc(dat, sizeof(void *) * (num)); else dat = malloc(sizeof(void *) * (num));}
|
||||||
|
|
Loading…
Reference in New Issue