diff --git a/datadec.c b/datadec.c
index 2b00550e14883f34c8756df55d0c07564d6cbdd0..2d9a29763bf06f9e71cb0a9e40fc5db5496bd774 100644
--- a/datadec.c
+++ b/datadec.c
@@ -10,11 +10,10 @@
  *
  *      This program builds C data declarations, construction functions
  *	and print functions from a series of HOPE/Miranda style recursive
- *	data declarations. (with hints on printing)
+ *	data declarations. (with optional hints on printing)
  *
- *      The output produced is placed in pair of files
- *      ( x.c and x.h ) which together form a module provided the
- *      relevent data types.
+ *      The output produced is placed in pair of files (eg. x.c and x.h )
+ *	which together form a module provided the relevent data types.
  */
 
 #include <dcw.h>
@@ -23,19 +22,39 @@
 #include "parser.h"
 
 
+#define MUSTBE(b)	ASSERT(b,("Usage: datadec [-v] outfile [infile]\n"))
+
+#define NEED_ANOTHER_ARG	MUSTBE( IS_ANOTHER_ARG )
+#define REQUIRE_NO_MORE_ARGS	MUSTBE( argc == arg )
+#define IS_ANOTHER_ARG		(argc > arg)
+
+
 main( argc, argv ) int argc; char **argv;
 {
-        FILE		*infile, *cfile, *hfile;
-        char		inname[256], tempname[256];
+        FILE		*cfile, *hfile;
+        char		tempname[256];
         declnlist	declns;
 	int		len;
 	char		*basename;
+	BOOL		verbose;
+	int		arg;
 
-        ASSERT( argc==2 || argc==3, ("Usage: datadec outfile [infile]\n") );
+	arg = 1;
+	NEED_ANOTHER_ARG;
+
+	verbose = FALSE;
+	if( strcmp( argv[arg], "-v" )==0 )
+	{
+		arg++;
+		verbose = TRUE;
+	}
 
-	basename = argv[1];
+	NEED_ANOTHER_ARG;
+
+	basename = argv[arg++];
 	len = strlen( basename );
-	if( !strcmp( basename+len-2, ".c" ) ) {
+	if( !strcmp( basename+len-2, ".c" ) )
+	{
 		basename[len-2] = '\0';
 	}
 
@@ -47,16 +66,29 @@ main( argc, argv ) int argc; char **argv;
         hfile = fopen( tempname, "w" );
         ASSERT( hfile != NULL, ("datadec: can't create '%s'\n",tempname) );
 
-        if( argc == 3 ) {
-                lexfile = fopen( argv[2], "r" );
+        if( IS_ANOTHER_ARG ) {
+                lexfile = fopen( argv[arg], "r" );
                 ASSERT( lexfile != NULL,
-			("datadec: can't open '%s'\n",argv[2]) );
+			("datadec: can't open '%s'\n",argv[arg]) );
+		arg++;
         } else {
                 lexfile = stdin;
         }
-        ASSERT( parse_declns( &declns ),
-		("datadec: can't parse input properly\n") );
-        make_declns( declns, cfile, hfile, basename );
+
+	REQUIRE_NO_MORE_ARGS;
+
+        if( parse_declns( &declns ) )
+	{
+		if( verbose )
+		{
+			printf( "parsed declns: they are:\n\n" );
+			print_declnlist( declns );
+		}
+		make_declns( declns, cfile, hfile, basename );
+	} else
+	{
+		fprintf( stderr, "datadec: can't parse input properly\n" );
+	}
 	fclose( cfile );
 	fclose( hfile );
 	exit(0);