Ejemplo n.º 1
0
void      gib_hash_free_and_data(gib_hash *hash)
{
	/* free hash keys as it's not taken care of by gib_list_free */
	gib_list *i;
	for (i = GIB_LIST(hash->base); i; i = i->next)
		gib_efree(GIB_HASH_NODE(i)->key);

	gib_list_free_and_data(GIB_LIST(hash->base));
	gib_efree(hash);
	return;
}
Ejemplo n.º 2
0
/*
 * XXX gib_imlib_save_image_with_error_return breaks with *.END and
 * similar because it tries to set the image format, which only works
 * with .end .
 * So we leave that part out.
 */
void ungib_imlib_save_image_with_error_return(Imlib_Image im, char *file,
	Imlib_Load_Error * error_return)
{
	char *tmp;
	imlib_context_set_image(im);
	tmp = strrchr(file, '.');
	if (tmp) {
		char *p, *pp;
		p = gib_estrdup(tmp + 1);
		pp = p;
		while(*pp) {
			*pp = tolower(*pp);
			pp++;
		}
		imlib_image_set_format(p);
		gib_efree(p);
	}
	imlib_save_image_with_error_return(file, error_return);
}
Ejemplo n.º 3
0
void
gib_imlib_save_image(Imlib_Image im, char *file)
{
   char *tmp;

   imlib_context_set_image(im);
   tmp = strrchr(file, '.');
   if (tmp)
   {
     char *p, *pp;
     p = gib_estrdup(tmp + 1);
     pp = p;
     while(*pp) {
       *pp = tolower(*pp);
       pp++;
     }
     imlib_image_set_format(p);
     gib_efree(p);
   }
   imlib_save_image(file);
}
Ejemplo n.º 4
0
void           gib_hash_node_free_and_data(gib_hash_node *node)
{
	gib_efree(node->list.data);
	gib_hash_node_free(node);
	return;
}
Ejemplo n.º 5
0
void           gib_hash_node_free(gib_hash_node *node)
{
	gib_efree(node->key);
	gib_efree(node);
	return;
}