First commit 07/10/1996
This commit is contained in:
		
							
								
								
									
										200
									
								
								M.TXT
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										200
									
								
								M.TXT
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,200 @@
 | 
			
		||||
Busqueda:
 | 
			
		||||
 | 
			
		||||
         CodR   CodB
 | 
			
		||||
         Nombre
 | 
			
		||||
         P.C     P.V
 | 
			
		||||
         [ Combinados ]
 | 
			
		||||
 | 
			
		||||
----------------------------
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 MesActual
 | 
			
		||||
 DiaActual
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 SCmpInx.Registros[DiaActual]     El dia 1 es el registro 1
 | 
			
		||||
                                  el registro 0 debe contener el inicio de
 | 
			
		||||
                                  todo, -> 0 <-
 | 
			
		||||
 | 
			
		||||
 Lo unico que debe contener el indice es:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                   long Registros[13];   // Que son los inicios de cada
 | 
			
		||||
                                         // uno de los registros por dia...
 | 
			
		||||
 | 
			
		||||
                                         // TOTAL: 52 bytes.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Codigo Descripcion Unidades Proveedor Costo
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
14400 bps
 | 
			
		||||
 | 
			
		||||
Alicante, 134.000
 | 
			
		||||
 | 
			
		||||
   ___                ___
 | 
			
		||||
      ---__________---
 | 
			
		||||
___---<2D><><EFBFBD>          <20><><EFBFBD>---___
 | 
			
		||||
---___    Dragonet    ___---
 | 
			
		||||
      ---__________---
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Martes / cambiar por miercoles ( 424 09 84 / Reyes )
 | 
			
		||||
 | 
			
		||||
Provedisa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
a<EFBFBD>ana vienen para,
 | 
			
		||||
  926 85 36 50 __ Rosa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 Win
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 N<> Piso
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  _________________
 | 
			
		||||
 /                  \
 | 
			
		||||
|   Balance Diario   |
 | 
			
		||||
 \__________________/
 | 
			
		||||
 | 
			
		||||
    1 Archivo / mes
 | 
			
		||||
      |
 | 
			
		||||
      |  /---
 | 
			
		||||
      | |
 | 
			
		||||
      | | Hora ( 1, 2, 3, 4, 5, 6 ) * 31 dias
 | 
			
		||||
      | |
 | 
			
		||||
      | |
 | 
			
		||||
      <20>-| Total Vendido ( 1, 2, 3, ..., 31 )
 | 
			
		||||
      | |                /\
 | 
			
		||||
      | |                ||    |  Hora 1:
 | 
			
		||||
      | |                <20><>___/   Hora 2:
 | 
			
		||||
      | |                <20>----\   Hora 3:
 | 
			
		||||
      | |                      |  Hora 4:
 | 
			
		||||
      | |                      |  Hora 5:
 | 
			
		||||
      | |                      |  Hora 6:
 | 
			
		||||
      | |
 | 
			
		||||
      | | Total Ganado  ( 1, 2, 3, ..., 31 ) { Descontando Gastos a Vendido }
 | 
			
		||||
      | |
 | 
			
		||||
      | | N<> Tickets, N<> Cambio  * 31 dias
 | 
			
		||||
      | |                       <20>------------------<2D>
 | 
			
		||||
      | |                       | 1, 2, 3, ..., 31 |
 | 
			
		||||
      | | N<> Empleado  Nombre   |     Vendido      |
 | 
			
		||||
     | |
 | 
			
		||||
      | |
 | 
			
		||||
      | |  Estructura     char Hora[6];
 | 
			
		||||
      | |  de datos       long TotalVendido[6];
 | 
			
		||||
      | |  diaria         long BeneficioBruto;
 | 
			
		||||
      | |                 long Gastos;
 | 
			
		||||
      | |                 int  Tickets;
 | 
			
		||||
      | |                 int  Cambio;
 | 
			
		||||
      | |                 hora AperturaCaja;
 | 
			
		||||
      | |                 hora FinCaja;
 | 
			
		||||
      | |
 | 
			
		||||
      | |
 | 
			
		||||
      |  \___
 | 
			
		||||
      |                <20>------------------<2D> <20>------------------<2D> <20>------------------<2D>
 | 
			
		||||
      |                | 1, 2, 3, ..., 31 | | 1, 2, 3, ..., 31 | | 1, 2, 3, ..., 31 |
 | 
			
		||||
      <20>-> Ref. Nombre  |       Cant.      | |   Ventas Pv T.   | |   Ventas PCosto  |
 | 
			
		||||
                         /\
 | 
			
		||||
                         ||    |  8 :> 12
 | 
			
		||||
                         <20><>___/  12 :> 16
 | 
			
		||||
                         <20>----\  16 :> 20
 | 
			
		||||
                              | 20 :> 24
 | 
			
		||||
                               | 24 :>  4
 | 
			
		||||
                               |  4 :>  8
 | 
			
		||||
 | 
			
		||||
      Estructura unificada de productos vendidos
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      long CodigoR;
 | 
			
		||||
      char Nombre[30+1];
 | 
			
		||||
      unsigned int  Cantidad[31][5];
 | 
			
		||||
      unsigned long PrecioVenta[31];
 | 
			
		||||
      unsigned long PrecioCosto[31];
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  Productos vendidos,           N<> Tickets: xxx.xxx.xx <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ
 | 
			
		||||
  desde: __    hasta __         Cambio:          x.xxx <20> Nombre      Vendido <20>
 | 
			
		||||
 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ  Intentos Salir: xxx.xx <20>---------------------<2D>
 | 
			
		||||
 <20> Ref. Producto      T.Unds <20>  Salidas Menu P:      x <20>                     <20>
 | 
			
		||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ  <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ <20>                     <20>
 | 
			
		||||
 <20>                           <20>  <20>  8 : 12          x <20> <20>                     <20>
 | 
			
		||||
 <20>                           <20>  <20> 12 : 16         xx <20> <20>                     <20>
 | 
			
		||||
 <20>                           <20>  <20> 16 : 20       x.xx <20> <20>                     <20>
 | 
			
		||||
 <20>                           <20>  <20> 20 : 24          x <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 <20>                           <20>  <20> 24 :  4         xx <20>
 | 
			
		||||
 <20>                           <20>  <20>  4 :  8          x <20> Inicio Caja:  XX:XX:xx
 | 
			
		||||
 <20>                           <20>  <20>--------------------<2D> Fin Caja:     XX:XX:xx
 | 
			
		||||
 <20>                           <20>  <20> ToTal Ventas: x.xx <20>
 | 
			
		||||
 <20>                           <20>  <20>                    <20>
 | 
			
		||||
 <20>                           <20>  <20> Gastos:      x.xxx <20>
 | 
			
		||||
 <20>                           <20>  <20>--------------------<2D>
 | 
			
		||||
 <20>                           <20>  <20> Beneficios: xx.xxx <20>
 | 
			
		||||
 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>  <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ
 | 
			
		||||
 <20> Notas:                                                                   <20>
 | 
			
		||||
 <20>                                                                          <20>
 | 
			
		||||
 <20>                                                                          <20>
 | 
			
		||||
 <20>                                                                          <20>
 | 
			
		||||
 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 Codigo: 64.621
 | 
			
		||||
 Datos:  42.107
 | 
			
		||||
 | 
			
		||||
 101010100
 | 
			
		||||
 | 
			
		||||
 123400000
 | 
			
		||||
 | 
			
		||||
 Bar Con ocho basta
 | 
			
		||||
 Puerto de los azores, n<> 7
 | 
			
		||||
 Junto al tacher,
 | 
			
		||||
                 tlf, 492-16-05 ( Antonio, el padre )
 | 
			
		||||
                 Ya est<73> cerrado, y todo desmontado para recogerlo
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      11111111-            -
 | 
			
		||||
      22222222-            -
 | 
			
		||||
      33333333-            -
 | 
			
		||||
      44444444  -        -
 | 
			
		||||
      55555555  -        -
 | 
			
		||||
      66666666  -        -
 | 
			
		||||
      77777777    -    -
 | 
			
		||||
      88888888    -    -
 | 
			
		||||
      99999999    -    -
 | 
			
		||||
      00000000      -
 | 
			
		||||
                    -
 | 
			
		||||
                    -
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    Codigos No...
 | 
			
		||||
 | 
			
		||||
                    C<>digo (numerico 9)
 | 
			
		||||
                    Nombre (alfa    35)
 | 
			
		||||
                    Domicilio       35
 | 
			
		||||
                    Poblacion
 | 
			
		||||
                    Provincia
 | 
			
		||||
                    CP.
 | 
			
		||||
                    Cif/Nif.
 | 
			
		||||
                    Tlf.
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								MAILINGS.DBF
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								MAILINGS.DBF
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								MAILINGS.DSK
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								MAILINGS.DSK
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								MAILINGS.EXE
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								MAILINGS.EXE
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								MAILINGS.PRJ
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								MAILINGS.PRJ
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										99
									
								
								MAIL_.H
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										99
									
								
								MAIL_.H
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,99 @@
 | 
			
		||||
