First commit 07/10/1996
This commit is contained in:
commit
0cb8c5868e
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
|
||||||
|
|
||||||
|
___ ___
|
||||||
|
---__________---
|
||||||
|
___---ùùù ùùù---___
|
||||||
|
---___ Dragonet ___---
|
||||||
|
---__________---
|
||||||
|
|
||||||
|
|
||||||
|
Martes / cambiar por miercoles ( 424 09 84 / Reyes )
|
||||||
|
|
||||||
|
Provedisa
|
||||||
|
|
||||||
|
|
||||||
|
a¤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
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
Ã-| Total Vendido ( 1, 2, 3, ..., 31 )
|
||||||
|
| | /\
|
||||||
|
| | || | Hora 1:
|
||||||
|
| | ³³___/ Hora 2:
|
||||||
|
| | À----\ Hora 3:
|
||||||
|
| | | Hora 4:
|
||||||
|
| | | Hora 5:
|
||||||
|
| | | Hora 6:
|
||||||
|
| |
|
||||||
|
| | Total Ganado ( 1, 2, 3, ..., 31 ) { Descontando Gastos a Vendido }
|
||||||
|
| |
|
||||||
|
| | N§ Tickets, N§ Cambio * 31 dias
|
||||||
|
| | Ú------------------¿
|
||||||
|
| | | 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;
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| \___
|
||||||
|
| Ú------------------¿ Ú------------------¿ Ú------------------¿
|
||||||
|
| | 1, 2, 3, ..., 31 | | 1, 2, 3, ..., 31 | | 1, 2, 3, ..., 31 |
|
||||||
|
À-> Ref. Nombre | Cant. | | Ventas Pv T. | | Ventas PCosto |
|
||||||
|
/\
|
||||||
|
|| | 8 :> 12
|
||||||
|
³³___/ 12 :> 16
|
||||||
|
À----\ 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 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
|
||||||
|
desde: __ hasta __ Cambio: x.xxx ³ Nombre Vendido ³
|
||||||
|
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ Intentos Salir: xxx.xx ³---------------------³
|
||||||
|
³ Ref. Producto T.Unds ³ Salidas Menu P: x ³ ³
|
||||||
|
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³
|
||||||
|
³ ³ ³ 8 : 12 x ³ ³ ³
|
||||||
|
³ ³ ³ 12 : 16 xx ³ ³ ³
|
||||||
|
³ ³ ³ 16 : 20 x.xx ³ ³ ³
|
||||||
|
³ ³ ³ 20 : 24 x ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
|
||||||
|
³ ³ ³ 24 : 4 xx ³
|
||||||
|
³ ³ ³ 4 : 8 x ³ Inicio Caja: XX:XX:xx
|
||||||
|
³ ³ ³--------------------³ Fin Caja: XX:XX:xx
|
||||||
|
³ ³ ³ ToTal Ventas: x.xx ³
|
||||||
|
³ ³ ³ ³
|
||||||
|
³ ³ ³ Gastos: x.xxx ³
|
||||||
|
³ ³ ³--------------------³
|
||||||
|
³ ³ ³ Beneficios: xx.xxx ³
|
||||||
|
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
|
||||||
|
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
|
||||||
|
³ Notas: ³
|
||||||
|
³ ³
|
||||||
|
³ ³
|
||||||
|
³ ³
|
||||||
|
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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 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);
|
||||||
|
|
||||||
|
//ÛÛ
|
||||||
|
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;
|
||||||
|
|
||||||
|
//ÛÛ
|
||||||
|
|
||||||
|
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‚ David Guill‚n || _-ùFuTuRe ViSiOnù-_ || 1996 (c)" );
|
||||||
|
printf( "\nJoshua G¢mez Garcia | Spiral Software || 1996 (c)" );
|
||||||
|
printf( "\n " );
|
||||||
|
printf( "\n e-mail: Jose-David.Guill‚n@cs.us.es " );
|
||||||
|
printf( "\n infomundo@arrakis.es " );
|
||||||
|
printf( "\n " );
|
||||||
|
printf( "\n " );
|
||||||
|
printf( "\n Ü ÜÄÄ Ü Ü ³ ÚÄÄÄ¿ " );
|
||||||
|
printf( "\n Û ÜÄ¿ÛÄÄ ÜÄÄ¿Û\\/Û Ü ÜÄ¿ÜÄ´ ÜÄ¿ ³ þ ³ " );
|
||||||
|
printf( "\n Û Û ³Û Û__³Û Û Û_³ Û ³Û_³ Û_³ ÀßßßÙ " );
|
||||||
|
printf( "\n" );
|
||||||
|
|
||||||
|
|
||||||
|
_setcursortype(_NORMALCURSOR);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int MenuPrincipal(void)
|
||||||
|
{
|
||||||
|
_setcursortype(_NOCURSOR);
|
||||||
|
textcolor( WHITE );
|
||||||
|
textbackground( BLACK );
|
||||||
|
clrscr();
|
||||||
|
|
||||||
|
cprintf(" ÜÄÄÄ Ü \n\r");
|
||||||
|
cprintf(" Û Û \n\r");
|
||||||
|
cprintf(" ÛÄÄÄ ÜÄÄÄ¿ Û ³ ß ÜÄÄÄ¿ ÜÄÄ¿ Û ÚÄÄÜ ÜÄÄ¿ \n\r");
|
||||||
|
cprintf(" Û Û ³ Û ³ Û Û ³ ÜÄÄ´ Û ÀÄÄ¿ ÜÄÄ´ \n\r");
|
||||||
|
cprintf(" ßÄÄÄ ßÄÄÄ´ ßÄÄÄÙ ß ÛÄÄÄÙ ßÄÄÙ ßÄÄÄ ßÄÄÙ ßÄÄÙ \n\r");
|
||||||
|
cprintf(" Å Û \n\r");
|
||||||
|
cprintf(" ³ Û \n\r");
|
||||||
|
cprintf(" \n\r");
|
||||||
|
textcolor( RED );
|
||||||
|
cprintf(" ßÜ ÜÜ \n\r");
|
||||||
|
cprintf(" ßß ßÜ ÛÜ ÜÛ ßßßÛ ß Û ß ÛÜ Û ÛßßÛ ÛßßÛ \n\r");
|
||||||
|
cprintf(" ÜÜßßÜßÜ ß Û ß Û ÜÜÜÛ Û Û Û Û Û Û Û ÜÜ ßÜ \n\r");
|
||||||
|
cprintf(" Ü Ü Û Û ÛÜÜÛ Û ÛÜÜ Û Û Û ÛÜÜÛ ÛÜÜÛ \n\r");
|
||||||
|
cprintf(" ßß ÜÜß \n\r");
|
||||||
|
cprintf(" ÜÜßß \n\r");
|
||||||
|
cprintf(" \n\r");
|
||||||
|
cprintf(" \n\r");
|
||||||
|
cprintf(" \n\r");
|
||||||
|
cprintf(" \n\r");
|
||||||
|
textcolor( LIGHTGRAY );
|
||||||
|
cprintf(" ³ ³ ³\\ ³ ³ ÚÄÄ¿ ÜÜ ÜÜ ÜÜÜ ÜÜÜ Ü |> | _ Å\n\r");
|
||||||
|
cprintf(" ³ ³ ³ \\³ ÚÄÄ´ ³ÄÄÙ Û ß Û ÛÜÛ Û ÛßÛ Ûß ÛßÛ |> () |> ( |-| |\n\r");
|
||||||
|
cprintf(" ÀÄÄ Á Á Á ÀÄÄÙ ÀÄÄÙ ß ß ß ß ß ßßß ß ßßß \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); // ±SALIR±Ü
|
||||||
|
cprintf("ß"); // ßßßßßßß
|
||||||
|
gotoxy(Boton_Texto[nBotones].x+1, Boton_Texto[nBotones].y+1);
|
||||||
|
for(i = 0; i < longitud; i ++ ) // ±±±±±±±Ü
|
||||||
|
cprintf("Ü"); // ßßßßßßß
|
||||||
|
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); //
|
||||||
|
// ±±±±±±±
|
||||||
|
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¢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¢n mickey/pixel */
|
||||||
|
|
||||||
|
ent.x.ax = 7;
|
||||||
|
ent.x.cx = 0;
|
||||||
|
ent.x.dx = 639;
|
||||||
|
int86(0x33, &ent, &sal); /* fija la posici¢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¢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¢n del rat¢n */
|
||||||
|
|
||||||
|
ent.x.ax = 1;
|
||||||
|
int86(0x33, &ent, &sal); /* muestra el puntero del rat¢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¢n y estados del bot¢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¢n y estados del bot¢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¢n: *|
|
||||||
|
|* Edita una cadena en formato gr 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 );
|
||||||
|
|
||||||
|
}
|
||||||
|
/*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ*/
|
||||||
|
else if( c == 27 ) {*s='\0'; ok = 1; }
|
||||||
|
/*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ*/
|
||||||
|
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("ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿");
|
||||||
|
gotoxy( 21, 6 ); cprintf("³ ³");
|
||||||
|
gotoxy( 21, 7 ); cprintf("ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´");
|
||||||
|
gotoxy( 21, 8 ); cprintf("³ ³");
|
||||||
|
gotoxy( 21, 9 ); cprintf("³ ³");
|
||||||
|
gotoxy( 21, 10 ); cprintf("³ ³");
|
||||||
|
gotoxy( 21, 11 ); cprintf("³ ³");
|
||||||
|
gotoxy( 21, 12 ); cprintf("³ ³");
|
||||||
|
gotoxy( 21, 13 ); cprintf("³ ³");
|
||||||
|
gotoxy( 21, 14 ); cprintf("³ ³");
|
||||||
|
gotoxy( 21, 15 ); cprintf("³ ³");
|
||||||
|
gotoxy( 21, 16 ); cprintf("³ ³");
|
||||||
|
gotoxy( 21, 17 ); cprintf("ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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 @@
|
|||||||
|
|
Loading…
x
Reference in New Issue
Block a user