From 25a4205d9d6b595843292cbf055415260756798a Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 22 Nov 2023 16:50:44 +0000 Subject: [PATCH] docs: Move the ghostutils SECTION MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sadly, this is about hostnames rather than ghosts. 😞 Signed-off-by: Philip Withnall Helps: #3037 --- docs/reference/glib/glib.toml.in | 1 + docs/reference/glib/host-utils.md | 30 ++++++++++++++++++++++++++++++ docs/reference/glib/meson.build | 1 + glib/ghostutils.c | 18 ------------------ 4 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 docs/reference/glib/host-utils.md diff --git a/docs/reference/glib/glib.toml.in b/docs/reference/glib/glib.toml.in index 94a5e2fb5..7405e4e3f 100644 --- a/docs/reference/glib/glib.toml.in +++ b/docs/reference/glib/glib.toml.in @@ -61,6 +61,7 @@ content_files = [ "error-reporting.md", "logging.md", "file-utils.md", + "host-utils.md", "main-loop.md", "reference-counting.md", "testing.md", diff --git a/docs/reference/glib/host-utils.md b/docs/reference/glib/host-utils.md new file mode 100644 index 000000000..5a86b25d6 --- /dev/null +++ b/docs/reference/glib/host-utils.md @@ -0,0 +1,30 @@ +Title: Hostname Utilities +SPDX-License-Identifier: LGPL-2.1-or-later +SPDX-FileCopyrightText: 2008 Dan Winship + +# Hostname Utilities + +Functions for manipulating internet hostnames; in particular, for +converting between Unicode and ASCII-encoded forms of +Internationalized Domain Names (IDNs). + +The +[Internationalized Domain Names for Applications (IDNA)](http://www.ietf.org/rfc/rfc3490.txt) +standards allow for the use +of Unicode domain names in applications, while providing +backward-compatibility with the old ASCII-only DNS, by defining an +ASCII-Compatible Encoding of any given Unicode name, which can be +used with non-IDN-aware applications and protocols. (For example, +“Παν語.org” maps to “xn--4wa8awb4637h.org”.) + +## Hostname Conversions + + * [func@GLib.hostname_to_ascii] + * [func@GLib.hostname_to_unicode] + +## Hostname Checks + + * [func@GLib.hostname_is_non_ascii] + * [func@GLib.hostname_is_ascii_encoded] + * [func@GLib.hostname_is_ip_address] + diff --git a/docs/reference/glib/meson.build b/docs/reference/glib/meson.build index 5a9ad97c7..bdb41d15a 100644 --- a/docs/reference/glib/meson.build +++ b/docs/reference/glib/meson.build @@ -167,6 +167,7 @@ expand_content_files = [ 'threads-deprecated.md', 'markup.md', 'goption.md', + 'host-utils.md', 'data-structures.md', 'shell.md', 'string-utils.md', diff --git a/glib/ghostutils.c b/glib/ghostutils.c index db6d68793..fbc9b113e 100644 --- a/glib/ghostutils.c +++ b/glib/ghostutils.c @@ -41,24 +41,6 @@ #endif -/** - * SECTION:ghostutils - * @short_description: Internet hostname utilities - * - * Functions for manipulating internet hostnames; in particular, for - * converting between Unicode and ASCII-encoded forms of - * Internationalized Domain Names (IDNs). - * - * The - * [Internationalized Domain Names for Applications (IDNA)](http://www.ietf.org/rfc/rfc3490.txt) - * standards allow for the use - * of Unicode domain names in applications, while providing - * backward-compatibility with the old ASCII-only DNS, by defining an - * ASCII-Compatible Encoding of any given Unicode name, which can be - * used with non-IDN-aware applications and protocols. (For example, - * "Παν語.org" maps to "xn--4wa8awb4637h.org".) - **/ - #define IDNA_ACE_PREFIX "xn--" #define IDNA_ACE_PREFIX_LEN 4