dnsapi: Reorder a couple of functions to avoid forward declarations.
Francois Gouget
fgouget at free.fr
Wed Jan 7 05:45:00 CST 2009
---
The functions are already static so this does not help with further
cleanups. Also I don;t know if we should keep changes to this file to a
minimum to make it easier to resync it with wherever it comes from. So
I'm fine if this patch is not applied.
dlls/dnsapi/ns_name.c | 75 +++++++++++++++++++++++--------------------------
1 files changed, 35 insertions(+), 40 deletions(-)
diff --git a/dlls/dnsapi/ns_name.c b/dlls/dnsapi/ns_name.c
index c8e8187..994aef9 100644
--- a/dlls/dnsapi/ns_name.c
+++ b/dlls/dnsapi/ns_name.c
@@ -39,10 +39,42 @@
static const char digits[] = "0123456789";
-/* Forward. */
+/* 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);
+ }
+}
-static int special(int);
-static int printable(int);
+/*
+ * 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 */
--
1.5.6.5
More information about the wine-patches
mailing list