/*--------------------------------------------------------------------
 * FICHERO:       Caracter.h
 * OBJETIVO:      Definir el objeto "Carcter"
 * IDENTIFICADOR: Car
 * AUTOR:         Pedro Reina
 * FECHA:         D.6.8.1995
 *------------------------------------------------------------------*/

/*--------------------------------------------------------------------
 * Funciones pblicas
 *
 *   Car_EsMayus()           CarEsM.c
 *   Car_EsMinus()           CarEsM.c
 *   Car_Mayus()             CarMayus.c
 *   Car_Minus()             CarMinus.c
 *   Car_ConvierteQLaPC()    CarQLaPC.c
 *   Car_ConviertePCaQL()    CarPCaQL.c
 *   Car_ConvierteQLaANSI()  CarQLaAN.c
 *   Car_ConvierteANSIaQL()  CarANaQL.c
 *   Car_ConviertePCaANSI()  CarPCaAN.c
 *   Car_ConvierteANSIaPC()  CarANaPC.c
 *   Car_Compara()           CarComp.c
 *------------------------------------------------------------------*/

/*--------------------------------------------------------------------
 * Funciones conocidas
 *
 *   Ninguna
 *------------------------------------------------------------------*/

/*--------------------------------------------------------------------
 * Funciones privadas
 *
 *   Ninguna
 *------------------------------------------------------------------*/

#ifndef _CARACTER_
#define _CARACTER_

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

#include "General.h"

/*--------------------------------------------------------------------
 * Definicin de macros constantes
 *------------------------------------------------------------------*/

   /* Ninguna */

/*--------------------------------------------------------------------
 * Definicin del tipo "caracter"
 *------------------------------------------------------------------*/

typedef unsigned char caracter;

/*--------------------------------------------------------------------
 * Variables globales
 *------------------------------------------------------------------*/

   /* Ninguna */

/*--------------------------------------------------------------------
 * Declaracin de funciones
 *------------------------------------------------------------------*/

logico   Car_EsMayus();
logico   Car_EsMinus();
caracter Car_Mayus();
caracter Car_Minus();
caracter Car_ConvierteQLaPC();
caracter Car_ConviertePCaQL();
caracter Car_ConvierteQLaANSI();
caracter Car_ConvierteANSIaQL();
caracter Car_ConviertePCaANSI();
caracter Car_ConvierteANSIaPC();
contador Car_Compara();              

/*--------------------------------------------------------------------
 * Definicin de constantes para PC
 *------------------------------------------------------------------*/

#ifdef OLIMPO_PC

/* Vocales minsculas acentuadas:      */

#define CAR_A_AGUDO 160
#define CAR_E_AGUDO 130
#define CAR_I_AGUDO 161
#define CAR_O_AGUDO 162
#define CAR_U_AGUDO 163

/* Vocales minsculas con acento grave:      */

#define CAR_A_GRAVE  133
#define CAR_E_GRAVE  138
#define CAR_I_GRAVE  141
#define CAR_O_GRAVE  149
#define CAR_U_GRAVE  151

/* Vocales minsculas con acento circunflejo: , , , ,  */

#define CAR_A_CIRCUNFLEJO  131
#define CAR_E_CIRCUNFLEJO  136
#define CAR_I_CIRCUNFLEJO  140
#define CAR_O_CIRCUNFLEJO  147
#define CAR_U_CIRCUNFLEJO  150

/* Vocales minsculas con diresis:      */

#define CAR_A_DIERESIS  132
#define CAR_E_DIERESIS  137
#define CAR_I_DIERESIS  139
#define CAR_O_DIERESIS  148
#define CAR_U_DIERESIS  129

/* Vocales maysculas con diresis:    */

#define CAR_MAY_A_DIERESIS  142
#define CAR_MAY_O_DIERESIS  153
#define CAR_MAY_U_DIERESIS  154

/* Vocales maysculas acentuadas:  */

#define CAR_MAY_E_AGUDO 144

/* Las dos ees:   */

#define CAR_N_TILDE     164
#define CAR_MAY_N_TILDE 165

/* Las dos ces con cejilla:   */

#define CAR_C_CEDILLA     135
#define CAR_MAY_C_CEDILLA 128