#include <dos.h>
 | 
			
		||||
 | 
			
		||||
#define DIBUJA       1
 | 
			
		||||
#define DEPRIME      2
 | 
			
		||||
#define Dibuja_Todos 3
 | 
			
		||||
#define COMPRUEBA    4
 | 
			
		||||
#define STD_BY       5
 | 
			
		||||
 | 
			
		||||
#define NORMAL           0
 | 
			
		||||
#define INTENSO          1
 | 
			
		||||
 | 
			
		||||
#define ATRAS           -1
 | 
			
		||||
#define NUEVA_BUSQUEDA   0
 | 
			
		||||
#define ADELANTE         1
 | 
			
		||||
 | 
			
		||||
#define SEC_OPTAR        5
 | 
			
		||||
#define ENCUADRE         3
 | 
			
		||||
 | 
			
		||||
// Niveles de acceso al programa
 | 
			
		||||
#define TOTAL     0
 | 
			
		||||
#define USUARIO   1
 | 
			
		||||
#define NINGUNO   2
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
 char FillBgS, FillBgC;
 | 
			
		||||
 char NumFg, NumBg, NumLn;
 | 
			
		||||
 char TxtBgN, TxtBgI, TxtFgN, TxtFgI;
 | 
			
		||||
 char Printer, PrintTo[80];
 | 
			
		||||
} CONFIG;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
 long Codigo;
 | 
			
		||||
 char NIF[10+1];
 | 
			
		||||
 char Nombre[45+1];
 | 
			
		||||
 | 
			
		||||
 char Direccion[40+1];
 | 
			
		||||
 char Num[4+1];
 | 
			
		||||
 char Piso[4+1];
 | 
			
		||||
 | 
			
		||||
 char Localidad[25+1];
 | 
			
		||||
 char Provincia[15+1];
 | 
			
		||||
 | 
			
		||||
 long CodPostal;
 | 
			
		||||
 | 
			
		||||
 char Cod1;
 | 
			
		||||
 char Cod2;
 | 
			
		||||
 char Cod3;
 | 
			
		||||
} MAILINGS;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
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);
 | 
			
		||||
int  InputCadenaG(char *s, int numalp, int lmax, int cc, int cf, int X0, int Y0, int X1, int Y1);
 | 
			
		||||
void Error( int code );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// M<>dulo de referencias
 | 
			
		||||
void InfoProductos(void);
 | 
			
		||||
 | 
			
		||||
// M<>dulo de Compras
 | 
			
		||||
void ComprasDiarias( int NivelAcceso );
 | 
			
		||||
 | 
			
		||||
// Informacion de los proveedores
 | 
			
		||||
