Subversion Repositories svn1

Rev

Rev 133 | Rev 158 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 133 Rev 144
Line 62... Line 62...
62
 *
62
 *
63
 *===========================================================================*/
63
 *===========================================================================*/
64
 
64
 
65
int main( int argc, char *argv[] )
65
int main( int argc, char *argv[] )
66
{
66
{
67
    bool        do_splash = TRUE;
-
 
68
    bool        do_version = FALSE;
-
 
69
    bool        do_config = FALSE;
-
 
70
    char       *file_name = NULL;
67
    char       *file_name = NULL;
71
 
68
 
72
    QApplication a(argc, argv);
69
    QApplication a(argc, argv);
73
 
70
 
74
    /*
71
    /*
Line 85... Line 82...
85
        argv++;
82
        argv++;
86
        if( argv[0][0] == '-' )
83
        if( argv[0][0] == '-' )
87
        {
84
        {
88
            switch( argv[0][1] )
85
            switch( argv[0][1] )
89
            {
86
            {
90
              case 'q':
-
 
91
                do_splash = FALSE;
-
 
92
                break;
-
 
93
 
-
 
94
              case 'v':
-
 
95
                do_version = TRUE;
-
 
96
                break;
-
 
97
 
-
 
98
              case 'c' :
-
 
99
                do_config = TRUE;
-
 
100
                break;
-
 
101
 
-
 
102
              case 'x' :
-
 
103
                set_commands( &argv[0][2]);
-
 
104
                break;
-
 
105
 
-
 
106
                /*
87
                /*
107
                **  Unknown switch
88
                **  Unknown switch
108
                */
89
                */
109
              default:
90
              default:
110
                usage();
91
                usage();
Line 169... Line 150...
169
 *      
150
 *      
170
 *===========================================================================*/
151
 *===========================================================================*/
171
 
152
 
172
void usage(void)
153
void usage(void)
173
{
154
{
174
    init_screen();
-
 
175
    printf( "Usage : mara [options] configuration_file\n" );
155
    qDebug( "Usage : mara [options] configuration_file\n" );
176
    printf( " or   : mara -v\n" );
156
    qDebug( " or   : mara -v\n" );
177
    printf( "\n" );
157
    qDebug( "\n" );
178
    printf( "Options are:\n" );
158
    qDebug( "Options are:\n" );
179
    printf( "   -c       - Create configuration file\n" );
159
    qDebug( "   -c       - Create configuration file\n" );
180
    printf( "   -q       - No splash screen\n" );
160
    qDebug( "   -q       - No splash screen\n" );
181
    printf( "   -v       - Display version then exit\n" );
161
    qDebug( "   -v       - Display version then exit\n" );
182
    printf( "   -x<cmds> - Execute commnads\n" );
162
    qDebug( "   -x<cmds> - Execute commnads\n" );
183
    fix_screen();
-
 
184
    exit( 3 );
163
    exit( 3 );
185
}
164
}
186
 
165
 
187
 
166
 
188
/*============================================================================
167
/*============================================================================