Commit 04ea85dd authored by dcw's avatar dcw
Browse files

changed the comment to include M2;

removed print/write option - always written;
opt = TRUE by default; added -n "no optimize" option..
parent 98e3dade
...@@ -8,9 +8,10 @@ ...@@ -8,9 +8,10 @@
* *
******* Description: ******* Description:
* *
* This program builds C data declarations, construction functions * This program builds C or Modula-2 data declarations,
* and print functions from a series of HOPE/Miranda style recursive * constructor and deconstructor functions and write functions
* data declarations. (with optional hints on printing) * from a series of HOPE/Miranda style recursive data declarations.
* (with optional hints on printing)
* *
* The output produced is placed in pair of files (eg. x.c and x.h ) * 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. * which together form a module provided the relevent data types.
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
#include "optimize.h" #include "optimize.h"
#define MUSTBE(b) ASSERT(b,("Usage: datadec [-vpo] outfile [infile]\n")) #define MUSTBE(b) ASSERT(b,("Usage: datadec [-vno] outfile [infile]\n"))
#define NEED_ANOTHER_ARG MUSTBE( IS_ANOTHER_ARG ) #define NEED_ANOTHER_ARG MUSTBE( IS_ANOTHER_ARG )
#define REQUIRE_NO_MORE_ARGS MUSTBE( argc == arg ) #define REQUIRE_NO_MORE_ARGS MUSTBE( argc == arg )
...@@ -46,7 +47,7 @@ void main( argc, argv ) int argc; char **argv; ...@@ -46,7 +47,7 @@ void main( argc, argv ) int argc; char **argv;
arg = 1; arg = 1;
NEED_ANOTHER_ARG; NEED_ANOTHER_ARG;
verbose = FALSE; print = FALSE; opt = FALSE; verbose = FALSE; opt = TRUE;
while( *(s=argv[arg]) == '-' ) while( *(s=argv[arg]) == '-' )
{ {
for( s++; *s; s++ ) for( s++; *s; s++ )
...@@ -56,8 +57,8 @@ void main( argc, argv ) int argc; char **argv; ...@@ -56,8 +57,8 @@ void main( argc, argv ) int argc; char **argv;
case 'v': case 'v':
verbose = TRUE; verbose = TRUE;
break; break;
case 'p': case 'n':
print = TRUE; opt = FALSE;
break; break;
case 'o': case 'o':
opt = TRUE; opt = TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment