From: cuz Date: Sat, 29 Jul 2000 22:39:39 +0000 (+0000) Subject: Better handling of missing flags and wrong files X-Git-Tag: V2.12.0~3286 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8dbc44fed4e7266e3715f97707b3c1c445309da4;p=cc65 Better handling of missing flags and wrong files git-svn-id: svn://svn.cc65.org/cc65/trunk@232 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/od65/main.c b/src/od65/main.c index b95b669e2..25963086d 100644 --- a/src/od65/main.c +++ b/src/od65/main.c @@ -128,16 +128,25 @@ static void DumpFile (const char* Name) /* Do we know this type of file? */ if (Magic != OBJ_MAGIC) { - fclose (F); - Warning ("File `%s' is not an xo65 object file", Name); - } - /* Print the filename */ - printf ("%s:\n", Name); + /* Unknown format */ + printf ("%s: (no xo65 object file)\n", Name); + + } else if (What == 0) { + + /* Special handling if no info was requested */ + printf ("%s: (no information requested)\n", Name); + + } else { + + /* Print the filename */ + printf ("%s:\n", Name); + + /* Check what to dump */ + if (What & D_HEADER) { + DumpHeader (F, 0); + } - /* Check what to dump */ - if (What & D_HEADER) { - DumpHeader (F, 0); } /* Close the file */