|
a/src/qtgui/main.cpp |
|
b/src/qtgui/main.cpp |
|
... |
|
... |
193 |
" avoid shell interpretation\n"
|
193 |
" avoid shell interpretation\n"
|
194 |
" -a : the query will be interpreted as an AND query.\n"
|
194 |
" -a : the query will be interpreted as an AND query.\n"
|
195 |
" -o : the query will be interpreted as an OR query.\n"
|
195 |
" -o : the query will be interpreted as an OR query.\n"
|
196 |
" -f : the query will be interpreted as a filename search\n"
|
196 |
" -f : the query will be interpreted as a filename search\n"
|
197 |
" -l : the query will be interpreted as a query language string (default)\n"
|
197 |
" -l : the query will be interpreted as a query language string (default)\n"
|
198 |
" -t : terminal display: no gui. Results go to stdout. MUST be given\n"
|
198 |
" -t : terminal display: no gui. Results go to stdout. MUST be given\n"
|
199 |
" explicitly as -t (not ie, -at), and -q <query> MUST\n"
|
199 |
" explicitly as -t (not ie, -at), and -q <query> MUST\n"
|
200 |
" be last on the command line if this is used.\n"
|
200 |
" be last on the command line if this is used.\n"
|
|
|
201 |
" Use -t -h to see the additional non-gui options\n"
|
201 |
;
|
202 |
;
|
202 |
static void
|
203 |
static void
|
203 |
Usage(void)
|
204 |
Usage(void)
|
204 |
{
|
205 |
{
|
205 |
FILE *fp = (op_flags & OPT_h) ? stdout : stderr;
|
206 |
FILE *fp = (op_flags & OPT_h) ? stdout : stderr;
|
|
... |
|
... |
207 |
exit((op_flags & OPT_h)==0);
|
208 |
exit((op_flags & OPT_h)==0);
|
208 |
}
|
209 |
}
|
209 |
|
210 |
|
210 |
int main(int argc, char **argv)
|
211 |
int main(int argc, char **argv)
|
211 |
{
|
212 |
{
|
|
|
213 |
// If "-t" is present at all, we don't do the GUI thing and pass the
|
|
|
214 |
// whole to recollq for command line / pipe usage.
|
212 |
for (int i = 0; i < argc; i++) {
|
215 |
for (int i = 0; i < argc; i++) {
|
213 |
if (!strcmp(argv[i], "-t")) {
|
216 |
if (!strcmp(argv[i], "-t")) {
|
214 |
exit(recollq(&theconfig, argc, argv));
|
217 |
exit(recollq(&theconfig, argc, argv));
|
215 |
}
|
218 |
}
|
216 |
}
|
219 |
}
|