Example #1
0
bool
xml_formatter::get_bfd_object(symbol_entry const * symb, op_bfd * & abfd) const
{
	bool ok = true;

	string const & image_name = get_image_name(symb->image_name,
	                                           image_name_storage::int_filename, extra_found_images);
	if (abfd && abfd->get_filename() == image_name)
		return true;
	delete abfd;
	abfd = new op_bfd(image_name, symbol_filter,
	                  extra_found_images, ok);

	if (!ok) {
		report_image_error(image_name, image_format_failure,
				   false, extra_found_images);
		delete abfd;
		abfd = 0;
		return false;
	}

	return true;
}
Example #2
0
static int scene_reloadimage(dword selidx)
{
	int result;

	reset_image_ptr();

	if (where == scene_in_zip || where == scene_in_chm || where == scene_in_rar)
		STRCPY_S(filename, filelist[selidx].compname->ptr);
	else {
		STRCPY_S(filename, config.shortpath);
		STRCAT_S(filename, filelist[selidx].shortname->ptr);
	}

	if (config.use_image_queue) {
		result = cache_get_image(selidx);
	} else {
		result = open_image(selidx);
	}

	if (result != 0) {
		report_image_error(result);
		return -1;
	}
	// already calc brightness in cacher
	if (!config.use_image_queue && config.imgbrightness != 100) {
		recalc_brightness();
	}

	STRCPY_S(config.lastfile, filelist[selidx].compname->ptr);
	STRCPY_S(prev_path, config.path);
	STRCPY_S(prev_shortpath, config.shortpath);
	STRCPY_S(prev_lastfile, filelist[selidx].compname->ptr);
	prev_where = where;
	oldangle = 0;

	return 0;
}