MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / format_match

Function format_match

libsigrok4DSL/input/in_vcd.c:301–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301static int format_match(const char *filename)
302{
303 FILE *file;
304 gchar *name = NULL, *contents = NULL;
305 gboolean status;
306
307 file = fopen(filename, "r");
308 if (file == NULL)
309 return FALSE;
310
311 /* If we can parse the first section correctly,
312 * then it is assumed to be a VCD file.
313 */
314 status = parse_section(file, &name, &contents);
315 status = status && (*name != '\0');
316
317 g_free(name);
318 g_free(contents);
319 fclose(file);
320
321 return status;
322}
323
324static int init(struct sr_input *in, const char *filename)
325{

Callers

nothing calls this directly

Calls 1

parse_sectionFunction · 0.85

Tested by

no test coverage detected