home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 125.img / PRO-C4.ZIP / BENCH1.ZIP / GENSUP / DEFAULT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-28  |  753 b   |  41 lines

  1. # include <stdio.h>
  2. # include <bench.h>
  3. # include <proc.io>
  4. # include "field.h"
  5. # include "screen.h"
  6. # include "iodef.h"
  7. # include "sup.h"
  8.  
  9. /*
  10.  * Set up the key-searching defaults
  11.  * comprising - key, match & sequence
  12. */
  13. int default_mode(tab, head, lptr, table, mode)
  14. struct _table *tab;
  15. struct a_line **head, **lptr;
  16. int table, mode;
  17. {
  18.     /*
  19.      * Generated in the screen program
  20.     */
  21.     if (tab->sel_fn != (void (*)())0)
  22.        (*tab->sel_fn)();
  23.     else
  24.         return (IOGOOD);
  25.  
  26.    if (*(tab->keynum) == -1)
  27.     {
  28.         *(tab->keynum) = 1;
  29.         *(tab->keymatch) = PART;
  30.       return (IOGOOD);
  31.     }
  32.  
  33.     tab->mode   = K_DOWN;
  34.     *(tab->seq) = ASCENDING;
  35.  
  36.    selectinx(tab->fd, *(tab->keynum), *(tab->keymatch), tab->retry);
  37.  
  38.     return (IOGOOD);
  39. }
  40.  
  41.