Eet: remove ugly FMT_* compatibility strings as Evil has now POSIX printf family functions

SVN revision: 68091
This commit is contained in:
Vincent Torri 2012-02-17 21:08:15 +00:00
parent 2e088e3f1d
commit 026f3439ed
1 changed files with 4 additions and 17 deletions

View File

@ -21,18 +21,6 @@
#include "Eet.h" #include "Eet.h"
#include "Eet_private.h" #include "Eet_private.h"
#ifdef _WIN32
# define FMT_CHAR "%c"
# define FMT_UCHAR "%c"
# define FMT_LONG_LONG "%I64i"
# define FMT_ULONG_LONG "%I64u"
#else
# define FMT_CHAR "%hhi"
# define FMT_UCHAR "%hhu"
# define FMT_LONG_LONG "%lli"
# define FMT_ULONG_LONG "%llu"
#endif
/* /*
* routines for doing data -> struct and struct -> data conversion * routines for doing data -> struct and struct -> data conversion
* *
@ -3108,7 +3096,7 @@ _eet_data_dump_parse(Eet_Dictionary *ed,
if (!strcmp(tok3, "char:")) if (!strcmp(tok3, "char:"))
{ {
n->type = EET_T_CHAR; n->type = EET_T_CHAR;
sscanf(tok4, FMT_CHAR, sscanf(tok4, "%hhi",
&(n->data.value.c)); &(n->data.value.c));
} }
else if (!strcmp(tok3, "short:")) else if (!strcmp(tok3, "short:"))
@ -3126,7 +3114,7 @@ _eet_data_dump_parse(Eet_Dictionary *ed,
else if (!strcmp(tok3, "long_long:")) else if (!strcmp(tok3, "long_long:"))
{ {
n->type = EET_T_LONG_LONG; n->type = EET_T_LONG_LONG;
sscanf(tok4, FMT_LONG_LONG, sscanf(tok4, "%lli",
&(n->data.value.l)); &(n->data.value.l));
} }
else if (!strcmp(tok3, "float:")) else if (!strcmp(tok3, "float:"))
@ -3144,7 +3132,7 @@ _eet_data_dump_parse(Eet_Dictionary *ed,
else if (!strcmp(tok3, "uchar:")) else if (!strcmp(tok3, "uchar:"))
{ {
n->type = EET_T_UCHAR; n->type = EET_T_UCHAR;
sscanf(tok4, FMT_UCHAR, sscanf(tok4, "%hhu",
&(n->data.value.uc)); &(n->data.value.uc));
} }
else if (!strcmp(tok3, "ushort:")) else if (!strcmp(tok3, "ushort:"))
@ -3162,7 +3150,7 @@ _eet_data_dump_parse(Eet_Dictionary *ed,
else if (!strcmp(tok3, "ulong_long:")) else if (!strcmp(tok3, "ulong_long:"))
{ {
n->type = EET_T_ULONG_LONG; n->type = EET_T_ULONG_LONG;
sscanf(tok4, FMT_ULONG_LONG, sscanf(tok4, "%llu",
&(n->data.value.ul)); &(n->data.value.ul));
} }
else if (!strcmp(tok3, "string:")) else if (!strcmp(tok3, "string:"))
@ -4996,4 +4984,3 @@ eet_data_xattr_cipher_set(const char *filename,
return ret; return ret;
} }