/*--------------------------------------------------------------------
 * FICHERO:  PanCurVi.c
 * OBJETIVO: Definir la funcin Pan_CursorVisible()
 * AUTOR:    Pedro Reina
 * FECHA:    X.26.7.1995
 *------------------------------------------------------------------*/

/*--------------------------------------------------------------------
 * Ficheros de cabecera
 *------------------------------------------------------------------*/

#include "Pantalla.h"

#ifdef OLIMPO_PC
#include <dos.h>       /*  REGS  int86()  */
#endif

#ifdef OLIMPO_QL
#include <qlib.h>      /*  sd_cure()  sd_curs()  */
#endif

/*--------------------------------------------------------------------
 * Definicin de funciones
 *------------------------------------------------------------------*/

/*--------------------------------------------------------------Olimpo
 * FUNCION:  Pan_CursorVisible()
 * OBJETIVO: Poner y quitar el cursor
 * ENTRADAS: Lgica
 * SALIDAS:  Ninguna
 * EJEMPLO:  Pan_CursorVisible ( SI )
 *------------------------------------------------------------------*/

#ifdef OLIMPO_PC
void Pan_CursorVisible (Tipo)
logico Tipo;
  {
  union REGS r;

  if ( Pan_Modo() == PAN_TEXTO )
    {
    if ( Tipo == SI ) { r.h.ch = 0x01; }
    else              { r.h.ch = 0x20; }

    r.h.ah = 0x01;
    r.h.cl = 0x0A;
    int86 (0x10,&r,&r);
    }
  }
#endif

#ifdef OLIMPO_QL
void Pan_CursorVisible (Tipo)
logico Tipo;
  {
  if ( Tipo == SI ) { sd_cure (Pan_Canal(),-1L); }
  else              { sd_curs (Pan_Canal(),-1L); }
  }
#endif