Lines Matching +full:rate +full:- +full:np +full:- +full:ms
1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
59 struct gettynums *np; in gettable() local
78 for (sp = gettystrs; sp->field; sp++) in gettable()
79 if (sp->value != NULL) { in gettable()
84 l = strlen(sp->value) + 1; in gettable()
86 strlcpy(p, sp->value, l); in gettable()
91 sp->value = p; in gettable()
102 case -1: in gettable()
105 case -2: in gettable()
108 case -3: in gettable()
116 for (sp = gettystrs; sp->field; sp++) { in gettable()
117 if ((l = cgetstr(buf, sp->field, &p)) >= 0) { in gettable()
118 if (sp->value) { in gettable()
120 if (strcmp(p, sp->value) != 0) in gettable()
121 free(sp->value); in gettable()
124 p = sp->value; in gettable()
127 sp->value = p; in gettable()
128 } else if (l == -1) { in gettable()
129 free(sp->value); in gettable()
130 sp->value = NULL; in gettable()
134 for (np = gettynums; np->field; np++) { in gettable()
135 if (cgetnum(buf, np->field, &n) == -1) in gettable()
136 np->set = 0; in gettable()
138 np->set = 1; in gettable()
139 np->value = n; in gettable()
143 for (fp = gettyflags; fp->field; fp++) { in gettable()
144 if (cgetcap(buf, fp->field, ':') == NULL) in gettable()
145 fp->set = 0; in gettable()
147 fp->set = 1; in gettable()
148 fp->value = 1 ^ fp->invrt; in gettable()
158 struct gettynums *np; in gendefaults() local
161 for (sp = gettystrs; sp->field; sp++) in gendefaults()
162 if (sp->value) in gendefaults()
163 sp->defalt = strdup(sp->value); in gendefaults()
164 for (np = gettynums; np->field; np++) in gendefaults()
165 if (np->set) in gendefaults()
166 np->defalt = np->value; in gendefaults()
167 for (fp = gettyflags; fp->field; fp++) in gendefaults()
168 if (fp->set) in gendefaults()
169 fp->defalt = fp->value; in gendefaults()
171 fp->defalt = fp->invrt; in gendefaults()
178 struct gettynums *np; in setdefaults() local
181 for (sp = gettystrs; sp->field; sp++) in setdefaults()
182 if (!sp->value) in setdefaults()
183 sp->value = !sp->defalt ? in setdefaults()
184 sp->defalt : strdup(sp->defalt); in setdefaults()
185 for (np = gettynums; np->field; np++) in setdefaults()
186 if (!np->set) in setdefaults()
187 np->value = np->defalt; in setdefaults()
188 for (fp = gettyflags; fp->field; fp++) in setdefaults()
189 if (!fp->set) in setdefaults()
190 fp->value = fp->defalt; in setdefaults()
271 if (NP) { in set_flags()
393 unsigned delay; /* delay in ms */
451 adelay(int ms, struct delayval *dp) in adelay() argument
453 if (ms == 0) in adelay()
455 while (dp->delay && ms > dp->delay) in adelay()
457 return (dp->bits); in adelay()
492 totalsize = match[subex].rm_eo - match[subex].rm_so + 1; in edithost()
544 for (sp = speedtab; sp->speed; sp++) in speed()
545 if (sp->speed == val) in speed()
546 return (sp->uxname); in speed()
579 * baud rate. This string indicates the user's actual speed.
608 for (len = 0; len < sizeof (baud) - 1; len++) { in portselector()
619 for (ps = portspeeds; ps->ps_baud; ps++) in portselector()
620 if (strcmp(ps->ps_baud, baud) == 0) { in portselector()
621 type = ps->ps_type; in portselector()
629 * This auto-baud speed select mechanism is written for the Micom 600
639 const char *type = "9600-baud"; in autobaud()
654 case 0200: /* 300-baud */ in autobaud()
655 type = "300-baud"; in autobaud()
658 case 0346: /* 1200-baud */ in autobaud()
659 type = "1200-baud"; in autobaud()
662 case 015: /* 2400-baud */ in autobaud()
664 type = "2400-baud"; in autobaud()
667 default: /* 4800-baud */ in autobaud()
668 type = "4800-baud"; in autobaud()
671 case 0377: /* 9600-baud */ in autobaud()
672 type = "9600-baud"; in autobaud()