Remove disabled code and change signature

Makes getmyline() identical to the other simulators.
pull/1831/head
Daniele Forsi IU5HKX 2025-08-04 11:19:15 +02:00
rodzic f8881f9bb9
commit 10f6504897
1 zmienionych plików z 1 dodań i 6 usunięć

Wyświetl plik

@ -50,24 +50,19 @@ static void load_dat(const char *filename, unsigned char buf[1492])
static unsigned char alldata[1492];
int
getmyline(int fd, char *buf)
getmyline(int fd, unsigned char *buf)
{
unsigned char c;
int i = 0;
int n = 0;
memset(buf, 0, BUFSIZE);
#if 1
while (i < 5 && read(fd, &c, 1) > 0)
{
buf[i++] = c;
n++;
}
#else
n = read(fd, buf, 5);
#endif
printf("n=%d %02x %02x %02x %02x %02x\n", n, buf[0], buf[1], buf[2], buf[3],
buf[4]);
return n;