• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/tcsh/

Lines Matching refs:wp

205     struct who *wp, *wpnew;
279 for (wp = whohead.who_next; wp->who_next != NULL; wp = wp->who_next)
280 wp->who_status = OFFLINE | CLEARED;
310 wp = whohead.who_next;
311 while (wp->who_next && (comp = strncmp(wp->who_tty, utmp.ut_line, UTLINLEN)) < 0)
312 wp = wp->who_next;/* find that tty! */
314 if (wp->who_next && comp == 0) { /* found the tty... */
315 if (utmp.ut_time < wp->who_time)
319 wp->who_time = utmp.ut_time;
320 wp->who_status = OFFLINE;
325 wp->who_time = utmp.ut_time;
326 wp->who_status = OFFLINE;
328 else if (strncmp(utmp.ut_name, wp->who_name, UTNAMLEN) == 0) {
330 wp->who_time = utmp.ut_time;
331 wp->who_status = ONLINE | ANNOUNCE; /* same guy */
334 (void) strncpy(wp->who_new, utmp.ut_name, UTNAMLEN);
337 host = ut_find_host(wp->who_tty);
339 (void) strncpy(wp->who_host, host, UTHOSTLEN);
341 wp->who_host[0] = 0;
343 (void) strncpy(wp->who_host, utmp.ut_host, UTHOSTLEN);
346 wp->who_time = utmp.ut_time;
347 if (wp->who_name[0] == '\0')
348 wp->who_status = ONLINE;
350 wp->who_status = CHANGED;
380 debugwholist(wpnew, wp);
383 wpnew->who_next = wp; /* link in a new 'who' */
384 wpnew->who_prev = wp->who_prev;
386 wp->who_prev = wpnew; /* linked in now */
412 for (wp = whohead.who_next; wp->who_next != NULL; wp = wp->who_next) {
413 if (wp->who_status & ANNOUNCE ||
415 !Gmatch(str2short(wp->who_name), vp[0]) &&
416 !Gmatch(str2short(wp->who_new), vp[0])) ||
417 (!Gmatch(str2short(wp->who_tty), vp[1]) &&
423 if (wp->who_status & CLEARED) {/* utmp entry was cleared */
424 wp->who_time = watch_period;
425 wp->who_status &= ~CLEARED;
428 if ((wp->who_status & OFFLINE) &&
429 (wp->who_name[0] != '\0')) {
431 print_who(wp);
432 wp->who_name[0] = '\0';
433 wp->who_status |= ANNOUNCE;
436 if (wp->who_status & ONLINE) {
438 print_who(wp);
439 (void) strcpy(wp->who_name, wp->who_new);
440 wp->who_status |= ANNOUNCE;
443 if (wp->who_status & CHANGED) {
445 print_who(wp);
446 (void) strcpy(wp->who_name, wp->who_new);
447 wp->who_status |= ANNOUNCE;
457 debugwholist(struct who *new, struct who *wp)
484 if (wp)
485 xprintf("wp: %s/%s\n", wp->who_name, wp->who_tty);
491 print_who(struct who *wp)
504 str = tprintf(FMT_WHO, cp, NULL, wp->who_time, wp);
516 struct who *wp = ptr;
526 switch (wp->who_status & STMASK) {
529 return strsave(wp->who_new);
531 return strsave(wp->who_name);
538 switch (wp->who_status & STMASK) {
544 return xasprintf(CGETS(26, 11, "replaced %s on"), wp->who_name);
552 if (wp->who_host[0] == '\0')
555 pb = wp->who_host;
572 if (wp->who_host[0] == '\0')
575 pb = wp->who_host;
587 return strsave(wp->who_tty);
603 struct who *wp;
612 wp = whohead.who_next;
613 while (wp->who_next != NULL) {
614 wp->who_name[0] = '\0';
615 wp = wp->who_next;
630 struct who *wp;
635 for (wp = whohead.who_next; wp->who_next != NULL; wp = wp->who_next) {
636 if (strcmp(tty, wp->who_tty) == 0)
637 host = wp->who_host;
638 wp->who_name[0] = '\0';