MCPcopy Create free account
hub / github.com/WiringPi/WiringPi / remoteReadline

Function remoteReadline

wiringPi/drcNet.c:51–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 */
50
51static int remoteReadline (int fd, char *buf, int max)
52{
53 int len = 0 ;
54 char c ;
55
56 for (;;)
57 {
58 if (read (fd, &c, 1) < 1)
59 return -1 ;
60
61 if (c == '\n')
62 return len ;
63
64 *buf++ = c ;
65 if (++len == max)
66 return len ;
67 }
68}
69
70
71/*

Callers 1

getChallengeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected