home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 2.ddi / OWLSRC.EXE / CSCAPE / SOURCE / PCMCURRT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  1.1 KB  |  58 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 1.1
  11.     Copyright (c) 1988, by Oakland Group, Inc.
  12.     ALL RIGHTS RESERVED.
  13.  
  14.     Revision History:
  15.     -----------------
  16. */
  17.  
  18. #include "pcpriv.h"
  19.  
  20. /* -------------------------------------------------------------------------- */
  21.  
  22. boolean pc_ModeCurrText(digp)
  23.     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(digp, mode)
  36.     dig_struct *digp;
  37.     int mode;
  38. /*
  39.     Open a pc display in the given text mode, if possible.
  40. */
  41. {
  42.     switch(mode) {
  43.     case 0x00:
  44.     case 0x01:
  45.     case 0x02:
  46.     case 0x03:
  47.     case PCMODE_EGA43:
  48.     case PCMODE_VGA50:
  49.         return(pc_OpenText(digp, mode));
  50.     case 0x07:
  51.         return(pc_OpenText(digp, mode));
  52.     default:
  53.         return(FALSE);
  54.     }
  55. }
  56. /* -------------------------------------------------------------------------- */
  57.  
  58.