diff options
Diffstat (limited to 'Build/source/texk/kpathsea/kpathsea.c')
-rw-r--r-- | Build/source/texk/kpathsea/kpathsea.c | 129 |
1 files changed, 8 insertions, 121 deletions
diff --git a/Build/source/texk/kpathsea/kpathsea.c b/Build/source/texk/kpathsea/kpathsea.c index fe5a439e205..86a4d053b63 100644 --- a/Build/source/texk/kpathsea/kpathsea.c +++ b/Build/source/texk/kpathsea/kpathsea.c @@ -114,6 +114,14 @@ kpathsea_finish (kpathsea kpse) string_free (kpse->saved_env[i]); free (kpse->saved_env); } +#if defined(WIN32) || defined(__MINGW32__) || defined(__CYGWIN__) + if (kpse->suffixlist != NULL) { + char **p; + for p = kpse->suffixlist; *p; p++) + free (*p); + free (kpse->suffixlist); + } +#endif /* WIN32 || __MINGW32__ || __CYGWIN__ */ #endif /* KPATHSEA_CAN_FREE */ #if defined (KPSE_COMPAT_API) if (kpse==kpse_def) @@ -125,128 +133,7 @@ kpathsea_finish (kpathsea kpse) #if defined (KPSE_COMPAT_API) -/* - * FIXME: completely remove the initializer. - */ - -#if 0 - -#define NULL_FORMAT_INFO(kpse_file_format_type) { \ - NULL, /* const_string type */ \ - NULL, /* const_string path */ \ - NULL, /* const_string raw_path */ \ - NULL, /* const_string path_source */ \ - NULL, /* const_string override_path */ \ - NULL, /* const_string client_path */ \ - NULL, /* const_string cnf_path */ \ - NULL, /* const_string default_path */ \ - NULL, /* const_string *suffix */ \ - NULL, /* const_string *alt_suffix */ \ - false, /* boolean suffix_search_only */ \ - NULL, /* const_string program */ \ - 0, /* int argc */ \ - NULL, /* const_string *argv */ \ - false, /* boolean program_enabled_p */ \ - 0, /* kpse_src_type program_enable_level */ \ - false /* boolean binmode */ \ - } - -kpathsea_instance kpse_def_inst = { - NULL, /* p_record_input record_input */ - NULL, /* p_record_output record_output */ - {NULL, 0}, /* hash_table_type cnf_hash */ - false, /* boolean doing_cnf_init */ - {NULL, 0}, /* hash_table_type db */ - {NULL, 0}, /* hash_table_type alias_db */ - {0, NULL}, /* str_list_type db_dir_list */ - 0, /* unsigned debug */ - {NULL, 0}, /* hash_table_type link_table */ - NULL, /* cache_entry *the_cache */ - 0, /* unsigned cache_length */ - {NULL, 0}, /* hash_table_type map */ - NULL, /* const_string map_path */ - false, /* boolean debug_hash_lookup_int */ - NULL, /* string elt */ - 0, /* unsigned elt_alloc */ - NULL, /* const_string path */ - false, /* boolean followup_search */ - NULL, /* FILE *log_file */ - false, /* boolean log_opened */ - NULL, /* string invocation_name */ - NULL, /* string invocation_short_name */ - NULL, /* string program_name */ - 0, /* int ll_verbose */ - NULL, /* const_string fallback_font */ - NULL, /* const_string fallback_resolutions_string */ - 0, /* unsigned *fallback_resolutions */ - { /* kpse_format_info_type format_info[kpse_last_format] */ - NULL_FORMAT_INFO(kpse_gf_format), - NULL_FORMAT_INFO(kpse_pk_format), - NULL_FORMAT_INFO(kpse_any_glyph_format), - NULL_FORMAT_INFO(kpse_tfm_format), - NULL_FORMAT_INFO(kpse_afm_format), - NULL_FORMAT_INFO(kpse_base_format), - NULL_FORMAT_INFO(kpse_bib_format), - NULL_FORMAT_INFO(kpse_bst_format), - NULL_FORMAT_INFO(kpse_cnf_format), - NULL_FORMAT_INFO(kpse_db_format), - NULL_FORMAT_INFO(kpse_fmt_format), - NULL_FORMAT_INFO(kpse_fontmap_format), - NULL_FORMAT_INFO(kpse_mem_format), - NULL_FORMAT_INFO(kpse_mf_format), - NULL_FORMAT_INFO(kpse_mfpool_format), - NULL_FORMAT_INFO(kpse_mft_format), - NULL_FORMAT_INFO(kpse_mp_format), - NULL_FORMAT_INFO(kpse_mppool_format), - NULL_FORMAT_INFO(kpse_mpsupport_format), - NULL_FORMAT_INFO(kpse_ocp_format), - NULL_FORMAT_INFO(kpse_ofm_format), - NULL_FORMAT_INFO(kpse_opl_format), - NULL_FORMAT_INFO(kpse_otp_format), - NULL_FORMAT_INFO(kpse_ovf_format), - NULL_FORMAT_INFO(kpse_ovp_format), - NULL_FORMAT_INFO(kpse_pict_format), - NULL_FORMAT_INFO(kpse_tex_format), - NULL_FORMAT_INFO(kpse_texdoc_format), - NULL_FORMAT_INFO(kpse_texpool_format), - NULL_FORMAT_INFO(kpse_texsource_format), - NULL_FORMAT_INFO(kpse_tex_ps_header_format), - NULL_FORMAT_INFO(kpse_troff_font_format), - NULL_FORMAT_INFO(kpse_type1_format), - NULL_FORMAT_INFO(kpse_vf_format), - NULL_FORMAT_INFO(kpse_dvips_config_format), - NULL_FORMAT_INFO(kpse_ist_format), - NULL_FORMAT_INFO(kpse_truetype_format), - NULL_FORMAT_INFO(kpse_type42_format), - NULL_FORMAT_INFO(kpse_web2c_format), - NULL_FORMAT_INFO(kpse_program_text_format), - NULL_FORMAT_INFO(kpse_program_binary_format), - NULL_FORMAT_INFO(kpse_miscfonts_format), - NULL_FORMAT_INFO(kpse_web_format), - NULL_FORMAT_INFO(kpse_cweb_format), - NULL_FORMAT_INFO(kpse_enc_format), - NULL_FORMAT_INFO(kpse_cmap_format), - NULL_FORMAT_INFO(kpse_sfd_format), - NULL_FORMAT_INFO(kpse_opentype_format), - NULL_FORMAT_INFO(kpse_pdftex_config_format), - NULL_FORMAT_INFO(kpse_lig_format), - NULL_FORMAT_INFO(kpse_texmfscripts_format), - NULL_FORMAT_INFO(kpse_lua_format) - }, - false, /* boolean make_tex_discard_errors */ - NULL, /* FILE *missfont */ - NULL, /* expansion_type *expansions */ - 0, /* unsigned expansion_len */ - NULL, /* char **saved_env */ - 0 /* int saved_count */ -}; - -#else /* zero */ - kpathsea_instance kpse_def_inst; - -#endif /* zero */ - kpathsea kpse_def = &kpse_def_inst; #endif /* KPSE_COMPAT_API */ |