projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f71e421
)
(main) [TEST_CANON_HOST]: Add a simple test driver.
author
Jim Meyering
<jim@meyering.net>
Mon, 11 Jan 1999 02:46:33 +0000
(
02:46
+0000)
committer
Jim Meyering
<jim@meyering.net>
Mon, 11 Jan 1999 02:46:33 +0000
(
02:46
+0000)
lib/canon-host.c
patch
|
blob
|
history
diff --git
a/lib/canon-host.c
b/lib/canon-host.c
index db195385f4b616bac89101359a04ea2cec313601..1f6b575ee15d756272855d475c55cbd83dfe0879 100644
(file)
--- a/
lib/canon-host.c
+++ b/
lib/canon-host.c
@@
-78,3
+78,17
@@
canon_host (const char *host)
#endif /* HAVE_GETHOSTBYNAME */
return 0;
}
+
+#ifdef TEST_CANON_HOST
+int
+main (int argc, char **argv)
+{
+ int i;
+ for (i = 1; i < argc; i++)
+ {
+ char *s = canon_host (argv[i]);
+ printf ("%s: %s\n", argv[i], (s ? s : "<undef>"));
+ }
+ exit (0);
+}
+#endif /* TEST_CANON_HOST */