head 1.3; access; symbols; locks; strict; comment @ * @; 1.3 date 92.12.15.00.20.22; author jromine; state Exp; branches; next 1.2; 1.2 date 92.12.14.17.47.34; author jromine; state Exp; branches; next 1.1; 1.1 date 92.12.14.17.44.38; author jromine; state Exp; branches; next ; desc @@ 1.3 log @endif sugar @ text @/* hosts.c - use MMDF to get hostname information */ #ifndef lint static char ident[] = "@@(#)$Id: hosts.c,v 1.2 1992/12/14 17:47:34 jromine Exp jromine $"; #endif /* lint */ /* LINTLIBRARY */ #include "../h/strings.h" #include "util.h" #include "mmdf.h" #include "ch.h" #ifdef MMDFII #include "dm.h" #endif /* MMDFII */ #include "../zotnet/mts.h" /* * We really should be careful with the number of fd's that this routine * opens: the ch_seq ch_table.c module likes to keep 6 (yes, SIX) fds around * to speed-up host lookups in the channel table. Unfortunately, after all * of them get opened, six are always open (ch_table may close one to open * another). The bottom line is that if repl calls post, then we get 12 * (yes, TWELVE) fds open, with only six usable. * * send will close all fds >= 3 prior to invoking post. It would be nice * if one could control ch_seq's use of fds for table lookups, but such is * life. * */ #ifndef MMDFII char *OfficialName (name) register char *name; { register Chan *ch; static char buffer[BUFSIZ]; return ((ch = ch_h2chan (name, buffer)) == (Chan *) (-1) ? NULL : ch == (Chan *) NULL ? LocalName () : buffer); } #else /* MMDFII */ extern char *invo_name; extern short ch_yloc; /* ok to intercept local names */ static int inited = 0; char *OfficialName (name) register char *name; { Dmn_route route; static char buffer[BUFSIZ]; if (!inited) { mmdf_init (invo_name); inited = 1; } switch (dm_v2route (name, buffer, &route)) { case NOTOK: case OK: return ((ch_yloc && lexequ (name, LocalName ())) ? LocalName () : NULL); default: return buffer; } } #endif /* MMDFII */ @ 1.2 log @add id @ text @d3 1 a3 1 static char ident[] = "@@(#)$Id: pidwait.c,v 1.9 1992/12/14 17:10:58 jromine Exp $"; d14 1 a14 1 #endif MMDFII d42 1 a42 1 #else MMDFII d70 1 a70 1 #endif MMDFII @ 1.1 log @Initial revision @ text @d2 3 @