Mercurial > hg > octave-lojdl > gnulib-hg
changeset 1631:3072de090265
(main) [TEST_CANON_HOST]: Add a simple test driver.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Mon, 11 Jan 1999 02:46:33 +0000 |
parents | 0ff41da90847 |
children | f6217175922c |
files | lib/canon-host.c |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/canon-host.c +++ b/lib/canon-host.c @@ -78,3 +78,17 @@ #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 */