From c876e45dfbcf722edba190639a07969535c83895 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 26 Jul 2014 09:33:58 +0200 Subject: [modules] Kill pango-querymodules It serves no purpose now. --- configure.ac | 31 +---- docs/Makefile.am | 23 +--- docs/pango-docs.sgml | 5 - docs/pango-querymodules.xml | 131 ------------------ pango-zip.sh.in | 1 - pango/Makefile.am | 18 --- pango/querymodules.c | 323 -------------------------------------------- 7 files changed, 4 insertions(+), 528 deletions(-) delete mode 100644 docs/pango-querymodules.xml delete mode 100644 pango/querymodules.c diff --git a/configure.ac b/configure.ac index 16b8db6e..cf4ac8ae 100644 --- a/configure.ac +++ b/configure.ac @@ -437,10 +437,7 @@ AM_CONDITIONAL(HAVE_CAIRO_QUARTZ, $have_cairo_quartz) # -# We must have some backend defined, in order for the pango-querymodules -# rule in pango/Makefile.am to work correctly. If you are up to writing -# a new Pango backend outside of Pango, you are up to sending the necessary -# patch to fix that rule. :-) +# We must have some backend defined # if $have_freetype || `test "x$with_xft" = xyes && $have_xft` || $have_cairo || $have_win32 ; then : ; else AC_MSG_ERROR([*** Could not enable any backends. @@ -539,32 +536,6 @@ fi GTK_DOC_CHECK([1.15], [--flavour no-tmpl]) -AC_ARG_ENABLE(man, - AC_HELP_STRING([--enable-man], - [regenerate man pages from Docbook @<:@default=no@:>@]), - enable_man=yes, - enable_man=no) - -if test "x$enable_man" != xno ; then - dnl - dnl Check for xsltproc - dnl - AC_PATH_PROG([XSLTPROC], [xsltproc]) - if test -z "$XSLTPROC"; then - enable_man=no - fi -fi - -if test "x$enable_man" != xno ; then - dnl check for DocBook DTD and stylesheets in the local catalog. - JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN], - [DocBook XML DTD V4.1.2],,enable_man=no) - JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], - [DocBook XSL Stylesheets],,enable_man=no) -fi - -AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno) - AC_ARG_ENABLE(doc-cross-references, AC_HELP_STRING([--disable-doc-cross-references], [cross reference glib and cairo symbols @<:@default=yes@:>@]), diff --git a/docs/Makefile.am b/docs/Makefile.am index 89be228f..19124137 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -85,8 +85,7 @@ GTKDOC_LIBS += $(GLIB_LIBS) # Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE) content_files = \ pango_markup.sgml \ - version.xml \ - pango-querymodules.xml + version.xml # Images to copy into HTML directory HTML_IMAGES = \ @@ -116,29 +115,13 @@ BUILT_SOURCES = pango.types ######################################################################## -man_MANS = pango-querymodules.1 -if ENABLE_MAN -.xml.1: - @XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< -dist-local-check-mans-enabled: - @if grep "Man generation disabled" $(man_MANS) >/dev/null; then $(RM) $(man_MANS); fi -else -$(man_MANS): - @echo Man generation disabled. Creating dummy $@. Configure with --enable-man to enable it. - @echo Man generation disabled. Remove this file, configure with --enable-man, and rebuild Pango > $@ -dist-local-check-mans-enabled: - @echo "*** --enable-man must be used in order to make dist" - @false -endif - -MAINTAINERCLEANFILES = $(man_MANS) $(BUILT_SOURCES) +MAINTAINERCLEANFILES = $(BUILT_SOURCES) EXTRA_DIST += \ layout.fig \ layout.eps \ version.xml.in \ check.docs \ - pango.types \ - $(man_MANS) + pango.types # force doc rebulid after configure dist-hook-local: dist-local-check-mans-enabled dist-local-check-no-cross-references all-local diff --git a/docs/pango-docs.sgml b/docs/pango-docs.sgml index 65514ab2..c5e3bb89 100644 --- a/docs/pango-docs.sgml +++ b/docs/pango-docs.sgml @@ -50,11 +50,6 @@ - - Pango Tools - - - Object Hierarchy diff --git a/docs/pango-querymodules.xml b/docs/pango-querymodules.xml deleted file mode 100644 index 09c3209f..00000000 --- a/docs/pango-querymodules.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - -pango-querymodules -Pango - - -Developer -Owen -Taylor - - -Developer -Behdad -Esfahbod - - - - - -pango-querymodules -1 -User Commands - - - -pango-querymodules -Module registration utility - - - - -pango-querymodules -OPTION -MODULE - - - -Description - -pango-querymodules collects information about loadable -modules for Pango and writes it to stdout. - - -If called without MODULE arguments, it looks for modules in the Pango -module path, which is specified by the key Pango/ModulesPath -in the Pango configuration database. - - -If called with MODULE arguments, it looks for the specified modules. The -arguments may be absolute or relative paths. - - -At runtime, Pango looks for the loadable module information (i.e. the output -of pango-querymodules) in libdir/pango/1.8.0/modules.cache. - - - -Options - - - -, -Prints a short help text and exits. - - - - -Prints version information. - - - - -Do not load user-specific configuration. - - - - -Update the Pango module cache file directly, -instead of writing the information to stdout. - - - - - - -Environment - - - -PANGO_RC_FILE -Specifies an additional rc file for the Pango configuration -database, in addition to the system-wide and per-user files. - - - - - - -Files - - - - -sysconfdir/pango/pangorc -System-wide Pango configuration file. - - - -$XDG_CONFIG_HOME/pango/pangorc -User-specific Pango configuration file. - - - -libdir/pango/1.8.0/modules.cache -Location of the module cache file read by Pango. - - - - - - -Bugs - -None known yet. - - - - - - diff --git a/pango-zip.sh.in b/pango-zip.sh.in index d3d965b9..d1ac2f19 100755 --- a/pango-zip.sh.in +++ b/pango-zip.sh.in @@ -14,7 +14,6 @@ cp -p @abs_srcdir@/COPYING share/doc/pango-dev-@PANGO_VERSION@ rm $ZIP zip $ZIP -@ < -#include "config.h" - -#include -#include -#include "pango-break.h" -#include "pango-context.h" -#include "pango-impl-utils.h" -#include "pango-engine.h" -#include "pango-enum-types.h" - -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include - -#ifdef USE_LA_MODULES -#define SOEXT ".la" -#else -#define SOEXT ("." G_MODULE_SUFFIX) -#endif -#define SOEXT_LEN ((int) strlen (SOEXT)) - -static gboolean system_mode; /* MT-safe as we're single-threaded! */ - -static gboolean -string_needs_escape (const char *str) -{ - while (TRUE) - { - char c = *str++; - - if (!c) - return FALSE; - else if (c == '\"' || c == '\\' || g_ascii_isspace (c)) - return TRUE; - } -} - -static char * -escape_string (const char *str) -{ - GString *result = g_string_new (NULL); - - while (TRUE) - { - char c = *str++; - - switch (c) - { - case '\0': - goto done; - case '\n': - g_string_append (result, "\\n"); - break; - case '\"': - g_string_append (result, "\\\""); - break; - case '\\': - g_string_append (result, "\\\\"); - break; - default: - g_string_append_c (result, c); - } - } - - done: - return g_string_free (result, FALSE); -} - -#define GET_SYMBOL(module,name,location) \ - g_module_symbol (module, name, (gpointer *)(void *)&location) - -static const char * -string_from_script (PangoScript script) -{ - static GEnumClass *class = NULL; /* MT-safe as we're single-threaded! */ - GEnumValue *value; - if (!class) - class = g_type_class_ref (PANGO_TYPE_SCRIPT); - - value = g_enum_get_value (class, script); - if (!value) - { - g_warning ("Engine reported invalid script value %d\n", script); - return string_from_script (PANGO_SCRIPT_INVALID_CODE); - } - - return value->value_nick; -} - -static void -query_module (const char *dir, const char *name, GString *contents) -{ - void (*list) (PangoEngineInfo **engines, gint *n_engines); - void (*init) (GTypeModule *module); - void (*exit) (void); - PangoEngine *(*create) (const gchar *id); - - GModule *module; - gchar *path; - - if (g_path_is_absolute (name)) - path = g_strdup (name); - else - path = g_build_filename (dir, name, NULL); - - module = g_module_open (path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); - - if (!module) - g_printerr ("Cannot load module %s: %s\n", path, g_module_error ()); - - if (module && - GET_SYMBOL (module, "script_engine_list", list) && - GET_SYMBOL (module, "script_engine_init", init) && - GET_SYMBOL (module, "script_engine_exit", exit) && - GET_SYMBOL (module, "script_engine_create", create)) - { - gint i,j; - PangoEngineInfo *engines; - gint n_engines; - - (*list) (&engines, &n_engines); - - for (i=0; imessage); - } - else - { - g_printerr("Parse option error\n"); - } - exit(1); - } - - g_option_context_free(context); - -#if !GLIB_CHECK_VERSION (2, 35, 3) - g_type_init (); -#endif - - contents = g_string_new (""); - g_string_append (contents, - "# Pango Modules file\n" - "# Automatically generated file, do not edit\n" - "#\n"); - - if (argc == 1) /* No arguments given */ - { - char **dirs; - int i; - - if (system_mode) - path = pango_config_key_get_system ("Pango/ModulesPath"); - else - path = pango_config_key_get ("Pango/ModulesPath"); - if (!path) - path = g_build_filename (pango_get_lib_subdirectory (), - MODULE_VERSION, - "modules", - NULL); - - g_string_append_printf (contents, "# ModulesPath = %s\n#\n", path); - - dirs = pango_split_file_list (path); - - g_free (path); - - for (i=0; dirs[i]; i++) - { - GDir *dir = g_dir_open (dirs[i], 0, NULL); - if (dir) - { - const char *dent; - - while ((dent = g_dir_read_name (dir))) - { - int len = strlen (dent); - if (len > SOEXT_LEN && strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) - query_module (dirs[i], dent, contents); - } - - g_dir_close (dir); - } - } - - g_strfreev (dirs); - } - else - { - cwd = g_get_current_dir (); - - for (i=1; istr, -1, &err)) - { - g_fprintf (stderr, "%s\n", err->message); - exit(1); - } - g_free (cache_file); - } - else - g_print ("%s\n", contents->str); - - return 0; -} -- cgit v1.2.1