Fix nasty formatting.

SVN revision: 44988
This commit is contained in:
Christopher Michael 2010-01-08 19:49:05 +00:00
parent fb539519ca
commit ecb57ac1b8
2 changed files with 127 additions and 152 deletions

View File

@ -56,9 +56,7 @@ static Eina_List *event_handlers_delete_list = NULL;
static Ecore_Event_Filter *event_filters = NULL;
static int event_filters_delete_me = 0;
static int event_id_max = ECORE_EVENT_COUNT;
static int ecore_raw_event_type = ECORE_EVENT_NONE;
static void *ecore_raw_event_event = NULL;

View File

@ -94,8 +94,7 @@ struct _Ecore_Exe
ECORE_MAGIC;
pid_t pid;
void *data;
char *tag;
char *cmd;
char *tag, *cmd;
Ecore_Exe_Flags flags;
Ecore_Fd_Handler *write_fd_handler; /* the fd_handler to handle write to child - if this was used, or NULL if not */
Ecore_Fd_Handler *read_fd_handler; /* the fd_handler to handle read from child - if this was used, or NULL if not */
@ -145,22 +144,12 @@ struct _ecore_exe_dead_exe
};
static inline void _ecore_exe_exec_it(const char *exe_cmd, Ecore_Exe_Flags flags);
static int _ecore_exe_data_generic_handler(void *data,
Ecore_Fd_Handler *
fd_handler,
Ecore_Exe_Flags flags);
static int _ecore_exe_data_error_handler(void *data,
Ecore_Fd_Handler *
fd_handler);
static int _ecore_exe_data_read_handler(void *data,
Ecore_Fd_Handler * fd_handler);
static int _ecore_exe_data_write_handler(void *data,
Ecore_Fd_Handler *
fd_handler);
static int _ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler, Ecore_Exe_Flags flags);
static int _ecore_exe_data_error_handler(void *data, Ecore_Fd_Handler *fd_handler);
static int _ecore_exe_data_read_handler(void *data, Ecore_Fd_Handler *fd_handler);
static int _ecore_exe_data_write_handler(void *data, Ecore_Fd_Handler *fd_handler);
static void _ecore_exe_flush(Ecore_Exe * exe);
static void _ecore_exe_event_exe_data_free(void *data __UNUSED__,
void *ev);
static void _ecore_exe_event_exe_data_free(void *data __UNUSED__, void *ev);
static Ecore_Exe *_ecore_exe_is_it_alive(pid_t pid);
static int _ecore_exe_make_sure_its_dead(void *data);
static int _ecore_exe_make_sure_its_really_dead(void *data);
@ -264,7 +253,6 @@ _ecore_exe_check_errno(int result, const char *file, int line)
result = -1;
break;
}
case EMFILE:
case ENFILE:
case ENOLCK:
@ -274,14 +262,12 @@ _ecore_exe_check_errno(int result, const char *file, int line)
result = 0;
break;
}
case EIO:
{ /* I/O error. */
ERR("*** I/O error in %s @%u.", file, line);
result = 0;
break;
}
case EFAULT:
case EBADF:
case EINVAL:
@ -298,7 +284,6 @@ _ecore_exe_check_errno(int result, const char *file, int line)
result = 0;
break;
}
default:
{ /* Unsupported errno code, please add this one. */
ERR("*** NAUGHTY PROGRAMMER!!!\n"
@ -506,10 +491,8 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
if (run_pri != ECORE_EXE_PRIORITY_INHERIT)
{
if ((run_pri >= -20) && (run_pri <= 19))
{
setpriority(PRIO_PROCESS, 0, run_pri);
}
}
/* dup2 STDERR, STDIN, and STDOUT. dup2() allegedly closes the
* second pipe if it's open. On the other hand, there was the
* Great FD Leak Scare of '06, so let's be paranoid. */
@ -587,8 +570,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
if (vfork_exec_errno != 0)
{
n = vfork_exec_errno;
ERR("Could not start \"%s\"",
exe_cmd);
ERR("Could not start \"%s\"", exe_cmd);
pid = 0;
}
break;
@ -768,8 +750,7 @@ ecore_exe_send(Ecore_Exe * exe, const void *data, int size)
if (exe->child_fd_write == -1)
{
ERR("Ecore_Exe %p created without ECORE_EXE_PIPE_WRITE! "
"Cannot send %d bytes from %p",
exe, size, data);
"Cannot send %d bytes from %p", exe, size, data);
return 0;
}
@ -814,8 +795,7 @@ ecore_exe_close_stdin(Ecore_Exe *exe)
* @ingroup Ecore_Exe_Basic_Group
*/
EAPI void
ecore_exe_auto_limits_set(Ecore_Exe *exe, int start_bytes, int end_bytes,
int start_lines, int end_lines)
ecore_exe_auto_limits_set(Ecore_Exe *exe, int start_bytes, int end_bytes, int start_lines, int end_lines)
{
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
{
@ -979,8 +959,7 @@ ecore_exe_event_data_get(Ecore_Exe *exe, Ecore_Exe_Flags flags)
}
if (i > last) /* Partial line left over, save it for next time. */
{
if (e)
e->size = last;
if (e) e->size = last;
if (flags & ECORE_EXE_PIPE_READ)
{
exe->read_data_size = i - last;
@ -1589,8 +1568,7 @@ _ecore_exe_exec_it(const char *exe_cmd, Ecore_Exe_Flags flags)
}
static int
_ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler,
Ecore_Exe_Flags flags)
_ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler, Ecore_Exe_Flags flags)
{
Ecore_Exe *exe;
int child_fd;
@ -1737,8 +1715,7 @@ _ecore_exe_data_write_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED_
Ecore_Exe *exe;
exe = data;
if ((exe->write_fd_handler)
&&
if ((exe->write_fd_handler) &&
(ecore_main_fd_handler_active_get
(exe->write_fd_handler, ECORE_FD_WRITE)))
_ecore_exe_flush(exe);