Lines Matching defs:sp
529 insert_pmtab(sp)
530 register struct pmtab *sp; /* ptr to entry to be inserted */
545 ret = strcmp(sp->p_tag, tsp->p_tag);
559 if (same_entry(tsp,sp)) { /* same entry */
563 if ((sp->p_flags & X_FLAG) &&
564 ((sp->p_dmsg == NULL) ||
565 (*(sp->p_dmsg) == '\0'))) {
571 debug("replacing <%s>", sp->p_tag);
574 sp->p_next = tsp->p_next;
576 PMtab = sp;
579 savtsp->p_next = sp;
581 sp->p_status = CHANGED;
582 sp->p_fd = tsp->p_fd;
583 sp->p_pid = tsp->p_pid;
584 sp->p_inservice =
586 sp = tsp;
591 free_pmtab(sp);
595 if ((sp->p_flags & X_FLAG) &&
596 ((sp->p_dmsg == NULL) ||
597 (*(sp->p_dmsg) == '\0'))) { /* disabled entry */
598 free_pmtab(sp);
607 if (*sp->p_softcar != '\0')
608 set_softcar(sp);
612 sp->p_next = PMtab;
613 PMtab = sp;
616 sp->p_next = savtsp->p_next;
617 savtsp->p_next = sp;
620 debug("adding <%s>", sp->p_tag);
624 sp->p_status = VALID;
633 if ((sp->p_flags & X_FLAG) &&
634 ((sp->p_dmsg == NULL) ||
635 (*(sp->p_dmsg) == '\0'))) { /* disabled entry */
636 free_pmtab(sp); /* do not poll this entry */
645 if (*sp->p_softcar != '\0')
646 set_softcar(sp);
647 sp->p_next = NULL;
649 PMtab = sp;
651 savtsp->p_next = sp;
653 debug("adding <%s>", sp->p_tag);
657 sp->p_status = VALID;
669 register struct pmtab *sp; /* working pointer */
675 sp = savesp = PMtab;
676 while (sp) {
677 if (sp->p_status) {
681 savesp = sp;
682 sp = sp->p_next;
685 tsp = sp;
687 PMtab = sp->p_next;
691 savesp->p_next = sp->p_next;
693 debug("purging <%s>", sp->p_tag);
695 sp = sp->p_next;