From e63a65b3955b173a3e8d6b78c6377a518a9922d6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 11 Aug 2005 23:45:42 +0000 Subject: * drop glib from avahi-common * add new module with avahi_malloc() and friends git-svn-id: file:///home/lennart/svn/public/avahi/trunk@298 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-common/domain-test.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'avahi-common/domain-test.c') diff --git a/avahi-common/domain-test.c b/avahi-common/domain-test.c index 240f960..a9ad0b6 100644 --- a/avahi-common/domain-test.c +++ b/avahi-common/domain-test.c @@ -23,26 +23,29 @@ #include #endif +#include + #include "util.h" +#include "malloc.h" int main(int argc, char *argv[]) { - gchar *s; + char *s; - g_message("host name: %s", s = avahi_get_host_name()); - g_free(s); + printf("host name: %s\n", s = avahi_get_host_name()); + avahi_free(s); - g_message("%s", s = avahi_normalize_name("foo.foo.")); - g_free(s); + printf("%s\n", s = avahi_normalize_name("foo.foo.")); + avahi_free(s); - g_message("%s", s = avahi_normalize_name("\\f\\o\\\\o\\..\\f\\ \\o\\o.")); - g_free(s); + printf("%s\n", s = avahi_normalize_name("\\f\\o\\\\o\\..\\f\\ \\o\\o.")); + avahi_free(s); - g_message("%i", avahi_domain_equal("\\aaa bbb\\.cccc\\\\.dee.fff.", "aaa\\ bbb\\.cccc\\\\.dee.fff")); - g_message("%i", avahi_domain_equal("\\A", "a")); + printf("%i\n", avahi_domain_equal("\\aaa bbb\\.cccc\\\\.dee.fff.", "aaa\\ bbb\\.cccc\\\\.dee.fff")); + printf("%i\n", avahi_domain_equal("\\A", "a")); - g_message("%i", avahi_domain_equal("a", "aaa")); + printf("%i\n", avahi_domain_equal("a", "aaa")); - g_message("%u = %u", avahi_domain_hash("\\Aaaab\\\\."), avahi_domain_hash("aaaa\\b\\\\")); + printf("%u = %u\n", avahi_domain_hash("\\Aaaab\\\\."), avahi_domain_hash("aaaa\\b\\\\")); return 0; } -- cgit