Lines Matching full:up
141 as2201_start, /* start up driver */
160 register struct as2201unit *up; in as2201_start() local
176 up = emalloc_zero(sizeof(*up)); in as2201_start()
185 free(up); in as2201_start()
188 pp->unitptr = up; in as2201_start()
196 up->lastptr = up->stats; in as2201_start()
197 up->index = 0; in as2201_start()
211 register struct as2201unit *up; in as2201_shutdown() local
215 up = pp->unitptr; in as2201_shutdown()
218 if (NULL != up) in as2201_shutdown()
219 free(up); in as2201_shutdown()
231 register struct as2201unit *up; in as2201_receive() local
242 up = pp->unitptr; in as2201_receive()
247 up->linect, pp->lencode, pp->a_lastcode); in as2201_receive()
265 if (up->linect > 0) { in as2201_receive()
266 up->linect--; in as2201_receive()
267 if ((int)(up->lastptr - up->stats + pp->lencode) > SMAX - 2) in as2201_receive()
269 *up->lastptr++ = ' '; in as2201_receive()
270 memcpy(up->lastptr, pp->a_lastcode, 1 + pp->lencode); in as2201_receive()
271 up->lastptr += pp->lencode; in as2201_receive()
275 up->linect = atoi(pp->a_lastcode); in as2201_receive()
278 record_clock_stats(&peer->srcadr, up->stats); in as2201_receive()
281 printf("gps: stat %s\n", up->stats); in as2201_receive()
285 up->lastptr = up->stats; in as2201_receive()
286 *up->lastptr = '\0'; in as2201_receive()
331 if ((int)(up->lastptr - up->stats + pp->lencode) > SMAX - 2) in as2201_receive()
333 memcpy(up->lastptr, pp->a_lastcode, pp->lencode); in as2201_receive()
334 up->lastptr += pp->lencode; in as2201_receive()
336 octets = strlen(stat_command[up->index]); in as2201_receive()
337 if ((int)(up->lastptr - up->stats + 1 + octets) > SMAX - 2) in as2201_receive()
339 *up->lastptr++ = ' '; in as2201_receive()
340 memcpy(up->lastptr, stat_command[up->index], octets); in as2201_receive()
341 up->lastptr += octets - 1; in as2201_receive()
342 *up->lastptr = '\0'; in as2201_receive()
343 refclock_write(peer, stat_command[up->index], in as2201_receive()
344 strlen(stat_command[up->index]), in as2201_receive()
346 up->index++; in as2201_receive()
347 if (*stat_command[up->index] == '\0') in as2201_receive()
348 up->index = 0; in as2201_receive()