rem: if ( DEBUG ) printf ( "gsb_file_load_open_file %s\n", filename );
add: devel_debug ( g_strdup_printf ("gsb_file_load_open_file %s", filename ));
context: gboolean gsb_file_load_open_file ( gchar *filename ){    struct stat buffer_stat;    gint return_value;    gchar *file_content;    guint length;    if ( DEBUG )	printf ( "gsb_file_load_open_file %s\n", 		 filename );    /* general check */        if ( !g_file_test ( filename,			G_FILE_TEST_EXISTS ))    {	dialogue_error_hint (g_strdup_printf (_("Cannot open file '%s': %s"),					      filename,					      latin2utf8 (strerror(errno))),			     g_strdup_printf ( _("Error loading file '%s'"), filename));	remove_file_from_last_opened_files_list (filename);	return FALSE;    }    /* check here if it's not a regular file */    if ( !g_file_test ( filename,			G_FILE_TEST_IS_REGULAR ))    {	dialogue_error_hint ( g_strdup_printf ( _("%s doesn't seem to be a regular file,\nplease check it and try again."),						filename ),			      g_strdup_printf ( _("Error loading file '%s'"), filename));	remove_file_from_last_opened_files_list (filename);	return ( FALSE );    }     /* fill the buffer stat to check the permission */    return_value = utf8_stat ( filename,			       &buffer_stat);        /* check the access to the file and propose to change it */#ifdef _WIN32    if ( buffer_stat.st_mode != 33152 )	gsb_file_util_change_permissions();#endif /* _WIN32 */    /* load the file */    if ( g_file_get_contents ( filename,			       &file_content,			       &length,			       NULL ))    {	GMarkupParser *markup_parser = g_malloc0 (sizeof (GMarkupParser));	GMarkupParseContext *context;	gulong long_length = 0;	/* for zlib, need a gulong for size and g_file_get_contents a guint...	 * perhaps it exists another mean than that ? */	long_length = length;	/* first, we check if the file is crypted, if it is, we decrypt it */	if ( !strncmp ( file_content, "Grisbi encrypted file ", 22 ))	    if ( !( long_length = gsb_file_util_crypt_file ( filename, &file_content, 							      FALSE, long_length )))		return FALSE;	/* after, we check if the file is compressed, if it is, we uncompress it */	if ( !strncmp ( file_content, "Grisbi compressed file ", 23 ))	    if ( !( length = gsb_file_util_compress_file ( &file_content, 							   long_length,							   FALSE )))		return FALSE;	/* we begin to check if we are in a version under 0.6 or 0.6 and above,	 * because the xml structure changes after 0.6 */	if ( gsb_file_load_check_new_structure (file_content))	{	    /* fill the GMarkupParser for a new xml structure */	    markup_parser -> start_element = (void *) gsb_file_load_start_element;	    markup_parser -> error = (void *) gsb_file_load_error;	}	else	{	    /* fill the GMarkupParser for the last xml structure */	    markup_parser -> start_element = (void *) gsb_file_load_start_element_before_0_6;	    markup_parser -> end_element = (void *) gsb_file_load_end_element_before_0_6;	    markup_parser -> text = (void *) gsb_file_load_text_element_before_0_6;	}	context = g_markup_parse_context_new ( markup_parser,					       0,					       NULL,					       NULL );	download_tmp_values.download_ok = FALSE;	g_markup_parse_context_parse ( context,				       file_content,				       strlen (file_content),				       NULL );	if ( !download_tmp_values.download_ok )	{	    g_markup_parse_context_free (context);	    g_free (markup_parser);	    g_free (file_content);	    return FALSE;	}	g_markup_parse_context_free (context);	g_free (markup_parser);	g_free (file_content);    }    else    {	dialogue_error_hint (g_strdup_printf (_("Cannot open file '%s': %s"),					      filename,					      latin2utf8 (strerror(errno))),			     g_strdup_printf ( _("Error loading file '%s'"), filename));	remove_file_from_last_opened_files_list (filename);	return FALSE;    }    return gsb_file_load_update_previous_version();}