Lines Matching defs:tp
103 struct tty_entry *tp;
108 if ((tp = malloc(sizeof(*tp))) == NULL)
110 tp->len = 0; /* full match */
111 tp->ret = 1; /* do if match */
113 tp->ret = 0;
116 strlcpy(tp->line, line, sizeof(tp->line));
118 if ((rcp = strchr(tp->line, '*')) != NULL) {
121 tp->len = strlen(tp->line);
123 SLIST_INSERT_HEAD(&Ttys, tp, next);
132 struct tty_entry *tp;
135 SLIST_FOREACH(tp, &Ttys, next) {
136 if (tp->ret == 0) /* specific don't */
138 if (tp->len != 0) {
139 if (strncmp(line, tp->line, tp->len) == 0)
140 return tp->ret;
142 if (strncmp(line, tp->line, sizeof(tp->line)) == 0)
143 return tp->ret;