struct timeval tv;
if (gettimeofday(&tv, NULL) < 0) {
- ErrPrint("gettimeofday: %s\n", strerror(errno));
+ ErrPrint("gettimeofday: %d\n", errno);
} else {
timestamp = (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0f;
timestamp -= event_info->timestamp;
if (!info->resource_array) {
info->resource_array = calloc(WIDGET_CONF_EXTRA_BUFFER_COUNT, sizeof(*info->resource_array));
if (!info->resource_array) {
- ErrPrint("Out of memory: %s\n", strerror(errno));
+ ErrPrint("Out of memory: %d\n", errno);
return 0u;
}
static void pre_destroy_cb(const char *id, void *data)
{
vwin_info_t info = data;
+ char *path = NULL;
- if (id && strcmp(info->id, widget_util_uri_to_path(id))) {
- /* Skip */
- DbgPrint("SKIP: Pre destroy event callback is called [%s], %s\n", id, info->id);
- return;
+ if (id) {
+ path = widget_util_uri_to_path(id);
+
+ if (path && strcmp(info->id, path)) {
+ /* Skip */
+ DbgPrint("SKIP: Pre destroy event callback is called [%s], %s\n", id, info->id);
+ return;
+ }
}
DbgPrint("Pre destroy event callback is called [%s]\n", id);
info = calloc(1, sizeof(*info));
if (!info) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
return NULL;
}
info->id = strdup(id);
if (!info->id) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
free(info);
return NULL;
}
handle = calloc(1, sizeof(*handle));
if (!handle) {
- ErrPrint("Error: %s\n", strerror(errno));
+ ErrPrint("Error: %d\n", errno);
return NULL;
}
len = strlen(filename) + strlen(".desc") + 1;
new_fname = malloc(len);
if (!new_fname) {
- ErrPrint("Error: %s\n", strerror(errno));
+ ErrPrint("Error: %d\n", errno);
free(handle);
return NULL;
}
} else {
new_fname = strdup(filename);
if (!new_fname) {
- ErrPrint("Error: %s\n", strerror(errno));
+ ErrPrint("Error: %d\n", errno);
free(handle);
return NULL;
}
handle->fp = fopen(new_fname, "at");
free(new_fname);
if (!handle->fp) {
- ErrPrint("Failed to open a file: %s\n", strerror(errno));
+ ErrPrint("Failed to open a file: %d\n", errno);
free(handle);
return NULL;
}
}
if (fclose(handle->fp) != 0) {
- ErrPrint("fclose: %s\n", strerror(errno));
+ ErrPrint("fclose: %d\n", errno);
}
free(handle);
return WIDGET_ERROR_NONE;
block->target_id = strdup(id);
if (!block->target_id) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
return WIDGET_ERROR_OUT_OF_MEMORY;
}
block = calloc(1, sizeof(*block));
if (!block) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
return WIDGET_ERROR_OUT_OF_MEMORY;
}
block->type = strdup(type);
if (!block->type) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
free(block);
return WIDGET_ERROR_OUT_OF_MEMORY;
}
block->part = strdup(part);
if (!block->part) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
free(block->type);
free(block);
return WIDGET_ERROR_OUT_OF_MEMORY;
block->data = strdup(data);
if (!block->data) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
free(block->type);
free(block->part);
free(block);
if (option) {
block->option = strdup(option);
if (!block->option) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
free(block->data);
free(block->type);
free(block->part);
if (id) {
block->id = strdup(id);
if (!block->id) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
free(block->option);
free(block->data);
free(block->type);
user_data = calloc(1, sizeof(*user_data));
if (!user_data) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
return NULL;
}
uri = id_to_uri(filename);
if (!uri) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
free(user_data);
return NULL;
}
uri = id_to_uri(filename);
if (!uri) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
return WIDGET_ERROR_OUT_OF_MEMORY;
}
if (strncmp(id, FILE_SCHEMA, schema_len)) {
uri = id_to_uri(id);
if (!uri) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
return WIDGET_ERROR_OUT_OF_MEMORY;
}
} else {
uri = strdup(id);
if (!uri) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
return WIDGET_ERROR_OUT_OF_MEMORY;
}
}
uri = id_to_uri(id);
if (!uri) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
return WIDGET_ERROR_OUT_OF_MEMORY;
}
uri = id_to_uri(id);
if (!uri) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
return WIDGET_ERROR_OUT_OF_MEMORY;
}
uri = id_to_uri(id);
if (!uri) {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
return WIDGET_ERROR_OUT_OF_MEMORY;
}
user_data->content = _content;
} else {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
}
}
user_data->title = _title;
} else {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
}
}
user_data->icon = _icon;
} else {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
}
}
user_data->name = _name;
} else {
- ErrPrint("Heap: %s\n", strerror(errno));
+ ErrPrint("Heap: %d\n", errno);
}
}