| 18 | int vfo, vfo_tx, ptt, ptt_data, ptt_mic, ptt_tune; |
| 19 | |
| 20 | int |
| 21 | _getmyline(int fd, char *buf) |
| 22 | { |
| 23 | char c; |
| 24 | int i = 0; |
| 25 | memset(buf, 0, BUFSIZE); |
| 26 | |
| 27 | while (read(fd, &c, 1) > 0) |
| 28 | { |
| 29 | buf[i++] = c; |
| 30 | |
| 31 | if (c == 0x0d) { return strlen(buf); } |
| 32 | } |
| 33 | |
| 34 | if (strlen(buf) == 0) { hl_usleep(10 * 1000); } |
| 35 | |
| 36 | return strlen(buf); |
| 37 | } |
| 38 | |
| 39 | #include "sim.h" |
| 40 |