home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_09_10 / 9n10025a < prev    next >
Text File  |  1991-08-14  |  479b  |  20 lines

  1.  
  2. main()
  3. {
  4.         void (*lookup(const char *pcmd))(void);
  5.         void stolower(char *pstring);
  6.         char command[21];
  7.  
  8.         while (1) {
  9.                 printf("\nEnter Action (`Help' for help): ");
  10.                 scanf(" %20[^\n]", command);
  11.                 if (command[0] == '\0') {
  12.                         continue;
  13.                 }
  14.                 stolower(command);
  15.  
  16.                 (*lookup(command))();   /* call selected action */
  17.         }
  18. }
  19.  
  20.