forked from enlightenment/efl
Edje: remove ugly FMT_* compatibility strings as Evil has now POSIX printf family functions
SVN revision: 68110
This commit is contained in:
parent
52752392b1
commit
b0a4783e22
|
@ -7,12 +7,6 @@
|
||||||
|
|
||||||
#include "edje_cc.h"
|
#include "edje_cc.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
# define FMT_SIZE_T "%Iu"
|
|
||||||
#else
|
|
||||||
# define FMT_SIZE_T "%zu"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void *
|
void *
|
||||||
mem_alloc(size_t size)
|
mem_alloc(size_t size)
|
||||||
{
|
{
|
||||||
|
@ -20,7 +14,7 @@ mem_alloc(size_t size)
|
||||||
|
|
||||||
mem = calloc(1, size);
|
mem = calloc(1, size);
|
||||||
if (mem) return mem;
|
if (mem) return mem;
|
||||||
ERR("%s: Error. %s:%i memory allocation of " FMT_SIZE_T " bytes failed. %s",
|
ERR("%s: Error. %s:%i memory allocation of %zu bytes failed. %s",
|
||||||
progname, file_in, line, size, strerror(errno));
|
progname, file_in, line, size, strerror(errno));
|
||||||
exit(-1);
|
exit(-1);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -33,7 +27,7 @@ mem_strdup(const char *s)
|
||||||
|
|
||||||
str = strdup(s);
|
str = strdup(s);
|
||||||
if (str) return str;
|
if (str) return str;
|
||||||
ERR("%s: Error. %s:%i memory allocation of " FMT_SIZE_T " bytes failed. %s. string being duplicated: \"%s\"",
|
ERR("%s: Error. %s:%i memory allocation of %zu bytes failed. %s. string being duplicated: \"%s\"",
|
||||||
progname, file_in, line, strlen(s) + 1, strerror(errno), s);
|
progname, file_in, line, strlen(s) + 1, strerror(errno), s);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -31,12 +31,6 @@ static int _log_dom;
|
||||||
#define FLOAT_PRECISION 0.0001
|
#define FLOAT_PRECISION 0.0001
|
||||||
#define FDIFF(a, b) (fabs((a) - (b)) > FLOAT_PRECISION)
|
#define FDIFF(a, b) (fabs((a) - (b)) > FLOAT_PRECISION)
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
# define FMT_UCHAR "%c"
|
|
||||||
#else
|
|
||||||
# define FMT_UCHAR "%hhu"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* context */
|
/* context */
|
||||||
static Eina_List *groups;
|
static Eina_List *groups;
|
||||||
static Ecore_Evas *ee;
|
static Ecore_Evas *ee;
|
||||||
|
@ -1588,8 +1582,8 @@ main(int argc, char **argv)
|
||||||
goto error_getopt;
|
goto error_getopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG("mode=%s, detail=%d(%s), group=%s, part=%s, program=%s, api-only=" FMT_UCHAR
|
DBG("mode=%s, detail=%d(%s), group=%s, part=%s, program=%s, api-only=%hhu"
|
||||||
", api-fix=" FMT_UCHAR ", machine=" FMT_UCHAR ", file=%s",
|
", api-fix=%hhu, machine=%hhu, file=%s",
|
||||||
mode, detail, detail_name,
|
mode, detail, detail_name,
|
||||||
group ? group : "",
|
group ? group : "",
|
||||||
part ? part : "",
|
part ? part : "",
|
||||||
|
|
|
@ -20,12 +20,6 @@
|
||||||
#include <Ecore_Evas.h>
|
#include <Ecore_Evas.h>
|
||||||
#include <Edje.h>
|
#include <Edje.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
# define FMT_UCHAR "%c"
|
|
||||||
#else
|
|
||||||
# define FMT_UCHAR "%hhu"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct opts {
|
struct opts {
|
||||||
char *file;
|
char *file;
|
||||||
char *group;
|
char *group;
|
||||||
|
@ -554,7 +548,7 @@ static unsigned char _parse_color(__UNUSED__ const Ecore_Getopt *parser, __UNUSE
|
||||||
{
|
{
|
||||||
unsigned char *color = (unsigned char *)storage->ptrp;
|
unsigned char *color = (unsigned char *)storage->ptrp;
|
||||||
|
|
||||||
if (sscanf(str, FMT_UCHAR "," FMT_UCHAR "," FMT_UCHAR, color, color + 1, color + 2) != 3)
|
if (sscanf(str, "%hhu,%hhu,%hhu", color, color + 1, color + 2) != 3)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "ERROR: incorrect color value '%s'\n", str);
|
fprintf(stderr, "ERROR: incorrect color value '%s'\n", str);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue