summaryrefslogtreecommitdiff
path: root/kicad/ext.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-23 14:46:04 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-23 14:46:04 -0300
commitf5fa04cbf3ac9011f4f144cd68543f8d9536e3fd (patch)
treeac9160ef7ef5963e296144fb75845db56ba62e7c /kicad/ext.c
parent061dd9094a903be73e3aa7a65aafb8bcb70010b7 (diff)
downloadeeshow-f5fa04cbf3ac9011f4f144cd68543f8d9536e3fd.tar.gz
eeshow-f5fa04cbf3ac9011f4f144cd68543f8d9536e3fd.tar.bz2
eeshow-f5fa04cbf3ac9011f4f144cd68543f8d9536e3fd.zip
misc/diag.h (BUG): more useful diagnostics; replace all "abort" with it
Diffstat (limited to 'kicad/ext.c')
-rw-r--r--kicad/ext.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kicad/ext.c b/kicad/ext.c
index d4221ee..fe85c44 100644
--- a/kicad/ext.c
+++ b/kicad/ext.c
@@ -46,13 +46,15 @@ void classify_files(struct file_names *fn, char *const *args,
unsigned n_args)
{
unsigned i;
+ enum ext ext;
fn->pro = fn->sch = fn->pl = NULL;
fn->libs = NULL;
fn->n_libs = 0;
for (i = 0; i != n_args; i++) {
- switch (identify(args[i])) {
+ ext = identify(args[i]);
+ switch (ext) {
case ext_unknown:
fatal("%s: unknown file type", args[i]);
case ext_project:
@@ -80,7 +82,7 @@ void classify_files(struct file_names *fn, char *const *args,
fn->pl = args[i];
break;
default:
- abort();
+ BUG("invalid extension code %d", ext);
}
}
}