home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 1.ddi / FUNCS.EXE / CSCAPE / SOURCE / FNIPAGE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-07  |  959 b   |  50 lines

  1. /*
  2.     fnipage.c
  3.  
  4.     % inter_page
  5.  
  6.     This function is used by the standard field functions to facilitate
  7.     movement between pages.
  8.  
  9.     Handling the inter_page movement in one place save code space and
  10.     makes it easy to modify the inter_page behavior.  Simply replace
  11.     inter_page with a new function that performs as desired.
  12.  
  13.     C-scape 3.1
  14.     Copyright (c) 1986, 1987, 1988 by Oakland Group, Inc.
  15.     ALL RIGHTS RESERVED.
  16.  
  17.     Revision History:
  18.     -----------------
  19. */
  20.  
  21. #include <stdio.h>
  22. #include "cscape.h"
  23. #include "scancode.h"
  24.  
  25. boolean inter_page(sed, scancode)
  26.     sed_type sed;
  27.     int scancode;
  28. /*
  29.     effects:    Handles movement between pages.
  30.                     PGUP    goes to the previous page.
  31.                     PGDN    goes to the next page.
  32.  
  33.     returns:    TRUE if intercepted a key, FALSE otherwise.
  34. */
  35. {
  36.     switch (scancode) {
  37.     case PGUP:
  38.         sed_PageUp(sed);
  39.         return(TRUE);
  40.     case PGDN:
  41.         sed_PageDown(sed);
  42.         return(TRUE);
  43.     default:
  44.         break;
  45.     }
  46.     return(FALSE);
  47. }
  48.  
  49.  
  50.