/* Las aperturas de admiracin e interrogacin:   */

#define CAR_ADMIRACION    173
#define CAR_INTERROGACION 168

/* Contracciones latinas:   */

#define CAR_AE     145
#define CAR_MAY_AE 146

/* Letras griegas:       */

#define CAR_ALFA  224
#define CAR_BETA  225
#define CAR_DELTA 235
#define CAR_FI    237
#define CAR_MU    230
#define CAR_PI    227

/* Smbolos matemticos:   */

#define CAR_DIVISION 246
#define CAR_ANGSTROM 143

/* Smbolos tipogrficos:    */

#define CAR_COMILLA_ABRIR  174
#define CAR_COMILLA_CERRAR 175
#define CAR_FINPARRAFO      21

/* Smbolos monetarios: `   */

#define CAR_LIBRA   156
#define CAR_CENTAVO 155
#define CAR_YEN     157

/* Flechas en las cuatro direcciones */

#define CAR_FLECHA_ARRIBA     24
#define CAR_FLECHA_ABAJO      25
#define CAR_FLECHA_DERECHA    26
#define CAR_FLECHA_IZQUIERDA  27

#endif


/*--------------------------------------------------------------------
 * Definicin de constantes para QL
 *------------------------------------------------------------------*/

#ifdef OLIMPO_QL

/* Vocales minsculas acentuadas:      */

#define CAR_A_AGUDO  140
#define CAR_E_AGUDO  131
#define CAR_I_AGUDO  147
#define CAR_O_AGUDO  150
#define CAR_U_AGUDO  153

/* Vocales minsculas con acento grave:      */

#define CAR_A_GRAVE  141
#define CAR_E_GRAVE  144
#define CAR_I_GRAVE  148
#define CAR_O_GRAVE  151
#define CAR_U_GRAVE  154

/* Vocales minsculas con acento circunflejo: , , , ,  */

#define CAR_A_CIRCUNFLEJO  142
#define CAR_E_CIRCUNFLEJO  145
#define CAR_I_CIRCUNFLEJO  149
#define CAR_O_CIRCUNFLEJO  152
#define CAR_U_CIRCUNFLEJO  155

/* Vocales minsculas con diresis:      */

#define CAR_A_DIERESIS  128
#define CAR_E_DIERESIS  143
#define CAR_I_DIERESIS  146
#define CAR_O_DIERESIS  132
#define CAR_U_DIERESIS  135

/* Vocales maysculas con diresis:    */

#define CAR_MAY_A_DIERESIS  160
#define CAR_MAY_O_DIERESIS  164
#define CAR_MAY_U_DIERESIS  167

/* Vocales maysculas acentuadas:  */

#define CAR_MAY_E_AGUDO  163

/* Las dos ees:   */

#define CAR_N_TILDE     137
#define CAR_MAY_N_TILDE 169

/* Las dos ces con cejilla:   */

#define CAR_C_CEDILLA     136
#define CAR_MAY_C_CEDILLA 168

/* Las aperturas de admiracin e interrogacin:   */

#define CAR_ADMIRACION    179
#define CAR_INTERROGACION 180

/* Contracciones latinas:   */

#define CAR_AE      138
#define CAR_MAY_AE  170

/* Letras griegas:       */

#define CAR_ALFA   172
#define CAR_BETA   156
#define CAR_DELTA  173
#define CAR_FI     178
#define CAR_MU     176
#define CAR_PI     177

/* Smbolos matemticos:   */

#define CAR_DIVISION  187
#define CAR_ANGSTROM  162

/* Smbolos tipogrficos:    */

#define CAR_COMILLA_ABRIR   184
#define CAR_COMILLA_CERRAR  185
#define CAR_FINPARRAFO      182

/* Smbolos monetarios: `   */

#define CAR_LIBRA    96
#define CAR_CENTAVO  157
#define CAR_YEN      158

/* Flechas en las cuatro direcciones */

#define CAR_FLECHA_ARRIBA    190
#define CAR_FLECHA_ABAJO     191
#define CAR_FLECHA_DERECHA   189
#define CAR_FLECHA_IZQUIERDA 188

#endif

#endif /* _CARACTER_ */