home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 125.img / PRO-C4.ZIP / BENCH1.ZIP / BENCH / USERFUNC.C < prev   
Encoding:
C/C++ Source or Header  |  1990-05-28  |  1.2 KB  |  64 lines

  1. /* ==( bench/userfunc.c )== */
  2.  
  3. /* ----------------------------------------------- */
  4. /* Pro-C - Copyright (C) 1988, 1989 Vestronix Inc. */
  5. /* Modification to this source is not supported    */
  6. /* by Vestronix Inc.                               */
  7. /*            All Rights Reserved                  */
  8. /* ----------------------------------------------- */
  9. /* Written   Bob   1-May-90                        */
  10. /* ----------------------------------------------- */
  11. /* %W%  (%H% %T%) */
  12.  
  13. /*
  14.  *  Modifications
  15.  *
  16.  *  10-May-90  Geo - 1.32 Merge
  17. */
  18.  
  19. #include  <stdio.h>
  20. #include  <bench.h>
  21. #include  <field.h>
  22. #include  <proc.io>
  23.  
  24. /*
  25. * User funcdtion to force inquire mode on an update x-ref link
  26. * May-10-90
  27. */
  28.  
  29. int forceinq(fld)
  30. FIELD *fld;
  31. {
  32.     extern int glob_mode;
  33.  
  34.     if (glob_mode == K_F5)
  35.         return;
  36.  
  37.     /* 
  38.     * if using function keys and F5 for inquire mode 
  39.     * 1) use F5 for function keys
  40.     * 2) use I for menus
  41.     */
  42.     unget_inchar(K_F5);    
  43.  
  44.     /*
  45.     * return control back to driving table
  46.     */
  47.     unget_inchar(K_ESC);
  48.  
  49.     if (fld->f_pre != (int (*)())0)
  50.         (*fld->f_pre)(fld);
  51.  
  52.     return(TRUE);
  53. }
  54.  
  55.  
  56. int forcepop(fld)
  57. FIELD *fld;
  58. {
  59.     unget_inchar(K_F6);
  60.     return(TRUE);
  61. }
  62.  
  63.  
  64.