void InfoProveedores(void);
 | 
			
		||||
 | 
			
		||||
//<2F><>
 | 
			
		||||
void espera_soltar(void);
 | 
			
		||||
void espera_pulsar(void);
 | 
			
		||||
void activa_raton(void);
 | 
			
		||||
void desactiva_raton(void);
 | 
			
		||||
void inicializa_raton_texto(void);
 | 
			
		||||
struct Boton_Texto{
 | 
			
		||||
  char x; char y;
 | 
			
		||||
  char Texto[80];
 | 
			
		||||
 | 
			
		||||
  int ID_T1;
 | 
			
		||||
  int ID_T2;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int Funcion_Botones(int Funcion, int nBotones, struct Boton_Texto *Boton_Texto);
 | 
			
		||||
 | 
			
		||||
extern int   boton_izq, boton_der;
 | 
			
		||||
extern int x_raton, y_raton, RATON;
 | 
			
		||||
 | 
			
		||||
//<2F><>
 | 
			
		||||
 | 
			
		||||
extern int AnoActual;
 | 
			
		||||
							
								
								
									
										334
									
								
								MAIL_M.CPP
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										334
									
								
								MAIL_M.CPP
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,334 @@
 | 
			
		||||
#include <io.h>
 | 
			
		||||
#include <dos.h>
 | 
			
		||||
#include <conio.h>
 | 
			
		||||
#include<bios.h>
 | 
			
		||||
#include<dos.h>
 | 
			
		||||
#include<stdlib.h>
 | 
			
		||||
#include<conio.h>
 | 
			
		||||
#include<string.h>
 | 
			
		||||
#include<ctype.h>
 | 
			
		||||
 | 
			
		||||
#include "d:\program\src_dos\libs\bdatos\bdatos.hh"
 | 
			
		||||
#include "mail_.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
CONFIG Config = {
 | 
			
		||||
		  1, BLUE,
 | 
			
		||||
		  RED, WHITE, BLACK,
 | 
			
		||||
		  BLACK, WHITE, WHITE, BLACK,
 | 
			
		||||
		  0, { "PrnFile.out" }
 | 
			
		||||
		};
 | 
			
		||||
 | 
			
		||||
#define OFF     0
 | 
			
		||||
#define ON      1
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
    #define __CPPARGS ...
 | 
			
		||||
#else
 | 
			
		||||
    #define __CPPARGS
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define GESTION_DE_SOCIOS        1
 | 
			
		||||
#define LISTA_DE_PRECIOS         2
 | 
			
		||||
#define GASTOS_INTERNOS          3
 | 
			
		||||
#define SALIR                    4
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int  MenuPrincipal(void);
 | 
			
		||||
 | 
			
		||||
void Mailings(void);
 | 
			
		||||
 | 
			
		||||
void PideAnoActual(void);
 | 
			
		||||
 | 
			
		||||
void DibujaPantallaGastosInt(void);
 | 
			
		||||
 | 
			
		||||
int   boton_izq; int   boton_der;
 | 
			
		||||
int x_raton, y_raton, RATON = 1;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main(void)
 | 
			
