From 205dc2bbbc12b40bc361c162c472591d5df18137 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 9 Sep 2019 11:19:49 -0500 Subject: update fit and zdab-cat to skip ZDAB records --- src/fit.c | 12 ++++++++++++ src/zdab-cat.c | 12 ++++++++++++ 2 files changed, 24 insertions(+) (limited to 'src') diff --git a/src/fit.c b/src/fit.c index cb8fd6b..46a14df 100644 --- a/src/fit.c +++ b/src/fit.c @@ -6138,6 +6138,18 @@ int main(int argc, char **argv) goto err; } + if (!strncmp(bmast.name,"MAST",4)) { + ; + } else if (!strncmp(bmast.name,"ZDAB",4)) { + /* Not sure why, but occasionally some of the zdabs output by + * SNOMAN have logical records which start with a ZDAB record + * instead of a MAST record. */ + continue; + } else { + fprintf(stderr, "logical record starts with unknown bank '%s'\n", bmast.name); + goto err; + } + if (bmast.links[KMAST_EV-1] == 0) { /* First logical record in SNOCR files don't have an EV bank. */ continue; diff --git a/src/zdab-cat.c b/src/zdab-cat.c index c9e50f2..dfb295a 100644 --- a/src/zdab-cat.c +++ b/src/zdab-cat.c @@ -162,6 +162,18 @@ int main(int argc, char **argv) goto err; } + if (!strncmp(bmast.name,"MAST",4)) { + ; + } else if (!strncmp(bmast.name,"ZDAB",4)) { + /* Not sure why, but occasionally some of the zdabs output by + * SNOMAN have logical records which start with a ZDAB record + * instead of a MAST record. */ + continue; + } else { + fprintf(stderr, "logical record starts with unknown bank '%s'\n", bmast.name); + goto err; + } + if (bmast.links[KMAST_EV-1] == 0) { /* First logical record in SNOCR files doesn't have an EV bank. */ continue; -- cgit