/* vgetctyp.c (emx+gcc) -- Copyright (c) 1987-1993 by Eberhard Mattes */

#include <stdlib.h>
#include <dos.h>
#define INCL_VIO
#include <os2emx.h>
#include <sys/video.h>
#include "video2.h"

void v_getctype (int *start, int *end)
{
  static VIOCURSORINFO cinfo;

  if (_osmode == OS2_MODE)
    {
      VioGetCurType (&cinfo, 0);
      *start = cinfo.yStart -1;
      *end = cinfo.cEnd -1;
    }
  else
    {
      union REGS r;

      r.h.ah = 0x03;
      r.h.bh = 0x00;
      _int86 (0x10, &r, &r);
      *start = r.h.ch & 0x1f;
      *end = r.h.cl & 0x1f;
    }
}
