From a9597698a8916ec0d66660db57f232b62daa9cd2 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Wed, 7 Jan 2009 12:45:00 +0100 Subject: [PATCH] dnsapi: Reorder a couple of functions to avoid forward declarations. --- dlls/dnsapi/ns_name.c | 75 ++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 40 deletions(-) diff --git a/dlls/dnsapi/ns_name.c b/dlls/dnsapi/ns_name.c index c8e81871b12..994aef94459 100644 --- a/dlls/dnsapi/ns_name.c +++ b/dlls/dnsapi/ns_name.c @@ -39,10 +39,42 @@ static const char digits[] = "0123456789"; -/* Forward. */ +/* Private. */ -static int special(int); -static int printable(int); +/* + * special(ch) + * Thinking in noninternationalized USASCII (per the DNS spec), + * is this character special ("in need of quoting") ? + * return: + * boolean. + */ +static int +special(int ch) { + switch (ch) { + case 0x22: /* '"' */ + case 0x2E: /* '.' */ + case 0x3B: /* ';' */ + case 0x5C: /* '\\' */ + /* Special modifiers in zone files. */ + case 0x40: /* '@' */ + case 0x24: /* '$' */ + return (1); + default: + return (0); + } +} + +/* + * printable(ch) + * Thinking in noninternationalized USASCII (per the DNS spec), + * is this character visible and not a space when printed ? + * return: + * boolean. + */ +static int +printable(int ch) { + return (ch > 0x20 && ch < 0x7f); +} /* Public. */ @@ -278,41 +310,4 @@ dns_ns_name_skip(const u_char **ptrptr, const u_char *eom) { return (0); } -/* Private. */ - -/* - * special(ch) - * Thinking in noninternationalized USASCII (per the DNS spec), - * is this character special ("in need of quoting") ? - * return: - * boolean. - */ -static int -special(int ch) { - switch (ch) { - case 0x22: /* '"' */ - case 0x2E: /* '.' */ - case 0x3B: /* ';' */ - case 0x5C: /* '\\' */ - /* Special modifiers in zone files. */ - case 0x40: /* '@' */ - case 0x24: /* '$' */ - return (1); - default: - return (0); - } -} - -/* - * printable(ch) - * Thinking in noninternationalized USASCII (per the DNS spec), - * is this character visible and not a space when printed ? - * return: - * boolean. - */ -static int -printable(int ch) { - return (ch > 0x20 && ch < 0x7f); -} - #endif /* HAVE_RESOLV */