aboutsummaryrefslogtreecommitdiff
path: root/src/tools/myriad.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/myriad.cpp')
-rw-r--r--src/tools/myriad.cpp26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/tools/myriad.cpp b/src/tools/myriad.cpp
index 73ceba1..c6a3a4d 100644
--- a/src/tools/myriad.cpp
+++ b/src/tools/myriad.cpp
@@ -56,11 +56,11 @@ public:
56 addOption( iStream, 's', "stream", "Substream to work with."); 56 addOption( iStream, 's', "stream", "Substream to work with.");
57 addOption( sSrc, "src", "Source file for copying into a Myriad file."); 57 addOption( sSrc, "src", "Source file for copying into a Myriad file.");
58 58
59 setOverride( "create", "create" ); 59 setOverride( "create", modeCreate );
60 setOverride( "info", "info" ); 60 setOverride( "info", modeInfo );
61 setOverride( "new", "new" ); 61 setOverride( "new", modeStreamNew );
62 setOverride( "dump", "dump" ); 62 setOverride( "dump", modeStreamDump );
63 setOverride( "put", "put" ); 63 setOverride( "put", modeStreamPut );
64 64
65 parse( argc, argv ); 65 parse( argc, argv );
66 } 66 }
@@ -73,21 +73,9 @@ public:
73 Bu::FString sSrc; 73 Bu::FString sSrc;
74}; 74};
75 75
76Bu::Formatter &operator>>( Bu::Formatter &f, Mode &m ) 76Bu::Formatter &operator>>( Bu::Formatter &f, Mode &e )
77{ 77{
78 Bu::FString sTok = f.readToken(); 78 sio << "Uh oh, the formatter was called..." << sio.nl;
79 if( sTok == "create" )
80 m = modeCreate;
81 else if( sTok == "info" )
82 m = modeInfo;
83 else if( sTok == "new" )
84 m = modeStreamNew;
85 else if( sTok == "dump" )
86 m = modeStreamDump;
87 else if( sTok == "put" )
88 m = modeStreamPut;
89 else
90 m = modeNone;
91 return f; 79 return f;
92} 80}
93 81