remove trailing spaces and factorize Windows detection

SVN revision: 34135
This commit is contained in:
doursse 2008-03-29 07:28:18 +00:00 committed by doursse
parent 54c28a5391
commit 741b44f6e2
4 changed files with 18 additions and 22 deletions

View File

@ -34,21 +34,17 @@ WIN32_CFLAGS=""
WIN32_LIBS="" WIN32_LIBS=""
create_shared_lib="" create_shared_lib=""
case "$host_os" in case "$host_os" in
mingw|mingw32) mingw|mingw32*|cegcc)
PKG_CHECK_MODULES([EVIL], [evil]) PKG_CHECK_MODULES([EVIL], [evil])
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed]) AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed])
dnl needed for correct definition of EAPI dnl needed for correct definition of EAPI
AC_DEFINE(EFL_EET_BUILD, 1, [Define to mention that eet is built]) AC_DEFINE(EFL_EET_BUILD, 1, [Define to mention that eet is built])
WIN32_LIBS="-lws2_32" if test "$host_os" = "cegcc" ; then
create_shared_lib="-no-undefined " WIN32_CFLAGS="-mwin32"
;; WIN32_LIBS="-lws2"
cegcc) else
PKG_CHECK_MODULES([EVIL], [evil]) WIN32_LIBS="-lws2_32"
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed]) fi
dnl needed for correct definition of EAPI
AC_DEFINE(EFL_EET_BUILD, 1, [Define to mention that eet is built])
WIN32_CFLAGS="-mwin32"
WIN32_LIBS="-lws2"
create_shared_lib="-no-undefined " create_shared_lib="-no-undefined "
;; ;;
esac esac

View File

@ -10,7 +10,7 @@ do_eet_list(const char *file)
int i, num; int i, num;
char **list; char **list;
Eet_File *ef; Eet_File *ef;
ef = eet_open(file, EET_FILE_MODE_READ); ef = eet_open(file, EET_FILE_MODE_READ);
if (!ef) if (!ef)
{ {
@ -34,7 +34,7 @@ do_eet_extract(const char *file, const char *key, const char *out)
void *data; void *data;
int size = 0; int size = 0;
FILE *f; FILE *f;
ef = eet_open(file, EET_FILE_MODE_READ); ef = eet_open(file, EET_FILE_MODE_READ);
if (!ef) if (!ef)
{ {
@ -76,7 +76,7 @@ do_eet_decode(const char *file, const char *key, const char *out)
void *data; void *data;
int size = 0; int size = 0;
FILE *f; FILE *f;
ef = eet_open(file, EET_FILE_MODE_READ); ef = eet_open(file, EET_FILE_MODE_READ);
if (!ef) if (!ef)
{ {
@ -112,7 +112,7 @@ do_eet_insert(const char *file, const char *key, const char *out, int compress)
void *data; void *data;
int size = 0; int size = 0;
FILE *f; FILE *f;
ef = eet_open(file, EET_FILE_MODE_READ_WRITE); ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
if (!ef) if (!ef)
ef = eet_open(file, EET_FILE_MODE_WRITE); ef = eet_open(file, EET_FILE_MODE_WRITE);
@ -156,7 +156,7 @@ do_eet_encode(const char *file, const char *key, const char *out, int compress)
void *data; void *data;
int size = 0; int size = 0;
FILE *f; FILE *f;
ef = eet_open(file, EET_FILE_MODE_READ_WRITE); ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
if (!ef) if (!ef)
ef = eet_open(file, EET_FILE_MODE_WRITE); ef = eet_open(file, EET_FILE_MODE_WRITE);
@ -202,7 +202,7 @@ static void
do_eet_remove(const char *file, const char *key) do_eet_remove(const char *file, const char *key)
{ {
Eet_File *ef; Eet_File *ef;
ef = eet_open(file, EET_FILE_MODE_READ_WRITE); ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
if (!ef) if (!ef)
{ {

View File

@ -230,19 +230,19 @@ extern "C" {
* Return a handle to the shared string dictionary of the Eet file * Return a handle to the shared string dictionary of the Eet file
* @param ef A valid eet file handle. * @param ef A valid eet file handle.
* @return A handle to the dictionary of the file * @return A handle to the dictionary of the file
* *
* This function returns a handle to the dictionary of an Eet file whose * This function returns a handle to the dictionary of an Eet file whose
* handle is @p ef, if a dictionary exists. NULL is returned otherwise or * handle is @p ef, if a dictionary exists. NULL is returned otherwise or
* if the file handle is known to be invalid. * if the file handle is known to be invalid.
*/ */
EAPI Eet_Dictionary *eet_dictionary_get(Eet_File *ef); EAPI Eet_Dictionary *eet_dictionary_get(Eet_File *ef);
/** /**
* Check if a given string comes from a given dictionary * Check if a given string comes from a given dictionary
* @param ed A valid dictionary handle * @param ed A valid dictionary handle
* @param string A valid 0 byte terminated C string * @param string A valid 0 byte terminated C string
* @return 1 if it is in the dictionary, 0 otherwise * @return 1 if it is in the dictionary, 0 otherwise
* *
* This checks the given dictionary to see if the given string is actually * This checks the given dictionary to see if the given string is actually
* inside that dictionary (i.e. comes from it) and returns 1 if it does. * inside that dictionary (i.e. comes from it) and returns 1 if it does.
* If the dictionary handle is invlide, the string is NULL or the string is * If the dictionary handle is invlide, the string is NULL or the string is

View File

@ -1065,7 +1065,7 @@ eet_internal_read(Eet_File *ef)
if (eet_test_close((ef->data == (void *)-1) || (ef->data == NULL), ef)) if (eet_test_close((ef->data == (void *)-1) || (ef->data == NULL), ef))
return NULL; return NULL;
if (eet_test_close(ef->data_size < sizeof(int) * 3, ef)) if (eet_test_close(ef->data_size < sizeof(int) * 3, ef))
return NULL; return NULL;
@ -1080,7 +1080,7 @@ eet_internal_read(Eet_File *ef)
eet_close(ef); eet_close(ef);
break; break;
} }
return NULL; return NULL;
} }