summaryrefslogtreecommitdiff
path: root/gtkdoc-fixxref.in
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-11-25 11:03:17 +0200
committerStefan Kost <ensonic@users.sf.net>2009-11-25 11:03:17 +0200
commitf44066988964f964bba015db382a70d9d899bce1 (patch)
treefd1d44904e43721aaed54ec1aabe502eca0176a9 /gtkdoc-fixxref.in
parent2c5cdf51ac727e189d9a7cc909db8b1f4551f39d (diff)
downloadgtk-doc-f44066988964f964bba015db382a70d9d899bce1.tar.gz
common: move CreateValidSGMLID to common
Diffstat (limited to 'gtkdoc-fixxref.in')
-rwxr-xr-xgtkdoc-fixxref.in29
1 files changed, 3 insertions, 26 deletions
diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
index 8e9e406..90727a9 100755
--- a/gtkdoc-fixxref.in
+++ b/gtkdoc-fixxref.in
@@ -28,6 +28,9 @@ use strict;
use bytes;
use Getopt::Long;
+unshift @INC, '@PACKAGE_DATA_DIR@';
+require "gtkdoc-common.pl";
+
# Options
# name of documentation module
@@ -425,29 +428,3 @@ sub HighlightSourcePostprocess {
END_OF_HTML
}
-
-#############################################################################
-# Function : CreateValidSGMLID
-# Description : Creates a valid SGML 'id' from the given string.
-# NOTE: SGML ids are case-insensitive, so we have a few special
-# cases to avoid clashes of ids.
-# Arguments : $id - the string to be converted into a valid SGML id.
-#############################################################################
-
-sub CreateValidSGMLID {
- my ($id) = $_[0];
-
- # Special case, '_' would end up as '' so we use 'gettext-macro' instead.
- if ($id eq "_") { return "gettext-macro"; }
-
- $id =~ s/[_ ]/-/g;
- $id =~ s/[,\.]//g;
- $id =~ s/^-*//;
- $id =~ s/::/-/g;
- $id =~ s/:/--/g;
-
- # Append ":CAPS" to all all-caps identifiers
- if ($id !~ /[a-z]/ && $id !~ /-CAPS$/) { $id .= ":CAPS" };
-
- return $id;
-}