home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / trl14db.zip / TRLSRC.EXE / TR_LIST.C < prev    next >
C/C++ Source or Header  |  1990-10-22  |  1KB  |  62 lines

  1. /*
  2.  * tr_list.c - display function table 
  3.  *
  4.  * by Alastair Dallas, Ralph Davis, Tom Rettig, and Leonard Zerman
  5.  *
  6.  * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  7.  *
  8.  */
  9.  
  10. #include "trdbase.h"
  11.  
  12. extern struct tr_dt tr_vectors[];
  13. extern int numvecs;
  14.  
  15. tr_list()
  16. {
  17.    
  18.       int i, c;
  19.  
  20.       /* start i at 4 to skip type checking in table */
  21.       for (i = 4; i < numvecs; i++)
  22.          {
  23.             if (kbhit())
  24.                {
  25.                switch(c = getch())
  26.                {
  27.  
  28.                case CTRL_C:
  29.                   puts("^C\n");
  30.                   /* fall thru... */
  31.                case ESC:
  32.                   goto terminate;
  33.  
  34.                case CTRL_S:   /* pause until next key hit */
  35.                   c = getch();
  36.                   break;
  37.  
  38.                default:
  39.                   break;
  40.  
  41.                }   /* switch */
  42.             }   /* if kbhit */
  43.  
  44.  
  45.             printf("%-15s:  %1d parameter%s  %s\n",tr_vectors[i].function,
  46.             tr_vectors[i].num_parms, (tr_vectors[i].num_parms != 1 ?
  47.             (tr_vectors[i].num_parms > 0 ? "s:" : "s") : ": "),
  48.             tr_vectors[i].var_types);
  49.  
  50.          }   /* for each function */
  51.  
  52.    printf("\n\n");       /* skip 2 lines at end */
  53.    return (0);
  54.  
  55. terminate:
  56.  
  57.    printf("\n\n");       /* skip 2 lines at end */
  58.    return (1);
  59.  
  60. }   /* tr_list */
  61.  
  62.