- * If there is no local printer, then print the queue on
- * the remote machine and then what's in the queue here.
- * Note that a file in transit may not show up in either queue.
- */
- if (*LP == '\0') {
- register char *cp;
- char c;
-
- sendtorem++;
- (void) sprintf(line, "%c%s", format + '\3', RP);
- cp = line;
- for (i = 0; i < requests; i++) {
- cp += strlen(cp);
- (void) sprintf(cp, " %d", requ[i]);
- }
- for (i = 0; i < users; i++) {
- cp += strlen(cp);
- *cp++ = ' ';
- strcpy(cp, user[i]);
- }
- strcat(line, "\n");
- fd = getport(RM);
- if (fd < 0) {
- if (from != host)
- printf("%s: ", host);
- printf("connection to %s is down\n", RM);
- } else {
- i = strlen(line);
- if (write(fd, line, i) != i)
- fatal("Lost connection");
- while ((i = read(fd, line, sizeof(line))) > 0)
- (void) fwrite(line, 1, i, stdout);
- (void) close(fd);
- }
- }
- /*