209 lines
4.6 KiB
C
209 lines
4.6 KiB
C
#include <dos.h> // Estructuras varias
|
||
|
||
// Para generar una demostraci¢n: activar la macro generadora.
|
||
// la demostraci¢n excluir suficiente c¢digo como para no
|
||
// poder generar el programa completo a travez de ASM.
|
||
//#define DEMOSTRACION
|
||
|
||
#define NORMAL 0
|
||
#define INTENSO 1
|
||
|
||
#define ELIMINAR -1
|
||
#define INSERTAR 1
|
||
|
||
#define ATRAS -1
|
||
#define NUEVA_BUSQUEDA 0
|
||
#define ADELANTE 1
|
||
|
||
#define SEC_OPTAR 2
|
||
#define ENCUADRE 3
|
||
|
||
// Niveles de acceso al programa
|
||
#define TOTAL 0
|
||
#define USUARIO 1
|
||
#define NINGUNO 2
|
||
|
||
/**************************************************************************\
|
||
|* *|
|
||
|* Estructura para el informe de datos varios... *|
|
||
|* *|
|
||
\**************************************************************************/
|
||
typedef struct
|
||
{
|
||
// Empresas
|
||
int NumAlum; // N£mero de antiguos alumnos
|
||
|
||
// Datos de interes vario
|
||
long EspacioCon; // Espacio consumido por el progr.
|
||
long EspacioLib; // Espacio libre en disco.
|
||
} DatosInformativos;
|
||
|
||
|
||
struct hora
|
||
{
|
||
char min; // Minutos y hora
|
||
char hora;
|
||
};
|
||
|
||
|
||
struct VentaProductos
|
||
{
|
||
struct hora HoraIni[5];
|
||
struct hora HoraFin[5];
|
||
|
||
char CambioHorario;
|
||
char CambioPC;
|
||
|
||
char ProcentajeMesa;
|
||
};
|
||
|
||
typedef struct
|
||
{
|
||
char Printer;
|
||
char PrintTo[80];
|
||
|
||
char Lineas;
|
||
char Normal[80], Condensado[80];
|
||
|
||
char PrincipioTickets[4][25+1];
|
||
char FinTickets[4][25+1];
|
||
} IMPRESORA;
|
||
|
||
|
||
struct CajaDia
|
||
{
|
||
char ImprimirTickets;
|
||
char CobroCompleto;
|
||
|
||
char PorcentajeMesa;
|
||
|
||
char SaltarInicio;
|
||
};
|
||
|
||
|
||
typedef struct
|
||
{
|
||
char FillBgS, FillBgC, FillBgF;
|
||
char NumFg, NumBg, NumLn;
|
||
char DigFg, DigBg;
|
||
char TxtBgN, TxtBgI, TxtFgN, TxtFgI;
|
||
|
||
IMPRESORA Impresora;
|
||
|
||
struct VentaProductos VProductos;
|
||
|
||
struct CajaDia OpcionesCaja;
|
||
|
||
|
||
char TProtector;
|
||
double Protector;
|
||
|
||
char Prot_fnt[80];
|
||
char Vent_msg[80];
|
||
|
||
char HorasMedicion[6];
|
||
|
||
long UltimaEmpresa;
|
||
char Intentos;
|
||
|
||
} CONFIG;
|
||
|
||
struct CuentaBancaria
|
||
{
|
||
int Oficina; // 4 dig.
|
||
int Sucursal; // 4 dig.
|
||
char DigControl; // 2 dig.
|
||
double NumCuenta; // 10 dig.
|
||
};
|
||
|
||
typedef struct
|
||
{
|
||
long CodigoR;
|
||
|
||
char Nombre[15+1];
|
||
char Apellidos[30+1];
|
||
// char Apellido2[15+1];
|
||
|
||
char Direccion[28+1];
|
||
char Localidad[15+1];
|
||
char Provincia[15+1];
|
||
unsigned long CodPostal;
|
||
|
||
char Telefono1[15+1];
|
||
char Fax[15+1];
|
||
|
||
struct CuentaBancaria CC;
|
||
|
||
char Notas[4][37+1];
|
||
|
||
char FuturaAmpliacion[1024];
|
||
} AntiguosAlumnos;
|
||
|
||
//ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜß
|
||
//ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜß
|
||
//ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜß
|
||
//ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜß
|
||
|
||
typedef struct
|
||
{
|
||
int x, y;
|
||
char ndigitos;
|
||
char AX, AY;
|
||
char C1, C2, C3;
|
||
} p_graphics;
|
||
|
||
int Numero_Digital( long numero, p_graphics *ND );
|
||
void LeeFuentes(char *file);
|
||
|
||
typedef struct
|
||
{
|
||
int x, y; // Coordenadas iniciales de muestreo
|
||
char ndigitos; // n£mero de digitos a mostrar
|
||
char AX, AY; // factor de espaciado
|
||
char C1, C2, C3; // colores de fondo, texto, borde
|
||
|
||
// Datos privados y uso interno exclusivamente
|
||
unsigned int Flen; // longitud de la frase actual
|
||
char BitByte; // bit del byte por el que va en el recorrido
|
||
char currByte; // byte actual dentro de la frase
|
||
} p_Ampliada;
|
||
|
||
|
||
void Fuente_Amplia( char *Frase, p_Ampliada far *FA );
|
||
void FuenteAmplia( char *Frase, p_Ampliada far *FA );
|
||
void Fuente_Amplia3( char *Frase, p_Ampliada *FA );
|
||
|
||
|
||
|
||
extern struct date FechaGestionActual;
|
||
|
||
extern CONFIG Config;
|
||
|
||
extern char led_on [18] [18];
|
||
extern char led_off [18] [18];
|
||
extern char flecha [18] [18];
|
||
|
||
int Optar( int optar, ... );
|
||
void ponicono(int x,int y,char matriz[18][18], char pos);
|
||
void formatea_u_long( unsigned long Numero, char *Inter_Chg);
|
||
void formatea_long( long Numero, char *Inter_Chg);
|
||
int InputCadenaG(char *s, int numalp, int lmax, int cc, int cf, int X0, int Y0, int X1, int Y1);
|
||
int EditComentario( char *Comentario, int Lineas, int Columnas, int cc, int cf, int X0, int Y0, int X1, int Y1, int Inc );
|
||
|
||
void TextoDoble( int x, int y, char *texto );
|
||
void AnulaInterrupcion(void);
|
||
|
||
extern char IntVect;
|
||
extern char VisualMode;
|
||
|
||
void Error( int code, char *MensajeError );
|
||
|
||
extern int far RatonVentas(void);
|
||
|
||
// Cambia las opciones de configuraci¢n.
|
||
void ConfigurarEntorno( void );
|
||
|
||
// Gestion de Alumnos
|
||
void GstAlumnos(void);
|
||
|
||
int Comprueba_Impresora(void); |