home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume6 / lookup.c++ / testhelp.c < prev   
Encoding:
C/C++ Source or Header  |  1989-03-04  |  341 b   |  20 lines

  1. #include <stream.h>
  2. #include "lookup.h"
  3.  
  4. extern entry list[];
  5.  
  6. int help(const char *s)
  7.   {
  8.   entry *t = list;
  9.  
  10.   (void) s; // "use" s so that CC won't complain
  11.   cout << "Available commands:\n\n";
  12.   cout << "quit\t";
  13.  
  14.   for(int max=1+int((t++)->name); t-list < max; t++)
  15.     cout << form("%s\t", t->name);
  16.  
  17.   cout.put('\n');
  18.   return 0;
  19.   }
  20.