Lines Matching defs:buf
67 static char *look4domain(char *file, char *buf, int size)
75 while (fgets(buf, size, fp))
76 if (strncmp(buf, "domain", 6) == 0)
77 if (isspace(buf[6])) {
78 char *x = skipspace(buf + 6);
81 strmove(buf, x);
82 ret = buf;
92 static char *readdomain(char *buf, int size)
97 (void) strncpy(buf, ret, size);
98 return (buf);
101 if (((ret = look4domain("/etc/resolv.conf", buf, size)) != 0) ||
102 ((ret = look4domain("/etc/inet/named.boot", buf, size)) != 0) ||
103 ((ret = look4domain("/etc/named.boot", buf, size)) != 0))
107 if (sysinfo(SI_SRPC_DOMAIN, buf, size) >= 0)
108 return (buf);