tmp = realloc(_eina_magic_strings, sizeof(Eina_Magic_String) * size);
if (!tmp)
{
-#ifdef _WIN32
- ERR("could not realloc magic_strings from %Iu to %Iu buckets.",
- _eina_magic_strings_allocated, size);
-#else
ERR("could not realloc magic_strings from %zu to %zu buckets.",
_eina_magic_strings_allocated, size);
-#endif
return NULL;
}
const Eina_Model_Description *desc = model->desc;
unsigned int i;
- DBG("model %p (%s) refcount=%d deleted=" FMT_UCHAR,
+ DBG("model %p (%s) refcount=%d deleted=%hhu",
model, model->desc->cache.types[0]->name,
model->refcount, model->deleted);
{
const Eina_Model_Description *desc = model->desc;
- DBG("model %p (%s) refcount=%d deleted=" FMT_UCHAR,
+ DBG("model %p (%s) refcount=%d deleted=%hhu",
model, model->desc->cache.types[0]->name,
model->refcount, model->deleted);
static void
_eina_model_unref(Eina_Model *model)
{
- DBG("model %p (%s) refcount=%d deleted=" FMT_UCHAR,
+ DBG("model %p (%s) refcount=%d deleted=%hhu",
model, model->desc->cache.types[0]->name,
model->refcount, model->deleted);
eina_model_ref(Eina_Model *model)
{
EINA_MODEL_INSTANCE_CHECK_VAL(model, NULL);
- DBG("model %p (%s) refcount=%d deleted=" FMT_UCHAR,
+ DBG("model %p (%s) refcount=%d deleted=%hhu",
model, model->desc->cache.types[0]->name,
model->refcount, model->deleted);
model->refcount++;
eina_model_xref(Eina_Model *model, const void *id, const char *label)
{
EINA_MODEL_INSTANCE_CHECK_VAL(model, NULL);
- DBG("model %p (%s) refcount=%d deleted=" FMT_UCHAR" id=%p label=%s",
+ DBG("model %p (%s) refcount=%d deleted=%hhu id=%p label=%s",
model, model->desc->cache.types[0]->name,
model->refcount, model->deleted, id, label ? label : "");
max) (((x) > (max)) ? (max) : (((x) < (min)) ? (min) : (x)))
#endif
-#ifdef _WIN32
-# define FMT_CHAR "%c"
-# define FMT_UCHAR "%c"
-# define FMT_XCHAR "%c"
-# define FMT_OCHAR "%c"
-# define FMT_2XCHAR "%2c"
-#else
-# define FMT_CHAR "%hhd"
-# define FMT_UCHAR "%hhu"
-# define FMT_XCHAR "%hhx"
-# define FMT_OCHAR "%hho"
-# define FMT_2XCHAR "%02hhx"
-#endif
-
#define EINA_INLIST_JUMP_SIZE 256
#define READBUFSIZ 65536
for (i = 0; i < bucket->count; i++, s++, l++, r++)
{
int dups;
-#ifdef _WIN32
- printf("DDD: %5hu %5hu '%s'\n", *l, *r, *s);
-#else
+
printf("DDD: %5hhu %5hu '%s'\n", *l, *r, *s);
-#endif
dups = (*r - 1);
#include <inttypes.h> /* PRId64 and PRIu64 */
#include <sys/time.h> /* struct timeval */
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
#include "eina_config.h"
#include "eina_private.h"
#include "eina_error.h"
{
const char *other_mem;
char buf[64];
- snprintf(buf, sizeof(buf), FMT_UCHAR , v);
+ snprintf(buf, sizeof(buf), "%hhu", v);
other_mem = buf; /* required due &buf == buf */
return eina_value_type_pset(convert, convert_mem, &other_mem);
}
{
const char *other_mem;
char buf[64];
- snprintf(buf, sizeof(buf), FMT_CHAR, v);
+ snprintf(buf, sizeof(buf), "%hhd", v);
other_mem = buf; /* required due &buf == buf */
return eina_value_type_pset(convert, convert_mem, &other_mem);
}
if (convert == EINA_VALUE_TYPE_UCHAR)
{
unsigned char other_mem;
- if ((sscanf(v, FMT_UCHAR, &other_mem) != 1) &&
- (sscanf(v, FMT_XCHAR, &other_mem) != 1) &&
- (sscanf(v, FMT_OCHAR, &other_mem) != 1))
+ if ((sscanf(v, "%hhu", &other_mem) != 1) &&
+ (sscanf(v, "%hhx", &other_mem) != 1) &&
+ (sscanf(v, "%hho", &other_mem) != 1))
return EINA_FALSE;
return eina_value_type_pset(convert, convert_mem, &other_mem);
}
else if (convert == EINA_VALUE_TYPE_CHAR)
{
char other_mem;
- if ((sscanf(v, FMT_CHAR, &other_mem) != 1) &&
- (sscanf(v, FMT_XCHAR, &other_mem) != 1) &&
- (sscanf(v, FMT_OCHAR, &other_mem) != 1))
+ if ((sscanf(v, "%hhd", &other_mem) != 1) &&
+ (sscanf(v, "%hhx", &other_mem) != 1) &&
+ (sscanf(v, "%hho", &other_mem) != 1))
return EINA_FALSE;
return eina_value_type_pset(convert, convert_mem, &other_mem);
}
if (first)
{
first = EINA_FALSE;
- if (!eina_strbuf_append_printf(str, FMT_2XCHAR, *ptr))
+ if (!eina_strbuf_append_printf(str, "%02hhx", *ptr))
goto error;
}
else
{
- if (!eina_strbuf_append_printf(str, " " FMT_2XCHAR, *ptr))
+ if (!eina_strbuf_append_printf(str, " %02hhx", *ptr))
goto error;
}
}