home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / CSAPE32.ARJ / SOURCE / OWLSCR / PCMCURRT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-03-29  |  1.1 KB  |  56 lines

  1. /*
  2.     pcmcurrt.c
  3.  
  4.     % pc_ModeCurrText, pc_OpenModeText
  5.  
  6.      4/10/88  by Ted.
  7.     Created so you can have current text mode capability w/o linking in all
  8.     the pc graphics code.
  9.  
  10.     OWL-PC 1.2
  11.     Copyright (c) 1988, by Oakland Group, Inc.
  12.     ALL RIGHTS RESERVED.
  13.  
  14.     Revision History:
  15.     -----------------
  16.      3/28/90 jmd    ansi-fied
  17. */
  18.  
  19. #include "pcpriv.h"
  20.  
  21. /* -------------------------------------------------------------------------- */
  22.  
  23. boolean pc_ModeCurrText(dig_struct *digp)
  24. {
  25.     int mode;
  26.  
  27.     /* Get Current Mode from hardware */
  28.     mode = pc_GetMode();
  29.  
  30.     /* Call to open with current mode */
  31.     return(pc_OpenModeText(digp, mode));
  32. }
  33. /* -------------------------------------------------------------------------- */
  34.  
  35. boolean DIGPRIV pc_OpenModeText(dig_struct *digp, int mode)
  36. /*
  37.     Open a pc display in the given text mode, if possible.
  38. */
  39. {
  40.     switch(mode) {
  41.     case 0x00:
  42.     case 0x01:
  43.     case 0x02:
  44.     case 0x03:
  45.     case PCMODE_EGA43:
  46.     case PCMODE_VGA50:
  47.         return(pc_OpenText(digp, mode));
  48.     case 0x07:
  49.         return(pc_OpenText(digp, mode));
  50.     default:
  51.         return(FALSE);
  52.     }
  53. }
  54. /* -------------------------------------------------------------------------- */
  55.  
  56.