char outf[64], outft[64];
struct stat sb;
time_t ftime;
-## char name[17], rp[17], sd[33], rm[33], *filetime;
-## int flag;
+## char name[17], rp[17], sd[33], rm[33], rq[33], *filetime;
+## int flag, ka, pc;
sprintf(outf, "%s/printcap.db", hesiod_dir);
fprintf(stderr, "Building printcap.db\n");
## range of p is printcap
-## retrieve (name = p.#name, rp = p.#rp, sd = p.dir, rm = machine.#name)
-## where machine.mach_id = p.mach_id {
+## range of m is machine
+## retrieve (name = p.#name, rp = p.#rp, sd = p.dir, rm = machine.#name,
+## ka = p.auth, pc = p.price, rq = m.#name)
+## where machine.mach_id = p.mach_id and m.mach_id = p.quotaserver {
strtrim(name);
strtrim(rp);
strtrim(sd);
strtrim(rm);
- fprintf(out, "%s.pcap\tHS %s \"%s:rp=%s:rm=%s:sd=%s\"\n",
- name, HTYPE, name, rp, rm, sd);
+ strtrim(rq);
+ fprintf(out, "%s.pcap\tHS %s \"%s:rp=%s:rm=%s:sd=%s:ka#%d:pc#%d",
+ name, HTYPE, name, rp, rm, sd, ka, pc);
+ if (strcmp(rq, "[NONE]"))
+ fprintf(out, ":rq=%s\"\n", rq);
+ else
+ fputs("\"\n", out);
## }
if (fclose(out)) {