[4920] in Athena Bugs
hesinfo
daemon@ATHENA.MIT.EDU (John Carr)
Sun May 13 01:13:03 1990
To: bugs@ATHENA.MIT.EDU
Date: Sun, 13 May 90 01:12:52 EDT
From: John Carr <jfc@ATHENA.MIT.EDU>
hesinfo doesn't notice hesiod errors; it just prints nothing (or
"nothing" with the -l option).
*** /source/athena/athena.lib/hesiod/hesinfo.c Sun Aug 7 21:52:33 1988
--- hesinfo.c Sun May 13 01:07:06 1990
***************
*** 27,32 ****
--- 27,33 ----
#endif
#include <stdio.h>
+ #include <hesiod.h>
main(argc, argv)
char *argv[];
***************
*** 70,75 ****
--- 71,90 ----
cpp = hes_resolve(identifier, type);
if (cpp == NULL) {
if (lflag) printf("nothing\n");
+ switch(hes_error())
+ {
+ case 0:
+ break;
+ default:
+ fputs("Unknown hesiod error\n", stderr);
+ break;
+ case HES_ER_NOTFOUND:
+ fputs("Hesiod name not found\n", stderr);
+ break;
+ case HES_ER_CONFIG:
+ fputs("Hesiod configuration error\n", stderr);
+ break;
+ }
} else {
while(*cpp) printf("%s\n", *cpp++);
}