		||||
{
 | 
			
		||||
 int ok;
 | 
			
		||||
 | 
			
		||||
 inicializa_raton_texto();
 | 
			
		||||
 if( RATON ) desactiva_raton();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 ok = 0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 MenuPrincipal();
 | 
			
		||||
 sleep( 5 );
 | 
			
		||||
 | 
			
		||||
 Mailings();
 | 
			
		||||
 clrscr();
 | 
			
		||||
 | 
			
		||||
 printf( "\nJos<EFBFBD> David Guill<6C>n || _-<2D>FuTuRe ViSiOn<4F>-_ || 1996 (c)" );
 | 
			
		||||
 printf( "\nJoshua G<>mez Garcia | Spiral Software     || 1996 (c)" );
 | 
			
		||||
 printf( "\n                                                     " );
 | 
			
		||||
 printf( "\n        e-mail: Jose-David.Guill<6C>n@cs.us.es          " );
 | 
			
		||||
 printf( "\n                infomundo@arrakis.es                 " );
 | 
			
		||||
 printf( "\n                                                     " );
 | 
			
		||||
 printf( "\n                                                     " );
 | 
			
		||||
 printf( "\n          <20>    <20><><EFBFBD>     <20>  <20>          <20>       <20><><EFBFBD>Ŀ   " );
 | 
			
		||||
 printf( "\n          <20> <20>Ŀ<EFBFBD><C4BF><EFBFBD> <20><>Ŀ<EFBFBD>\\/<2F> <20>   <20>Ŀ<EFBFBD>Ĵ <20>Ŀ   <20> <20> <20>   " );
 | 
			
		||||
 printf( "\n          <20> <20> <20><>   <20>__<5F><5F>  <20> <20>_<EFBFBD> <20> <20><>_<EFBFBD> <20>_<EFBFBD>   <20><><EFBFBD><EFBFBD><EFBFBD>   " );
 | 
			
		||||
 printf( "\n" );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 _setcursortype(_NORMALCURSOR);
 | 
			
		||||
 | 
			
		||||
return 0;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int MenuPrincipal(void)
 | 
			
		||||
{
 | 
			
		||||
  _setcursortype(_NOCURSOR);
 | 
			
		||||
  textcolor( WHITE );
 | 
			
		||||
  textbackground( BLACK );
 | 
			
		||||
  clrscr();
 | 
			
		||||
 | 
			
		||||
  cprintf("                <20><><EFBFBD><EFBFBD>                            <20>                              \n\r");
 | 
			
		||||
  cprintf("                <20>                               <20>                              \n\r");
 | 
			
		||||
  cprintf("                <20><><EFBFBD><EFBFBD>  <20><><EFBFBD>Ŀ <20>   <20> <20>  <20><><EFBFBD>Ŀ <20><>Ŀ <20>    <20><><EFBFBD><EFBFBD> <20><>Ŀ                 \n\r");
 | 
			
		||||
  cprintf("                <20>     <20>   <20> <20>   <20> <20>  <20>   <20> <20><>Ĵ <20>    <20><>Ŀ <20><>Ĵ                 \n\r");
 | 
			
		||||
  cprintf("                <20><><EFBFBD><EFBFBD>  <20><><EFBFBD>Ĵ <20><><EFBFBD><EFBFBD><EFBFBD> <20>  <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>                 \n\r");
 | 
			
		||||
  cprintf("                          <20>          <20>                                         \n\r");
 | 
			
		||||
  cprintf("                          <20>          <20>                                         \n\r");
 | 
			
		||||
  cprintf("                                                                               \n\r");
 | 
			
		||||
  textcolor( RED );
 | 
			
		||||
  cprintf("           <20><>  <20><>                                                              \n\r");
 | 
			
		||||
  cprintf("             <20><>  <20><>       <20><> <20><>  <20><><EFBFBD><EFBFBD>  <20>  <20>    <20>  <20><>  <20>  <20><><EFBFBD><EFBFBD>  <20><><EFBFBD><EFBFBD>            \n\r");
 | 
			
		||||
  cprintf("           <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>     <20> <20> <20>  <20><><EFBFBD><EFBFBD>  <20>  <20>    <20>  <20> <20> <20>  <20> <20><>   <20><>              \n\r");
 | 
			
		||||
  cprintf("              <20>    <20>    <20>   <20>  <20><><EFBFBD><EFBFBD>  <20>  <20><><EFBFBD>  <20>  <20>   <20>  <20><><EFBFBD><EFBFBD>  <20><><EFBFBD><EFBFBD>              \n\r");
 | 
			
		||||
  cprintf("            <20><>  <20><><EFBFBD>                                                            \n\r");
 | 
			
		||||
  cprintf("            <20><><EFBFBD><EFBFBD>                                                               \n\r");
 | 
			
		||||
  cprintf("                                                                               \n\r");
 | 
			
		||||
  cprintf("                                                                               \n\r");
 | 
			
		||||
  cprintf("                                                                               \n\r");
 | 
			
		||||
  cprintf("                                                                               \n\r");
 | 
			
		||||
  textcolor( LIGHTGRAY );
 | 
			
		||||
  cprintf("    <20>   <20> <20>\\ <20>    <20> <20><>Ŀ        <20><> <20><> <20><><EFBFBD> <20><><EFBFBD> <20>                |>    |     _  <20>\n\r");
 | 
			
		||||
  cprintf("    <20>   <20> <20> \\<EFBFBD> <20><>Ĵ <20><><EFBFBD><EFBFBD>        <20> <20> <20> <20><><EFBFBD>  <20>  <20><><EFBFBD> <20><> <20><><EFBFBD>       |> () |> ( |-| |\n\r");
 | 
			
		||||
  cprintf("    <20><><EFBFBD> <20> <20>  <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>        <20>   <20> <20> <20>  <20>  <20><><EFBFBD> <20>  <20><><EFBFBD>                       \n\r");
 | 
			
		||||
  cprintf("                                                                               \n\r");
 | 
			
		||||
  cprintf("                                                                               \n\r");
 | 
			
		||||
  textcolor( RED );
 | 
			
		||||
  cprintf("                                                                               \n\r");
 | 
			
		||||
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int Funcion_Botones(int Funcion, int nBotones, struct Boton_Texto *Boton_Texto)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
 char i;
 | 
			
		||||
 int DEVOLVER = -1;
 | 
			
		||||
 int longitud, key, key2;
 | 
			
		||||
 | 
			
		||||
 switch( Funcion ) {
 | 
			
		||||
  case DIBUJA:
 | 
			
		||||
		 highvideo();
 | 
			
		||||
		 textcolor(BLACK);
 | 
			
		||||
		 textbackground(11);
 | 
			
		||||
		 gotoxy(Boton_Texto[nBotones].x, Boton_Texto[nBotones].y);
 | 
			
		||||
	      DEVOLVER = 0;
 | 
			
		||||
	      longitud = strlen( Boton_Texto[nBotones].Texto );
 | 
			
		||||
	      while( DEVOLVER <= longitud  ) {
 | 
			
		||||
	       if( Boton_Texto[nBotones].Texto[DEVOLVER] == '&' ) {
 | 
			
		||||
		DEVOLVER ++;
 | 
			
		||||
	      textcolor(RED);
 | 
			
		||||
		cprintf("%c", Boton_Texto[nBotones].Texto[DEVOLVER]);
 | 
			
		||||
	      textcolor(BLACK);
 | 
			
		||||
	       } else cprintf("%c", Boton_Texto[nBotones].Texto[DEVOLVER]);
 | 
			
		||||
	       DEVOLVER ++;
 | 
			
		||||
	      }
 | 
			
		||||
 | 
			
		||||
 //		      cprintf("%s", Texto);
 | 
			
		||||
 | 
			
		||||
	      textbackground(7);   			  // <20>SALIR<49><52>
 | 
			
		||||
				cprintf("<EFBFBD>");		  //  <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
	      gotoxy(Boton_Texto[nBotones].x+1, Boton_Texto[nBotones].y+1);
 | 
			
		||||
	      for(i = 0; i < longitud; i ++ )             // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
				cprintf("<EFBFBD>");             //  <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
	      break;
 | 
			
		||||
  case DEPRIME:
 | 
			
		||||
		 highvideo();
 | 
			
		||||
		 textcolor(BLACK);
 | 
			
		||||
		 textbackground(11);
 | 
			
		||||
	      gotoxy(Boton_Texto[nBotones].x, Boton_Texto[nBotones].y);
 | 
			
		||||
	      DEVOLVER = 0;
 | 
			
		||||
	      longitud = strlen( Boton_Texto[nBotones].Texto );
 | 
			
		||||
              ////////////////
 | 
			
		||||
	      textbackground(BLACK);
 | 
			
		||||
	      while( DEVOLVER <= (longitud+1)  ) {
 | 
			
		||||
	       if( Boton_Texto[nBotones].Texto[DEVOLVER] == '&' ) {
 | 
			
		||||
		DEVOLVER ++;
 | 
			
		||||
	       }
 | 
			
		||||
	       cprintf(" ");
 | 
			
		||||
	       DEVOLVER ++;
 | 
			
		||||
	      }
 | 
			
		||||
	      textbackground(11);
 | 
			
		||||
	      gotoxy(Boton_Texto[nBotones].x+1, Boton_Texto[nBotones].y+1);
 | 
			
		||||
	      DEVOLVER = 0;
 | 
			
		||||
	      while( DEVOLVER <= longitud  ) {
 | 
			
		||||
 | 
			
		||||
	       if( Boton_Texto[nBotones].Texto[DEVOLVER] == '&' ) {
 | 
			
		||||
		DEVOLVER ++;
 | 
			
		||||
	      textcolor(RED);
 | 
			
		||||
		cprintf("%c", Boton_Texto[nBotones].Texto[DEVOLVER]);
 | 
			
		||||
	      textcolor(BLACK);
 | 
			
		||||
	       } else cprintf("%c", Boton_Texto[nBotones].Texto[DEVOLVER]);
 | 
			
		||||
	       DEVOLVER ++;
 | 
			
		||||
	      }
 | 
			
		||||
//	      cprintf("%s", Texto);                       //
 | 
			
		||||
							  //  <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
	      break;
 | 
			
		||||
  case Dibuja_Todos:
 | 
			
		||||
	      for( i=0; i < nBotones; i++)
 | 
			
		||||
		Funcion_Botones( DIBUJA, i, Boton_Texto);
 | 
			
		||||
	      break;
 | 
			
		||||
  case COMPRUEBA:
 | 
			
		||||
	      if( bioskey(1)!=0 ) {
 | 
			
		||||
		      key = toupper( getch() ); DEVOLVER = -2;
 | 
			
		||||
                      if ( key == 0 ) { key2 = toupper( getch() ); DEVOLVER = -1; }
 | 
			
		||||
		      for( i=0; i < nBotones && DEVOLVER <= -1; i++){
 | 
			
		||||
			if( key == Boton_Texto[i].ID_T1 ) {
 | 
			
		||||
			     if( key == 0 ) {
 | 
			
		||||
			       if( key2 == Boton_Texto[i].ID_T2 ){
 | 
			
		||||
								 DEVOLVER = (i + 1);
 | 
			
		||||
								 Funcion_Botones( DEPRIME, (DEVOLVER-1), Boton_Texto);
 | 
			
		||||
								 delay(150);
 | 
			
		||||
								 //sleep(1);
 | 
			
		||||
								 Funcion_Botones( DIBUJA, (DEVOLVER-1), Boton_Texto);
 | 
			
		||||
			       }
 | 
			
		||||
			     } else
 | 
			
		||||
					{ DEVOLVER =  (i + 1);
 | 
			
		||||
					 Funcion_Botones( DEPRIME, (DEVOLVER-1), Boton_Texto);
 | 
			
		||||
					 delay(150);
 | 
			
		||||
					 //sleep(1);
 | 
			
		||||
					 Funcion_Botones( DIBUJA, (DEVOLVER-1), Boton_Texto);
 | 
			
		||||
					}
 | 
			
		||||
			}
 | 
			
		||||
		      }
 | 
			
		||||
 | 
			
		||||
		      if( DEVOLVER == -2 )
 | 
			
		||||
					{ ungetch(key); }
 | 
			
		||||
 | 
			
		||||
		      if( DEVOLVER == -1 )
 | 
			
		||||
					{ ungetch(key2); }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	      } else if( RATON ) {
 | 
			
		||||
                DEVOLVER = 0;
 | 
			
		||||
		      for( i=0; i < nBotones && DEVOLVER == 0; i++) {
 | 
			
		||||
			longitud = strlen( Boton_Texto[i].Texto );
 | 
			
		||||
			if ( (x_raton+1) >= Boton_Texto[i].x && (x_raton+1) <= ( Boton_Texto[i].x + longitud -1) &&
 | 
			
		||||
			     y_raton == (Boton_Texto[i].y-1) ) { DEVOLVER = (i + 1);
 | 
			
		||||
							     Funcion_Botones( DEPRIME, (DEVOLVER-1), Boton_Texto);
 | 
			
		||||
							     if( RATON ) activa_raton();
 | 
			
		||||
							     espera_soltar();
 | 
			
		||||
							     if( RATON ) desactiva_raton();
 | 
			
		||||
//			     				     delay(150);
 | 
			
		||||
							     Funcion_Botones( DIBUJA, (DEVOLVER-1), Boton_Texto);
 | 
			
		||||
			}
 | 
			
		||||
		      }
 | 
			
		||||
	      }
 | 
			
		||||
	      break;
 | 
			
		||||
  case STD_BY:
 | 
			
		||||
	      Funcion_Botones(Dibuja_Todos, nBotones, Boton_Texto);
 | 
			
		||||
	      do{
 | 
			
		||||
		if( RATON ) activa_raton();
 | 
			
		||||
		if( RATON ) espera_pulsar(); else while( bioskey(1)==0 );
 | 
			
		||||
		if( RATON ) desactiva_raton();
 | 
			
		||||
		DEVOLVER = Funcion_Botones(COMPRUEBA, nBotones, Boton_Texto);
 | 
			
		||||
	      }while(DEVOLVER==0 && bioskey(1)==0 );
 | 
			
		||||
 | 
			
		||||
 }
 | 
			
		||||
 return DEVOLVER;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void inicializa_raton_texto(void)
 | 
			
		||||
{
 | 
			
		||||
	union REGS ent, sal;
 | 
			
		||||
 | 
			
		||||
	ent.x.ax =   0;
 | 
			
		||||
        int86(0x33, &ent, &sal);          /* averigua si hay rat<61>n conectado */
 | 
			
		||||
 | 
			
		||||
	if(sal.x.ax==0) { RATON = 0; return; }
 | 
			
		||||
 | 
			
		||||
        ent.x.ax =  15;
 | 
			
		||||
	ent.x.cx =   8;
 | 
			
		||||
	ent.x.dx =  16;
 | 
			
		||||
        int86(0x33, &ent, &sal);               /* fija la raz<61>n mickey/pixel */
 | 
			
		||||
 | 
			
		||||
	ent.x.ax =   7;
 | 
			
		||||
        ent.x.cx =   0;
 | 
			
		||||
        ent.x.dx = 639;
 | 
			
		||||
        int86(0x33, &ent, &sal);  /* fija la posici<63>n m<>x. y m<>n. horizontal */
 | 
			
		||||
 | 
			
		||||
        ent.x.ax =   8;
 | 
			
		||||
	ent.x.cx =   0;
 | 
			
		||||
	ent.x.dx = 199;
 | 
			
		||||
	int86(0x33, &ent, &sal);    /* fija la posici<63>n m<>x. y m<>n. vertical */
 | 
			
		||||
 | 
			
		||||
	ent.x.ax =   4;
 | 
			
		||||
	ent.x.cx = 320;
 | 
			
		||||
	ent.x.dx = 100;
 | 
			
		||||
	int86(0x33, &ent, &sal);               /* fija la posici<63>n del rat<61>n */
 | 
			
		||||
 | 
			
		||||
	ent.x.ax =   1;
 | 
			
		||||
	int86(0x33, &ent, &sal);             /* muestra el puntero del rat<61>n */
 | 
			
		||||
}
 | 
			
		||||
void activa_raton(void)
 | 
			
		||||
{
 | 
			
		||||
	union REGS ent, sal;
 | 
			
		||||
 | 
			
		||||
	ent.x.ax = 1;
 | 
			
		||||
	int86(0x33, &ent, &sal);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void desactiva_raton(void)
 | 
			
		||||
{
 | 
			
		||||
        union REGS ent, sal;
 | 
			
		||||
 | 
			
		||||
	ent.x.ax = 2;
 | 
			
		||||
	int86(0x33, &ent, &sal);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void espera_pulsar(void)
 | 
			
		||||
{
 | 
			
		||||
	union REGS ent, sal;
 | 
			
		||||
 | 
			
		||||
	do{
 | 
			
		||||
	  if(bioskey(1)!=0) break;
 | 
			
		||||
	  ent.x.ax = 3;
 | 
			
		||||
	  int86(0x33, &ent, &sal);       /* lee posici<63>n y estados del bot<6F>n */
 | 
			
		||||
	}while((sal.x.bx & 3)==0);
 | 
			
		||||
	boton_izq=sal.x.bx & 1;
 | 
			
		||||
	boton_der=(sal.x.bx >> 1) & 1;
 | 
			
		||||
	x_raton= (sal.x.cx >> 1) / 4; // / 8
 | 
			
		||||
	y_raton= (sal.x.dx)/8; //  /8
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void espera_soltar(void)
 | 
			
		||||
{
 | 
			
		||||
	union REGS ent, sal;
 | 
			
		||||
 | 
			
		||||
	do{
 | 
			
		||||
	  ent.x.ax = 3;
 | 
			
		||||
	  int86(0x33, &ent, &sal);       /* lee posici<63>n y estados del bot<6F>n */
 | 
			
		||||
	}while((sal.x.bx & 3)!=0);
 | 
			
		||||
	boton_izq=sal.x.bx & 1;
 | 
			
		||||
	boton_der=(sal.x.bx >> 1) & 1;
 | 
			
		||||
	x_raton=sal.x.cx >> 1;
 | 
			
		||||
	y_raton=sal.x.dx;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1158
									
								
								MAIL_PR.CPP
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1158
									
								
								MAIL_PR.CPP
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										277
									
								
								MAIL_TL.CPP
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										277
									
								
								MAIL_TL.CPP
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,277 @@
 | 
			
		||||
#include <dos.h>
 | 
			
		||||
#include <conio.h>
 | 
			
		||||
#include <ctype.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <alloc.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <stdarg.h>
 | 
			
		||||
 | 
			
		||||
#define BLANCO EGA_WHITE
 | 
			
		||||
#define ENCUADRE       3
 | 
			
		||||
#define SEC_OPTAR      5
 | 
			
		||||
 | 
			
		||||
#include "mail_.h"
 | 
			
		||||
 | 
			
		||||
void BEEP(void);
 | 
			
		||||
 | 
			
		||||
 /**************************************************************************\
 | 
			
		||||
|*                                                                          *|
 | 
			
		||||
|*  InputCadenaG                                                            *|
 | 
			
		||||
|*                                                                          *|
 | 
			
		||||
|*  Descripci<63>n:                                                            *|
 | 
			
		||||
|*              Edita una cadena en formato gr<67>fico                         *|
 | 
			
		||||
|*                                                                          *|
 | 
			
		||||
|*  Entradas:                                                               *|
 | 
			
		||||
|*            Puntero a los datos editados                                  *|
 | 
			
		||||
|*            0 alfanumerico   1 numerico                                   *|
 | 
			
		||||
|*            longitud de la cadena (TEXTO/NUMERO)                          *|
 | 
			
		||||
|*            color del texto                                               *|
 | 
			
		||||
|*            color de fondo                                                *|
 | 
			
		||||
|*            Limites de acotacion                                          *|
 | 
			
		||||
|*                                                                          *|
 | 
			
		||||
|*  Salidas:  (ninguna)                                                     *|
 | 
			
		||||
|*                                                                          *|
 | 
			
		||||
|*                                                                          *|
 | 
			
		||||
 \**************************************************************************/
 | 
			
		||||
int InputCadenaG(char *s, int numalp, int lmax, int cc, int cf, int X0, int Y0, int X1, int Y1)
 | 
			
		||||
{
 | 
			
		||||
  // A todas las y les sumaba antes +RoW*12 parametro que indica la linea
 | 
			
		||||
 | 
			
		||||
  int  ls;                                      // longitud cadena
 | 
			
		||||
  char Status = 0;
 | 
			
		||||
  char *s1;                                     // puntero a cadena inicial
 | 
			
		||||
  int c, ok, i;
 | 
			
		||||
 | 
			
		||||
  s1 = s;                                       // inicio cadena
 | 
			
		||||
 | 
			
		||||
                textbackground( cf );
 | 
			
		||||
 | 
			
		||||
                gotoxy( X0, Y0 );
 | 
			
		||||
                for ( i = 0; i < X1; i++ )
 | 
			
		||||
                                        putch( 32 );
 | 
			
		||||
                textcolor( cc );
 | 
			
		||||
                gotoxy( X0, Y0 );
 | 
			
		||||
                cprintf( "%s", s1 );
 | 
			
		||||
 | 
			
		||||
  _setcursortype( _SOLIDCURSOR );
 | 
			
		||||
 | 
			
		||||
  ls = strlen ( s );                            // Longitud de actual
 | 
			
		||||
 | 
			
		||||
  s += ls;                                      // se coloca en el final
 | 
			
		||||
 | 
			
		||||
  do{
 | 
			
		||||
	c = getch();                            // obtiene tecla
 | 
			
		||||
 | 
			
		||||
        if ( c == 27 ) Status = 1;
 | 
			
		||||
 | 
			
		||||
	ok = ( c == 27 || c == 13 || c == 0);              // 13 = INTRO || Especiales
 | 
			
		||||
 | 
			
		||||
	if ( c == 8  && ls > 0 && !ok ) {       //  8 = Back Space
 | 
			
		||||
		ls--;
 | 
			
		||||
		s--;
 | 
			
		||||
 | 
			
		||||
		*s = '\0';
 | 
			
		||||
 | 
			
		||||
                gotoxy( X0, Y0 );
 | 
			
		||||
                for ( i = 0; i < X1; i++ )
 | 
			
		||||
                                         putch( 32 );
 | 
			
		||||
                textcolor( cc );
 | 
			
		||||
                gotoxy( X0, Y0 );
 | 
			
		||||
                cprintf( "%s", s1 );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	} else {
 | 
			
		||||
		if ( !numalp && c >= 32 && c <= 254  && ls < lmax) {
 | 
			
		||||
 | 
			
		||||
			*s++ = c;
 | 
			
		||||
			ls++;
 | 
			
		||||
 | 
			
		||||
			*s = '\0';
 | 
			
		||||
 | 
			
		||||
                gotoxy( X0, Y0 );
 | 
			
		||||
                for ( i = 0; i < X1; i++ )
 | 
			
		||||
                                         putch( 32 );
 | 
			
		||||
                textcolor( cc );
 | 
			
		||||
                gotoxy( X0, Y0 );
 | 
			
		||||
                cprintf( "%s", s1 );
 | 
			
		||||
 | 
			
		||||
		} else {
 | 
			
		||||
			if ( numalp && isdigit(c)  && ls < lmax) {
 | 
			
		||||
				*s++ = c;
 | 
			
		||||
				ls++;
 | 
			
		||||
 | 
			
		||||
				*s = '\0';                              // Cero final
 | 
			
		||||
 | 
			
		||||
                gotoxy( X0, Y0 );
 | 
			
		||||
                for ( i = 0; i < X1; i++ )
 | 
			
		||||
                                         putch( 32 );
 | 
			
		||||
                textcolor( cc );
 | 
			
		||||
                gotoxy( X0, Y0 );
 | 
			
		||||
                cprintf( "%s", s1 );
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
		/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
 | 
			
		||||
		else if( c == 27 ) {*s='\0'; ok = 1; }
 | 
			
		||||
		/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
 | 
			
		||||
		else BEEP();
 | 
			
		||||
	}
 | 
			
		||||
     }
 | 
			
		||||
 | 
			
		||||
  }while(!ok);
 | 
			
		||||
 | 
			
		||||
  _setcursortype( _NOCURSOR );
 | 
			
		||||
 | 
			
		||||
  ok = 1;
 | 
			
		||||
  *s = ' ';
 | 
			
		||||
  while( ok && ls >= 0 ) {
 | 
			
		||||
		if(*s==' ') { *s = '\0'; s--; ls--;
 | 
			
		||||
		} else { s++; ok = 0; }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  *s = '\0';
 | 
			
		||||
 | 
			
		||||
  while(kbhit()) getch();              // Vacia Buffer impidiendo falsas
 | 
			
		||||
					//  pulsaciones...
 | 
			
		||||
 | 
			
		||||
  return ( (Status<<8) + (ls&0x00FF) );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void BEEP(void)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
	sound(440);
 | 
			
		||||
	delay(50);
 | 
			
		||||
	nosound();
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void formatea_u_long( unsigned long Numero, char *Inter_Chg)
 | 
			
		||||
{
 | 
			
		||||
 char Buffer1[80];
 | 
			
		||||
 | 
			
		||||
 int c;
 | 
			
		||||
 | 
			
		||||
 sprintf(Buffer1, "%lu", Numero);
 | 
			
		||||
 | 
			
		||||
 Inter_Chg[0]='\0';
 | 
			
		||||
 | 
			
		||||
 strrev(Buffer1);
 | 
			
		||||
 | 
			
		||||
 c = strlen( Buffer1 );
 | 
			
		||||
 | 
			
		||||
 while( c >= 3 )
 | 
			
		||||
 {
 | 
			
		||||
 | 
			
		||||
    c -= 3;
 | 
			
		||||
    strncat( Inter_Chg, Buffer1, 3);
 | 
			
		||||
 | 
			
		||||
    strrev(Buffer1);
 | 
			
		||||
 | 
			
		||||
    Buffer1[c] = '\0';
 | 
			
		||||
 | 
			
		||||
    strrev(Buffer1);
 | 
			
		||||
 | 
			
		||||
    if(strlen(Buffer1)!=0)
 | 
			
		||||
			strcat( Inter_Chg, "." );
 | 
			
		||||
 }
 | 
			
		||||
 | 
			
		||||
 strcat( Inter_Chg, Buffer1);
 | 
			
		||||
 strrev(Inter_Chg);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*// return Buffer2;*/
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int Optar( int optar, ... )
 | 
			
		||||
{
 | 
			
		||||
struct Boton_Texto BT[6];
 | 
			
		||||
int devolver = 0;
 | 
			
		||||
 | 
			
		||||
BT[0].x = 22; BT[0].y = 15; strcpy( BT[0].Texto, " acep&Tar "); BT[0].ID_T1 = 00; BT[0].ID_T2 = 20;
 | 
			
		||||
BT[1].x = 51; BT[1].y = 15; strcpy( BT[1].Texto, " &Cancelar"); BT[1].ID_T1 = 00; BT[1].ID_T2 = 46;
 | 
			
		||||
 | 
			
		||||
 static char fondo[4096];
 | 
			
		||||
 static char Memoria = 0;
 | 
			
		||||
 | 
			
		||||
 int DEV = 0, ok = 0, linea = 0;
 | 
			
		||||
 int Center; char *buff;
 | 
			
		||||
 | 
			
		||||
 va_list ap;
 | 
			
		||||
 va_start( ap, &optar );
 | 
			
		||||
 | 
			
		||||
 if ( Memoria == 1 )
 | 
			
		||||
 {
 | 
			
		||||
  puttext(  21,  5, 63, 17, (void *)fondo );  Memoria = 0;
 | 
			
		||||
  if ( optar == ENCUADRE ) return DEV;
 | 
			
		||||
 }
 | 
			
		||||
 | 
			
		||||
 Memoria = 1;
 | 
			
		||||
 | 
			
		||||
 gettext( 21,  5,  63, 17, (void *)fondo      );
 | 
			
		||||
 | 
			
		||||
textbackground( BLACK );
 | 
			
		||||
textcolor( CYAN );
 | 
			
		||||
gotoxy( 21,  5 );    cprintf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ");
 | 
			
		||||
gotoxy( 21,  6 );    cprintf("<EFBFBD>                                         <20>");
 | 
			
		||||
gotoxy( 21,  7 );    cprintf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ");
 | 
			
		||||
gotoxy( 21,  8 );    cprintf("<EFBFBD>                                         <20>");
 | 
			
		||||
gotoxy( 21,  9 );    cprintf("<EFBFBD>                                         <20>");
 | 
			
		||||
gotoxy( 21, 10 );    cprintf("<EFBFBD>                                         <20>");
 | 
			
		||||
gotoxy( 21, 11 );    cprintf("<EFBFBD>                                         <20>");
 | 
			
		||||
gotoxy( 21, 12 );    cprintf("<EFBFBD>                                         <20>");
 | 
			
		||||
gotoxy( 21, 13 );    cprintf("<EFBFBD>                                         <20>");
 | 
			
		||||
gotoxy( 21, 14 );    cprintf("<EFBFBD>                                         <20>");
 | 
			
		||||
gotoxy( 21, 15 );    cprintf("<EFBFBD>                                         <20>");
 | 
			
		||||
gotoxy( 21, 16 );    cprintf("<EFBFBD>                                         <20>");
 | 
			
		||||
gotoxy( 21, 17 );    cprintf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   textcolor( RED );
 | 
			
		||||
   linea = 0;
 | 
			
		||||
   while ( (buff = va_arg(ap, char *)) != NULL )
 | 
			
		||||
   {
 | 
			
		||||
     Center = (42 - strlen( buff ) ) / 2;
 | 
			
		||||
     gotoxy( 21+Center+1, ( (linea == 0 ) ? 6 : 8 + linea ) );
 | 
			
		||||
     cprintf( "%s", buff );
 | 
			
		||||
     linea++;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   va_end(ap);
 | 
			
		||||
 | 
			
		||||
   if ( optar != ENCUADRE )
 | 
			
		||||
   {
 | 
			
		||||
    ok = 0;   	       while( kbhit() ) getch();  // Limpiamos posibles teclas en BUFFER
 | 
			
		||||
    if ( optar == 1 )
 | 
			
		||||
    do {
 | 
			
		||||
      switch( Funcion_Botones(STD_BY, 2, BT) )
 | 
			
		||||
      {
 | 
			
		||||
        case  0:				  // No se pulso ningun BOTON
 | 
			
		||||
        case -2:
 | 
			
		||||
        case -1:
 | 
			
		||||
	       while( kbhit() ) getch();  // Limpiamos posibles teclas en BUFFER
 | 
			
		||||
               if ( optar == 0 ) ok = 1;
 | 
			
		||||
	       break;
 | 
			
		||||
        case  1:
 | 
			
		||||
                DEV = 1; ok = 1;
 | 
			
		||||
                break;
 | 
			
		||||
        case  2:
 | 
			
		||||
                DEV = 0; ok = 1;
 | 
			
		||||
                break;
 | 
			
		||||
      }
 | 
			
		||||
    }while( !ok );
 | 
			
		||||
    else { espera_pulsar(); espera_soltar(); }
 | 
			
		||||
 | 
			
		||||
   puttext(  21,  5, 63, 17, (void *)fondo );
 | 
			
		||||
 | 
			
		||||
   Memoria = 0;
 | 
			
		||||
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
 return DEV;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								PRNFILE.OUT
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								PRNFILE.OUT
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user