EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
gettimeofday(&now, NULL);
- fprintf(out, "; Host table generated %s;\n", ctime(&now.tv_sec));
+
+ fprintf(out, "; MIT Network Host Table\n;\n");
+ fprintf(out, "; \t%cAuthor: $\n", '$');
+ fprintf(out, "; \t%cDate: $\n", '$');
+ fprintf(out, "; \t%cRevision: $\n;\n", '$');
+ fprintf(out, "; Host table generated by Moira at %s;\n",
+ ctime(&now.tv_sec));
EXEC SQL DECLARE y CURSOR FOR SELECT
mach_id, name FROM hostalias;
if (id == 0) continue;
if (*strtrim(name) == 0) continue;
if ((i = strlen(name)) < 9 || strcmp(&name[i-8], ".MIT.EDU")) {
- fprintf(stderr, "Name %s not in MIT domain\n", name);
continue;
} else {
name[i-8] = 0;