Switch to unified view

a/src/qtgui/main.cpp b/src/qtgui/main.cpp
...
...
197
#define OPT_o     0x80
197
#define OPT_o     0x80
198
#define OPT_l     0x100
198
#define OPT_l     0x100
199
#define OPT_f     0x200
199
#define OPT_f     0x200
200
#define OPT_a     0x400
200
#define OPT_a     0x400
201
#define OPT_t     0x800
201
#define OPT_t     0x800
202
#define OPT_v     0x1000
202
203
203
static const char usage [] =
204
static const char usage [] =
204
"\n"
205
"\n"
205
"recoll [-h] [-c <configdir>] [-q query]\n"
206
"recoll [-h] [-c <configdir>] [-q query]\n"
206
"  -h : Print help and exit\n"
207
"  -h : Print help and exit\n"
...
...
216
"     -l : the query will be interpreted as a query language string (default)\n"
217
"     -l : the query will be interpreted as a query language string (default)\n"
217
"  -t : terminal display: no gui. Results go to stdout. MUST be given\n"
218
"  -t : terminal display: no gui. Results go to stdout. MUST be given\n"
218
"       explicitly as -t (not ie, -at), and -q <query> MUST\n"
219
"       explicitly as -t (not ie, -at), and -q <query> MUST\n"
219
"       be last on the command line if this is used.\n"
220
"       be last on the command line if this is used.\n"
220
"       Use -t -h to see the additional non-gui options\n"
221
"       Use -t -h to see the additional non-gui options\n"
222
"recoll -v : print version\n"
221
"recoll <url>\n"
223
"recoll <url>\n"
222
"   This is used to open a recoll url (including an ipath), and called\n"
224
"   This is used to open a recoll url (including an ipath), and called\n"
223
"   typically from another search interface like the Unity Dash\n"
225
"   typically from another search interface like the Unity Dash\n"
224
;
226
;
225
static void
227
static void
226
Usage(void)
228
Usage(void)
227
{
229
{
228
    FILE *fp = (op_flags & OPT_h) ? stdout : stderr;
230
    FILE *fp = (op_flags & OPT_h) ? stdout : stderr;
231
    fprintf(fp, "%s\n", Rcl::version_string().c_str());
229
    fprintf(fp, "%s: Usage: %s", thisprog, usage);
232
    fprintf(fp, "%s: Usage: %s", thisprog, usage);
230
    exit((op_flags & OPT_h)==0);
233
    exit((op_flags & OPT_h)==0);
231
}
234
}
232
235
233
int main(int argc, char **argv)
236
int main(int argc, char **argv)
...
...
267
        case 'l': op_flags |= OPT_l; break;
270
        case 'l': op_flags |= OPT_l; break;
268
        case 'o': op_flags |= OPT_o; break;
271
        case 'o': op_flags |= OPT_o; break;
269
        case 'q':   op_flags |= OPT_q; if (argc < 2)  Usage();
272
        case 'q':   op_flags |= OPT_q; if (argc < 2)  Usage();
270
        question = *(++argv);
273
        question = *(++argv);
271
        argc--; goto b1;
274
        argc--; goto b1;
275
            case 'v': op_flags |= OPT_v;
276
                fprintf(stdout, "%s\n", Rcl::version_string().c_str());
277
                return 0;
272
        case 't': op_flags |= OPT_t; break;
278
        case 't': op_flags |= OPT_t; break;
273
        default: Usage();
279
        default: Usage();
274
        }
280
        }
275
    b1: argc--; argv++;
281
    b1: argc--; argv++;
276
    }
282
    }