X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=input%2Fvcd.c;h=6f947977a08b6d1c941c1b481427620d47d8276f;hb=91aea754aaed0f0f2a6fc4b2b875f0d0b7c01f8e;hp=1cfb75bbc5636d792781470b0a8e837a31893297;hpb=cd1b0e8f7921afc84d582eb4d95ce673912943dd;p=libsigrok.git diff --git a/input/vcd.c b/input/vcd.c index 1cfb75bb..6f947977 100644 --- a/input/vcd.c +++ b/input/vcd.c @@ -93,14 +93,15 @@ struct probe { */ static gboolean read_until(FILE *file, GString *dest, char mode) { + int c; char prev[4] = ""; - long startpos = ftell(file); + for(;;) { - int c = fgetc(file); + c = fgetc(file); if (c == EOF) { if (mode == '$') - sr_err("Unexpected EOF, read started at %ld.", startpos); + sr_err("Unexpected EOF."); return FALSE; } @@ -286,7 +287,7 @@ static int format_match(const char *filename) static int init(struct sr_input *in, const char *filename) { - struct sr_probe *probe; + struct sr_channel *probe; int num_probes, i; char name[SR_MAX_PROBENAME_LEN + 1]; char *param; @@ -468,8 +469,6 @@ static void parse_contents(FILE *file, const struct sr_dev_inst *sdi, struct con probe = l->data; if (g_strcmp0(token->str, probe->identifier) == 0) { - sr_dbg("Probe %d new value %d.", i, bit); - /* Found our probe */ if (bit) prev_values |= (uint64_t)1 << i;