rem: if (DEBUG) printf ( "gsb_file_util_compress_file : %d\n", compress );
add: devel_debug ( g_strdup_printf ("gsb_file_util_compress_file : %d", compress ));
context: gint gsb_file_util_compress_file ( gchar **file_content,				   gulong length,				   gboolean compress ){    /* FIXME : for zlib, file_content need to be guchar, but g_file_get_contents need     * a gchar... i don't know if it's a problem to hide that to gcc, but it     * seems to work... perhaps there is a better way ?     * so here a gchar comes in, but it's hidden with (guchar *) to zlib... */    if (DEBUG)	printf ( "gsb_file_util_compress_file : %d\n",		 compress );    if ( compress )    {	/* compress */	gchar *temp;	gulong new_length;	gint result;	gchar *str_length;	gint iterator;	new_length = compressBound (length);	temp = g_malloc (new_length);	result = compress2 ( (guchar *) temp, &new_length,			     (guchar *) *file_content, length,			     Z_BEST_COMPRESSION );		if ( result != Z_OK )	{	    dialogue_error_hint ( ("An error occured while compressing the file : zlib error\nOperation aborted"),				  _("File compression"));	    free (*file_content);	    free (temp);	    return 0;	}	free (*file_content);	str_length = utils_str_itoa (length);	*file_content = g_malloc (23 + strlen (str_length) + 1 + new_length);		memcpy ( *file_content, "Grisbi compressed file ", 23 );	iterator = 23;	memcpy ( *file_content + iterator, str_length, strlen (str_length));	iterator = iterator + strlen (str_length);	memcpy ( *file_content + iterator, "_", 1);	iterator = iterator + 1;	memcpy ( *file_content + iterator, temp, new_length);	iterator = iterator + new_length;	free (temp);	return iterator;    }    else    {	/* decompress */	gchar *temp;	gint result;	gulong new_length;	gchar *zip_begining;	gulong zip_size;	/* get the length of the uncompressed file */	if ( !sscanf ( *file_content,		       "Grisbi compressed file %ld_",		       &new_length ))	{	    dialogue_error_hint ( ("An error occured while uncompressing the file : cannot get the size\nOperation aborted"),				  _("File uncompression"));	    free (*file_content);	    return 0;	}	zip_begining = memchr ( *file_content, '_', length );	if (!zip_begining)	{	    dialogue_error_hint ( ("An error occured while uncompressing the file : cannot find the begining of the compressed file.\nOperation aborted"),				  _("File uncompression"));	    free (*file_content);	    return 0;	}	zip_begining = zip_begining + 1;	zip_size = length - (zip_begining - *file_content );	temp = g_malloc ( new_length );	result = uncompress ( (guchar *) temp, &new_length,			      (guchar *) zip_begining, zip_size);	if ( result != Z_OK )	{	    dialogue_error_hint ( ("An error occured while uncompressing the file : zlib error\nOperation aborted"),				  _("File uncompression"));	    free (*file_content);	    free (temp);	    return 0;	}	free (*file_content);	*file_content = temp;	return new_length;    }    /* normally souldn't come here */    return length;}