#include "edje_cc.h"
-#ifdef _WIN32
-# define FMT_SIZE_T "%Iu"
-#else
-# define FMT_SIZE_T "%zu"
-#endif
-
void *
mem_alloc(size_t size)
{
mem = calloc(1, size);
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));
exit(-1);
return NULL;
str = strdup(s);
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);
exit(-1);
return NULL;
#define FLOAT_PRECISION 0.0001
#define FDIFF(a, b) (fabs((a) - (b)) > FLOAT_PRECISION)
-#ifdef _WIN32
-# define FMT_UCHAR "%c"
-#else
-# define FMT_UCHAR "%hhu"
-#endif
-
/* context */
static Eina_List *groups;
static Ecore_Evas *ee;
goto error_getopt;
}
- DBG("mode=%s, detail=%d(%s), group=%s, part=%s, program=%s, api-only=" FMT_UCHAR
- ", api-fix=" FMT_UCHAR ", machine=" FMT_UCHAR ", file=%s",
+ DBG("mode=%s, detail=%d(%s), group=%s, part=%s, program=%s, api-only=%hhu"
+ ", api-fix=%hhu, machine=%hhu, file=%s",
mode, detail, detail_name,
group ? group : "",
part ? part : "",
#include <Ecore_Evas.h>
#include <Edje.h>
-#ifdef _WIN32
-# define FMT_UCHAR "%c"
-#else
-# define FMT_UCHAR "%hhu"
-#endif
-
struct opts {
char *file;
char *group;
{
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);
return 0;