Ignore:
Timestamp:
2001-01-22T15:07:35+13:00 (23 years ago)
Author:
kjm18
Message:

added help message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/mgpp/text/Queryer.cpp

    r1849 r1850  
    3030#include "GSDLQueryParser.h"
    3131
     32void printHelp() {
     33
     34  cout << "commands available are:\n"
     35       << "\t.q\t\tquit\n"
     36       << "\t.h\t\tprint the help message\n"
     37       << "\t.i\t\tchange the search level (enter the new level at the prompt)\n"
     38       << "\t.l\t\tchange the result level ( \"\"   \"\"  )\n"
     39       << "\t.b\t\tfull text browse (enter a word or fragment at the prompt)\n"
     40       << "\t.r0/.r1\t\tranking off/on\n"
     41       << "\t.t0/.t1\t\tquery type some/all\n"
     42       << "\t.c0/.c1\t\tcasefolding off/on\n"
     43       << "\t.s0/.s1\t\tstemming off/on\n"
     44       << "\t.o0/.o1\t\tshort output off/on\n\n";
     45
     46}
    3247
    3348int main (int argc, char **argv) {
     
    115130    if (queryArray.size() >= 2 && queryArray[0] == '.') {
    116131      if (queryArray[1] == 'q') break;  // quit
    117      
     132
     133      if (queryArray[1] == 'h') { // help
     134    printHelp();
     135      }
    118136      if (queryArray[1] == 'i') {
    119137    cout << "current index="<< queryInfo.docLevel << "\nchange to index:";
     
    197215    cout << "\n";
    198216
    199       }
     217      }
     218      else { // bad option
     219    cout << "bad command\n\n";
     220    printHelp();
     221      }
    200222    } // if a .x query
    201223    else {
Note: See TracChangeset for help on using the changeset viewer.