First commit 11/11/1991
This commit is contained in:
commit
8fe25e5bc5
AGENDA.IMG
DATOS
BDATOS.OBJHERMANAS.BAKHERMANAS.DBFHERMANAS.DFBHERMANAS.TXTHERMANOS.BAKHERMANOS.DBFHERMANOS.DFBHERMANOS.TXTHNAS_BRR.BAKHNAS_BRR.DBFHNOS_BRR.BAKHNOS_BRR.DBFMBD2DBF.BAKMBD2DBF.CPPMBD2DBF.DFBMBD2DBF.OBJMDB2DBF.DSKMDB2DBF.EXEMDB2DBF.PRJ
EGAVGA.BGITODOS
FOTOS
HERM.EXEHERM.HHERM.ICOHERM.IMGHERM.PRJHERMANDA.CFGHERM_CFG.CPPHERM_GST.CPPHERM_IGA.CPPHERM_LST.CPPHERM_MM.CPPHERM_UTL.CPPINSIGNIA.BMPINSIGNIA.PCXLITT.CHRMENUS.CPPORDENA.CP.EXER.BATREADME.mdSUPERVGA.OBJ
361
AGENDA.IMG
Normal file
361
AGENDA.IMG
Normal file
@ -0,0 +1,361 @@
|
|||||||
|
** Codigo fuente para MAKE_BOTON
|
||||||
|
**
|
||||||
|
** Make BOTON es un programa realizado por Jos‚ David Guill‚n
|
||||||
|
**
|
||||||
|
** Enlazar al programa principal con MB2CPP, y compilar a OBJ para Linkar
|
||||||
|
**
|
||||||
|
**
|
||||||
|
** MAKE_BOTON es un producto de JD. -->>> 5.000 Libreria exelente para
|
||||||
|
** tratamiento de botones y grf.
|
||||||
|
** ONDA_GRN es un producto de JD. --->>> 5.000 Le gustaria representar ondas
|
||||||
|
** sonoras con facilidad: ONDA_GRN
|
||||||
|
** UTILIZADO EN FREC_OSC !!!
|
||||||
|
**
|
||||||
|
|
||||||
|
|
||||||
|
*****************************************************************************
|
||||||
|
*
|
||||||
|
* ATENCION !!!
|
||||||
|
* ALTERAR ESTE FICHERO, CAUSARA EL MALFUNCIONAMIENTO DEL
|
||||||
|
* PROGRAMA DE APOYO... ( ERRORES NO DOCUMENTADOS )
|
||||||
|
*
|
||||||
|
*****************************************************************************
|
||||||
|
|
||||||
|
#4
|
||||||
|
|
||||||
|
!1,37
|
||||||
|
|
||||||
|
1
|
||||||
|
* Fondo Total
|
||||||
|
& 0, 0, 639, 479, 7, 56, 63, 0, 2
|
||||||
|
* Cuadro de titulo
|
||||||
|
& 5, 5, 300, 25, 7, 63, 56, 0, 2
|
||||||
|
| 5, 5, 2, 6, 0, 1, Registro General de Hermanos,
|
||||||
|
|
||||||
|
* Linea de fondo para ayudas
|
||||||
|
& 5, 455, 500, 475, 0, 63, 56, 0, 2
|
||||||
|
& 505, 455, 635, 475, 63, 0, 56, 0, 2
|
||||||
|
|
||||||
|
|
||||||
|
$ 605, 5, 635, 25, 7, 63, 56, 0, 2, 000, 079
|
||||||
|
*| 609, 7, 2, 5, 0, 1, >,
|
||||||
|
$ 570, 5, 600, 25, 7, 63, 56, 0, 2, 000, 081
|
||||||
|
*| 574, 7, 2, 5, 0, 1, >>,
|
||||||
|
$ 535, 5, 565, 25, 7, 63, 56, 0, 2, 000, 073
|
||||||
|
*| 539, 7, 2, 5, 0, 1, <<,
|
||||||
|
$ 500, 5, 530, 25, 7, 63, 56, 0, 2, 000, 071
|
||||||
|
*| 504, 7, 2, 5, 0, 1, <,
|
||||||
|
|
||||||
|
$ 500, 30, 565, 50, 7, 63, 56, 0, 2, 000, 000
|
||||||
|
$ 570, 30, 635, 50, 7, 63, 56, 0, 2, 000, 000
|
||||||
|
|
||||||
|
| 10, 55, 2, 5, 0, 1, N£mero de Hermano,
|
||||||
|
$ 150, 53, 300, 72, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 80, 2, 5, 0, 1, Nombre,
|
||||||
|
$ 150, 78, 300, 97, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 105, 2, 5, 0, 1, Primer Apellido,
|
||||||
|
$ 150, 103, 300, 122, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 320, 105, 2, 5, 0, 1, Segundo Apellido,
|
||||||
|
$ 480, 103, 630, 122, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 130, 2, 5, 0, 1, Direcci¢n,
|
||||||
|
$ 150, 128, 390, 147, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 390, 130, 2, 5, 0, 1, N§,
|
||||||
|
$ 425, 128, 460, 147, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 460, 130, 2, 5, 0, 1, Piso,
|
||||||
|
$ 530, 128, 630, 147, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
|
||||||
|
| 10, 155, 2, 5, 0, 1, C.P.,
|
||||||
|
$ 60, 153, 140, 172, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 150, 155, 2, 5, 0, 1, Poblaci¢n,
|
||||||
|
$ 230, 153, 390, 172, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 400, 155, 2, 5, 0, 1, Provincia,
|
||||||
|
$ 480, 153, 630, 172, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
|
||||||
|
* Cuadro para enmarcar FN, Ant, R, UP, P
|
||||||
|
& 10, 180, 300, 305, 7, 56, 63, 1, 1
|
||||||
|
|
||||||
|
| 10, 185, 2, 5, 0, 1, Fecha de Nacimiento,
|
||||||
|
$ 170, 183, 290, 202, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 210, 2, 5, 0, 1, Antig<69>edad,
|
||||||
|
$ 170, 208, 290, 227, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 235, 2, 5, 0, 1, Reserva,
|
||||||
|
$ 271, 233, 290, 252, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 260, 2, 5, 0, 1, Posici¢n,
|
||||||
|
$ 150, 258, 290, 277, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 285, 2, 5, 0, 1, Insignia,
|
||||||
|
$ 150, 283, 290, 302, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
|
||||||
|
|
||||||
|
| 400, 185, 2, 5, 0, 1, Tel‚fono 1,
|
||||||
|
$ 480, 183, 630, 202, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 400, 210, 2, 5, 0, 1, Tel‚fono 2,
|
||||||
|
$ 480, 208, 630, 227, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
|
||||||
|
* Cuadro para englobar todo lo de abajo
|
||||||
|
& 360, 230, 630, 305, 7, 56, 63, 1, 1
|
||||||
|
|
||||||
|
| 400, 230, 2, 5, 0, 1, ¨Realiza la est. de penitencia?,
|
||||||
|
$ 380, 232, 390, 242, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 400, 241, 2, 5, 0, 1, ¨Acogido a cuota familiar?,
|
||||||
|
$ 380, 243, 390, 253, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 400, 252, 2, 5, 0, 1, ¨Tiene posibilidad de votar?,
|
||||||
|
$ 380, 254, 390, 264, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 400, 263, 2, 5, 0, 1, ¨Recibe notificaciones?,
|
||||||
|
$ 380, 265, 390, 275, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 400, 274, 2, 5, 0, 1, ¨Posee tunica Hdad? -->,
|
||||||
|
$ 380, 276, 390, 286, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
*Numero de tunica
|
||||||
|
$ 580, 268, 625, 288, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
|
||||||
|
| 400, 285, 2, 5, 0, 1, ¨ Cristo ? ¨ Virgen ?,
|
||||||
|
$ 380, 287, 390, 297, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
$ 520, 287, 530, 297, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
|
||||||
|
* Cuadro para un comentario
|
||||||
|
& 200, 310, 635, 325, 7, 56, 63, 1, 1
|
||||||
|
| 10, 310, 2, 5, 0, 1, Comentario,
|
||||||
|
$ 200, 325, 635, 450, 63, 56, 0, 1, 1, 000, 000
|
||||||
|
|
||||||
|
* Cuadro de Foto
|
||||||
|
& 320, 5, 400, 100, 0, 63, 56, 0, 2
|
||||||
|
|
||||||
|
* Botones Busqueda hacia atras BUSCAR delante
|
||||||
|
$ 500, 55, 540, 75, 7, 63, 56, 0, 2, 000, 082
|
||||||
|
$ 545, 55, 590, 75, 7, 63, 56, 0, 2, 000, 048
|
||||||
|
$ 595, 55, 635, 75, 7, 63, 56, 0, 2, 000, 083
|
||||||
|
|
||||||
|
* Lo de Registro general de hermanos sive para Imprimi la ficha tambien
|
||||||
|
$ 5, 5, 300, 25, 7, 63, 56, 0, 2, 000, 000
|
||||||
|
* Papeletas de sitio
|
||||||
|
$ 475, 5, 495, 75, 7, 63, 56, 0, 2, 000, 000
|
||||||
|
|
||||||
|
2
|
||||||
|
| 5, 5, 2, 6, 0, 1, Registro General de Hermanos,
|
||||||
|
* Titulos de los botones
|
||||||
|
| 477, 5, 2, 5, 1, 1, Papeleta,
|
||||||
|
| 609, 7, 2, 5, 0, 1, >,
|
||||||
|
| 574, 7, 2, 5, 0, 1, >>,
|
||||||
|
| 539, 7, 2, 5, 0, 1, <<,
|
||||||
|
| 504, 7, 2, 5, 0, 1, <,
|
||||||
|
| 572, 32, 2, 5, 0, 1, F2 Menu,
|
||||||
|
| 504, 57, 2, 5, 0, 1, <-,
|
||||||
|
| 547, 57, 2, 4, 0, 1, BUSCAR,
|
||||||
|
| 547, 58, 2, 4, 0, 1, _,
|
||||||
|
| 597, 57, 2, 5, 0, 1, ->,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* Menu Principal
|
||||||
|
10
|
||||||
|
* Fondo Total
|
||||||
|
& 0, 0, 639, 479, 7, 56, 63, 0, 2
|
||||||
|
* Cuadro de titulo
|
||||||
|
& 5, 5, 635, 30, 7, 63, 56, 0, 2
|
||||||
|
| 5, 120, 0, 1, 0, 0, Fervorosa e Ilustre Hermandad y Cofradia de Nazarenos de,
|
||||||
|
| 5, 160, 0, 1, 0, 0, Ntro. Padre Jesus de la Oracion en el Huerto de Getsemani,
|
||||||
|
| 5, 200, 0, 1, 0, 0, Maria Santisima del Rosario en sus Misterios Dolorosos y San Juan Bosco,
|
||||||
|
|
||||||
|
| 6, 121, 0, 1, 0, 63, Fervorosa e Ilustre Hermandad y Cofradia de Nazarenos de,
|
||||||
|
| 6, 161, 0, 1, 0, 63, Ntro. Padre Jesus de la Oracion en el Huerto de Getsemani,
|
||||||
|
| 6, 201, 0, 1, 0, 63, Maria Santisima del Rosario en sus Misterios Dolorosos y San Juan Bosco,
|
||||||
|
|
||||||
|
| 5, 7, 2, 6, 0, 1, Archivo Hermanos Hermanas Listados Ayuda,
|
||||||
|
|
||||||
|
20
|
||||||
|
& 170, 165, 470, 315, 7, 63, 56, 0, 2
|
||||||
|
& 172, 167, 468, 190, 1, 56, 63, 0, 2
|
||||||
|
|
||||||
|
21
|
||||||
|
& 170, 165, 470, 270, 7, 63, 56, 0, 2
|
||||||
|
& 172, 167, 468, 190, 1, 56, 63, 0, 2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
|
||||||
|
* Û Û
|
||||||
|
* Û Casilla de pregunta ( OPTAR por.... ACEPTAR CANCELAR Û
|
||||||
|
* Û Û
|
||||||
|
* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
|
||||||
|
|
||||||
|
100
|
||||||
|
& 200, 212, 440, 267, 7, 56, 63, 2, 1
|
||||||
|
& 205, 217, 435, 262, 7, 63, 56, -2, 1
|
||||||
|
|
||||||
|
* Boton Aceptar
|
||||||
|
& 200, 270, 280, 295, 7, 63, 56, 2, 1
|
||||||
|
* Boton Cancelar
|
||||||
|
& 360, 270, 440, 295, 7, 63, 56, 2, 1
|
||||||
|
|
||||||
|
101
|
||||||
|
| 200, 274, 2, 5, 0, 63, Aceptar,
|
||||||
|
| 201, 275, 2, 5, 0, 0, Aceptar,
|
||||||
|
| 200, 274, 2, 5, 0, 14, A,
|
||||||
|
| 201, 275, 2, 5, 0, 0, A,
|
||||||
|
|
||||||
|
|
||||||
|
| 340, 274, 2, 5, 0, 63, Cancelar,
|
||||||
|
| 341, 275, 2, 5, 0, 0, Cancelar,
|
||||||
|
| 340, 274, 2, 5, 0, 14, C,
|
||||||
|
| 341, 275, 2, 5, 0, 0, C,
|
||||||
|
|
||||||
|
|
||||||
|
!2, 2
|
||||||
|
* Boton Aceptar
|
||||||
|
$ 204, 274, 276, 291, 7, 56, 63, -2, 1, 00, 30
|
||||||
|
* Boton Cancelar
|
||||||
|
$ 364, 274, 436, 291, 7, 56, 63, -2, 1, 00, 46
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
** Esto es para cuando se va a ordenar
|
||||||
|
|
||||||
|
3
|
||||||
|
& 170, 165, 470, 315, 7, 63, 56, 0, 2
|
||||||
|
& 172, 167, 468, 190, 1, 56, 63, 0, 2
|
||||||
|
|
||||||
|
!3, 10
|
||||||
|
$ 172, 200, 316, 220, 7, 56, 63, 0, 2, 000, 049
|
||||||
|
$ 172, 222, 316, 242, 7, 56, 63, 0, 2, 000, 024
|
||||||
|
$ 172, 244, 316, 264, 7, 56, 63, 0, 2, 000, 025
|
||||||
|
$ 172, 266, 316, 286, 7, 56, 63, 0, 2, 000, 032
|
||||||
|
$ 172, 288, 316, 308, 7, 56, 63, 0, 2, 000, 048
|
||||||
|
|
||||||
|
$ 324, 200, 468, 220, 7, 56, 63, 0, 2, 000, 047
|
||||||
|
$ 324, 222, 468, 242, 7, 56, 63, 0, 2, 000, 033
|
||||||
|
$ 324, 244, 468, 264, 7, 56, 63, 0, 2, 000, 030
|
||||||
|
$ 324, 266, 468, 286, 7, 56, 63, 0, 2, 000, 023
|
||||||
|
$ 324, 288, 468, 308, 7, 56, 63, 0, 2, 000, 046
|
||||||
|
|
||||||
|
4
|
||||||
|
| 172, 167, 2, 6, 0, 63, Elija como ordenar:,
|
||||||
|
|
||||||
|
| 172, 200, 2, 5, 0, 63, Numero de Hno,
|
||||||
|
| 172, 202, 2, 5, 0, 0, _,
|
||||||
|
| 172, 222, 2, 5, 0, 63, Nombre,
|
||||||
|
| 172, 224, 2, 5, 0, 0, _,
|
||||||
|
| 172, 244, 2, 5, 0, 63, Primer Apellido,
|
||||||
|
| 172, 246, 2, 5, 0, 0, _,
|
||||||
|
| 172, 266, 2, 5, 0, 63, Direccion,
|
||||||
|
| 172, 268, 2, 5, 0, 0, _,
|
||||||
|
| 172, 288, 2, 5, 0, 63, Poblacion,
|
||||||
|
| 172, 290, 2, 5, 0, 0, _,
|
||||||
|
|
||||||
|
| 324, 200, 2, 5, 0, 63, Provincia,
|
||||||
|
| 324, 202, 2, 5, 0, 0, _,
|
||||||
|
| 324, 222, 2, 5, 0, 63, Fecha Nacimiento,
|
||||||
|
| 324, 224, 2, 5, 0, 0, _,
|
||||||
|
| 324, 244, 2, 5, 0, 63, Antiguedad,
|
||||||
|
| 324, 246, 2, 5, 0, 0, _,
|
||||||
|
| 324, 266, 2, 5, 0, 63, Insignia,
|
||||||
|
| 324, 268, 2, 5, 0, 0, _,
|
||||||
|
| 320, 288, 2, 5, 0, 63, CANCELAR OPERACION,
|
||||||
|
| 320, 290, 2, 5, 0, 0, _,
|
||||||
|
|
||||||
|
5
|
||||||
|
& 170, 165, 470, 315, 7, 63, 56, 0, 2
|
||||||
|
& 172, 167, 468, 190, 1, 56, 63, 0, 2
|
||||||
|
| 172, 167, 2, 6, 0, 63, Reordenando Base...,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
50
|
||||||
|
* Fondo Total
|
||||||
|
& 0, 0, 639, 479, 7, 56, 63, 0, 2
|
||||||
|
* Cuadro de titulo
|
||||||
|
& 5, 5, 300, 25, 7, 63, 56, 0, 2
|
||||||
|
| 5, 5, 2, 6, 0, 1, Registro de Insignias,
|
||||||
|
|
||||||
|
& 10, 45, 315, 63, 7, 63, 56, 0, 2
|
||||||
|
| 15, 45, 2, 6, 0, 1, Insignias Cristo Suplemento,
|
||||||
|
& 325, 45, 630, 63, 7, 63, 56, 0, 2
|
||||||
|
| 340, 45, 2, 6, 0, 1, Insignias Virgen Suplemento,
|
||||||
|
|
||||||
|
|
||||||
|
& 10, 65, 315, 450, 63, 0, 56, 0, 2
|
||||||
|
& 325, 65, 630, 450, 63, 0, 56, 0, 2
|
||||||
|
|
||||||
|
*| 15, 70, 2, 6, 0, 1, MMMMMMMMMMMMMMM,
|
||||||
|
*| 15, 90, 2, 6, 0, 1, MMMMMMMMMMMMMMM,
|
||||||
|
|
||||||
|
* Linea de fondo para ayudas
|
||||||
|
& 5, 455, 500, 475, 0, 63, 56, 0, 2
|
||||||
|
& 505, 455, 635, 475, 63, 0, 56, 0, 2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
60
|
||||||
|
* Fondo Total
|
||||||
|
& 0, 0, 639, 479, 7, 56, 63, 0, 2
|
||||||
|
* Cuadro de titulo
|
||||||
|
& 5, 5, 300, 25, 7, 63, 56, 0, 2
|
||||||
|
| 5, 5, 2, 6, 0, 1, Listado de Hnos:,
|
||||||
|
|
||||||
|
& 10, 65, 635, 450, 63, 0, 56, 0, 2
|
||||||
|
& 10, 45, 635, 63, 7, 63, 56, 0, 2
|
||||||
|
|
||||||
|
* Linea de fondo para ayudas
|
||||||
|
& 5, 455, 500, 475, 0, 63, 56, 0, 2
|
||||||
|
& 505, 455, 635, 475, 63, 0, 56, 0, 2
|
||||||
|
|
||||||
|
& 500, 5, 540, 25, 7, 63, 56, 0, 2, 000, 082
|
||||||
|
& 545, 5, 590, 25, 7, 63, 56, 0, 2, 000, 048
|
||||||
|
& 595, 5, 635, 25, 7, 63, 56, 0, 2, 000, 083
|
||||||
|
| 504, 7, 2, 5, 0, 1, <-,
|
||||||
|
| 547, 7, 2, 4, 0, 1, Imprimir,
|
||||||
|
| 547, 8, 2, 4, 0, 1, _,
|
||||||
|
| 597, 7, 2, 5, 0, 1, ->,
|
||||||
|
|
||||||
|
|
||||||
|
!4, 3
|
||||||
|
* Botones Busqueda hacia atras BUSCAR delante
|
||||||
|
$ 500, 5, 540, 25, 7, 63, 56, 0, 2, 000, 082
|
||||||
|
$ 545, 5, 590, 25, 7, 63, 56, 0, 2, 000, 048
|
||||||
|
$ 595, 5, 635, 25, 7, 63, 56, 0, 2, 000, 083
|
||||||
|
|
||||||
|
|
||||||
|
70
|
||||||
|
* Fondo Total
|
||||||
|
& 0, 0, 639, 479, 7, 56, 63, 0, 2
|
||||||
|
* Cuadro de titulo
|
||||||
|
& 5, 5, 300, 25, 7, 63, 56, 0, 2
|
||||||
|
| 5, 5, 2, 6, 0, 1, Configuraci¢n Global,
|
||||||
|
|
||||||
|
|
||||||
|
& 270, 60, 350, 78, 63, 7, 56, 0, 2
|
||||||
|
| 5, 60, 2, 6, 0, 1, Ultimo n£mero de Hermano:,
|
||||||
|
& 270, 80, 350, 98, 63, 7, 56, 0, 2
|
||||||
|
| 5, 80, 2, 6, 0, 1, Ultimo n£mero de Hermana:,
|
||||||
|
& 270, 100, 350, 118, 63, 7, 56, 0, 2
|
||||||
|
| 5, 100, 2, 6, 0, 1, Meses a guardar n§ hno/a:,
|
||||||
|
|
||||||
|
& 380, 95, 630, 125, 7, 63, 56, 0, 2
|
||||||
|
| 390, 100, 2, 6, 0, 1, Purgar hno/as eliminados,
|
||||||
|
|
||||||
|
& 270, 150, 400, 168, 63, 7, 56, 0, 2
|
||||||
|
| 5, 150, 2, 6, 0, 1, Imprimir normal (HEX): ,
|
||||||
|
& 270, 170, 400, 188, 63, 7, 56, 0, 2
|
||||||
|
| 5, 170, 2, 6, 0, 1, Imprimir comprimido (HEX):,
|
||||||
|
& 270, 190, 350, 208, 63, 7, 56, 0, 2
|
||||||
|
| 5, 190, 2, 6, 0, 1, Numero de lineas:,
|
||||||
|
& 270, 220, 350, 238, 63, 7, 56, 0, 2
|
||||||
|
| 5, 220, 2, 6, 0, 1, Cuota base: Cuota familiar:,
|
||||||
|
& 550, 220, 630, 238, 63, 7, 56, 0, 2
|
||||||
|
|
||||||
|
& 15, 315, 345, 350, 7, 63, 56, 0, 2
|
||||||
|
| 5, 320, 2, 6, 0, 1, Reinicializar papeletas de sitio,
|
||||||
|
|
||||||
|
|
||||||
|
11
|
||||||
|
|
||||||
|
& 170, 165, 470, 315, 7, 63, 56, 0, 2
|
||||||
|
& 172, 167, 468, 190, 1, 56, 63, 0, 2
|
||||||
|
| 175, 220, 2, 6, 0, 1, Ficha inicial:,
|
||||||
|
& 320, 220, 460, 240, 63, 56, 7, 0, 2
|
||||||
|
| 175, 260, 2, 6, 0, 1, Ficha final:,
|
||||||
|
& 320, 260, 460, 280, 63, 56, 7, 0, 2
|
BIN
DATOS/BDATOS.OBJ
Normal file
BIN
DATOS/BDATOS.OBJ
Normal file
Binary file not shown.
BIN
DATOS/HERMANAS.BAK
Normal file
BIN
DATOS/HERMANAS.BAK
Normal file
Binary file not shown.
BIN
DATOS/HERMANAS.DBF
Normal file
BIN
DATOS/HERMANAS.DBF
Normal file
Binary file not shown.
BIN
DATOS/HERMANAS.DFB
Normal file
BIN
DATOS/HERMANAS.DFB
Normal file
Binary file not shown.
8862
DATOS/HERMANAS.TXT
Normal file
8862
DATOS/HERMANAS.TXT
Normal file
File diff suppressed because it is too large
Load Diff
BIN
DATOS/HERMANOS.BAK
Normal file
BIN
DATOS/HERMANOS.BAK
Normal file
Binary file not shown.
BIN
DATOS/HERMANOS.DBF
Normal file
BIN
DATOS/HERMANOS.DBF
Normal file
Binary file not shown.
BIN
DATOS/HERMANOS.DFB
Normal file
BIN
DATOS/HERMANOS.DFB
Normal file
Binary file not shown.
13363
DATOS/HERMANOS.TXT
Normal file
13363
DATOS/HERMANOS.TXT
Normal file
File diff suppressed because it is too large
Load Diff
BIN
DATOS/HNAS_BRR.BAK
Normal file
BIN
DATOS/HNAS_BRR.BAK
Normal file
Binary file not shown.
BIN
DATOS/HNAS_BRR.DBF
Normal file
BIN
DATOS/HNAS_BRR.DBF
Normal file
Binary file not shown.
BIN
DATOS/HNOS_BRR.BAK
Normal file
BIN
DATOS/HNOS_BRR.BAK
Normal file
Binary file not shown.
BIN
DATOS/HNOS_BRR.DBF
Normal file
BIN
DATOS/HNOS_BRR.DBF
Normal file
Binary file not shown.
269
DATOS/MBD2DBF.BAK
Normal file
269
DATOS/MBD2DBF.BAK
Normal file
@ -0,0 +1,269 @@
|
|||||||
|
|
||||||
|
#include <conio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "..\herm.h"
|
||||||
|
#include "..\..\libs\bdatos\bdatos.hh"
|
||||||
|
|
||||||
|
HermStruct Hermanos;
|
||||||
|
BDatos Dbf;
|
||||||
|
void RellenaStructura(FILE *file);
|
||||||
|
void obten_linea(FILE *file, char *buf);
|
||||||
|
|
||||||
|
void PreparaNuevoRegistro(void);
|
||||||
|
|
||||||
|
void main( void )
|
||||||
|
{
|
||||||
|
long registro = 0;
|
||||||
|
FILE *origen;
|
||||||
|
|
||||||
|
printf( "\nConvertidor de fichero: PROCESANDO..." );
|
||||||
|
|
||||||
|
|
||||||
|
if ( (origen = fopen( "hermanas.txt", "r" ) ) != NULL )
|
||||||
|
{
|
||||||
|
Dbf.AbrirReg( "hermanas.dbf", sizeof( HermStruct ) );
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
RellenaStructura(origen);
|
||||||
|
// La estructura ya esta cargada, asi que....
|
||||||
|
Dbf.InsReg( (void *)&Hermanos, Dbf.Registros(), ARRIBA );
|
||||||
|
registro++;
|
||||||
|
gotoxy( 1,1 ); printf( "%ld", registro );
|
||||||
|
}while( !feof(origen) );
|
||||||
|
|
||||||
|
Dbf.CerrarReg();
|
||||||
|
fclose( origen );
|
||||||
|
} else
|
||||||
|
printf( "\nError abriendo el origen" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void RellenaStructura(FILE *file)
|
||||||
|
{
|
||||||
|
char buffer[250];
|
||||||
|
// este es el orden del archivo:
|
||||||
|
|
||||||
|
|
||||||
|
PreparaNuevoRegistro();
|
||||||
|
|
||||||
|
// Numero
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
Hermanos.NHno = atol( buffer );
|
||||||
|
// printf("\nNumero: %s", buffer );
|
||||||
|
|
||||||
|
// Nombre
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Nombre, buffer, 15 );
|
||||||
|
Hermanos.Nombre[16] = '\0';
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
|
||||||
|
|
||||||
|
// Apellido1
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Apellido1, buffer, 15 );
|
||||||
|
Hermanos.Apellido1[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Apellido2
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Apellido2, buffer, 15 );
|
||||||
|
Hermanos.Apellido2[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Direcci¢n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy ( Hermanos.Direccion, buffer, 30 );
|
||||||
|
Hermanos.Direccion[30] = '\0';
|
||||||
|
sprintf( Hermanos.Num, "" );
|
||||||
|
sprintf( Hermanos.Piso, "" );
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// CP
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
Hermanos.CodP = atol ( buffer );
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Poblaci¢n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Poblacion, buffer, 15 );
|
||||||
|
Hermanos.Poblacion[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Provincia
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Provincia, buffer, 15 );
|
||||||
|
Hermanos.Provincia[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Telefono1
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Telefono1, buffer, 15 );
|
||||||
|
Hermanos.Telefono1[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Telefono2
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Telefono2, buffer, 15 );
|
||||||
|
Hermanos.Telefono2[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Antig<69>edad
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] != '0' )
|
||||||
|
{
|
||||||
|
Hermanos.Antig.da_year = (buffer[0]-'0')*1000 + (buffer[1]-'0')*100 + (buffer[2]-'0')*10 + (buffer[3]-'0');
|
||||||
|
Hermanos.Antig.da_mon = (buffer[5]-'0')*10 + (buffer[6]-'0');
|
||||||
|
Hermanos.Antig.da_day = (buffer[8]-'0')*10 + (buffer[9]-'0');
|
||||||
|
}
|
||||||
|
|
||||||
|
// a¤o-mes-dia
|
||||||
|
// sprintf( Hermanos.Nombre, "%15s", buffer );
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Fecha de nacimiento
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
// sprintf( Hermanos.Nombre, "%15s", buffer );
|
||||||
|
if ( buffer[0] != '0' )
|
||||||
|
{
|
||||||
|
Hermanos.FechaN.da_year = (buffer[0]-'0')*1000 + (buffer[1]-'0')*100 + (buffer[2]-'0')*10 + (buffer[3]-'0');
|
||||||
|
Hermanos.FechaN.da_mon = (buffer[5]-'0')*10 + (buffer[6]-'0');
|
||||||
|
Hermanos.FechaN.da_day = (buffer[8]-'0')*10 + (buffer[9]-'0');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Reserva
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] == '1' )
|
||||||
|
Hermanos.Varios.Reserva = 1;
|
||||||
|
else
|
||||||
|
Hermanos.Varios.Reserva = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Ultima posici¢n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
strncpy( Hermanos.Posicion, buffer, 15 );
|
||||||
|
Hermanos.Posicion[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Posici¢n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
Hermanos.Insignia = 0;
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Cuota familiar
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] == '1' )
|
||||||
|
Hermanos.Varios.CuotaFam = 1;
|
||||||
|
else
|
||||||
|
Hermanos.Varios.CuotaFam = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Bolet¡n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] == '1' )
|
||||||
|
Hermanos.Varios.Notific = 1;
|
||||||
|
else
|
||||||
|
Hermanos.Varios.Notific = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Vota
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] == '1' )
|
||||||
|
Hermanos.Varios.PuedVotar = 1;
|
||||||
|
else
|
||||||
|
Hermanos.Varios.PuedVotar = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Sexo
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
|
||||||
|
// Salto de Linea
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void obten_linea(FILE *file, char *buf)
|
||||||
|
{
|
||||||
|
int c;
|
||||||
|
|
||||||
|
char *buffer;
|
||||||
|
|
||||||
|
buffer = buf;
|
||||||
|
|
||||||
|
*buffer = '\0';
|
||||||
|
|
||||||
|
// mientras no sea un salto de linea
|
||||||
|
while ( ( c = fgetc(file) ) != '\n' && c != EOF )
|
||||||
|
*(buffer++) = (char)c;
|
||||||
|
|
||||||
|
*(buffer++) = '\0';
|
||||||
|
};
|
||||||
|
|
||||||
|
void PreparaNuevoRegistro(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Hermanos.NHno = 0;
|
||||||
|
|
||||||
|
strcpy( Hermanos.Nombre, "" );
|
||||||
|
strcpy( Hermanos.Apellido1, "" );
|
||||||
|
strcpy( Hermanos.Apellido2, "" );
|
||||||
|
strcpy( Hermanos.Direccion, "" );
|
||||||
|
strcpy( Hermanos.Num, "" );
|
||||||
|
strcpy( Hermanos.Piso, "" );
|
||||||
|
|
||||||
|
Hermanos.CodP = 0;
|
||||||
|
|
||||||
|
strcpy( Hermanos.Poblacion, "" );
|
||||||
|
strcpy( Hermanos.Provincia, "" );
|
||||||
|
|
||||||
|
Hermanos.FechaN.da_day = 0;
|
||||||
|
Hermanos.FechaN.da_mon = 0;
|
||||||
|
Hermanos.FechaN.da_year = 0;
|
||||||
|
|
||||||
|
Hermanos.Antig.da_day = 0;
|
||||||
|
Hermanos.Antig.da_mon = 0;
|
||||||
|
Hermanos.Antig.da_year = 0;
|
||||||
|
|
||||||
|
Hermanos.Varios.Reserva = 0;
|
||||||
|
|
||||||
|
strcpy( Hermanos.Posicion, "" );
|
||||||
|
|
||||||
|
Hermanos.Insignia = 0;
|
||||||
|
|
||||||
|
strcpy( Hermanos.Telefono1, "" );
|
||||||
|
strcpy( Hermanos.Telefono2, "" );
|
||||||
|
|
||||||
|
Hermanos.Varios.CuotaFam = 0;
|
||||||
|
Hermanos.Varios.Notific = 0;
|
||||||
|
Hermanos.Varios.PuedVotar = 0;
|
||||||
|
Hermanos.Varios.RealPenit = 0;
|
||||||
|
Hermanos.Varios.TunicaHd = 0;
|
||||||
|
Hermanos.Varios.CtoVirgen = 0;
|
||||||
|
|
||||||
|
// Aqui vaciamos el comentario
|
||||||
|
for ( i=0; i<6; i++ )
|
||||||
|
strcpy( Hermanos.Comentario[i], "" );
|
||||||
|
|
||||||
|
|
||||||
|
}
|
269
DATOS/MBD2DBF.CPP
Normal file
269
DATOS/MBD2DBF.CPP
Normal file
@ -0,0 +1,269 @@
|
|||||||
|
|
||||||
|
#include <conio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "..\herm.h"
|
||||||
|
#include "..\..\libs\bdatos\bdatos.hh"
|
||||||
|
|
||||||
|
HermStruct Hermanos;
|
||||||
|
BDatos Dbf;
|
||||||
|
void RellenaStructura(FILE *file);
|
||||||
|
void obten_linea(FILE *file, char *buf);
|
||||||
|
|
||||||
|
void PreparaNuevoRegistro(void);
|
||||||
|
|
||||||
|
void main( void )
|
||||||
|
{
|
||||||
|
long registro = 0;
|
||||||
|
FILE *origen;
|
||||||
|
|
||||||
|
printf( "\nConvertidor de fichero: PROCESANDO..." );
|
||||||
|
|
||||||
|
|
||||||
|
if ( (origen = fopen( "hermanos.txt", "r" ) ) != NULL )
|
||||||
|
{
|
||||||
|
Dbf.AbrirReg( "hermanos.dbf", sizeof( HermStruct ) );
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
RellenaStructura(origen);
|
||||||
|
// La estructura ya esta cargada, asi que....
|
||||||
|
Dbf.InsReg( (void *)&Hermanos, Dbf.Registros(), ARRIBA );
|
||||||
|
registro++;
|
||||||
|
gotoxy( 1,1 ); printf( "%ld", registro );
|
||||||
|
}while( !feof(origen) );
|
||||||
|
|
||||||
|
Dbf.CerrarReg();
|
||||||
|
fclose( origen );
|
||||||
|
} else
|
||||||
|
printf( "\nError abriendo el origen" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void RellenaStructura(FILE *file)
|
||||||
|
{
|
||||||
|
char buffer[250];
|
||||||
|
// este es el orden del archivo:
|
||||||
|
|
||||||
|
|
||||||
|
PreparaNuevoRegistro();
|
||||||
|
|
||||||
|
// Numero
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
Hermanos.NHno = atol( buffer );
|
||||||
|
// printf("\nNumero: %s", buffer );
|
||||||
|
|
||||||
|
// Nombre
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Nombre, buffer, 15 );
|
||||||
|
Hermanos.Nombre[16] = '\0';
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
|
||||||
|
|
||||||
|
// Apellido1
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Apellido1, buffer, 15 );
|
||||||
|
Hermanos.Apellido1[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Apellido2
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Apellido2, buffer, 15 );
|
||||||
|
Hermanos.Apellido2[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Direcci¢n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy ( Hermanos.Direccion, buffer, 30 );
|
||||||
|
Hermanos.Direccion[30] = '\0';
|
||||||
|
sprintf( Hermanos.Num, "" );
|
||||||
|
sprintf( Hermanos.Piso, "" );
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// CP
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
Hermanos.CodP = atol ( buffer );
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Poblaci¢n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Poblacion, buffer, 15 );
|
||||||
|
Hermanos.Poblacion[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Provincia
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Provincia, buffer, 15 );
|
||||||
|
Hermanos.Provincia[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Telefono1
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Telefono1, buffer, 15 );
|
||||||
|
Hermanos.Telefono1[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Telefono2
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Telefono2, buffer, 15 );
|
||||||
|
Hermanos.Telefono2[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Antig<69>edad
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] != '0' )
|
||||||
|
{
|
||||||
|
Hermanos.Antig.da_year = (buffer[0]-'0')*1000 + (buffer[1]-'0')*100 + (buffer[2]-'0')*10 + (buffer[3]-'0');
|
||||||
|
Hermanos.Antig.da_mon = (buffer[5]-'0')*10 + (buffer[6]-'0');
|
||||||
|
Hermanos.Antig.da_day = (buffer[8]-'0')*10 + (buffer[9]-'0');
|
||||||
|
}
|
||||||
|
|
||||||
|
// a¤o-mes-dia
|
||||||
|
// sprintf( Hermanos.Nombre, "%15s", buffer );
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Fecha de nacimiento
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
// sprintf( Hermanos.Nombre, "%15s", buffer );
|
||||||
|
if ( buffer[0] != '0' )
|
||||||
|
{
|
||||||
|
Hermanos.FechaN.da_year = (buffer[0]-'0')*1000 + (buffer[1]-'0')*100 + (buffer[2]-'0')*10 + (buffer[3]-'0');
|
||||||
|
Hermanos.FechaN.da_mon = (buffer[5]-'0')*10 + (buffer[6]-'0');
|
||||||
|
Hermanos.FechaN.da_day = (buffer[8]-'0')*10 + (buffer[9]-'0');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Reserva
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] == '1' )
|
||||||
|
Hermanos.Varios.Reserva = 1;
|
||||||
|
else
|
||||||
|
Hermanos.Varios.Reserva = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Ultima posici¢n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
strncpy( Hermanos.Posicion, buffer, 15 );
|
||||||
|
Hermanos.Posicion[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Posici¢n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
Hermanos.Insignia = 0;
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Cuota familiar
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] == '1' )
|
||||||
|
Hermanos.Varios.CuotaFam = 1;
|
||||||
|
else
|
||||||
|
Hermanos.Varios.CuotaFam = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Bolet¡n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] == '1' )
|
||||||
|
Hermanos.Varios.Notific = 1;
|
||||||
|
else
|
||||||
|
Hermanos.Varios.Notific = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Vota
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] == '1' )
|
||||||
|
Hermanos.Varios.PuedVotar = 1;
|
||||||
|
else
|
||||||
|
Hermanos.Varios.PuedVotar = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Sexo
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
|
||||||
|
// Salto de Linea
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void obten_linea(FILE *file, char *buf)
|
||||||
|
{
|
||||||
|
int c;
|
||||||
|
|
||||||
|
char *buffer;
|
||||||
|
|
||||||
|
buffer = buf;
|
||||||
|
|
||||||
|
*buffer = '\0';
|
||||||
|
|
||||||
|
// mientras no sea un salto de linea
|
||||||
|
while ( ( c = fgetc(file) ) != '\n' && c != EOF )
|
||||||
|
*(buffer++) = (char)c;
|
||||||
|
|
||||||
|
*(buffer++) = '\0';
|
||||||
|
};
|
||||||
|
|
||||||
|
void PreparaNuevoRegistro(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Hermanos.NHno = 0;
|
||||||
|
|
||||||
|
strcpy( Hermanos.Nombre, "" );
|
||||||
|
strcpy( Hermanos.Apellido1, "" );
|
||||||
|
strcpy( Hermanos.Apellido2, "" );
|
||||||
|
strcpy( Hermanos.Direccion, "" );
|
||||||
|
strcpy( Hermanos.Num, "" );
|
||||||
|
strcpy( Hermanos.Piso, "" );
|
||||||
|
|
||||||
|
Hermanos.CodP = 0;
|
||||||
|
|
||||||
|
strcpy( Hermanos.Poblacion, "" );
|
||||||
|
strcpy( Hermanos.Provincia, "" );
|
||||||
|
|
||||||
|
Hermanos.FechaN.da_day = 0;
|
||||||
|
Hermanos.FechaN.da_mon = 0;
|
||||||
|
Hermanos.FechaN.da_year = 0;
|
||||||
|
|
||||||
|
Hermanos.Antig.da_day = 0;
|
||||||
|
Hermanos.Antig.da_mon = 0;
|
||||||
|
Hermanos.Antig.da_year = 0;
|
||||||
|
|
||||||
|
Hermanos.Varios.Reserva = 0;
|
||||||
|
|
||||||
|
strcpy( Hermanos.Posicion, "" );
|
||||||
|
|
||||||
|
Hermanos.Insignia = 0;
|
||||||
|
|
||||||
|
strcpy( Hermanos.Telefono1, "" );
|
||||||
|
strcpy( Hermanos.Telefono2, "" );
|
||||||
|
|
||||||
|
Hermanos.Varios.CuotaFam = 0;
|
||||||
|
Hermanos.Varios.Notific = 0;
|
||||||
|
Hermanos.Varios.PuedVotar = 0;
|
||||||
|
Hermanos.Varios.RealPenit = 0;
|
||||||
|
Hermanos.Varios.TunicaHd = 0;
|
||||||
|
Hermanos.Varios.CtoVirgen = 0;
|
||||||
|
|
||||||
|
// Aqui vaciamos el comentario
|
||||||
|
for ( i=0; i<6; i++ )
|
||||||
|
strcpy( Hermanos.Comentario[i], "" );
|
||||||
|
|
||||||
|
|
||||||
|
}
|
269
DATOS/MBD2DBF.DFB
Normal file
269
DATOS/MBD2DBF.DFB
Normal file
@ -0,0 +1,269 @@
|
|||||||
|
|
||||||
|
#include <conio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "..\herm.h"
|
||||||
|
#include "..\..\libs\bdatos\bdatos.hh"
|
||||||
|
|
||||||
|
HermStruct Hermanos;
|
||||||
|
BDatos Dbf;
|
||||||
|
void RellenaStructura(FILE *file);
|
||||||
|
void obten_linea(FILE *file, char *buf);
|
||||||
|
|
||||||
|
void PreparaNuevoRegistro(void);
|
||||||
|
|
||||||
|
void main( void )
|
||||||
|
{
|
||||||
|
long registro = 0;
|
||||||
|
FILE *origen;
|
||||||
|
|
||||||
|
printf( "\nConvertidor de fichero: PROCESANDO..." );
|
||||||
|
|
||||||
|
|
||||||
|
if ( (origen = fopen( "hermanas.txt", "r" ) ) != NULL )
|
||||||
|
{
|
||||||
|
Dbf.AbrirReg( "hermanas.dbf", sizeof( HermStruct ) );
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
RellenaStructura(origen);
|
||||||
|
// La estructura ya esta cargada, asi que....
|
||||||
|
Dbf.InsReg( (void *)&Hermanos, Dbf.Registros(), ARRIBA );
|
||||||
|
registro++;
|
||||||
|
gotoxy( 1,1 ); printf( "%ld", registro );
|
||||||
|
}while( !feof(origen) );
|
||||||
|
|
||||||
|
Dbf.CerrarReg();
|
||||||
|
fclose( origen );
|
||||||
|
} else
|
||||||
|
printf( "\nError abriendo el origen" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void RellenaStructura(FILE *file)
|
||||||
|
{
|
||||||
|
char buffer[250];
|
||||||
|
// este es el orden del archivo:
|
||||||
|
|
||||||
|
|
||||||
|
PreparaNuevoRegistro();
|
||||||
|
|
||||||
|
// Numero
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
Hermanos.NHno = atol( buffer );
|
||||||
|
// printf("\nNumero: %s", buffer );
|
||||||
|
|
||||||
|
// Nombre
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Nombre, buffer, 15 );
|
||||||
|
Hermanos.Nombre[16] = '\0';
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
|
||||||
|
|
||||||
|
// Apellido1
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Apellido1, buffer, 15 );
|
||||||
|
Hermanos.Apellido1[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Apellido2
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Apellido2, buffer, 15 );
|
||||||
|
Hermanos.Apellido2[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Direcci¢n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy ( Hermanos.Direccion, buffer, 30 );
|
||||||
|
Hermanos.Direccion[30] = '\0';
|
||||||
|
sprintf( Hermanos.Num, "" );
|
||||||
|
sprintf( Hermanos.Piso, "" );
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// CP
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
Hermanos.CodP = atol ( buffer );
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Poblaci¢n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Poblacion, buffer, 15 );
|
||||||
|
Hermanos.Poblacion[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Provincia
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Provincia, buffer, 15 );
|
||||||
|
Hermanos.Provincia[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Telefono1
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Telefono1, buffer, 15 );
|
||||||
|
Hermanos.Telefono1[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Telefono2
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
buffer[0] = toupper(buffer[0]);
|
||||||
|
strncpy( Hermanos.Telefono2, buffer, 15 );
|
||||||
|
Hermanos.Telefono2[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Antig<69>edad
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] != '0' )
|
||||||
|
{
|
||||||
|
Hermanos.Antig.da_year = (buffer[0]-'0')*1000 + (buffer[1]-'0')*100 + (buffer[2]-'0')*10 + (buffer[3]-'0');
|
||||||
|
Hermanos.Antig.da_mon = (buffer[5]-'0')*10 + (buffer[6]-'0');
|
||||||
|
Hermanos.Antig.da_day = (buffer[8]-'0')*10 + (buffer[9]-'0');
|
||||||
|
}
|
||||||
|
|
||||||
|
// a¤o-mes-dia
|
||||||
|
// sprintf( Hermanos.Nombre, "%15s", buffer );
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Fecha de nacimiento
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
// sprintf( Hermanos.Nombre, "%15s", buffer );
|
||||||
|
if ( buffer[0] != '0' )
|
||||||
|
{
|
||||||
|
Hermanos.FechaN.da_year = (buffer[0]-'0')*1000 + (buffer[1]-'0')*100 + (buffer[2]-'0')*10 + (buffer[3]-'0');
|
||||||
|
Hermanos.FechaN.da_mon = (buffer[5]-'0')*10 + (buffer[6]-'0');
|
||||||
|
Hermanos.FechaN.da_day = (buffer[8]-'0')*10 + (buffer[9]-'0');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Reserva
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] == '1' )
|
||||||
|
Hermanos.Varios.Reserva = 1;
|
||||||
|
else
|
||||||
|
Hermanos.Varios.Reserva = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Ultima posici¢n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
strncpy( Hermanos.Posicion, buffer, 15 );
|
||||||
|
Hermanos.Posicion[16] = '\0';
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Posici¢n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
Hermanos.Insignia = 0;
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Cuota familiar
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] == '1' )
|
||||||
|
Hermanos.Varios.CuotaFam = 1;
|
||||||
|
else
|
||||||
|
Hermanos.Varios.CuotaFam = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Bolet¡n
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] == '1' )
|
||||||
|
Hermanos.Varios.Notific = 1;
|
||||||
|
else
|
||||||
|
Hermanos.Varios.Notific = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Vota
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
if ( buffer[0] == '1' )
|
||||||
|
Hermanos.Varios.PuedVotar = 1;
|
||||||
|
else
|
||||||
|
Hermanos.Varios.PuedVotar = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// printf("\n%s", buffer );
|
||||||
|
// Sexo
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
|
||||||
|
// Salto de Linea
|
||||||
|
obten_linea( file, buffer );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void obten_linea(FILE *file, char *buf)
|
||||||
|
{
|
||||||
|
int c;
|
||||||
|
|
||||||
|
char *buffer;
|
||||||
|
|
||||||
|
buffer = buf;
|
||||||
|
|
||||||
|
*buffer = '\0';
|
||||||
|
|
||||||
|
// mientras no sea un salto de linea
|
||||||
|
while ( ( c = fgetc(file) ) != '\n' && c != EOF )
|
||||||
|
*(buffer++) = (char)c;
|
||||||
|
|
||||||
|
*(buffer++) = '\0';
|
||||||
|
};
|
||||||
|
|
||||||
|
void PreparaNuevoRegistro(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Hermanos.NHno = 0;
|
||||||
|
|
||||||
|
strcpy( Hermanos.Nombre, "" );
|
||||||
|
strcpy( Hermanos.Apellido1, "" );
|
||||||
|
strcpy( Hermanos.Apellido2, "" );
|
||||||
|
strcpy( Hermanos.Direccion, "" );
|
||||||
|
strcpy( Hermanos.Num, "" );
|
||||||
|
strcpy( Hermanos.Piso, "" );
|
||||||
|
|
||||||
|
Hermanos.CodP = 0;
|
||||||
|
|
||||||
|
strcpy( Hermanos.Poblacion, "" );
|
||||||
|
strcpy( Hermanos.Provincia, "" );
|
||||||
|
|
||||||
|
Hermanos.FechaN.da_day = 0;
|
||||||
|
Hermanos.FechaN.da_mon = 0;
|
||||||
|
Hermanos.FechaN.da_year = 0;
|
||||||
|
|
||||||
|
Hermanos.Antig.da_day = 0;
|
||||||
|
Hermanos.Antig.da_mon = 0;
|
||||||
|
Hermanos.Antig.da_year = 0;
|
||||||
|
|
||||||
|
Hermanos.Varios.Reserva = 0;
|
||||||
|
|
||||||
|
strcpy( Hermanos.Posicion, "" );
|
||||||
|
|
||||||
|
Hermanos.Insignia = 0;
|
||||||
|
|
||||||
|
strcpy( Hermanos.Telefono1, "" );
|
||||||
|
strcpy( Hermanos.Telefono2, "" );
|
||||||
|
|
||||||
|
Hermanos.Varios.CuotaFam = 0;
|
||||||
|
Hermanos.Varios.Notific = 0;
|
||||||
|
Hermanos.Varios.PuedVotar = 0;
|
||||||
|
Hermanos.Varios.RealPenit = 0;
|
||||||
|
Hermanos.Varios.TunicaHd = 0;
|
||||||
|
Hermanos.Varios.CtoVirgen = 0;
|
||||||
|
|
||||||
|
// Aqui vaciamos el comentario
|
||||||
|
for ( i=0; i<6; i++ )
|
||||||
|
strcpy( Hermanos.Comentario[i], "" );
|
||||||
|
|
||||||
|
|
||||||
|
}
|
BIN
DATOS/MBD2DBF.OBJ
Normal file
BIN
DATOS/MBD2DBF.OBJ
Normal file
Binary file not shown.
BIN
DATOS/MDB2DBF.DSK
Normal file
BIN
DATOS/MDB2DBF.DSK
Normal file
Binary file not shown.
BIN
DATOS/MDB2DBF.EXE
Normal file
BIN
DATOS/MDB2DBF.EXE
Normal file
Binary file not shown.
BIN
DATOS/MDB2DBF.PRJ
Normal file
BIN
DATOS/MDB2DBF.PRJ
Normal file
Binary file not shown.
BIN
DATOS/TODOS/BASE1.MDB
Normal file
BIN
DATOS/TODOS/BASE1.MDB
Normal file
Binary file not shown.
BIN
DATOS/TODOS/BASE2.MDB
Normal file
BIN
DATOS/TODOS/BASE2.MDB
Normal file
Binary file not shown.
BIN
DATOS/TODOS/BASE3.MDB
Normal file
BIN
DATOS/TODOS/BASE3.MDB
Normal file
Binary file not shown.
19
DATOS/TODOS/CAMPOS.TIA
Normal file
19
DATOS/TODOS/CAMPOS.TIA
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Numero
|
||||||
|
Nombre
|
||||||
|
Apellido1
|
||||||
|
Apellido2
|
||||||
|
Direcci¢n
|
||||||
|
CP
|
||||||
|
Poblaci¢n
|
||||||
|
Provincia
|
||||||
|
Telefono1
|
||||||
|
Telefono2
|
||||||
|
Antig<EFBFBD>edad
|
||||||
|
Fecha de nacimiento
|
||||||
|
Reserva
|
||||||
|
Ultima posici¢n
|
||||||
|
Posici¢n
|
||||||
|
Cuota familiar
|
||||||
|
Bolet¡n
|
||||||
|
Vota
|
||||||
|
Sexo
|
BIN
DATOS/TODOS/CSLTA1.QRY
Normal file
BIN
DATOS/TODOS/CSLTA1.QRY
Normal file
Binary file not shown.
BIN
DATOS/TODOS/HERMANAS.DOC
Normal file
BIN
DATOS/TODOS/HERMANAS.DOC
Normal file
Binary file not shown.
BIN
DATOS/TODOS/HERMANAS.JD
Normal file
BIN
DATOS/TODOS/HERMANAS.JD
Normal file
Binary file not shown.
BIN
DATOS/TODOS/HERMANAS.LDB
Normal file
BIN
DATOS/TODOS/HERMANAS.LDB
Normal file
Binary file not shown.
BIN
DATOS/TODOS/HERMANAS.MDB
Normal file
BIN
DATOS/TODOS/HERMANAS.MDB
Normal file
Binary file not shown.
8862
DATOS/TODOS/HERMANAS.TXT
Normal file
8862
DATOS/TODOS/HERMANAS.TXT
Normal file
File diff suppressed because it is too large
Load Diff
BIN
DATOS/TODOS/HERMANOS.DOC
Normal file
BIN
DATOS/TODOS/HERMANOS.DOC
Normal file
Binary file not shown.
BIN
DATOS/TODOS/HERMANOS.LDB
Normal file
BIN
DATOS/TODOS/HERMANOS.LDB
Normal file
Binary file not shown.
BIN
DATOS/TODOS/HERMANOS.MDB
Normal file
BIN
DATOS/TODOS/HERMANOS.MDB
Normal file
Binary file not shown.
13363
DATOS/TODOS/HERMANOS.TXT
Normal file
13363
DATOS/TODOS/HERMANOS.TXT
Normal file
File diff suppressed because it is too large
Load Diff
BIN
EGAVGA.BGI
Normal file
BIN
EGAVGA.BGI
Normal file
Binary file not shown.
BIN
FOTOS/HO-00001.PCX
Normal file
BIN
FOTOS/HO-00001.PCX
Normal file
Binary file not shown.
BIN
HERM.EXE
Normal file
BIN
HERM.EXE
Normal file
Binary file not shown.
133
HERM.H
Normal file
133
HERM.H
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
#include <dos.h>
|
||||||
|
|
||||||
|
#define BLANCO EGA_WHITE
|
||||||
|
#define ENCUADRE 3
|
||||||
|
#define SEC_OPTAR 5
|
||||||
|
|
||||||
|
#define VOTANTES 1
|
||||||
|
#define ACOGIDOS_CUOT 2
|
||||||
|
#define RECIBE_NOTIFIC 3
|
||||||
|
#define PAPELETAS_SITIO 4
|
||||||
|
#define GRAL_HERM_RAP 5
|
||||||
|
#define GRAL_HERMANOS 6
|
||||||
|
#define TUNICA_HDAD 7
|
||||||
|
#define FACTURAS 8
|
||||||
|
#define ETIQUETAS 9
|
||||||
|
|
||||||
|
#define ALTAS 1
|
||||||
|
#define BAJAS 2
|
||||||
|
#define CONSULTAS 3
|
||||||
|
#define REORDENAR 4
|
||||||
|
|
||||||
|
#define HERMANOS 0
|
||||||
|
#define HERMANAS 1
|
||||||
|
|
||||||
|
#define NORMAL 1
|
||||||
|
#define INTENSO 0
|
||||||
|
|
||||||
|
#define BLANCO EGA_WHITE
|
||||||
|
#define NEGRO 0
|
||||||
|
#define ROJO EGA_RED
|
||||||
|
#define AZUL EGA_BLUE
|
||||||
|
#define GRIS_CLARO EGA_LIGHTGRAY
|
||||||
|
|
||||||
|
// Acceso a las funciones internas de MAKE_BOTON
|
||||||
|
struct Make_Boton {
|
||||||
|
/* unsigned */ int Up, Left, Down, Right;
|
||||||
|
unsigned char Cdf, Cb1, Cb2;
|
||||||
|
unsigned char Ab, Pb;
|
||||||
|
unsigned char Isc, Sc;
|
||||||
|
};
|
||||||
|
extern struct Make_Boton far *Botones; // Puntero a estructura
|
||||||
|
|
||||||
|
extern int Secuencias, *n_Botones_Secuencia;
|
||||||
|
extern void Imprime_Boton(int D_Bord, struct Make_Boton Bot_Imp);
|
||||||
|
|
||||||
|
void Error(char *cError);
|
||||||
|
|
||||||
|
struct VARIOS
|
||||||
|
{
|
||||||
|
unsigned int CuotaFam : 1; // Acogido a cuota familiar
|
||||||
|
unsigned int Notific : 1; // Recibe notificaciones
|
||||||
|
unsigned int PuedVotar: 1; // Puede Votar
|
||||||
|
unsigned int TunicaHd : 1; // Posse Tunica de Hermandad
|
||||||
|
unsigned int RealPenit: 1; // Realizo est. de penitencia
|
||||||
|
unsigned int CtoVirgen: 1; // Cristo o Virgen
|
||||||
|
unsigned int Reserva : 1; // Futura ampliacion
|
||||||
|
unsigned int FA2 : 1; // Futura ampliaci¢n
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
long NHno; // N§ de hermano
|
||||||
|
char Nombre[15+1]; // Nombre 15 dig.
|
||||||
|
char Apellido1[15+1]; // 1er Apellido 15 dig.
|
||||||
|
char Apellido2[15+1]; // 2er Apellido 15 dig.
|
||||||
|
char Direccion[29+1]; // Direccion 20 dig.
|
||||||
|
char Num[3+1]; // N§ 3 dig.
|
||||||
|
char Piso[5+1]; // Piso/Letra 5 dig.
|
||||||
|
long CodP; // C.P.
|
||||||
|
char Poblacion[15+1]; // Poblacion 15 dig.
|
||||||
|
char Provincia[15+1]; // Provincia 15 dig.
|
||||||
|
char Telefono1[15+1]; // Telefono 1 15 dig.
|
||||||
|
char Telefono2[15+1]; // Telefono 2 15 dig.
|
||||||
|
|
||||||
|
struct date FechaN; // Fecha de Nacimiento
|
||||||
|
struct date Antig; // Antig<69>edad
|
||||||
|
|
||||||
|
char Posicion[15+1]; // Posici¢n
|
||||||
|
char Insignia; // Insignia
|
||||||
|
|
||||||
|
long NTunica; // n§ tunica de hermandad
|
||||||
|
|
||||||
|
char Comentario[6][50];
|
||||||
|
|
||||||
|
struct VARIOS Varios; // Campos varios
|
||||||
|
|
||||||
|
} HermStruct;
|
||||||
|
|
||||||
|
|
||||||
|
// Estructura donde estan contenidas las insignias
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
char NInsignia[29+1];
|
||||||
|
long Suplemento;
|
||||||
|
} INSIGNIAS;
|
||||||
|
|
||||||
|
|
||||||
|
// Esta es la structura donde se guarda la configuraci¢n del programa
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
char config_color; // Configura que paleta usa
|
||||||
|
|
||||||
|
char item_ordenado[2]; // item por el que esta ordenado
|
||||||
|
|
||||||
|
int TiempoBorrados; // Tiempo que hay que mantener los items, borrados
|
||||||
|
long NHnoHna[2]; // Numero de Hermanos, Hermanas
|
||||||
|
int LineasImpresion;
|
||||||
|
|
||||||
|
INSIGNIAS Insignia[40]; // 20 Para Virgen y 20 Cristo
|
||||||
|
|
||||||
|
char ImpNormal[20];
|
||||||
|
char ImpCompr[20];
|
||||||
|
|
||||||
|
long CuotaBaseFam[2];
|
||||||
|
int MesVotacion;
|
||||||
|
|
||||||
|
char HoraSalida[10];
|
||||||
|
|
||||||
|
char FA[100];
|
||||||
|
} CONFIG;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
long NHerm;
|
||||||
|
struct date FechaBorrado;
|
||||||
|
} HERMBORRADOS;
|
||||||
|
|
||||||
|
int Optar( int optar, ... );
|
||||||
|
int InputCadenaG_T5(char *s, int numalp, int lmax, int cc, int cf, int X0, int Y0, int X1, int Y1);
|
||||||
|
|
||||||
|
int Comprueba_Impresora(void);
|
||||||
|
int file_exists(char *filename);
|
BIN
HERM.ICO
Normal file
BIN
HERM.ICO
Normal file
Binary file not shown.
After (image error) Size: 766 B |
408
HERM.IMG
Normal file
408
HERM.IMG
Normal file
@ -0,0 +1,408 @@
|
|||||||
|
** Codigo fuente para MAKE_BOTON
|
||||||
|
**
|
||||||
|
** Make BOTON es un programa realizado por Jos‚ David Guill‚n
|
||||||
|
**
|
||||||
|
** Enlazar al programa principal con MB2CPP, y compilar a OBJ para Linkar
|
||||||
|
**
|
||||||
|
**
|
||||||
|
** MAKE_BOTON es un producto de JD. -->>> 5.000 Libreria exelente para
|
||||||
|
** tratamiento de botones y grf.
|
||||||
|
** ONDA_GRN es un producto de JD. --->>> 5.000 Le gustaria representar ondas
|
||||||
|
** sonoras con facilidad: ONDA_GRN
|
||||||
|
** UTILIZADO EN FREC_OSC !!!
|
||||||
|
**
|
||||||
|
|
||||||
|
|
||||||
|
*****************************************************************************
|
||||||
|
*
|
||||||
|
* ATENCION !!!
|
||||||
|
* ALTERAR ESTE FICHERO, CAUSARA EL MALFUNCIONAMIENTO DEL
|
||||||
|
* PROGRAMA DE APOYO... ( ERRORES NO DOCUMENTADOS )
|
||||||
|
*
|
||||||
|
*****************************************************************************
|
||||||
|
|
||||||
|
#5
|
||||||
|
|
||||||
|
!1, 37
|
||||||
|
|
||||||
|
1
|
||||||
|
* Fondo Total
|
||||||
|
& 0, 0, 639, 479, 7, 56, 63, 0, 2
|
||||||
|
* Cuadro de titulo
|
||||||
|
& 5, 5, 300, 25, 7, 63, 56, 0, 2
|
||||||
|
| 5, 5, 2, 6, 0, 1, Registro General de Hermanos,
|
||||||
|
|
||||||
|
* Linea de fondo para ayudas
|
||||||
|
& 5, 455, 500, 475, 0, 63, 56, 0, 2
|
||||||
|
& 505, 455, 635, 475, 63, 0, 56, 0, 2
|
||||||
|
|
||||||
|
|
||||||
|
$ 605, 5, 635, 25, 7, 63, 56, 0, 2, 000, 079 * >
|
||||||
|
$ 570, 5, 600, 25, 7, 63, 56, 0, 2, 000, 081 * >>
|
||||||
|
$ 535, 5, 565, 25, 7, 63, 56, 0, 2, 000, 073 * <<
|
||||||
|
$ 500, 5, 530, 25, 7, 63, 56, 0, 2, 000, 071 * <
|
||||||
|
|
||||||
|
|
||||||
|
$ 500, 30, 565, 50, 7, 63, 56, 0, 2, 000, 000
|
||||||
|
$ 570, 30, 635, 50, 7, 63, 56, 0, 2, 000, 060
|
||||||
|
|
||||||
|
| 10, 55, 2, 5, 0, 1, N£mero de Hermano,
|
||||||
|
$ 150, 53, 300, 72, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 80, 2, 5, 0, 1, Nombre,
|
||||||
|
$ 150, 78, 300, 97, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 105, 2, 5, 0, 1, Primer Apellido,
|
||||||
|
$ 150, 103, 300, 122, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 320, 105, 2, 5, 0, 1, Segundo Apellido,
|
||||||
|
$ 480, 103, 630, 122, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 130, 2, 5, 0, 1, Direcci¢n,
|
||||||
|
$ 150, 128, 390, 147, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 390, 130, 2, 5, 0, 1, N§,
|
||||||
|
$ 425, 128, 460, 147, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 460, 130, 2, 5, 0, 1, Piso,
|
||||||
|
$ 530, 128, 630, 147, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
|
||||||
|
| 10, 155, 2, 5, 0, 1, C.P.,
|
||||||
|
$ 60, 153, 140, 172, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 150, 155, 2, 5, 0, 1, Poblaci¢n,
|
||||||
|
$ 230, 153, 390, 172, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 400, 155, 2, 5, 0, 1, Provincia,
|
||||||
|
$ 480, 153, 630, 172, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
|
||||||
|
* Cuadro para enmarcar FN, Ant, R, UP, P
|
||||||
|
& 10, 180, 300, 305, 7, 56, 63, 1, 1
|
||||||
|
|
||||||
|
| 10, 185, 2, 5, 0, 1, Fecha de Nacimiento,
|
||||||
|
$ 170, 183, 290, 202, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 210, 2, 5, 0, 1, Antig<69>edad,
|
||||||
|
$ 170, 208, 290, 227, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 235, 2, 5, 0, 1, Reserva,
|
||||||
|
$ 271, 233, 290, 252, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 260, 2, 5, 0, 1, Posici¢n,
|
||||||
|
$ 150, 258, 290, 277, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 10, 285, 2, 5, 0, 1, Insignia,
|
||||||
|
$ 150, 283, 290, 302, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
|
||||||
|
|
||||||
|
| 400, 185, 2, 5, 0, 1, Tel‚fono 1,
|
||||||
|
$ 480, 183, 630, 202, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 400, 210, 2, 5, 0, 1, Tel‚fono 2,
|
||||||
|
$ 480, 208, 630, 227, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
|
||||||
|
* Cuadro para englobar todo lo de abajo
|
||||||
|
& 360, 230, 630, 305, 7, 56, 63, 1, 1
|
||||||
|
|
||||||
|
| 400, 230, 2, 5, 0, 1, ¨Realiza la est. de penitencia?,
|
||||||
|
$ 380, 232, 390, 242, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 400, 241, 2, 5, 0, 1, ¨Acogido a cuota familiar?,
|
||||||
|
$ 380, 243, 390, 253, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 400, 252, 2, 5, 0, 1, ¨Tiene posibilidad de votar?,
|
||||||
|
$ 380, 254, 390, 264, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 400, 263, 2, 5, 0, 1, ¨Recibe notificaciones?,
|
||||||
|
$ 380, 265, 390, 275, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
| 400, 274, 2, 5, 0, 1, ¨Posee tunica Hdad? -->,
|
||||||
|
$ 380, 276, 390, 286, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
*Numero de tunica
|
||||||
|
$ 580, 268, 625, 288, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
|
||||||
|
| 400, 285, 2, 5, 0, 1, ¨ Cristo ? ¨ Virgen ?,
|
||||||
|
$ 380, 287, 390, 297, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
$ 520, 287, 530, 297, 63, 56, 0, 0, 2, 000, 000
|
||||||
|
|
||||||
|
* Cuadro para un comentario
|
||||||
|
& 200, 310, 635, 325, 7, 56, 63, 1, 1
|
||||||
|
| 10, 310, 2, 5, 0, 1, Comentario,
|
||||||
|
$ 200, 325, 635, 450, 63, 56, 0, 1, 1, 000, 000
|
||||||
|
|
||||||
|
* Cuadro de Foto
|
||||||
|
& 320, 5, 400, 100, 0, 63, 56, 0, 2
|
||||||
|
|
||||||
|
* Botones Busqueda hacia atras BUSCAR delante
|
||||||
|
$ 500, 55, 540, 75, 7, 63, 56, 0, 2, 000, 82
|
||||||
|
$ 545, 55, 590, 75, 7, 63, 56, 0, 2, 000, 48
|
||||||
|
$ 595, 55, 635, 75, 7, 63, 56, 0, 2, 000, 83
|
||||||
|
|
||||||
|
* Lo de Registro general de hermanos sive para Imprimi la ficha tambien
|
||||||
|
$ 5, 5, 300, 25, 7, 63, 56, 0, 2, 000, 000
|
||||||
|
* Papeletas de sitio
|
||||||
|
$ 475, 5, 495, 75, 7, 63, 56, 0, 2, 000, 000
|
||||||
|
|
||||||
|
2
|
||||||
|
| 5, 5, 2, 6, 0, 1, Registro General de Hermanos,
|
||||||
|
* Titulos de los botones
|
||||||
|
| 477, 5, 2, 5, 1, 1, Papeleta,
|
||||||
|
| 609, 7, 2, 5, 0, 1, >,
|
||||||
|
| 574, 7, 2, 5, 0, 1, >>,
|
||||||
|
| 539, 7, 2, 5, 0, 1, <<,
|
||||||
|
| 504, 7, 2, 5, 0, 1, <,
|
||||||
|
| 572, 32, 2, 5, 0, 1, F2 Menu,
|
||||||
|
| 504, 57, 2, 5, 0, 1, <-,
|
||||||
|
| 547, 57, 2, 4, 0, 1, BUSCAR,
|
||||||
|
| 547, 58, 2, 4, 0, 1, _,
|
||||||
|
| 597, 57, 2, 5, 0, 1, ->,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* Menu Principal
|
||||||
|
10
|
||||||
|
* Fondo Total
|
||||||
|
& 0, 0, 639, 479, 7, 56, 63, 0, 2
|
||||||
|
* Cuadro de titulo
|
||||||
|
& 5, 5, 635, 30, 7, 63, 56, 0, 2
|
||||||
|
| 5, 120, 0, 1, 0, 0, Fervorosa e Ilustre Hermandad y Cofradia de Nazarenos de,
|
||||||
|
| 5, 160, 0, 1, 0, 0, Ntro. Padre Jesus de la Oracion en el Huerto de Getsemani,
|
||||||
|
| 5, 200, 0, 1, 0, 0, Maria Santisima del Rosario en sus Misterios Dolorosos y San Juan Bosco,
|
||||||
|
|
||||||
|
| 6, 121, 0, 1, 0, 63, Fervorosa e Ilustre Hermandad y Cofradia de Nazarenos de,
|
||||||
|
| 6, 161, 0, 1, 0, 63, Ntro. Padre Jesus de la Oracion en el Huerto de Getsemani,
|
||||||
|
| 6, 201, 0, 1, 0, 63, Maria Santisima del Rosario en sus Misterios Dolorosos y San Juan Bosco,
|
||||||
|
|
||||||
|
| 5, 7, 2, 6, 0, 1, Archivo Hermanos Hermanas Listados Ayuda,
|
||||||
|
|
||||||
|
20
|
||||||
|
& 170, 165, 470, 315, 7, 63, 56, 0, 2
|
||||||
|
& 172, 167, 468, 190, 1, 56, 63, 0, 2
|
||||||
|
|
||||||
|
21
|
||||||
|
& 170, 165, 470, 270, 7, 63, 56, 0, 2
|
||||||
|
& 172, 167, 468, 190, 1, 56, 63, 0, 2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
|
||||||
|
* Û Û
|
||||||
|
* Û Casilla de pregunta ( OPTAR por.... ACEPTAR CANCELAR Û
|
||||||
|
* Û Û
|
||||||
|
* ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
|
||||||
|
|
||||||
|
100
|
||||||
|
& 200, 212, 440, 267, 7, 56, 63, 2, 1
|
||||||
|
& 205, 217, 435, 262, 7, 63, 56, -2, 1
|
||||||
|
|
||||||
|
* Boton Aceptar
|
||||||
|
& 200, 270, 280, 295, 7, 63, 56, 2, 1
|
||||||
|
* Boton Cancelar
|
||||||
|
& 360, 270, 440, 295, 7, 63, 56, 2, 1
|
||||||
|
|
||||||
|
101
|
||||||
|
| 200, 274, 2, 5, 0, 63, Aceptar,
|
||||||
|
| 201, 275, 2, 5, 0, 0, Aceptar,
|
||||||
|
| 200, 274, 2, 5, 0, 14, A,
|
||||||
|
| 201, 275, 2, 5, 0, 0, A,
|
||||||
|
|
||||||
|
|
||||||
|
| 340, 274, 2, 5, 0, 63, Cancelar,
|
||||||
|
| 341, 275, 2, 5, 0, 0, Cancelar,
|
||||||
|
| 340, 274, 2, 5, 0, 14, C,
|
||||||
|
| 341, 275, 2, 5, 0, 0, C,
|
||||||
|
|
||||||
|
|
||||||
|
!2, 2
|
||||||
|
* Boton Aceptar
|
||||||
|
$ 204, 274, 276, 291, 7, 56, 63, 2, 1, 00, 30
|
||||||
|
* Boton Cancelar
|
||||||
|
$ 364, 274, 436, 291, 7, 56, 63, 2, 1, 00, 46
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
** Esto es para cuando se va a ordenar
|
||||||
|
|
||||||
|
3
|
||||||
|
& 170, 165, 470, 315, 7, 63, 56, 0, 2
|
||||||
|
& 172, 167, 468, 190, 1, 56, 63, 0, 2
|
||||||
|
|
||||||
|
!3, 10
|
||||||
|
$ 172, 200, 316, 220, 7, 56, 63, 0, 2, 000, 49
|
||||||
|
$ 172, 222, 316, 242, 7, 56, 63, 0, 2, 000, 24
|
||||||
|
$ 172, 244, 316, 264, 7, 56, 63, 0, 2, 000, 25
|
||||||
|
$ 172, 266, 316, 286, 7, 56, 63, 0, 2, 000, 32
|
||||||
|
$ 172, 288, 316, 308, 7, 56, 63, 0, 2, 000, 48
|
||||||
|
|
||||||
|
$ 324, 200, 468, 220, 7, 56, 63, 0, 2, 000, 47
|
||||||
|
$ 324, 222, 468, 242, 7, 56, 63, 0, 2, 000, 33
|
||||||
|
$ 324, 244, 468, 264, 7, 56, 63, 0, 2, 000, 30
|
||||||
|
$ 324, 266, 468, 286, 7, 56, 63, 0, 2, 000, 23
|
||||||
|
$ 324, 288, 468, 308, 7, 56, 63, 0, 2, 000, 46
|
||||||
|
|
||||||
|
4
|
||||||
|
| 172, 167, 2, 6, 0, 63, Elija como ordenar:,
|
||||||
|
|
||||||
|
| 172, 200, 2, 5, 0, 63, Numero de Hno,
|
||||||
|
| 172, 202, 2, 5, 0, 0, _,
|
||||||
|
| 172, 222, 2, 5, 0, 63, Nombre,
|
||||||
|
| 172, 224, 2, 5, 0, 0, _,
|
||||||
|
| 172, 244, 2, 5, 0, 63, Primer Apellido,
|
||||||
|
| 172, 246, 2, 5, 0, 0, _,
|
||||||
|
| 172, 266, 2, 5, 0, 63, Direccion,
|
||||||
|
| 172, 268, 2, 5, 0, 0, _,
|
||||||
|
| 172, 288, 2, 5, 0, 63, Poblacion,
|
||||||
|
| 172, 290, 2, 5, 0, 0, _,
|
||||||
|
|
||||||
|
| 324, 200, 2, 5, 0, 63, Provincia,
|
||||||
|
| 324, 202, 2, 5, 0, 0, _,
|
||||||
|
| 324, 222, 2, 5, 0, 63, Fecha Nacimiento,
|
||||||
|
| 324, 224, 2, 5, 0, 0, _,
|
||||||
|
| 324, 244, 2, 5, 0, 63, Antiguedad,
|
||||||
|
| 324, 246, 2, 5, 0, 0, _,
|
||||||
|
| 324, 266, 2, 5, 0, 63, Insignia,
|
||||||
|
| 324, 268, 2, 5, 0, 0, _,
|
||||||
|
| 320, 288, 2, 5, 0, 63, CANCELAR OPERACION,
|
||||||
|
| 320, 290, 2, 5, 0, 0, _,
|
||||||
|
|
||||||
|
5
|
||||||
|
& 170, 165, 470, 315, 7, 63, 56, 0, 2
|
||||||
|
& 172, 167, 468, 190, 1, 56, 63, 0, 2
|
||||||
|
| 172, 167, 2, 6, 0, 63, Reordenando Base...,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
50
|
||||||
|
* Fondo Total
|
||||||
|
& 0, 0, 639, 479, 7, 56, 63, 0, 2
|
||||||
|
* Cuadro de titulo
|
||||||
|
& 5, 5, 300, 25, 7, 63, 56, 0, 2
|
||||||
|
| 5, 5, 2, 6, 0, 1, Registro de Insignias,
|
||||||
|
|
||||||
|
& 10, 45, 315, 63, 7, 63, 56, 0, 2
|
||||||
|
| 15, 45, 2, 6, 0, 1, Insignias Cristo Suplemento,
|
||||||
|
& 325, 45, 630, 63, 7, 63, 56, 0, 2
|
||||||
|
| 340, 45, 2, 6, 0, 1, Insignias Virgen Suplemento,
|
||||||
|
|
||||||
|
|
||||||
|
& 10, 65, 315, 450, 63, 0, 56, 0, 2
|
||||||
|
& 325, 65, 630, 450, 63, 0, 56, 0, 2
|
||||||
|
|
||||||
|
*| 15, 70, 2, 6, 0, 1, MMMMMMMMMMMMMMM,
|
||||||
|
*| 15, 90, 2, 6, 0, 1, MMMMMMMMMMMMMMM,
|
||||||
|
|
||||||
|
* Linea de fondo para ayudas
|
||||||
|
& 5, 455, 500, 475, 0, 63, 56, 0, 2
|
||||||
|
& 505, 455, 635, 475, 63, 0, 56, 0, 2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
60
|
||||||
|
* Fondo Total
|
||||||
|
& 0, 0, 639, 479, 7, 56, 63, 0, 2
|
||||||
|
* Cuadro de titulo
|
||||||
|
& 5, 5, 300, 25, 7, 63, 56, 0, 2
|
||||||
|
| 5, 5, 2, 6, 0, 1, Listado de Hnos:,
|
||||||
|
|
||||||
|
& 10, 65, 635, 450, 63, 0, 56, 0, 2
|
||||||
|
& 10, 45, 635, 63, 7, 63, 56, 0, 2
|
||||||
|
|
||||||
|
* Linea de fondo para ayudas
|
||||||
|
& 5, 455, 500, 475, 0, 63, 56, 0, 2
|
||||||
|
& 505, 455, 635, 475, 63, 0, 56, 0, 2
|
||||||
|
|
||||||
|
& 500, 5, 540, 25, 7, 63, 56, 0, 2
|
||||||
|
& 545, 5, 590, 25, 7, 63, 56, 0, 2
|
||||||
|
& 595, 5, 635, 25, 7, 63, 56, 0, 2
|
||||||
|
| 504, 7, 2, 5, 0, 1, <-,
|
||||||
|
| 547, 7, 2, 4, 0, 1, Imprimir,
|
||||||
|
| 547, 8, 2, 4, 0, 1, _,
|
||||||
|
| 597, 7, 2, 5, 0, 1, ->,
|
||||||
|
|
||||||
|
|
||||||
|
!4, 3
|
||||||
|
* Botones Busqueda hacia atras BUSCAR delante
|
||||||
|
$ 500, 5, 540, 25, 7, 63, 56, 0, 2, 000, 75
|
||||||
|
$ 545, 5, 590, 25, 7, 63, 56, 0, 2, 000, 23
|
||||||
|
$ 595, 5, 635, 25, 7, 63, 56, 0, 2, 000, 77
|
||||||
|
|
||||||
|
|
||||||
|
70
|
||||||
|
* Fondo Total
|
||||||
|
& 0, 0, 639, 479, 7, 56, 63, 0, 2
|
||||||
|
* Cuadro de titulo
|
||||||
|
& 5, 5, 300, 25, 7, 63, 56, 0, 2
|
||||||
|
| 5, 5, 2, 6, 0, 1, Configuraci¢n Global,
|
||||||
|
|
||||||
|
|
||||||
|
& 270, 60, 350, 78, 63, 7, 56, 0, 2
|
||||||
|
| 5, 60, 2, 6, 0, 1, Ultimo n£mero de Hermano:,
|
||||||
|
& 270, 80, 350, 98, 63, 7, 56, 0, 2
|
||||||
|
| 5, 80, 2, 6, 0, 1, Ultimo n£mero de Hermana:,
|
||||||
|
& 270, 100, 350, 118, 63, 7, 56, 0, 2
|
||||||
|
| 5, 100, 2, 6, 0, 1, Meses a guardar n§ hno/a:,
|
||||||
|
|
||||||
|
& 380, 95, 630, 125, 7, 63, 56, 0, 2
|
||||||
|
| 390, 100, 2, 6, 0, 1, Purgar hno/as eliminados,
|
||||||
|
|
||||||
|
& 270, 150, 400, 168, 63, 7, 56, 0, 2
|
||||||
|
| 5, 150, 2, 6, 0, 1, Imprimir normal (HEX): ,
|
||||||
|
& 270, 170, 400, 188, 63, 7, 56, 0, 2
|
||||||
|
| 5, 170, 2, 6, 0, 1, Imprimir comprimido (HEX):,
|
||||||
|
& 270, 190, 350, 208, 63, 7, 56, 0, 2
|
||||||
|
| 5, 190, 2, 6, 0, 1, Numero de lineas:,
|
||||||
|
& 270, 220, 350, 238, 63, 7, 56, 0, 2
|
||||||
|
| 5, 220, 2, 6, 0, 1, Cuota base: Cuota familiar:,
|
||||||
|
& 550, 220, 630, 238, 63, 7, 56, 0, 2
|
||||||
|
|
||||||
|
| 5, 250, 2, 6, 0, 1, Mes Votaci¢n: Hora Salida:,
|
||||||
|
& 270, 250, 350, 268, 63, 7, 56, 0, 2
|
||||||
|
|
||||||
|
& 550, 250, 630, 268, 63, 7, 56, 0, 2
|
||||||
|
|
||||||
|
& 15, 315, 345, 350, 7, 63, 56, 0, 2
|
||||||
|
| 5, 320, 2, 6, 0, 1, Reinicializar papeletas de sitio,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
************************************************ Botones D: 5
|
||||||
|
**** **** Botones S:
|
||||||
|
** Parte Utilizada por Optar **
|
||||||
|
**** ****
|
||||||
|
************************************************
|
||||||
|
!5, 2
|
||||||
|
|
||||||
|
$ 170, 320, 270, 350, 7, 63, 56, 2, 2, 000, 30
|
||||||
|
$ 370, 320, 470, 350, 7, 63, 56, 2, 2, 000, 46
|
||||||
|
|
||||||
|
150
|
||||||
|
& 170, 165, 470, 315, 7, 63, 56, 0, 2
|
||||||
|
& 172, 167, 468, 190, 1, 56, 63, 0, 2
|
||||||
|
|
||||||
|
& 170, 320, 270, 350, 7, 63, 56, 2, 2
|
||||||
|
| 175, 325, 2, 6, 0, 63, Aceptar,
|
||||||
|
| 176, 326, 2, 6, 0, 0, Aceptar,
|
||||||
|
| 175, 327, 2, 6, 0, 63, _,
|
||||||
|
| 176, 328, 2, 6, 0, 0, _,
|
||||||
|
|
||||||
|
& 370, 320, 470, 350, 7, 63, 56, 2, 2
|
||||||
|
| 373, 325, 2, 6, 0, 63, Cancelar,
|
||||||
|
| 374, 326, 2, 6, 0, 0, Cancelar,
|
||||||
|
| 373, 327, 2, 6, 0, 63, _,
|
||||||
|
| 374, 328, 2, 6, 0, 0, _,
|
||||||
|
|
||||||
|
|
||||||
|
* Buscar...
|
||||||
|
300
|
||||||
|
|
||||||
|
& 255, 199, 310, 217, 63, 7, 56, 0, 2
|
||||||
|
& 365, 199, 465, 217, 63, 7, 56, 0, 2
|
||||||
|
| 170, 200, 2, 5, 0, 63, N§ Hno: Tlf.:,
|
||||||
|
| 171, 201, 2, 5, 0, 0, N§ Hno: Tlf.:,
|
||||||
|
|
||||||
|
& 255, 219, 360, 237, 63, 7, 56, 0, 2
|
||||||
|
| 170, 220, 2, 5, 0, 63, Nombre:,
|
||||||
|
| 171, 221, 2, 5, 0, 0, Nombre:,
|
||||||
|
|
||||||
|
& 255, 239, 360, 257, 63, 7, 56, 0, 2
|
||||||
|
& 365, 239, 465, 257, 63, 7, 56, 0, 2
|
||||||
|
| 170, 240, 2, 5, 0, 63, Apellido:,
|
||||||
|
| 171, 241, 2, 5, 0, 0, Apellido:,
|
||||||
|
|
||||||
|
& 255, 259, 465, 277, 63, 7, 56, 0, 2
|
||||||
|
| 170, 260, 2, 5, 0, 63, Direcci¢n:,
|
||||||
|
| 171, 261, 2, 5, 0, 0, Direcci¢n:,
|
||||||
|
|
||||||
|
& 225, 279, 320, 297, 63, 7, 56, 0, 2
|
||||||
|
& 365, 279, 465, 297, 63, 7, 56, 0, 2
|
||||||
|
| 170, 280, 2, 5, 0, 63, F.Nac: Antig:,
|
||||||
|
| 171, 281, 2, 5, 0, 0, F.Nac: Antig:,
|
BIN
HERM.PRJ
Normal file
BIN
HERM.PRJ
Normal file
Binary file not shown.
BIN
HERMANDA.CFG
Normal file
BIN
HERMANDA.CFG
Normal file
Binary file not shown.
411
HERM_CFG.CPP
Normal file
411
HERM_CFG.CPP
Normal file
@ -0,0 +1,411 @@
|
|||||||
|
/*************************************************************************\
|
||||||
|
|* *|
|
||||||
|
|* HERM_CFG *|
|
||||||
|
|* *|
|
||||||
|
|* Descripci¢n: *|
|
||||||
|
|* M¢dulo para mantener la configuraci¢n. *|
|
||||||
|
|* *|
|
||||||
|
|* Fecha: 21-07-96 14.34 / 18.00 *|
|
||||||
|
|* 23.13 / 00.30 *|
|
||||||
|
\*************************************************************************/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <alloc.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <graphics.h>
|
||||||
|
|
||||||
|
#include "..\libs\make_bot\make_bot.h"
|
||||||
|
#include "..\libs\bdatos\bdatos.hh"
|
||||||
|
#include "Herm.h"
|
||||||
|
|
||||||
|
extern int far Espera_TeclaRaton(void);
|
||||||
|
|
||||||
|
|
||||||
|
CONFIG Config;
|
||||||
|
BDatos BConfig;
|
||||||
|
|
||||||
|
extern int DifDate( struct date FechaF, struct date FechaO, struct date *FechaD );
|
||||||
|
extern struct date FechaActual;
|
||||||
|
|
||||||
|
extern char FICHA_REGISTRO;
|
||||||
|
extern int ComparaRegistros( const void *A, const void *B );
|
||||||
|
|
||||||
|
void CompruebaTiempoBorrados( char *File );
|
||||||
|
void MarcaConfig( int item, int como );
|
||||||
|
void EditConfig( int item );
|
||||||
|
|
||||||
|
void LeeConfiguracion(void)
|
||||||
|
{
|
||||||
|
long i;
|
||||||
|
BDatos GHtmp;
|
||||||
|
|
||||||
|
if ( BConfig.AbrirReg( "hermandad.cfg", sizeof( Config ) ) != OK )
|
||||||
|
Error(BConfig.cError);
|
||||||
|
|
||||||
|
if ( BConfig.Registros() == 0 )
|
||||||
|
{
|
||||||
|
|
||||||
|
// Ponemos a por defecto la configuraci¢n
|
||||||
|
Config.config_color = 0; // Configura que paleta usa
|
||||||
|
Config.item_ordenado[0]= 0; // item por el que esta ordenado
|
||||||
|
Config.item_ordenado[1]= 0; // item por el que esta ordenado
|
||||||
|
Config.TiempoBorrados = 6; // Tiempo que hay que mantener los items, borrados
|
||||||
|
// en meses...
|
||||||
|
GHtmp.AbrirReg( "datos\\hermanos.dbf", sizeof( HermStruct ) );
|
||||||
|
Config.NHnoHna[0] = GHtmp.NRegTotal(); // Numero de Hermanos, Hermanas
|
||||||
|
GHtmp.CerrarReg();
|
||||||
|
GHtmp.AbrirReg( "datos\\hermanas.dbf", sizeof( HermStruct ) );
|
||||||
|
Config.NHnoHna[1] = GHtmp.NRegTotal();
|
||||||
|
Config.TiempoBorrados = 6;
|
||||||
|
Config.CuotaBaseFam[0] = 0;
|
||||||
|
Config.CuotaBaseFam[1] = 0;
|
||||||
|
Config.LineasImpresion = 60;
|
||||||
|
Config.ImpNormal[0]='\0';
|
||||||
|
Config.ImpCompr[0]='\0';
|
||||||
|
|
||||||
|
|
||||||
|
GHtmp.CerrarReg();
|
||||||
|
|
||||||
|
Config.LineasImpresion = 60;
|
||||||
|
|
||||||
|
for ( i=0; i < 40; i++ )
|
||||||
|
{
|
||||||
|
strcpy( Config.Insignia[i].NInsignia, "ninguna" );
|
||||||
|
Config.Insignia[i].Suplemento = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inserta un Reg por arriba de pos.
|
||||||
|
if ( BConfig.InsReg( (void *)&Config, BConfig.Registros(), ARRIBA ) != OK )
|
||||||
|
Error(BConfig.cError);
|
||||||
|
} else
|
||||||
|
BConfig.LeeReg( (void *)&Config, 0 );
|
||||||
|
|
||||||
|
|
||||||
|
// Chequeamos el tiempo permitido en hermanos borrados
|
||||||
|
CompruebaTiempoBorrados( "datos\\hnos_brr.dbf" );
|
||||||
|
CompruebaTiempoBorrados( "datos\\hnas_brr.dbf" );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CompruebaTiempoBorrados( char *File )
|
||||||
|
{
|
||||||
|
BDatos Borr;
|
||||||
|
HERMBORRADOS HB;
|
||||||
|
long i;
|
||||||
|
int enc;
|
||||||
|
struct date d;
|
||||||
|
|
||||||
|
getdate(&d);
|
||||||
|
|
||||||
|
if ( Borr.AbrirReg( File, sizeof( HERMBORRADOS ) ) == OK )
|
||||||
|
{
|
||||||
|
for ( i = 0; i < Borr.Registros() && enc == OK; )
|
||||||
|
{
|
||||||
|
enc = Borr.LeeReg( (void *)&HB, i );
|
||||||
|
// Si se cumple...
|
||||||
|
if ( ( ( ( HB.FechaBorrado.da_year - d.da_year - 1 ) * 12 ) < 0 ? 0 : ( ( HB.FechaBorrado.da_year - d.da_year - 1 ) * 12 ) ) + abs(d.da_mon - HB.FechaBorrado.da_mon) >= Config.TiempoBorrados )
|
||||||
|
{
|
||||||
|
Borr.DelReg( Borr.RegActual() );
|
||||||
|
} else i++;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Borr.CerrarReg();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConfiguracionGlobal(void)
|
||||||
|
{
|
||||||
|
int ok, item = 0, dev, key;
|
||||||
|
long i;
|
||||||
|
struct date d;
|
||||||
|
|
||||||
|
getdate(&d);
|
||||||
|
|
||||||
|
BDatos Herm;
|
||||||
|
HermStruct HermS;
|
||||||
|
|
||||||
|
Imprime_Estaticos( 70, "herm.img" );
|
||||||
|
for ( ok = 0; ok < 10; ok++ )
|
||||||
|
MarcaConfig( ok, NORMAL );
|
||||||
|
|
||||||
|
ok = 0;
|
||||||
|
do{
|
||||||
|
MarcaConfig( item, INTENSO );
|
||||||
|
dev = Espera_TeclaRaton();
|
||||||
|
MarcaConfig( item, NORMAL );
|
||||||
|
if ( dev == 0 )
|
||||||
|
{
|
||||||
|
if ( kbhit() )
|
||||||
|
switch( key = getch() )
|
||||||
|
{
|
||||||
|
case 27:
|
||||||
|
ok = 1;
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
switch( getch() )
|
||||||
|
{
|
||||||
|
//ARRIBA -- IZQUIERDA
|
||||||
|
case 72:
|
||||||
|
case 75:
|
||||||
|
case 15:
|
||||||
|
item--; if ( item<0 ) item = 9;
|
||||||
|
break;
|
||||||
|
// ABAJO -- DERECHA
|
||||||
|
case 80:
|
||||||
|
case 77:
|
||||||
|
case 9:
|
||||||
|
item++; if ( item>9 ) item = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ungetch( key );
|
||||||
|
case 13:
|
||||||
|
EditConfig(item);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ( x_raton > 380 && x_raton < 630 && y_raton > 95 && y_raton < 125 )
|
||||||
|
{
|
||||||
|
if ( Optar( 1, "FIN REGISTRO Borrados", "Seguro que desea eliminar", "el registro de n§ eliminados", NULL ) )
|
||||||
|
{
|
||||||
|
remove( "datos\\hnos_brr.dbf" );
|
||||||
|
remove( "datos\\hnas_brr.dbf" );
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
if ( x_raton > 15 && x_raton < 345 && y_raton > 315 && y_raton < 350 )
|
||||||
|
{
|
||||||
|
if ( Optar( 1, "CONFIRME OPERACION", "La reinicializaci¢n es", "irreversible. CONFIRME !!", "Se recalcularan las posiciones", NULL ) )
|
||||||
|
{
|
||||||
|
|
||||||
|
unlink( "datos\\hnos_brr.dbf" );
|
||||||
|
unlink( "datos\\hnas_brr.dbf" );
|
||||||
|
|
||||||
|
Herm.AbrirReg( "datos\\hermanos.dbf", sizeof( HermStruct ) );
|
||||||
|
// Ordenamos por n§ de hermanos
|
||||||
|
|
||||||
|
Config.NHnoHna[0] = Herm.Registros(); // Numero de Hermanos, Hermanas
|
||||||
|
Config.item_ordenado[0] = 0;
|
||||||
|
Config.item_ordenado[1] = 0;
|
||||||
|
|
||||||
|
if ( BConfig.EscribeReg((void *)&Config, 0) != OK )
|
||||||
|
Error(BConfig.cError);
|
||||||
|
if ( Herm.SortReg(ComparaRegistros) == OK )
|
||||||
|
{
|
||||||
|
Herm.SortReg(ComparaRegistros);
|
||||||
|
|
||||||
|
for ( i=0; i < Herm.Registros(); i++ )
|
||||||
|
{
|
||||||
|
Herm.LeeReg( (void *)&HermS, i );
|
||||||
|
HermS.Varios.RealPenit = 0;
|
||||||
|
if ( // Mayor de 18 a¤os
|
||||||
|
DifDate( d, HermS.FechaN, NULL ) > 18 &&
|
||||||
|
DifDate( d, HermS.Antig, NULL ) > 1 &&
|
||||||
|
|
||||||
|
/*
|
||||||
|
( d.da_year - HermS.FechaN.da_year ) > 18 &&
|
||||||
|
// Mas de un a¤o de antiguedad
|
||||||
|
( d.da_year - HermS.Antig.da_year ) > 1 &&
|
||||||
|
*/
|
||||||
|
HermS.FechaN.da_year != 0
|
||||||
|
)
|
||||||
|
{
|
||||||
|
HermS.Varios.PuedVotar = 1;
|
||||||
|
} else {
|
||||||
|
HermS.Varios.PuedVotar = 0;
|
||||||
|
}
|
||||||
|
HermS.NHno = i+1;
|
||||||
|
Herm.EscribeReg( (void *)&HermS, i );
|
||||||
|
}
|
||||||
|
} else Error( Herm.cError );
|
||||||
|
Herm.CerrarReg();
|
||||||
|
Herm.AbrirReg( "datos\\hermanas.dbf", sizeof( HermStruct ) );
|
||||||
|
|
||||||
|
Config.NHnoHna[1] = Herm.Registros();
|
||||||
|
Config.item_ordenado[0] = 0;
|
||||||
|
Config.item_ordenado[1] = 0;
|
||||||
|
if ( BConfig.EscribeReg((void *)&Config, 0) != OK )
|
||||||
|
Error(BConfig.cError);
|
||||||
|
if ( Herm.SortReg(ComparaRegistros) == OK )
|
||||||
|
{
|
||||||
|
for ( i=0; i < Herm.Registros(); i++ )
|
||||||
|
{
|
||||||
|
Herm.LeeReg( (void *)&HermS, i );
|
||||||
|
HermS.Varios.RealPenit = 0;
|
||||||
|
if ( // Mayor de 18 a¤os
|
||||||
|
DifDate( d, HermS.FechaN, NULL ) > 18 &&
|
||||||
|
DifDate( d, HermS.Antig, NULL ) > 1 &&
|
||||||
|
/*
|
||||||
|
( d.da_year - HermS.FechaN.da_year ) > 18 &&
|
||||||
|
// Mas de un a¤o de antiguedad
|
||||||
|
( d.da_year - HermS.Antig.da_year ) > 1 &&
|
||||||
|
*/
|
||||||
|
HermS.FechaN.da_year != 0
|
||||||
|
)
|
||||||
|
{
|
||||||
|
HermS.Varios.PuedVotar = 1;
|
||||||
|
} else {
|
||||||
|
HermS.Varios.PuedVotar = 0;
|
||||||
|
}
|
||||||
|
HermS.NHno = i+1;
|
||||||
|
Herm.EscribeReg( (void *)&HermS, i );
|
||||||
|
}
|
||||||
|
} else Error( Herm.cError );
|
||||||
|
Herm.CerrarReg();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}while( !ok );
|
||||||
|
|
||||||
|
// Guardamos configuraci¢n
|
||||||
|
BConfig.EscribeReg( (void *)&Config, 0 );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MarcaConfig( int item, int como )
|
||||||
|
{
|
||||||
|
char buffer[80];
|
||||||
|
|
||||||
|
if ( como == INTENSO )
|
||||||
|
setfillstyle( SOLID_FILL, ROJO );
|
||||||
|
else
|
||||||
|
setfillstyle( SOLID_FILL, BLANCO );
|
||||||
|
|
||||||
|
setcolor( NEGRO );
|
||||||
|
switch( item )
|
||||||
|
{
|
||||||
|
// Ultimo hermano
|
||||||
|
case 0:
|
||||||
|
bar ( 270, 60, 350, 78 );
|
||||||
|
sprintf( buffer, " %04ld", Config.NHnoHna[0] );
|
||||||
|
outtextxy( 270, 60, buffer );
|
||||||
|
break;
|
||||||
|
// Ultima hermana
|
||||||
|
case 1:
|
||||||
|
bar ( 270, 80, 350, 98 );
|
||||||
|
sprintf( buffer, " %04ld", Config.NHnoHna[1] );
|
||||||
|
outtextxy( 270, 80, buffer );
|
||||||
|
break;
|
||||||
|
// Tiempo ha mantener los hermanos borrados
|
||||||
|
case 2:
|
||||||
|
bar ( 270, 100, 350, 118 );
|
||||||
|
sprintf( buffer, " %4d", Config.TiempoBorrados );
|
||||||
|
outtextxy( 270, 100, buffer );
|
||||||
|
break;
|
||||||
|
// Cadena imprimir normal
|
||||||
|
case 3:
|
||||||
|
bar ( 270, 150, 460, 168 );
|
||||||
|
outtextxy( 270, 150, Config.ImpNormal );
|
||||||
|
break;
|
||||||
|
// Cadena imprimir comprimido
|
||||||
|
case 4:
|
||||||
|
bar ( 270, 170, 460, 188 );
|
||||||
|
outtextxy( 270, 170, Config.ImpCompr );
|
||||||
|
break;
|
||||||
|
// N§ de lineas
|
||||||
|
case 5:
|
||||||
|
bar ( 270, 190, 350, 208 );
|
||||||
|
sprintf( buffer, " %4d", Config.LineasImpresion );
|
||||||
|
outtextxy( 270, 190, buffer );
|
||||||
|
break;
|
||||||
|
// Couta Base
|
||||||
|
case 6:
|
||||||
|
bar ( 270, 220, 350, 238 );
|
||||||
|
sprintf( buffer, " %4ld", Config.CuotaBaseFam[0] );
|
||||||
|
outtextxy( 270, 220, buffer );
|
||||||
|
break;
|
||||||
|
// Couta Familiar
|
||||||
|
case 7:
|
||||||
|
bar ( 550, 220, 630, 238 );
|
||||||
|
sprintf( buffer, " %4ld", Config.CuotaBaseFam[1] );
|
||||||
|
outtextxy( 550, 220, buffer );
|
||||||
|
break;
|
||||||
|
// Mes de las votaciones
|
||||||
|
case 8:
|
||||||
|
bar ( 270, 250, 350, 268 );
|
||||||
|
sprintf( buffer, " %4d", Config.MesVotacion );
|
||||||
|
outtextxy( 270, 250, buffer );
|
||||||
|
break;
|
||||||
|
// Hora de Salida
|
||||||
|
case 9:
|
||||||
|
bar ( 550, 250, 630, 268 );
|
||||||
|
sprintf( buffer, " %5s", Config.HoraSalida );
|
||||||
|
outtextxy( 550, 250, buffer );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void EditConfig( int item )
|
||||||
|
{
|
||||||
|
char buffer[80];
|
||||||
|
|
||||||
|
switch( item )
|
||||||
|
{
|
||||||
|
// Ultimo hermano
|
||||||
|
case 0:
|
||||||
|
sprintf( buffer, "%ld", Config.NHnoHna[0] );
|
||||||
|
if ( !( InputCadenaG_T5( buffer, 1, 5, BLANCO, AZUL, 270, 60, 350, 78 ) >> 8 ) )
|
||||||
|
Config.NHnoHna[0] = atol ( buffer );
|
||||||
|
break;
|
||||||
|
// Ultima hermana
|
||||||
|
case 1:
|
||||||
|
sprintf( buffer, "%ld", Config.NHnoHna[1] );
|
||||||
|
if ( !( InputCadenaG_T5( buffer, 1, 5, BLANCO, AZUL, 270, 80, 350, 98 ) >> 8 ) )
|
||||||
|
Config.NHnoHna[1] = atol ( buffer );
|
||||||
|
break;
|
||||||
|
// Tiempo ha mantener los hermanos borrados
|
||||||
|
case 2:
|
||||||
|
sprintf( buffer, "%d", Config.TiempoBorrados );
|
||||||
|
if ( !( InputCadenaG_T5( buffer, 1, 3, BLANCO, AZUL, 270, 100, 350, 118 ) >> 8 ) )
|
||||||
|
Config.TiempoBorrados = atoi ( buffer );
|
||||||
|
break;
|
||||||
|
// Cadena imprimir normal
|
||||||
|
case 3:
|
||||||
|
sprintf( buffer, "%s", Config.ImpNormal );
|
||||||
|
if ( !( InputCadenaG_T5( buffer, 0, 19, BLANCO, AZUL, 270, 150, 460, 168 ) >> 8 ) )
|
||||||
|
strcpy( Config.ImpNormal, buffer );
|
||||||
|
break;
|
||||||
|
// Cadena imprimir comprimido
|
||||||
|
case 4:
|
||||||
|
sprintf( buffer, "%s", Config.ImpCompr );
|
||||||
|
if ( !( InputCadenaG_T5( buffer, 0, 19, BLANCO, AZUL, 270, 170, 460, 188 ) >> 8 ) )
|
||||||
|
strcpy( Config.ImpCompr, buffer );
|
||||||
|
break;
|
||||||
|
// N§ de lineas
|
||||||
|
case 5:
|
||||||
|
sprintf( buffer, "%d", Config.LineasImpresion );
|
||||||
|
if ( !( InputCadenaG_T5( buffer, 1, 2, BLANCO, AZUL, 270, 190, 350, 208 ) >> 8 ) )
|
||||||
|
Config.LineasImpresion = atoi( buffer );
|
||||||
|
break;
|
||||||
|
// Couta Base
|
||||||
|
case 6:
|
||||||
|
sprintf( buffer, "%ld", Config.CuotaBaseFam[0] );
|
||||||
|
if ( !( InputCadenaG_T5( buffer, 1, 5, BLANCO, AZUL, 270, 220, 350, 238 ) >> 8 ) )
|
||||||
|
Config.CuotaBaseFam[0] = atol( buffer );
|
||||||
|
break;
|
||||||
|
// Couta Familiar
|
||||||
|
case 7:
|
||||||
|
sprintf( buffer, "%ld", Config.CuotaBaseFam[1] );
|
||||||
|
if ( !( InputCadenaG_T5( buffer, 1, 5, BLANCO, AZUL, 550, 220, 630, 238 ) >> 8 ) )
|
||||||
|
Config.CuotaBaseFam[1] = atol( buffer );
|
||||||
|
break;
|
||||||
|
// Mes votacion
|
||||||
|
case 8:
|
||||||
|
sprintf( buffer, "%d", Config.MesVotacion );
|
||||||
|
if ( !( InputCadenaG_T5( buffer, 1, 2, BLANCO, AZUL, 270, 250, 350, 268 ) >> 8 ) )
|
||||||
|
Config.MesVotacion = atoi( buffer );
|
||||||
|
break;
|
||||||
|
// HoraSalida
|
||||||
|
case 9:
|
||||||
|
sprintf( buffer, "%s", Config.HoraSalida );
|
||||||
|
if ( !( InputCadenaG_T5( buffer, 0, 5, BLANCO, AZUL, 550, 250, 630, 268 ) >> 8 ) )
|
||||||
|
strcpy( Config.HoraSalida, buffer );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
2649
HERM_GST.CPP
Normal file
2649
HERM_GST.CPP
Normal file
File diff suppressed because it is too large
Load Diff
173
HERM_IGA.CPP
Normal file
173
HERM_IGA.CPP
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
/*************************************************************************\
|
||||||
|
|* *|
|
||||||
|
|* HERM_IGA *|
|
||||||
|
|* *|
|
||||||
|
|* Descripci¢n: *|
|
||||||
|
|* Gestion de insginias ( solo ense¤a desde 1 hata 19 ) *|
|
||||||
|
|* *|
|
||||||
|
\*************************************************************************/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <alloc.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <graphics.h>
|
||||||
|
|
||||||
|
#include "..\libs\make_bot\make_bot.h"
|
||||||
|
#include "..\libs\bdatos\bdatos.hh"
|
||||||
|
#include "Herm.h"
|
||||||
|
|
||||||
|
extern CONFIG Config;
|
||||||
|
extern BDatos BConfig;
|
||||||
|
|
||||||
|
extern int far Espera_TeclaRaton(void);
|
||||||
|
|
||||||
|
void MuestraInsignia( int insignia, char como, int CtoVirgen, int columna );
|
||||||
|
|
||||||
|
void GestionInsignias(void)
|
||||||
|
{
|
||||||
|
int i, key; char buffer[80];
|
||||||
|
int X1, X0;
|
||||||
|
|
||||||
|
char insignia, ok, CtoVirgen, columna;
|
||||||
|
|
||||||
|
|
||||||
|
Imprime_Estaticos(50, "Herm.img");
|
||||||
|
settextstyle( SMALL_FONT, HORIZ_DIR, 4 );
|
||||||
|
|
||||||
|
for ( insignia = 1; insignia < 20; insignia++ )
|
||||||
|
{
|
||||||
|
MuestraInsignia( insignia, NORMAL, 0, 0 );
|
||||||
|
MuestraInsignia( insignia, NORMAL, 1, 0 );
|
||||||
|
|
||||||
|
MuestraInsignia( insignia, NORMAL, 0, 1 );
|
||||||
|
MuestraInsignia( insignia, NORMAL, 1, 1 );
|
||||||
|
}
|
||||||
|
insignia = 1; CtoVirgen = 0;
|
||||||
|
columna = 0;
|
||||||
|
|
||||||
|
ok = 0;
|
||||||
|
do{
|
||||||
|
MuestraInsignia( insignia, INTENSO, CtoVirgen, columna );
|
||||||
|
Espera_TeclaRaton();
|
||||||
|
MuestraInsignia( insignia, NORMAL, CtoVirgen, columna );
|
||||||
|
if ( !kbhit() ) // Donde pincho el raton
|
||||||
|
{
|
||||||
|
for ( i = 0; i < 20; i++ )
|
||||||
|
{
|
||||||
|
if ( x_raton > 15 && x_raton < 180 && y_raton > 70+20*i && y_raton < 90+20*i )
|
||||||
|
{
|
||||||
|
CtoVirgen = 0; columna = 0; insignia = i+1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if ( x_raton > 200 && x_raton < 310 && y_raton > 70+20*i && y_raton < 90+20*i )
|
||||||
|
{
|
||||||
|
CtoVirgen = 0; columna = 1; insignia = i+1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if ( x_raton > 330 && x_raton < 495 && y_raton > 70+20*i && y_raton < 90+20*i )
|
||||||
|
{
|
||||||
|
CtoVirgen = 1; columna = 0; insignia = i+1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if ( x_raton > 495 && x_raton < 625 && y_raton > 70+20*i && y_raton < 90+20*i )
|
||||||
|
{
|
||||||
|
CtoVirgen = 1; columna = 1; insignia = i+1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Anclar_Raton();
|
||||||
|
} else
|
||||||
|
switch( ( key = getch() ) )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
switch( getch() )
|
||||||
|
{
|
||||||
|
// Flecha Izquierda
|
||||||
|
case 75:
|
||||||
|
columna--;
|
||||||
|
if ( columna < 0 )
|
||||||
|
{
|
||||||
|
if ( CtoVirgen == 1 )
|
||||||
|
{
|
||||||
|
CtoVirgen = 0; columna = 1;
|
||||||
|
}else{
|
||||||
|
columna = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Flecha Derecha
|
||||||
|
case 77:
|
||||||
|
columna ++;
|
||||||
|
if ( columna > 1 )
|
||||||
|
{
|
||||||
|
if ( CtoVirgen == 0 )
|
||||||
|
{
|
||||||
|
CtoVirgen=1; columna = 0;
|
||||||
|
}else{
|
||||||
|
columna = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Flecha Arriba
|
||||||
|
case 80:
|
||||||
|
insignia++; if ( insignia > 19 ) insignia = 19;
|
||||||
|
break;
|
||||||
|
// Flecha Abajo
|
||||||
|
case 72:
|
||||||
|
insignia--; if ( insignia < 1 ) insignia = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
case 9:
|
||||||
|
CtoVirgen = !CtoVirgen;
|
||||||
|
columna = 0;
|
||||||
|
break;
|
||||||
|
// ESC
|
||||||
|
case 27:
|
||||||
|
ok = 1;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if ( key != 13 && key != 8 ) ungetch(key);
|
||||||
|
if ( columna == 0)
|
||||||
|
strcpy( buffer, Config.Insignia[insignia+20*CtoVirgen].NInsignia );
|
||||||
|
else
|
||||||
|
sprintf( buffer, "%ld", Config.Insignia[insignia+20*CtoVirgen].Suplemento );
|
||||||
|
if ( !( InputCadenaG_T5( buffer, columna, (columna == 0) ? 29 : 5, BLANCO, AZUL, ( (columna==0) ? 15 + CtoVirgen*315 : 200 + CtoVirgen*315 ), 70+20*(insignia-1), ( (columna==0) ? 200 + CtoVirgen*315 : 300 + CtoVirgen*315 ), 90+20*(insignia-1) - 1 ) >> 8 ) )
|
||||||
|
if ( columna == 0)
|
||||||
|
strcpy( Config.Insignia[insignia+20*CtoVirgen].NInsignia, buffer );
|
||||||
|
else
|
||||||
|
Config.Insignia[insignia+20*CtoVirgen].Suplemento = atol(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
}while( !ok );
|
||||||
|
|
||||||
|
// Salvamos configuracion
|
||||||
|
BConfig.EscribeReg( (void *)&Config, 0 );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MuestraInsignia( int insignia, char como, int CtoVirgen, int columna )
|
||||||
|
{
|
||||||
|
int X0, Y0, X1, Y1;
|
||||||
|
char buffer[80];
|
||||||
|
setfillstyle( SOLID_FILL, (como==NORMAL) ? BLANCO : ROJO );
|
||||||
|
setcolor( NEGRO );
|
||||||
|
|
||||||
|
if ( columna == 0)
|
||||||
|
sprintf( buffer, "%29s", Config.Insignia[insignia+20*CtoVirgen].NInsignia );
|
||||||
|
else
|
||||||
|
sprintf( buffer, " %05ld", Config.Insignia[insignia+20*CtoVirgen].Suplemento );
|
||||||
|
|
||||||
|
insignia--;
|
||||||
|
X0 = ( (columna==0) ? 15 + CtoVirgen*315 : 200 + CtoVirgen*315 );
|
||||||
|
Y0 = 70+20*insignia;
|
||||||
|
X1 = ( (columna==0) ? 200 + CtoVirgen*315 : 300 + CtoVirgen*315 );
|
||||||
|
Y1 = 90+20*insignia;
|
||||||
|
|
||||||
|
bar( X0, Y0, X1, Y1-1 );
|
||||||
|
|
||||||
|
outtextxy( X0, Y0, buffer );
|
||||||
|
}
|
978
HERM_LST.CPP
Normal file
978
HERM_LST.CPP
Normal file
@ -0,0 +1,978 @@
|
|||||||
|
/*************************************************************************\
|
||||||
|
|* *|
|
||||||
|
|* HERM_LST *|
|
||||||
|
|* *|
|
||||||
|
|* Descripci¢n: *|
|
||||||
|
|* Listados por pantalla e impresos (RAPIDOS) *|
|
||||||
|
|* *|
|
||||||
|
\*************************************************************************/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <alloc.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <graphics.h>
|
||||||
|
|
||||||
|
#include "..\libs\make_bot\make_bot.h"
|
||||||
|
#include "..\libs\bdatos\bdatos.hh"
|
||||||
|
#include "Herm.h"
|
||||||
|
|
||||||
|
#define AVANCES_DE_PAGINA 37
|
||||||
|
|
||||||
|
|
||||||
|
void ImprimeEtiquetas(void);
|
||||||
|
void ImprimeFacturas(void);
|
||||||
|
|
||||||
|
void OptenPaginasIniFin( int *Inicio, int *Fin, int NRegistros );
|
||||||
|
|
||||||
|
void ImprimeListaSitios(void);
|
||||||
|
void MuestraLinea(int Tipo_de_Listado);
|
||||||
|
void ImprimeLinea( int Tipo_de_Listado, FILE *file_out );
|
||||||
|
void ImprimePaginas( int Tipo_de_Listado );
|
||||||
|
void MuestraPagina( int adelante_atras, int Tipo_de_Listado );
|
||||||
|
void Escr_Mensaje(char *Encabezado, char lineas, char Mensaje[][50] );
|
||||||
|
|
||||||
|
extern void ImprimeFicha(void);
|
||||||
|
extern void CodigoImpresora( char *codigo );
|
||||||
|
extern int ComparaRegistros( const void *A, const void *B );
|
||||||
|
|
||||||
|
extern char FICHA_REGISTRO;
|
||||||
|
|
||||||
|
extern struct date FechaActual;
|
||||||
|
|
||||||
|
extern CONFIG Config;
|
||||||
|
extern BDatos BConfig;
|
||||||
|
|
||||||
|
extern BDatos BHerm;
|
||||||
|
extern HermStruct SHerm, BHtmp;
|
||||||
|
|
||||||
|
extern BDatos BHBorrados;
|
||||||
|
extern HERMBORRADOS HermanosBorrados;
|
||||||
|
|
||||||
|
void ListadosRapidos( int Tipo_de_Listado )
|
||||||
|
{
|
||||||
|
char Mensaje[][50] = { "La base de Datos", "esta vacia." };
|
||||||
|
char File[80];
|
||||||
|
int ok = 0, BPush;
|
||||||
|
True_Push = 0;
|
||||||
|
|
||||||
|
int HnoHna;
|
||||||
|
|
||||||
|
if ( Optar( 1, "BASE A LISTAR", "Aceptar: HERMANOS", "Cancelar: HERMANAS", NULL ) )
|
||||||
|
HnoHna = HERMANOS;
|
||||||
|
else
|
||||||
|
HnoHna = HERMANAS;
|
||||||
|
|
||||||
|
getdate( &FechaActual );
|
||||||
|
|
||||||
|
strcpy( BHerm.MyHeader.ProgName, "Hermadad" );
|
||||||
|
BHerm.MyHeader.VerHi = 1;
|
||||||
|
BHerm.MyHeader.VerLow = 0;
|
||||||
|
|
||||||
|
Imprime_Estaticos(60, "Herm.img");
|
||||||
|
|
||||||
|
settextstyle( SMALL_FONT, HORIZ_DIR, 4 );
|
||||||
|
|
||||||
|
// Base de Datos
|
||||||
|
if ( HnoHna == HERMANOS )
|
||||||
|
{
|
||||||
|
strcpy( File, "datos\\hermanos.dbf" );
|
||||||
|
FICHA_REGISTRO = 0;
|
||||||
|
} else {
|
||||||
|
strcpy( File, "datos\\hermanas.dbf" );
|
||||||
|
FICHA_REGISTRO = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( BHerm.AbrirReg( File, sizeof( HermStruct ) ) != OK )
|
||||||
|
Error(BHerm.cError);
|
||||||
|
|
||||||
|
if ( BHerm.Registros() == 0 )
|
||||||
|
{
|
||||||
|
Escr_Mensaje( "ERROR", 2, Mensaje );
|
||||||
|
BHerm.CerrarReg();
|
||||||
|
} else {
|
||||||
|
if ( Tipo_de_Listado == TUNICA_HDAD && Config.item_ordenado[FICHA_REGISTRO] != 9 )
|
||||||
|
{
|
||||||
|
Imprime_Estaticos(20, "Herm.img");
|
||||||
|
|
||||||
|
settextstyle( SMALL_FONT, HORIZ_DIR, 6 );
|
||||||
|
|
||||||
|
|
||||||
|
setcolor( 63 ); outtextxy( 172, 165, " Comando Ordenar" );
|
||||||
|
setcolor( ROJO );
|
||||||
|
|
||||||
|
outtextxy( 172, 200+20*1, " Preparando base de Datos" );
|
||||||
|
outtextxy( 172, 200+20*2, " Por favor, espere..." );
|
||||||
|
|
||||||
|
Config.item_ordenado[FICHA_REGISTRO] = 8;
|
||||||
|
if ( BConfig.EscribeReg((void *)&Config, 0) != OK )
|
||||||
|
Error(BConfig.cError);
|
||||||
|
BHerm.SortReg(ComparaRegistros);
|
||||||
|
|
||||||
|
Imprime_Estaticos(60, "Herm.img");
|
||||||
|
|
||||||
|
settextstyle( SMALL_FONT, HORIZ_DIR, 4 );
|
||||||
|
|
||||||
|
} else
|
||||||
|
if ( Tipo_de_Listado == FACTURAS )
|
||||||
|
{
|
||||||
|
ImprimeFacturas();
|
||||||
|
BHerm.CerrarReg();
|
||||||
|
return ;
|
||||||
|
} else
|
||||||
|
if ( Tipo_de_Listado == ETIQUETAS )
|
||||||
|
{
|
||||||
|
ImprimeEtiquetas();
|
||||||
|
BHerm.CerrarReg();
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
BHerm.LeeReg( (void *)&SHerm, 0 );
|
||||||
|
MuestraLinea(Tipo_de_Listado);
|
||||||
|
MuestraPagina( 1, Tipo_de_Listado);
|
||||||
|
|
||||||
|
while( !ok )
|
||||||
|
{
|
||||||
|
BPush = Comprueba_Secuencia( 4, NULL );
|
||||||
|
switch ( BPush )
|
||||||
|
{
|
||||||
|
case 0: // No se pulso ningun BOTON
|
||||||
|
while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER
|
||||||
|
// El raton todav¡a sigue pulsado
|
||||||
|
break;
|
||||||
|
case -2:
|
||||||
|
if ( (BPush = getch()) != 27 )
|
||||||
|
{
|
||||||
|
while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER
|
||||||
|
} else { ok = 1; }
|
||||||
|
break;
|
||||||
|
// Tecla Normal
|
||||||
|
case -1: // Hay una tecla especial en BUFFER
|
||||||
|
// La eliminamos
|
||||||
|
while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER
|
||||||
|
break;
|
||||||
|
|
||||||
|
// INICIO DE BOTONES
|
||||||
|
// Retroceso
|
||||||
|
case 1:
|
||||||
|
MuestraPagina( -1, Tipo_de_Listado );
|
||||||
|
break;
|
||||||
|
// Imprimir
|
||||||
|
case 2:
|
||||||
|
if ( Tipo_de_Listado == PAPELETAS_SITIO )
|
||||||
|
ImprimeListaSitios();
|
||||||
|
else
|
||||||
|
ImprimePaginas( Tipo_de_Listado );
|
||||||
|
break;
|
||||||
|
// Avance
|
||||||
|
case 3:
|
||||||
|
MuestraPagina( 1, Tipo_de_Listado );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
BHerm.CerrarReg();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void MuestraPagina( int adelante_atras, int Tipo_de_Listado )
|
||||||
|
{
|
||||||
|
long i, CurrReg;
|
||||||
|
static long antigua_pos = 0;
|
||||||
|
int virtual_pos = 0;
|
||||||
|
char buffer[500];
|
||||||
|
|
||||||
|
CurrReg = BHerm.RegActual();
|
||||||
|
|
||||||
|
if ( (CurrReg == 0 && adelante_atras == -1) )
|
||||||
|
return;
|
||||||
|
setfillstyle(SOLID_FILL, BLANCO);
|
||||||
|
bar( 11, 66, 634, 449 );
|
||||||
|
setcolor( AZUL );
|
||||||
|
|
||||||
|
|
||||||
|
if ( adelante_atras == -1 )
|
||||||
|
{
|
||||||
|
CurrReg = antigua_pos;
|
||||||
|
virtual_pos = AVANCES_DE_PAGINA-1;
|
||||||
|
} else {
|
||||||
|
virtual_pos = 0;
|
||||||
|
antigua_pos = BHerm.RegActual();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for( i=CurrReg; ( virtual_pos >= 0 && virtual_pos < AVANCES_DE_PAGINA && i >= 0 && i < BHerm.Registros() ) ; i+= adelante_atras )
|
||||||
|
{
|
||||||
|
if ( BHerm.LeeReg( (void *)&SHerm, i ) != OK ) return;
|
||||||
|
switch( Tipo_de_Listado )
|
||||||
|
{
|
||||||
|
case VOTANTES:
|
||||||
|
// si cumple los requisitos
|
||||||
|
if ( SHerm.Varios.PuedVotar )
|
||||||
|
{
|
||||||
|
// 12345 123456789-12345 123456789-12345 123456789-12345 123456789-123456789- 12-12-1234 12-12-1234
|
||||||
|
sprintf( buffer, "%5ld %-15s", SHerm.NHno, SHerm.Nombre );
|
||||||
|
outtextxy( 10, 75+10*virtual_pos, buffer );
|
||||||
|
// Los apellidos seran unidos
|
||||||
|
sprintf( buffer, "%s %s", SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
buffer[21] = '\0';
|
||||||
|
outtextxy( 140, 75+10*virtual_pos, buffer );
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", SHerm.Direccion, ( SHerm.Num[0] != '\0' ) ? "," : "", SHerm.Num, ( SHerm.Piso[0] != '\0' ) ? "," : "", SHerm.Piso );
|
||||||
|
outtextxy( 265, 75+10*virtual_pos, buffer );
|
||||||
|
sprintf( buffer, "%02d-%02d-%04d %02d-%02d-%04d"
|
||||||
|
,(int)SHerm.Antig.da_day, (int)SHerm.Antig.da_mon, SHerm.Antig.da_year,
|
||||||
|
(int)SHerm.FechaN.da_day, (int)SHerm.FechaN.da_mon, SHerm.FechaN.da_year
|
||||||
|
);
|
||||||
|
outtextxy( 505, 75+10*virtual_pos, buffer );
|
||||||
|
|
||||||
|
|
||||||
|
virtual_pos +=adelante_atras;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case PAPELETAS_SITIO:
|
||||||
|
if ( SHerm.Varios.RealPenit )
|
||||||
|
{
|
||||||
|
// si cumple los requisitos
|
||||||
|
// 12345 123456789-12345 123456789-12345 123456789-12345 123456789-123456789- 12-12-1234 12-12-1234
|
||||||
|
sprintf( buffer, "%5ld %-15s", SHerm.NHno, SHerm.Nombre );
|
||||||
|
outtextxy( 10, 75+10*virtual_pos, buffer );
|
||||||
|
// Los apellidos seran unidos
|
||||||
|
sprintf( buffer, "%s %s", SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
buffer[21] = '\0';
|
||||||
|
outtextxy( 140, 75+10*virtual_pos, buffer );
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", SHerm.Direccion, ( SHerm.Num[0] != '\0' ) ? "," : "", SHerm.Num, ( SHerm.Piso[0] != '\0' ) ? "," : "", SHerm.Piso );
|
||||||
|
outtextxy( 265, 75+10*virtual_pos, buffer );
|
||||||
|
sprintf( buffer, "%02d-%02d-%04d %s"
|
||||||
|
,(int)SHerm.Antig.da_day, (int)SHerm.Antig.da_mon, SHerm.Antig.da_year,
|
||||||
|
SHerm.Telefono1
|
||||||
|
);
|
||||||
|
outtextxy( 505, 75+10*virtual_pos, buffer );
|
||||||
|
virtual_pos +=adelante_atras;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GRAL_HERMANOS:
|
||||||
|
case GRAL_HERM_RAP:
|
||||||
|
// si cumple los requisitos
|
||||||
|
// 12345 123456789-12345 123456789-12345 123456789-12345 123456789-123456789- 12-12-1234 12-12-1234
|
||||||
|
sprintf( buffer, "%5ld %-15s", SHerm.NHno, SHerm.Nombre );
|
||||||
|
outtextxy( 10, 75+10*virtual_pos, buffer );
|
||||||
|
// Los apellidos seran unidos
|
||||||
|
sprintf( buffer, "%s %s", SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
buffer[21] = '\0';
|
||||||
|
outtextxy( 140, 75+10*virtual_pos, buffer );
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", SHerm.Direccion, ( SHerm.Num[0] != '\0' ) ? "," : "", SHerm.Num, ( SHerm.Piso[0] != '\0' ) ? "," : "", SHerm.Piso );
|
||||||
|
outtextxy( 265, 75+10*virtual_pos, buffer );
|
||||||
|
sprintf( buffer, "%02d-%02d-%04d %s"
|
||||||
|
,(int)SHerm.Antig.da_day, (int)SHerm.Antig.da_mon, (int)SHerm.Antig.da_year,
|
||||||
|
SHerm.Telefono1
|
||||||
|
);
|
||||||
|
outtextxy( 505, 75+10*virtual_pos, buffer );
|
||||||
|
virtual_pos +=adelante_atras;
|
||||||
|
break;
|
||||||
|
case RECIBE_NOTIFIC:
|
||||||
|
// si cumple los requisitos
|
||||||
|
if ( SHerm.Varios.Notific )
|
||||||
|
{
|
||||||
|
sprintf( buffer, "%5ld %-15s", SHerm.NHno, SHerm.Nombre );
|
||||||
|
outtextxy( 10, 75+10*virtual_pos, buffer );
|
||||||
|
// Los apellidos seran unidos
|
||||||
|
sprintf( buffer, "%s %s", SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
buffer[21] = '\0';
|
||||||
|
outtextxy( 140, 75+10*virtual_pos, buffer );
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", SHerm.Direccion, ( SHerm.Num[0] != '\0' ) ? "," : "", SHerm.Num, ( SHerm.Piso[0] != '\0' ) ? "," : "", SHerm.Piso );
|
||||||
|
outtextxy( 265, 75+10*virtual_pos, buffer );
|
||||||
|
sprintf( buffer, "%-15s", SHerm.Poblacion );
|
||||||
|
outtextxy( 505, 75+10*virtual_pos, buffer );
|
||||||
|
virtual_pos +=adelante_atras;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ACOGIDOS_CUOT:
|
||||||
|
// si cumple los requisitos
|
||||||
|
if ( SHerm.Varios.CuotaFam )
|
||||||
|
{
|
||||||
|
sprintf( buffer, "%5ld %-15s", SHerm.NHno, SHerm.Nombre );
|
||||||
|
outtextxy( 10, 75+10*virtual_pos, buffer );
|
||||||
|
// Los apellidos seran unidos
|
||||||
|
sprintf( buffer, "%s %s", SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
buffer[21] = '\0';
|
||||||
|
outtextxy( 120, 75+10*virtual_pos, buffer );
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", SHerm.Direccion, ( SHerm.Num[0] != '\0' ) ? "," : "", SHerm.Num, ( SHerm.Piso[0] != '\0' ) ? "," : "", SHerm.Piso );
|
||||||
|
outtextxy( 265, 75+10*virtual_pos, buffer );
|
||||||
|
sprintf( buffer, "%-15s", SHerm.Poblacion );
|
||||||
|
outtextxy( 505, 75+10*virtual_pos, buffer );
|
||||||
|
virtual_pos +=adelante_atras;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TUNICA_HDAD:
|
||||||
|
// si cumple los requisitos
|
||||||
|
if ( SHerm.Varios.TunicaHd )
|
||||||
|
{
|
||||||
|
sprintf( buffer, "%5ld %-15s", SHerm.NHno, SHerm.Nombre );
|
||||||
|
outtextxy( 10, 75+10*virtual_pos, buffer );
|
||||||
|
// Los apellidos seran unidos
|
||||||
|
sprintf( buffer, "%s %s", SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
buffer[21] = '\0';
|
||||||
|
outtextxy( 140, 75+10*virtual_pos, buffer );
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", SHerm.Direccion, ( SHerm.Num[0] != '\0' ) ? "," : "", SHerm.Num, ( SHerm.Piso[0] != '\0' ) ? "," : "", SHerm.Piso );
|
||||||
|
outtextxy( 265, 75+10*virtual_pos, buffer );
|
||||||
|
sprintf( buffer, "%02d-%02d-%04d %4ld"
|
||||||
|
,(int)SHerm.Antig.da_day, (int)SHerm.Antig.da_mon, SHerm.Antig.da_year,
|
||||||
|
(int)SHerm.NTunica
|
||||||
|
);
|
||||||
|
outtextxy( 505, 75+10*virtual_pos, buffer );
|
||||||
|
virtual_pos +=adelante_atras;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ( adelante_atras == -1 )
|
||||||
|
antigua_pos = BHerm.RegActual();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void MuestraLinea(int Tipo_de_Listado)
|
||||||
|
{
|
||||||
|
char buffer[500];
|
||||||
|
|
||||||
|
buffer[0] = '\0';
|
||||||
|
switch( Tipo_de_Listado )
|
||||||
|
{
|
||||||
|
case VOTANTES:
|
||||||
|
sprintf( buffer, "N§Hno Nombre (completo) Direccion Antig<69>edad F.Nacimiento");
|
||||||
|
break;
|
||||||
|
case GRAL_HERMANOS:
|
||||||
|
sprintf( buffer, "N§Hno Nombre (completo) Direccion Antig<69>edad Telefono");
|
||||||
|
break;
|
||||||
|
case GRAL_HERM_RAP:
|
||||||
|
sprintf( buffer, "N§Hno Nombre (completo) Direccion Antig<69>edad Telefono");
|
||||||
|
break;
|
||||||
|
case ACOGIDOS_CUOT:
|
||||||
|
sprintf( buffer, "N§Hno Nombre (completo) Direccion Poblacion");
|
||||||
|
break;
|
||||||
|
case RECIBE_NOTIFIC:
|
||||||
|
sprintf( buffer, "N§Hno Nombre (completo) Direccion Poblacion");
|
||||||
|
break;
|
||||||
|
case TUNICA_HDAD:
|
||||||
|
sprintf( buffer, "N§Hno Nombre (completo) Direccion Antig<69>edad N§ Tunica");
|
||||||
|
break;
|
||||||
|
case PAPELETAS_SITIO:
|
||||||
|
sprintf( buffer, "N§Hno Nombre (completo) Direccion Antig<69>edad Telefono");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
outtextxy( 12, 45, buffer );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void ImprimePaginas( int Tipo_de_Listado )
|
||||||
|
{
|
||||||
|
long i, CurrReg, lineas_impresas = 0;
|
||||||
|
char buffer[500];
|
||||||
|
FILE *file_out;
|
||||||
|
|
||||||
|
|
||||||
|
CurrReg = BHerm.RegActual();
|
||||||
|
|
||||||
|
while ( !Comprueba_Impresora() )
|
||||||
|
{
|
||||||
|
if ( !Optar( 1, "ERROR IMPRESORA", "Encienda la impresora", "y pulse ACEPTAR para continuar", NULL ) )
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
switch ( Tipo_de_Listado )
|
||||||
|
{
|
||||||
|
case ACOGIDOS_CUOT:
|
||||||
|
case VOTANTES:
|
||||||
|
// Miramos si desea mandar el informe a un archivo
|
||||||
|
if ( Config.ImpCompr[0] == '-' && Config.ImpCompr[1] == '>' )
|
||||||
|
{
|
||||||
|
strcpy( buffer, Config.ImpCompr );
|
||||||
|
strrev( buffer );
|
||||||
|
buffer[ strlen( buffer ) - 2 ] = '\0';
|
||||||
|
strrev( buffer );
|
||||||
|
if ( ( file_out = fopen( buffer, "w" ) ) == NULL )
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
// Mandar codigo caracteres grandes
|
||||||
|
CodigoImpresora( Config.ImpCompr );
|
||||||
|
file_out = stdprn;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
file_out = stdprn;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ImprimeLinea( Tipo_de_Listado, file_out );
|
||||||
|
|
||||||
|
for( i=0; i < BHerm.Registros() && i >= 0; i++ )
|
||||||
|
{
|
||||||
|
if ( Config.LineasImpresion != 0 && lineas_impresas > Config.LineasImpresion )
|
||||||
|
{
|
||||||
|
fputc( 12, file_out ); lineas_impresas = 0;
|
||||||
|
while ( !Comprueba_Impresora() )
|
||||||
|
{
|
||||||
|
if ( !Optar( 1, "ERROR IMPRESORA", "Coloque la siguiente p gina", "y pulse ACEPTAR para continuar", NULL ) )
|
||||||
|
i = -1;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ( BHerm.LeeReg( (void *)&SHerm, i ) != OK ) break;
|
||||||
|
switch( Tipo_de_Listado )
|
||||||
|
{
|
||||||
|
case VOTANTES:
|
||||||
|
// si cumple los requisitos
|
||||||
|
if ( SHerm.Varios.PuedVotar )
|
||||||
|
{
|
||||||
|
sprintf( buffer, "%s %s", SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
buffer[20] = '\0';
|
||||||
|
fprintf( file_out, "%4ld %-10s %-20s ", SHerm.NHno, SHerm.Nombre, buffer);
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", SHerm.Direccion, ( SHerm.Num[0] != '\0' ) ? ", " : "", SHerm.Num, ( SHerm.Piso[0] != '\0' ) ? ", " : "", SHerm.Piso );
|
||||||
|
buffer[34] = '\0';
|
||||||
|
fprintf( file_out, "%-34s %02d-%02d-%02d %02d-%02d-%02d\n\r", buffer,
|
||||||
|
(int)SHerm.Antig.da_day, (int)SHerm.Antig.da_mon, ( SHerm.Antig.da_year - (SHerm.Antig.da_year/100)*100 ) ,
|
||||||
|
(int)SHerm.FechaN.da_day, (int)SHerm.FechaN.da_mon, ( SHerm.FechaN.da_year - (SHerm.FechaN.da_year/100)*100 )
|
||||||
|
);
|
||||||
|
|
||||||
|
lineas_impresas++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GRAL_HERMANOS:
|
||||||
|
// ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜ Ü Ü
|
||||||
|
// Û D i R e C t O ß ßÜßÜ
|
||||||
|
|
||||||
|
// si cumple los requisitos
|
||||||
|
ImprimeFicha();
|
||||||
|
lineas_impresas++;
|
||||||
|
break;
|
||||||
|
case PAPELETAS_SITIO:
|
||||||
|
// ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜ Ü Ü
|
||||||
|
// Û D i R e C t O ß ßÜßÜ
|
||||||
|
if ( SHerm.Varios.RealPenit )
|
||||||
|
{
|
||||||
|
sprintf( buffer, "%s %s", SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
buffer[20] = '\0';
|
||||||
|
fprintf( file_out, "%4ld %-10s %-20s ", SHerm.NHno, SHerm.Nombre, buffer );
|
||||||
|
|
||||||
|
fprintf( file_out, "%02d-%02d-%04d %s\n\r",
|
||||||
|
(int)SHerm.Antig.da_day, (int)SHerm.Antig.da_mon, SHerm.Antig.da_year,
|
||||||
|
SHerm.Telefono1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GRAL_HERM_RAP:
|
||||||
|
// ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜ Ü Ü
|
||||||
|
// Û D i R e C t O ß ßÜßÜ
|
||||||
|
// si cumple los requisitos
|
||||||
|
sprintf( buffer, "%s %s", SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
buffer[20] = '\0';
|
||||||
|
fprintf( file_out, "%4ld %-10s %-20s ", SHerm.NHno, SHerm.Nombre, buffer );
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", SHerm.Direccion, ( SHerm.Num[0] != '\0' ) ? ", " : "", SHerm.Num, ( SHerm.Piso[0] != '\0' ) ? ", " : "", SHerm.Piso );
|
||||||
|
buffer[40] = '\0';
|
||||||
|
fprintf( file_out, "%-40s\n\r", buffer );
|
||||||
|
|
||||||
|
lineas_impresas++;
|
||||||
|
break;
|
||||||
|
case RECIBE_NOTIFIC:
|
||||||
|
// si cumple los requisitos
|
||||||
|
if ( SHerm.Varios.Notific )
|
||||||
|
{
|
||||||
|
sprintf( buffer, "%s %s", SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
buffer[20] = '\0';
|
||||||
|
fprintf( file_out, "%4ld %-10s %-20s ", SHerm.NHno, SHerm.Nombre, buffer );
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", SHerm.Direccion, ( SHerm.Num[0] != '\0' ) ? ", " : "", SHerm.Num, ( SHerm.Piso[0] != '\0' ) ? "," : "", SHerm.Piso );
|
||||||
|
buffer[32] = '\0';
|
||||||
|
fprintf( file_out, "%-30s %02d-%02d-%02d %s\n\r", buffer,
|
||||||
|
(int)SHerm.Antig.da_day, (int)SHerm.Antig.da_mon, ( SHerm.Antig.da_year - (SHerm.Antig.da_year/100)*100), SHerm.Telefono1
|
||||||
|
);
|
||||||
|
lineas_impresas++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ACOGIDOS_CUOT:
|
||||||
|
// si cumple los requisitos
|
||||||
|
if ( SHerm.Varios.CuotaFam )
|
||||||
|
{
|
||||||
|
sprintf( buffer, "%s %s", SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
buffer[20] = '\0';
|
||||||
|
fprintf( file_out, "%4ld %-10s %-20s ", SHerm.NHno, SHerm.Nombre, buffer );
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", SHerm.Direccion, ( SHerm.Num[0] != '\0' ) ? ", " : "", SHerm.Num, ( SHerm.Piso[0] != '\0' ) ? ", " : "", SHerm.Piso );
|
||||||
|
buffer[33] = '\0';
|
||||||
|
fprintf( file_out, "%-33s %02d-%02d-%04d %s\n\r", buffer,
|
||||||
|
(int)SHerm.Antig.da_day, (int)SHerm.Antig.da_mon, ( SHerm.Antig.da_year - (SHerm.Antig.da_year/100)*100), SHerm.Telefono1
|
||||||
|
);
|
||||||
|
lineas_impresas++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TUNICA_HDAD:
|
||||||
|
// ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜ Ü Ü
|
||||||
|
// Û D i R e C t O ß ßÜßÜ
|
||||||
|
// si cumple los requisitos
|
||||||
|
if ( SHerm.Varios.TunicaHd )
|
||||||
|
{
|
||||||
|
sprintf( buffer, "%s %s %s", SHerm.Nombre, SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
buffer[33] = '\0';
|
||||||
|
fprintf( file_out, "%4ld %-33s ", SHerm.NHno, buffer );
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", SHerm.Direccion, ( SHerm.Num[0] != '\0' ) ? ", " : "", SHerm.Num, ( SHerm.Piso[0] != '\0' ) ? ", " : "", SHerm.Piso );
|
||||||
|
buffer[32] = '\0';
|
||||||
|
fprintf( file_out, "%-32s ", buffer );
|
||||||
|
|
||||||
|
if ( SHerm.NTunica == 0 )
|
||||||
|
fprintf( stdprn, " %04ld\n\r", SHerm.NTunica );
|
||||||
|
else
|
||||||
|
fprintf( stdprn, " HDAD\n\r" );
|
||||||
|
lineas_impresas++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( kbhit() && getch() == 27 && Optar( 1, "CANCELAR IMPRESION", "Desea cancelar el trabajo", "de impresion actual?", NULL ) )
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Nueva pagina
|
||||||
|
fputc( 12, file_out );
|
||||||
|
if ( Tipo_de_Listado != PAPELETAS_SITIO && Tipo_de_Listado != TUNICA_HDAD && Tipo_de_Listado != GRAL_HERM_RAP)
|
||||||
|
{
|
||||||
|
// Miramos si desea mandar el informe a un archivo
|
||||||
|
if ( Config.ImpCompr[0] == '-' && Config.ImpCompr[1] == '>' )
|
||||||
|
{
|
||||||
|
fclose( file_out );
|
||||||
|
} else
|
||||||
|
// Mandar codigo caracteres peque¤os
|
||||||
|
CodigoImpresora( Config.ImpNormal );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Regresamos a la posicion original
|
||||||
|
if ( BHerm.LeeReg( (void *)&SHerm, CurrReg ) != OK ) return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImprimeLinea( int Tipo_de_Listado, FILE *file_out )
|
||||||
|
{
|
||||||
|
char buffer[500];
|
||||||
|
|
||||||
|
switch( Tipo_de_Listado )
|
||||||
|
{
|
||||||
|
case VOTANTES:
|
||||||
|
fprintf( file_out, "Listado General de Votantes\n\r\n\r");
|
||||||
|
fprintf( file_out, "N§Hno Nombre (completo) Direccion Antig<69>edad F.Nacimiento\n\r\n\r");
|
||||||
|
break;
|
||||||
|
case GRAL_HERMANOS:
|
||||||
|
break;
|
||||||
|
case GRAL_HERM_RAP:
|
||||||
|
fprintf( file_out, "Listado R pido de hermanos\n\r\n\r");
|
||||||
|
fprintf( file_out, "N§Hn Nombre (completo) Direccion \n\r\n\r");
|
||||||
|
//123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-
|
||||||
|
// 123456789-123456789-123456789- 123456789-123456789-123456789-123456789-
|
||||||
|
break;
|
||||||
|
case ACOGIDOS_CUOT:
|
||||||
|
fprintf( file_out, "Listado de Hermanos acogidos a cuota\n\r\n\r");
|
||||||
|
fprintf( file_out, "N§Hno Nombre (completo) Direccion Antig<69>edad Tel‚fono\n\r\n\r");
|
||||||
|
break;
|
||||||
|
case RECIBE_NOTIFIC:
|
||||||
|
fprintf( file_out, "Listado de hermanos que reciben notificaciones\n\r\n\r");
|
||||||
|
fprintf( file_out, "N§Hno Nombre (completo) Direccion Antig<69>edad Tel‚fono\n\r\n\r");
|
||||||
|
break;
|
||||||
|
case TUNICA_HDAD:
|
||||||
|
fprintf( file_out, "Listado de hermanos que poseen tunica de la hermandad\n\r\n\r");
|
||||||
|
fprintf( file_out, "N§Hno Nombre (completo) Direccion T£nica\n\r\n\r");
|
||||||
|
//123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-
|
||||||
|
// 123456789-123456789-123456789-123 56789-123456789-123456789-123456789-
|
||||||
|
break;
|
||||||
|
case PAPELETAS_SITIO:
|
||||||
|
fprintf( file_out, "Listado de hermanos que Realizan la estacion de Penitencia\n\r\n\r");
|
||||||
|
fprintf( file_out, "N§Hno Nombre (completo) Antig<69>edad Telefono\n\r\n\r");
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImprimeListaSitios(void)
|
||||||
|
{
|
||||||
|
char buffer[500];
|
||||||
|
BDatos Hnos, Hnas;
|
||||||
|
char CMen; struct textsettingstype texttypeinfo;
|
||||||
|
void *Imagen;
|
||||||
|
int ok = 0, enc, CtoVirgen, Insignia;
|
||||||
|
long i, j;
|
||||||
|
HermStruct A, B;
|
||||||
|
|
||||||
|
FILE *file_out;
|
||||||
|
file_out = stdprn;
|
||||||
|
|
||||||
|
|
||||||
|
if ( (Imagen = malloc( imagesize(170, 165, 470, 315) ) ) == NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
|
getimage( 170, 165, 470, 315, Imagen );
|
||||||
|
|
||||||
|
Imprime_Estaticos(20, "Herm.img");
|
||||||
|
|
||||||
|
gettextsettings( &texttypeinfo );
|
||||||
|
|
||||||
|
settextstyle( SMALL_FONT, HORIZ_DIR, 6 );
|
||||||
|
|
||||||
|
setcolor( BLANCO );
|
||||||
|
outtextxy( 172+((296 - textwidth( "Listado de P. Sitios" ) ) / 2 ), 165, "Listado de P. Sitios" );
|
||||||
|
setcolor( NEGRO );
|
||||||
|
|
||||||
|
outtextxy( 172, 200, "Reordenando Hermanos" );
|
||||||
|
|
||||||
|
Hnos.AbrirReg( "datos\\hermanos.dbf", sizeof( HermStruct ) );
|
||||||
|
FICHA_REGISTRO = 0;
|
||||||
|
if ( Config.item_ordenado[FICHA_REGISTRO] != 8 )
|
||||||
|
{
|
||||||
|
Config.item_ordenado[FICHA_REGISTRO] = 8;
|
||||||
|
if ( BConfig.EscribeReg((void *)&Config, 0) != OK )
|
||||||
|
Error(BConfig.cError);
|
||||||
|
Hnos.SortReg(ComparaRegistros);
|
||||||
|
}
|
||||||
|
|
||||||
|
outtextxy( 172, 225, "Reordenando Hermanas" );
|
||||||
|
Hnas.AbrirReg( "datos\\hermanas.dbf", sizeof( HermStruct ) );
|
||||||
|
FICHA_REGISTRO = 1;
|
||||||
|
if ( Config.item_ordenado[FICHA_REGISTRO] != 8 )
|
||||||
|
{
|
||||||
|
Config.item_ordenado[FICHA_REGISTRO] = 8;
|
||||||
|
if ( BConfig.EscribeReg((void *)&Config, 0) != OK )
|
||||||
|
Error(BConfig.cError);
|
||||||
|
Hnas.SortReg(ComparaRegistros);
|
||||||
|
}
|
||||||
|
outtextxy( 172, 250, "Fusionando Bases " );
|
||||||
|
|
||||||
|
////////////// Dos Recorridos 1§ Cribar CRISTO
|
||||||
|
////////////// 2§ Cribar VIRGEN
|
||||||
|
for ( CtoVirgen = 0; CtoVirgen < 2; CtoVirgen++ )
|
||||||
|
{
|
||||||
|
fprintf( file_out, "\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r");
|
||||||
|
fprintf( file_out, "> Listado de Hermanos que realizan penitencia" );
|
||||||
|
fprintf( file_out, "\n\r\n\r\n\r%s", (CtoVirgen==0) ? "C R I S T O" : "V I R G E N");
|
||||||
|
fprintf( file_out, "\n\r\n\r\n\r> Ordenado por antiguedad y seg£n insignia");
|
||||||
|
|
||||||
|
Insignia = -1;
|
||||||
|
i=0; j=0; ok = 0;
|
||||||
|
|
||||||
|
// Empezamos a comparar con los primeros datos validos
|
||||||
|
while( Hnos.LeeReg( (void *)&A, i ) == OK && ( A.Varios.RealPenit==0 || (A.Varios.RealPenit && A.Varios.CtoVirgen != CtoVirgen ) ) ) i++;
|
||||||
|
while( Hnas.LeeReg( (void *)&B, j ) == OK && ( B.Varios.RealPenit==0 || (B.Varios.RealPenit && B.Varios.CtoVirgen != CtoVirgen ) ) ) j++;
|
||||||
|
|
||||||
|
// Solo si es cierto que los datos de ambos son validos
|
||||||
|
if ( Hnos.LeeReg( (void *)&A, i ) == OK && Hnas.LeeReg( (void *)&B, j ) == OK )
|
||||||
|
while( !ok )
|
||||||
|
{
|
||||||
|
// Mientras A < B
|
||||||
|
if ( ComparaRegistros( (void *)&A, (void *)&B ) < 0 )
|
||||||
|
{
|
||||||
|
// Si es una nueva insignia. Digo cual...
|
||||||
|
if ( Insignia != A.Insignia )
|
||||||
|
{
|
||||||
|
Insignia = A.Insignia;
|
||||||
|
fputc( 12, file_out );
|
||||||
|
fprintf( file_out, "\n\r>Hermanos con insignia: %s\n\r\n\r", Config.Insignia[Insignia+20*CtoVirgen].NInsignia );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Imprimo y avanzo hermanos
|
||||||
|
sprintf( buffer, "%s %s", A.Apellido1, A.Apellido2 );
|
||||||
|
buffer[22] = '\0';
|
||||||
|
fprintf( file_out, "%4ld %-15s %-22s %02d-%02d-%04d %-15s\n\r",
|
||||||
|
A.NHno, A.Nombre, buffer, (int)A.Antig.da_day, (int)A.Antig.da_mon, (int)A.Antig.da_year, A.Telefono1 );
|
||||||
|
|
||||||
|
i++;
|
||||||
|
// Me coloco en el siguiente registro valido de HERMANOS
|
||||||
|
while( ( enc = Hnos.LeeReg( (void *)&A, i ) ) == OK && ( A.Varios.RealPenit==0 || (A.Varios.RealPenit && A.Varios.CtoVirgen != CtoVirgen ) ) ) i++;
|
||||||
|
|
||||||
|
// que no hay, po fale, me salgo
|
||||||
|
if ( enc != OK ) ok = 1;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Si es una nueva insignia. Digo cual...
|
||||||
|
if ( Insignia != B.Insignia )
|
||||||
|
{
|
||||||
|
Insignia = B.Insignia;
|
||||||
|
fputc( 12, file_out );
|
||||||
|
fprintf( file_out, "\n\rHermanos con insignia: %s\n\r\n\r", Config.Insignia[Insignia+20*CtoVirgen].NInsignia );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Imprimo y avanzo hermanas
|
||||||
|
sprintf( buffer, "%s %s", B.Apellido1, B.Apellido2 );
|
||||||
|
buffer[22] = '\0';
|
||||||
|
fprintf( file_out, "%4ld %-15s %-22s %02d-%02d-%04d %-15s\n\r",
|
||||||
|
B.NHno, B.Nombre, buffer, (int)B.Antig.da_day, (int)B.Antig.da_mon, (int)B.Antig.da_year, B.Telefono1 );
|
||||||
|
|
||||||
|
j++;
|
||||||
|
// Me coloco en el siguiente registro valido de HERMANAS
|
||||||
|
while( ( enc = Hnas.LeeReg( (void *)&B, j ) ) == OK && ( B.Varios.RealPenit==0 || (B.Varios.RealPenit && B.Varios.CtoVirgen != CtoVirgen ) ) ) j++;
|
||||||
|
// que no hay, po fale, me salgo
|
||||||
|
if ( enc != OK ) ok = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// Imprimo la base que quede por imprimir
|
||||||
|
if ( Hnos.LeeReg( (void *)&A, i ) == OK )
|
||||||
|
{
|
||||||
|
// Siguiente dato valido de hermanos
|
||||||
|
while( ( enc = Hnos.LeeReg( (void *)&A, i ) ) == OK && ( A.Varios.RealPenit==0 || (A.Varios.RealPenit && A.Varios.CtoVirgen != CtoVirgen ) ) ) i++;
|
||||||
|
|
||||||
|
while ( enc == OK )
|
||||||
|
{
|
||||||
|
// Falta mostrar la insignia ???
|
||||||
|
if ( Insignia != A.Insignia )
|
||||||
|
{
|
||||||
|
Insignia = A.Insignia;
|
||||||
|
fputc( 12, file_out );
|
||||||
|
fprintf( file_out, "\n\rHermanos con insignia: %s\n\r\n\r", Config.Insignia[Insignia+20*CtoVirgen].NInsignia );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Imprimo hermanos
|
||||||
|
sprintf( buffer, "%s %s", A.Apellido1, A.Apellido2 );
|
||||||
|
buffer[22] = '\0';
|
||||||
|
fprintf( file_out, "%4ld %-15s %-22s %02d-%02d-%04d %-15s\n\r",
|
||||||
|
A.NHno, A.Nombre, buffer, (int)A.Antig.da_day, (int)A.Antig.da_mon, (int)A.Antig.da_year, A.Telefono1 );
|
||||||
|
|
||||||
|
i++;
|
||||||
|
// Siguiente dato valido
|
||||||
|
while( ( enc = Hnos.LeeReg( (void *)&A, i ) ) == OK && ( A.Varios.RealPenit==0 || (A.Varios.RealPenit && A.Varios.CtoVirgen != CtoVirgen ) ) ) i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Siguiente dato valido de HERMANAS
|
||||||
|
while( ( enc = Hnas.LeeReg( (void *)&B, j ) ) == OK && ( B.Varios.RealPenit==0 || (B.Varios.RealPenit && B.Varios.CtoVirgen != CtoVirgen ) ) ) j++;
|
||||||
|
|
||||||
|
while ( enc == OK )
|
||||||
|
{
|
||||||
|
// Se conoce la insignia???
|
||||||
|
if ( Insignia != B.Insignia )
|
||||||
|
{
|
||||||
|
Insignia = B.Insignia;
|
||||||
|
fputc( 12, file_out );
|
||||||
|
fprintf( file_out, "\n\rHermanos con insignia: %s\n\r\n\r", Config.Insignia[Insignia+20*CtoVirgen].NInsignia );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Imprimo hermanos
|
||||||
|
sprintf( buffer, "%s %s", B.Apellido1, B.Apellido2 );
|
||||||
|
buffer[22] = '\0';
|
||||||
|
fprintf( file_out, "%4ld %-15s %-22s %02d-%02d-%04d %-15s\n\r",
|
||||||
|
B.NHno, B.Nombre, buffer, (int)B.Antig.da_day, (int)B.Antig.da_mon, (int)B.Antig.da_year, B.Telefono1 );
|
||||||
|
|
||||||
|
j++;
|
||||||
|
while( ( enc = Hnas.LeeReg( (void *)&B, j ) ) == OK && ( B.Varios.RealPenit==0 || (B.Varios.RealPenit && B.Varios.CtoVirgen != CtoVirgen ) ) ) j++;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Hnos.CerrarReg();
|
||||||
|
Hnas.CerrarReg();
|
||||||
|
|
||||||
|
settextstyle( texttypeinfo.font, texttypeinfo.direction, texttypeinfo.charsize );
|
||||||
|
putimage( 170, 165, Imagen, COPY_PUT );
|
||||||
|
free( Imagen );
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void ImprimeFacturas(void)
|
||||||
|
{
|
||||||
|
long i;
|
||||||
|
char pag;
|
||||||
|
|
||||||
|
int Center, lineas = 2, CMen, PagInicio, PagFin;
|
||||||
|
|
||||||
|
char Mensaje[][50] = { "Para interrumpir", "pulse una tecla" };
|
||||||
|
|
||||||
|
OptenPaginasIniFin( &PagInicio, &PagFin, BHerm.Registros() );
|
||||||
|
|
||||||
|
|
||||||
|
Imprime_Estaticos(20, "Herm.img");
|
||||||
|
|
||||||
|
settextstyle( SMALL_FONT, HORIZ_DIR, 6 );
|
||||||
|
|
||||||
|
setcolor( 63 ); outtextxy( 172, 165, "Imprimiendo Facturas" );
|
||||||
|
setcolor( ROJO );
|
||||||
|
|
||||||
|
for ( CMen = 0; CMen < lineas; CMen++ )
|
||||||
|
{
|
||||||
|
Center= (296 - textwidth( Mensaje[CMen] ) ) / 2;
|
||||||
|
outtextxy( 172+Center, 200+20*CMen, Mensaje[CMen] );
|
||||||
|
}
|
||||||
|
|
||||||
|
while ( !Comprueba_Impresora() )
|
||||||
|
{
|
||||||
|
if ( !Optar( 1, "ERROR IMPRESORA", "Encienda la impresora", "y pulse ACEPTAR para continuar", NULL ) )
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
pag = 0;
|
||||||
|
PagInicio--;
|
||||||
|
for ( i=PagInicio; i < BHerm.Registros() && i < PagFin; i++, pag++ )
|
||||||
|
{
|
||||||
|
if ( pag == 3 ) { pag = 0; fputc( 12, stdprn ); }
|
||||||
|
BHerm.LeeReg( (void *)&SHerm, i ); //123456789-123456789-1234567
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
|
||||||
|
fprintf( stdprn, " %4ld Alcal de Guadaira #%ld#", SHerm.NHno, Config.CuotaBaseFam[ SHerm.Varios.CuotaFam == 0 ? 0 : 1 ] );
|
||||||
|
fprintf( stdprn, "\n\r\n\r" );
|
||||||
|
fprintf( stdprn, " %02d-%02d-%04d %d / %d", (int)FechaActual.da_day, (int)FechaActual.da_mon, (int)FechaActual.da_year, FechaActual.da_year + 1, FechaActual.da_year);
|
||||||
|
fprintf( stdprn, "\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r" );
|
||||||
|
fprintf( stdprn, " %s %s %s", SHerm.Nombre, SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
fprintf( stdprn, " %s%s%s%s%s", SHerm.Direccion, (SHerm.Num[0]=='\0')?"":",", SHerm.Num,
|
||||||
|
(SHerm.Piso[0]=='\0')?"":",", SHerm.Piso );
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
fprintf( stdprn, " %s (%s)", SHerm.Poblacion, SHerm.Provincia );
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
fprintf( stdprn, " C.P. %ld", SHerm.CodP );
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
if ( kbhit() )
|
||||||
|
{
|
||||||
|
getch();
|
||||||
|
if ( Optar( 1, "CANCELAR TRABAJO?", "Desea Cancelar la impresion", "el trabajo aun no ha concluido", NULL ) )
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImprimeEtiquetas(void)
|
||||||
|
{
|
||||||
|
long i; char pag, buffer[80];
|
||||||
|
int Center, lineas = 2, CMen;
|
||||||
|
int PagInicio, PagFin;
|
||||||
|
|
||||||
|
char Mensaje[][50] = { "Para interrumpir", "pulse una tecla" };
|
||||||
|
|
||||||
|
OptenPaginasIniFin( &PagInicio, &PagFin, BHerm.Registros() );
|
||||||
|
|
||||||
|
Imprime_Estaticos(20, "Herm.img");
|
||||||
|
|
||||||
|
settextstyle( SMALL_FONT, HORIZ_DIR, 6 );
|
||||||
|
|
||||||
|
setcolor( 63 ); outtextxy( 172, 165, "Imprimiendo Etiquetas" );
|
||||||
|
setcolor( ROJO );
|
||||||
|
|
||||||
|
for ( CMen = 0; CMen < lineas; CMen++ )
|
||||||
|
{
|
||||||
|
Center= (296 - textwidth( Mensaje[CMen] ) ) / 2;
|
||||||
|
outtextxy( 172+Center, 200+20*CMen, Mensaje[CMen] );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
while ( !Comprueba_Impresora() )
|
||||||
|
{
|
||||||
|
if ( !Optar( 1, "ERROR IMPRESORA", "Encienda la impresora", "y pulse ACEPTAR para continuar", NULL ) )
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pag = 0;
|
||||||
|
PagInicio--;
|
||||||
|
for ( i=PagInicio; i < BHerm.Registros() && i < PagFin; /*i+=2, */pag++ )
|
||||||
|
{
|
||||||
|
if ( pag >= 3*12*2 )
|
||||||
|
{
|
||||||
|
if ( !Optar( 1, "NUEVA PAGINA", "Por favor, realinee la pagina", "y pulse una tecla", NULL ) )
|
||||||
|
return;
|
||||||
|
pag = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
do { BHerm.LeeReg( (void *)&SHerm, i ); i++; } while( !SHerm.Varios.Notific && i < BHerm.Registros() );
|
||||||
|
do { BHerm.LeeReg( (void *)&BHtmp, i ); i++; } while( !SHerm.Varios.Notific && i < BHerm.Registros() );
|
||||||
|
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
fprintf( stdprn, "N§ Hermano: %4ld N§ de Hermano: %4ld", SHerm.NHno, BHtmp.NHno );
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
sprintf( buffer, "%s %s %s", SHerm.Nombre, SHerm.Apellido1, SHerm.Apellido2 );
|
||||||
|
fprintf( stdprn, "%-37s ", buffer );
|
||||||
|
sprintf( buffer, "%s %s %s", BHtmp.Nombre, BHtmp.Apellido1, BHtmp.Apellido2 );
|
||||||
|
fprintf( stdprn, "%-37s", buffer );
|
||||||
|
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", SHerm.Direccion, (SHerm.Num[0]=='\0')?"":",", SHerm.Num, (SHerm.Piso[0]=='\0')?"":",", SHerm.Piso );
|
||||||
|
fprintf( stdprn, "%-37s ", buffer );
|
||||||
|
sprintf( buffer, "%s%s%s%s%s", BHtmp.Direccion, (BHtmp.Num[0]=='\0')?"":",", BHtmp.Num, (BHtmp.Piso[0]=='\0')?"":",", BHtmp.Piso );
|
||||||
|
fprintf( stdprn, "%-37s", buffer );
|
||||||
|
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
|
||||||
|
sprintf( buffer, "%s (%s)", SHerm.Poblacion, SHerm.Provincia );
|
||||||
|
fprintf( stdprn, "%-37s ", buffer );
|
||||||
|
sprintf( buffer, "%s (%s)", BHtmp.Poblacion, BHtmp.Provincia );
|
||||||
|
fprintf( stdprn, "%-37s", buffer );
|
||||||
|
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
fprintf( stdprn, "C.P. %5ld C.P. %5ld", SHerm.CodP, BHtmp.CodP );
|
||||||
|
fprintf( stdprn, "\n\r" );
|
||||||
|
|
||||||
|
|
||||||
|
if ( kbhit() )
|
||||||
|
{
|
||||||
|
getch();
|
||||||
|
if ( Optar( 1, "CANCELAR IMPRESION ?", "Desea Cancelar la impresion", "el trabajo aun no ha concluido ?", NULL ) )
|
||||||
|
break ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void OptenPaginasIniFin( int *Inicio, int *Fin, int NRegistros )
|
||||||
|
{
|
||||||
|
void far *Imagen;
|
||||||
|
char buffer[80];
|
||||||
|
struct textsettingstype texttypeinfo;
|
||||||
|
|
||||||
|
*Inicio = 1;
|
||||||
|
*Fin = NRegistros;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ( (Imagen = malloc( JD_imagesize(170, 165, 470, 315) ) ) != NULL )
|
||||||
|
{
|
||||||
|
getimage( 170, 165, 470, 315, Imagen );
|
||||||
|
gettextsettings( &texttypeinfo );
|
||||||
|
Imprime_Estaticos(20, "Herm.img");
|
||||||
|
settextstyle( SMALL_FONT, HORIZ_DIR, 6 );
|
||||||
|
|
||||||
|
outtextxy( 175, 220, "Ficha inicial:");
|
||||||
|
outtextxy( 175, 260, "Ficha final:");
|
||||||
|
|
||||||
|
sprintf( buffer, "%d", (*Inicio) );
|
||||||
|
InputCadenaG_T5(buffer, 0, 5, BLANCO, AZUL, 320, 220, 460, 240 );
|
||||||
|
(*Inicio) = atoi(buffer);
|
||||||
|
if ( *Inicio < 0 ) *Inicio = 0;
|
||||||
|
sprintf( buffer, "%d", (*Fin) );
|
||||||
|
InputCadenaG_T5(buffer, 0, 5, BLANCO, AZUL, 320, 260, 460, 280 );
|
||||||
|
(*Fin ) = atoi(buffer);
|
||||||
|
if ( *Fin > NRegistros ) *Fin = NRegistros;
|
||||||
|
|
||||||
|
putimage( 170, 165, Imagen, COPY_PUT );
|
||||||
|
settextstyle( texttypeinfo.font, texttypeinfo.direction, texttypeinfo.charsize );
|
||||||
|
|
||||||
|
farfree( Imagen );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
496
HERM_MM.CPP
Normal file
496
HERM_MM.CPP
Normal file
@ -0,0 +1,496 @@
|
|||||||
|
/**************************************************************************\
|
||||||
|
|* *|
|
||||||
|
|* Menus *|
|
||||||
|
|* *|
|
||||||
|
|* Descripci¢n: *|
|
||||||
|
|* M¢dulo encargado de generar menus, una vez se le pasa *|
|
||||||
|
|* el puntero a la estructura definida. *|
|
||||||
|
|* *|
|
||||||
|
|* Fecha: 21-07-96 14.34 / 18.00 *|
|
||||||
|
|* 23.13 / 00.30 *|
|
||||||
|
\**************************************************************************/
|
||||||
|
|
||||||
|
#include <dos.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <alloc.h>
|
||||||
|
#include <graphics.h>
|
||||||
|
#include "..\libs\make_bot\make_bot.h"
|
||||||
|
|
||||||
|
#undef MB_TeclaPulsada()
|
||||||
|
#define MB_TeclaPulsada() kbhit()
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "herm.h"
|
||||||
|
#include "..\libs\bdatos\bdatos.hh"
|
||||||
|
|
||||||
|
|
||||||
|
#define CONTRAIDO 0
|
||||||
|
#define EXPANDIDO 1
|
||||||
|
|
||||||
|
extern unsigned _stklen = 18432U;
|
||||||
|
|
||||||
|
extern BDatos BConfig;
|
||||||
|
|
||||||
|
extern int far Espera_TeclaRaton(void);
|
||||||
|
void ErrorOccurred(int errorcode);
|
||||||
|
|
||||||
|
int Topicos = 5;
|
||||||
|
int SubTopicos[] = { 3, 4, 4, 9, 3 };
|
||||||
|
void far *Fondo_Menu; int xST, yST;
|
||||||
|
char *email="Jose-David.Guillen@cs.us.es";
|
||||||
|
|
||||||
|
int MenuPrincipal(void);
|
||||||
|
|
||||||
|
void ContraeMenu(void);
|
||||||
|
void ExpandeMenu( int Menu );
|
||||||
|
void SeleccionaTopico(int Topico, char color);
|
||||||
|
void SeleccionaSubTopico( int Topico, int SubTopico, int color );
|
||||||
|
void CheckRaton_Topic(int *Topico, int *SubTopico, int *Menu);
|
||||||
|
int GestionHermanos( char HnoHna, int Accion );
|
||||||
|
void LeeConfiguracion(void);
|
||||||
|
void OrdenaBase( char HnoHna );
|
||||||
|
void GestionInsignias(void);
|
||||||
|
void ListadosRapidos( int Tipo_de_Listado );
|
||||||
|
void ConfiguracionGlobal(void);
|
||||||
|
void Imprime_Dibujo(void);
|
||||||
|
|
||||||
|
int handler(int errval,int ax,int bp,int si);
|
||||||
|
|
||||||
|
|
||||||
|
void main(void)
|
||||||
|
{
|
||||||
|
int Item;
|
||||||
|
struct date FechaActual;
|
||||||
|
getdate( &FechaActual );
|
||||||
|
|
||||||
|
|
||||||
|
if ( carga_botones( "Herm.img" ) != OK )
|
||||||
|
return;
|
||||||
|
LeeConfiguracion();
|
||||||
|
|
||||||
|
Initialize( 9, 2 ); // Inicializa el Modo Gr fico
|
||||||
|
|
||||||
|
harderr(handler);
|
||||||
|
|
||||||
|
True_Push = ON; PunteroRaton = 1;
|
||||||
|
inicializa_raton_grafico( 0, 0, 639, 479 );
|
||||||
|
|
||||||
|
while(1){
|
||||||
|
Item = MenuPrincipal();
|
||||||
|
switch ( Item>>8 )
|
||||||
|
{
|
||||||
|
// Archivo
|
||||||
|
case 1:
|
||||||
|
switch( Item & 0x00FF )
|
||||||
|
{
|
||||||
|
// Configuracion
|
||||||
|
case 1:
|
||||||
|
ConfiguracionGlobal();
|
||||||
|
break;
|
||||||
|
// Mantenimiento
|
||||||
|
case 2:
|
||||||
|
GestionInsignias();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
BConfig.CerrarReg();
|
||||||
|
closegraph();
|
||||||
|
printf("\nJos‚ David Guill‚n || _-ùFuTuRe ViSiOnù-_ ");
|
||||||
|
printf("\n\ne-mail: %s\n", email);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Hermanos / Hermanas
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
switch( Item & 0x00FF )
|
||||||
|
{
|
||||||
|
// Altas
|
||||||
|
case ALTAS:
|
||||||
|
if ( ( Item >> 8 ) == 2 )
|
||||||
|
GestionHermanos( HERMANOS, ALTAS );
|
||||||
|
else
|
||||||
|
GestionHermanos( HERMANAS, ALTAS );
|
||||||
|
break;
|
||||||
|
// Bajas
|
||||||
|
case BAJAS:
|
||||||
|
if ( ( Item >> 8 ) == 2 )
|
||||||
|
GestionHermanos( HERMANOS, BAJAS );
|
||||||
|
else
|
||||||
|
GestionHermanos( HERMANAS, BAJAS );
|
||||||
|
break;
|
||||||
|
// Consultas / Modificaciones
|
||||||
|
case CONSULTAS:
|
||||||
|
if ( ( Item >> 8 ) == 2 )
|
||||||
|
GestionHermanos( HERMANOS, CONSULTAS );
|
||||||
|
else
|
||||||
|
GestionHermanos( HERMANAS, CONSULTAS );
|
||||||
|
break;
|
||||||
|
case REORDENAR:
|
||||||
|
if ( ( Item >> 8 ) == 2 )
|
||||||
|
OrdenaBase( HERMANOS );
|
||||||
|
else
|
||||||
|
OrdenaBase( HERMANAS );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Listados
|
||||||
|
case 4:
|
||||||
|
ListadosRapidos( ( Item & 0x00FF ) );
|
||||||
|
break;
|
||||||
|
// Ayuda
|
||||||
|
case 5:
|
||||||
|
Optar( 0, "Acerca de...", "Programa realizado por:", "Jos‚ David Guill‚n || 1996", "e-mail:", "Jose-David.Guillen@cs.us.es", NULL );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//þþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþ
|
||||||
|
int MenuPrincipal(void)
|
||||||
|
{
|
||||||
|
int Menu = CONTRAIDO;
|
||||||
|
int Topico = 0, SubTopico = 0, ok=0;
|
||||||
|
|
||||||
|
// Memoria para el cuadro mas grande que coja
|
||||||
|
if ( ( Fondo_Menu = farmalloc( (long)(64000L/*+4*/) ) ) == NULL )
|
||||||
|
Error( "No hay suficiente memoria" );
|
||||||
|
|
||||||
|
|
||||||
|
// Imprime men£ principal
|
||||||
|
Imprime_Estaticos(10, "herm.img");
|
||||||
|
Imprime_Dibujo();
|
||||||
|
|
||||||
|
settextstyle( SMALL_FONT, HORIZ_DIR, 6 );
|
||||||
|
|
||||||
|
SeleccionaTopico( Topico, EGA_RED );
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
Espera_TeclaRaton();
|
||||||
|
if ( !kbhit() )
|
||||||
|
CheckRaton_Topic(&Topico, &SubTopico, &Menu);
|
||||||
|
else
|
||||||
|
switch( getch() )
|
||||||
|
{
|
||||||
|
// Intro
|
||||||
|
case 13:
|
||||||
|
if ( Menu == CONTRAIDO )
|
||||||
|
{
|
||||||
|
Menu = EXPANDIDO; ExpandeMenu( Topico );
|
||||||
|
SubTopico = 0;
|
||||||
|
SeleccionaSubTopico( Topico, SubTopico, EGA_RED );
|
||||||
|
} else {
|
||||||
|
ContraeMenu();
|
||||||
|
ok = 1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Esc
|
||||||
|
case 27:
|
||||||
|
if ( Menu == EXPANDIDO )
|
||||||
|
{
|
||||||
|
Menu = CONTRAIDO; ContraeMenu();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
switch( getch() )
|
||||||
|
{
|
||||||
|
// Flecha Izquierda
|
||||||
|
case 75:
|
||||||
|
case 15:
|
||||||
|
if ( Menu != CONTRAIDO )
|
||||||
|
ContraeMenu();
|
||||||
|
|
||||||
|
SeleccionaTopico( Topico, EGA_LIGHTGRAY );
|
||||||
|
Topico--; if ( Topico<0 ) Topico = Topicos-1;
|
||||||
|
SeleccionaTopico( Topico, EGA_RED );
|
||||||
|
SubTopico = 0;
|
||||||
|
|
||||||
|
if ( Menu != CONTRAIDO )
|
||||||
|
{
|
||||||
|
ExpandeMenu( Topico );
|
||||||
|
SeleccionaSubTopico( Topico, SubTopico, EGA_RED );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Flecha Derecha
|
||||||
|
case 77:
|
||||||
|
case 9:
|
||||||
|
if ( Menu != CONTRAIDO )
|
||||||
|
ContraeMenu();
|
||||||
|
|
||||||
|
SeleccionaTopico( Topico, EGA_LIGHTGRAY );
|
||||||
|
Topico++; if ( Topico>=Topicos ) Topico = 0;
|
||||||
|
SeleccionaTopico( Topico, EGA_RED );
|
||||||
|
SubTopico = 0;
|
||||||
|
|
||||||
|
if ( Menu != CONTRAIDO )
|
||||||
|
{
|
||||||
|
ExpandeMenu( Topico );
|
||||||
|
SeleccionaSubTopico( Topico, SubTopico, EGA_RED );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Flecha Arriba
|
||||||
|
case 72:
|
||||||
|
if ( Menu == EXPANDIDO )
|
||||||
|
{
|
||||||
|
SeleccionaSubTopico( Topico, SubTopico, EGA_LIGHTGRAY );
|
||||||
|
SubTopico--; if ( SubTopico < 0 ) SubTopico = SubTopicos[Topico]-1;
|
||||||
|
SeleccionaSubTopico( Topico, SubTopico, EGA_RED );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Flecha Abajo
|
||||||
|
case 80:
|
||||||
|
if ( Menu == EXPANDIDO )
|
||||||
|
{
|
||||||
|
SeleccionaSubTopico( Topico, SubTopico, EGA_LIGHTGRAY );
|
||||||
|
SubTopico++; if ( SubTopico >= SubTopicos[Topico] ) SubTopico = 0;
|
||||||
|
SeleccionaSubTopico( Topico, SubTopico, EGA_RED );
|
||||||
|
} else {
|
||||||
|
Menu = EXPANDIDO; ExpandeMenu( Topico );
|
||||||
|
SubTopico = 0;
|
||||||
|
SeleccionaSubTopico( Topico, SubTopico, EGA_RED );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}while(!ok);
|
||||||
|
|
||||||
|
farfree( Fondo_Menu );
|
||||||
|
return ( (Topico+1)<<8 )+(SubTopico+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CheckRaton_Topic(int *Topico, int *SubTopico, int *Menu)
|
||||||
|
{
|
||||||
|
// Men£ principal
|
||||||
|
if ( y_raton > 9 && y_raton < 27 )
|
||||||
|
{
|
||||||
|
if ( x_raton > 8 && x_raton < 90 && *Topico != 0 )
|
||||||
|
{
|
||||||
|
ContraeMenu(); SeleccionaTopico( *Topico, EGA_LIGHTGRAY );
|
||||||
|
*Topico = 0; *SubTopico = 0;
|
||||||
|
*Menu = EXPANDIDO; ExpandeMenu( *Topico );
|
||||||
|
SeleccionaTopico( *Topico, EGA_RED );
|
||||||
|
SeleccionaSubTopico( *Topico, *SubTopico, EGA_RED );
|
||||||
|
} else
|
||||||
|
if ( x_raton > 105 && x_raton < 197 && *Topico != 1 )
|
||||||
|
{
|
||||||
|
ContraeMenu(); SeleccionaTopico( *Topico, EGA_LIGHTGRAY );
|
||||||
|
*Topico = 1; *SubTopico = 0;
|
||||||
|
*Menu = EXPANDIDO; ExpandeMenu( *Topico );
|
||||||
|
SeleccionaTopico( *Topico, EGA_RED );
|
||||||
|
SeleccionaSubTopico( *Topico, *SubTopico, EGA_RED );
|
||||||
|
} else
|
||||||
|
if ( x_raton > 215 && x_raton < 307 && *Topico != 2 )
|
||||||
|
{
|
||||||
|
ContraeMenu(); SeleccionaTopico( *Topico, EGA_LIGHTGRAY );
|
||||||
|
*Topico = 2; *SubTopico = 0;
|
||||||
|
*Menu = EXPANDIDO; ExpandeMenu( *Topico );
|
||||||
|
SeleccionaTopico( *Topico, EGA_RED );
|
||||||
|
SeleccionaSubTopico( *Topico, *SubTopico, EGA_RED );
|
||||||
|
} else
|
||||||
|
if ( x_raton > 325 && x_raton < 412 && *Topico != 3 )
|
||||||
|
{
|
||||||
|
ContraeMenu(); SeleccionaTopico( *Topico, EGA_LIGHTGRAY );
|
||||||
|
*Topico = 3; *SubTopico = 0;
|
||||||
|
*Menu = EXPANDIDO; ExpandeMenu( *Topico );
|
||||||
|
SeleccionaTopico( *Topico, EGA_RED );
|
||||||
|
SeleccionaSubTopico( *Topico, *SubTopico, EGA_RED );
|
||||||
|
} else
|
||||||
|
if ( x_raton > 560 && x_raton < 630 && *Topico != 4 )
|
||||||
|
{
|
||||||
|
ContraeMenu(); SeleccionaTopico( *Topico, EGA_LIGHTGRAY );
|
||||||
|
*Topico = 4; *SubTopico = 0;
|
||||||
|
*Menu = EXPANDIDO; ExpandeMenu( *Topico );
|
||||||
|
SeleccionaTopico( *Topico, EGA_RED );
|
||||||
|
SeleccionaSubTopico( *Topico, *SubTopico, EGA_RED );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SeleccionaTopico(int Topico, char color)
|
||||||
|
{
|
||||||
|
setcolor( color );
|
||||||
|
switch( Topico )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
rectangle( 8, 9, 90, 27 );
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
rectangle( 105, 9, 197, 27 );
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
rectangle( 215, 9, 307, 27 );
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
rectangle( 325, 9, 412, 27 );
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
rectangle( 560, 9, 630, 27 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SeleccionaSubTopico( int Topico, int SubTopico, int color )
|
||||||
|
{
|
||||||
|
setcolor( color );
|
||||||
|
switch( Topico )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
if ( SubTopico == 2 )
|
||||||
|
rectangle( 8, 40+20*3, 157, 40+20*4 );
|
||||||
|
else
|
||||||
|
rectangle( 8, 40+20*SubTopico, 157, 40+20*( SubTopico + 1 ) );
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if ( SubTopico == 3 )
|
||||||
|
rectangle( 108, 40+20*4, 257, 40+20*5 );
|
||||||
|
else
|
||||||
|
rectangle( 108, 40+20*SubTopico, 257, 40+20*(SubTopico+1) );
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if ( SubTopico == 3 )
|
||||||
|
rectangle( 218, 40+20*4, 367, 40+20*5 );
|
||||||
|
else
|
||||||
|
rectangle( 218, 40+20*SubTopico, 367, 40+20*( SubTopico + 1 ) );
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
rectangle( 328, 40+20*SubTopico, 482, 40+20*( SubTopico + 1 ) );
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
rectangle( 483, 40+20*SubTopico, 627, 40+20*( SubTopico + 1 ) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//þþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþþ
|
||||||
|
|
||||||
|
void ExpandeMenu( int Menu )
|
||||||
|
{
|
||||||
|
|
||||||
|
switch( Menu )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
xST = 5; yST = 35;
|
||||||
|
getimage( 5, 35, 160, 40+20*4+5, Fondo_Menu );
|
||||||
|
setfillstyle(SOLID_FILL, EGA_LIGHTGRAY); bar( 5, 35, 160, 40+20*4+5 );
|
||||||
|
setcolor( EGA_BLACK ); rectangle( 5, 35, 160, 40+20*4+5 );
|
||||||
|
setcolor( EGA_BLUE );
|
||||||
|
outtextxy( 8, 40+20*0, " Configuracion" );
|
||||||
|
outtextxy( 8, 40+20*1, " Insignias " );
|
||||||
|
outtextxy( 8, 40+20*2, " -------------" );
|
||||||
|
outtextxy( 8, 40+20*3, " ( Salir ) " );
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
xST = 105; yST = 35;
|
||||||
|
getimage( 105, 35, 260, 40+20*5+5, Fondo_Menu );
|
||||||
|
setfillstyle(SOLID_FILL, EGA_LIGHTGRAY); bar( 105, 35, 260, 40+20*5+5 );
|
||||||
|
setcolor( EGA_BLACK ); rectangle( 105, 35, 260, 40+20*5+5 );
|
||||||
|
setcolor( EGA_BLUE );
|
||||||
|
outtextxy( 105, 40+20*0, " Altas de Hnos" );
|
||||||
|
outtextxy( 105, 40+20*1, " Bajas de Hnos" );
|
||||||
|
outtextxy( 105, 40+20*2, " Consul/Modif." );
|
||||||
|
outtextxy( 105, 40+20*3, " -------------" );
|
||||||
|
outtextxy( 105, 40+20*4, " Reordenar Hns" );
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
xST = 215; yST = 35;
|
||||||
|
getimage( 215, 35, 370, 40+20*5+5, Fondo_Menu );
|
||||||
|
setfillstyle(SOLID_FILL, EGA_LIGHTGRAY); bar( 215, 35, 370, 40+20*5+5 );
|
||||||
|
setcolor( EGA_BLACK ); rectangle( 215, 35, 370, 40+20*5+5 );
|
||||||
|
setcolor( EGA_BLUE );
|
||||||
|
outtextxy( 215, 40+20*0, " Altas de Hnos" );
|
||||||
|
outtextxy( 215, 40+20*1, " Bajas de Hnos" );
|
||||||
|
outtextxy( 215, 40+20*2, " Consul/Modif." );
|
||||||
|
outtextxy( 215, 40+20*3, " -------------" );
|
||||||
|
outtextxy( 215, 40+20*4, " Reordenar Hns" );
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
xST = 325; yST = 35;
|
||||||
|
getimage( 325, 35, 485, 40+20*9+5, Fondo_Menu );
|
||||||
|
setfillstyle(SOLID_FILL, EGA_LIGHTGRAY); bar( 325, 35, 485, 40+20*9+5 );
|
||||||
|
setcolor( EGA_BLACK ); rectangle( 325, 35, 485, 40+20*9+5 );
|
||||||
|
setcolor( EGA_BLUE );
|
||||||
|
outtextxy( 325, 40+20*0, " Votantes " );
|
||||||
|
outtextxy( 325, 40+20*1, " Acogido a Cuota" );
|
||||||
|
outtextxy( 325, 40+20*2, " Rec. Notificac." );
|
||||||
|
outtextxy( 325, 40+20*3, " Papeletas de S." );
|
||||||
|
outtextxy( 325, 40+20*4, " Listado Hnos " );
|
||||||
|
outtextxy( 325, 40+20*5, " Fichas Hnos " );
|
||||||
|
outtextxy( 325, 40+20*6, " T£nicas Hdad. " );
|
||||||
|
outtextxy( 325, 40+20*7, " Facturas " );
|
||||||
|
outtextxy( 325, 40+20*8, " Etiquetas Dir. " );
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
xST = 480; yST = 35;
|
||||||
|
getimage( 480, 35, 630, 40+20*3+5, Fondo_Menu );
|
||||||
|
setfillstyle(SOLID_FILL, EGA_LIGHTGRAY); bar( 480, 35, 630, 40+20*3+5 );
|
||||||
|
setcolor( EGA_BLACK ); rectangle( 480, 35, 630, 40+20*3+5 );
|
||||||
|
setcolor( EGA_BLUE );
|
||||||
|
outtextxy( 480, 40+20*0, " ------------" );
|
||||||
|
outtextxy( 480, 40+20*1, " Creditos " );
|
||||||
|
outtextxy( 480, 40+20*2, " Acerca de..." );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ContraeMenu(void)
|
||||||
|
{
|
||||||
|
if ( Fondo_Menu != NULL )
|
||||||
|
putimage( xST, yST, Fondo_Menu, COPY_PUT );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Imprime_Dibujo(void)
|
||||||
|
{
|
||||||
|
FILE *fp;
|
||||||
|
int alto, ancho; unsigned char byte;
|
||||||
|
int contador;
|
||||||
|
|
||||||
|
|
||||||
|
if ( ( fp = fopen ( "insignia.pcx", "rb" ) ) != NULL )
|
||||||
|
{
|
||||||
|
|
||||||
|
// Saltamos la cabecera
|
||||||
|
fseek( fp, 128, SEEK_SET );
|
||||||
|
|
||||||
|
for(alto=0; alto<128; alto++)
|
||||||
|
{
|
||||||
|
for(ancho=0; ancho<128; )
|
||||||
|
{
|
||||||
|
byte=getc(fp);
|
||||||
|
if(byte<=0xC0)
|
||||||
|
{
|
||||||
|
if ( byte != 255 )
|
||||||
|
putpixel( ancho+256, alto+270, byte );
|
||||||
|
ancho++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
contador=byte&0x3F; byte=getc(fp);
|
||||||
|
for(; contador>0; contador--)
|
||||||
|
{
|
||||||
|
if ( byte != 255 )
|
||||||
|
putpixel( ancho+256, alto+270, byte );
|
||||||
|
ancho++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
fclose( fp );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
501
HERM_UTL.CPP
Normal file
501
HERM_UTL.CPP
Normal file
@ -0,0 +1,501 @@
|
|||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include <graphics.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <alloc.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <conio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <dos.h>
|
||||||
|
#include <io.h>
|
||||||
|
#include <bios.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include "..\libs\make_bot\make_bot.h"
|
||||||
|
#include "herm.h"
|
||||||
|
|
||||||
|
extern CONFIG Config;
|
||||||
|
|
||||||
|
|
||||||
|
void BEEP(void);
|
||||||
|
void Escr_Mensaje(char *Encabezado, char lineas, char Mensaje[][50] );
|
||||||
|
int DifDate( struct date FechaF, struct date FechaO, struct date *FechaD );
|
||||||
|
|
||||||
|
|
||||||
|
int InputCadenaG_T5(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;
|
||||||
|
|
||||||
|
s1 = s; // inicio cadena
|
||||||
|
|
||||||
|
setfillstyle(SOLID_FILL, cf);
|
||||||
|
bar(X0, Y0, X1, Y1);
|
||||||
|
setcolor(cc); outtextxy( X0, Y0, s1 );
|
||||||
|
|
||||||
|
|
||||||
|
ls = strlen ( s ); // Longitud de actual
|
||||||
|
|
||||||
|
if ( ls < lmax ) {
|
||||||
|
setcolor(BLANCO);
|
||||||
|
outtextxy( X0+textwidth( s1 ), Y0, "þ");
|
||||||
|
}
|
||||||
|
|
||||||
|
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';
|
||||||
|
|
||||||
|
setfillstyle(SOLID_FILL, cf);
|
||||||
|
bar(X0, Y0, X1, Y1);
|
||||||
|
setcolor(cc); outtextxy( X0, Y0, s1 );
|
||||||
|
setcolor(BLANCO);
|
||||||
|
|
||||||
|
outtextxy( X0+textwidth( s1 ), Y0, "þ");
|
||||||
|
setcolor(cc);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if ( !numalp && c >= 32 && c <= 254 && ls < lmax) {
|
||||||
|
|
||||||
|
*s++ = c;
|
||||||
|
ls++;
|
||||||
|
|
||||||
|
*s = '\0';
|
||||||
|
setfillstyle(SOLID_FILL, cf);
|
||||||
|
bar(X0, Y0, X1, Y1);
|
||||||
|
setcolor(cc); outtextxy( X0, Y0, s1 );
|
||||||
|
|
||||||
|
if ( ls < lmax ) {
|
||||||
|
setcolor(BLANCO);
|
||||||
|
outtextxy( X0+textwidth( s1 ), Y0, "þ");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if ( numalp && isdigit(c) && ls < lmax) {
|
||||||
|
*s++ = c;
|
||||||
|
ls++;
|
||||||
|
|
||||||
|
*s = '\0'; // Cero final
|
||||||
|
setfillstyle(SOLID_FILL, cf);
|
||||||
|
bar(X0, Y0, X1, Y1);
|
||||||
|
setcolor(cc); outtextxy( X0, Y0, s1 );
|
||||||
|
|
||||||
|
if ( ls < lmax ) {
|
||||||
|
setcolor(BLANCO);
|
||||||
|
outtextxy( X0+textwidth( s1 ), Y0, "þ");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ*/
|
||||||
|
else if( c == 27 ) {*s='\0'; ok = 1; }
|
||||||
|
/*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ*/
|
||||||
|
else BEEP();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}while(!ok);
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
char Optar( char *texto1, char *texto2, char *texto3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
int ok = 0, inst = 0;
|
||||||
|
struct textsettingstype textinfo;
|
||||||
|
|
||||||
|
void *C_Texto, *C_Aceptar, *C_Cancelar;
|
||||||
|
|
||||||
|
C_Texto = malloc( JD_imagesize(200, 212, 440, 267) );
|
||||||
|
C_Aceptar = malloc( JD_imagesize(200, 270, 280, 295) );
|
||||||
|
C_Cancelar = malloc( JD_imagesize(360, 270, 440, 295) );
|
||||||
|
|
||||||
|
if( C_Texto == NULL || C_Aceptar == NULL || C_Cancelar == NULL) {
|
||||||
|
closegraph();
|
||||||
|
cprintf("\n\rSALIENDO");
|
||||||
|
cprintf("\n\rImposible encontrar %ldKbytes en el Heap",
|
||||||
|
( JD_imagesize(118, 160, 521, 335) +
|
||||||
|
JD_imagesize(118, 160, 521, 335) +
|
||||||
|
JD_imagesize(118, 160, 521, 335)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
exit(SIN_MEMORIA);
|
||||||
|
}
|
||||||
|
|
||||||
|
gettextsettings(&textinfo);
|
||||||
|
|
||||||
|
settextstyle(SMALL_FONT, HORIZ_DIR, 5 );
|
||||||
|
// settextjustify(CENTER_TEXT, CENTER_TEXT);
|
||||||
|
|
||||||
|
getimage(200, 212, 440, 267, C_Texto);
|
||||||
|
getimage(200, 270, 280, 295, C_Aceptar);
|
||||||
|
getimage(360, 270, 440, 295, C_Cancelar);
|
||||||
|
|
||||||
|
|
||||||
|
Imprime_Estaticos(100, "herm.img"); // Imprime botones estaticos 'Seccion 20'
|
||||||
|
|
||||||
|
Imprime_Secuencia(2); // Imprime secuencia 4.
|
||||||
|
Imprime_Estaticos(101, "herm.img"); // Imprime textos estaticos 'Seccion 5'
|
||||||
|
|
||||||
|
|
||||||
|
setcolor( AZUL );
|
||||||
|
outtextxy( 210+( ( 230 - textwidth(texto1) ) / 2 ), 220, texto1 );
|
||||||
|
outtextxy( 210+( ( 230 - textwidth(texto2) ) / 2 ), 235, texto2 );
|
||||||
|
outtextxy( 210+( ( 230 - textwidth(texto3) ) / 2 ), 250, texto3 );
|
||||||
|
|
||||||
|
while(!ok){ // Bucle infinito
|
||||||
|
|
||||||
|
switch( Comprueba_Secuencia( 2, NULL ) ) { // Iniciamos comprobacion de 2¦ sec
|
||||||
|
|
||||||
|
case 0: // No se pulso ningun BOTON
|
||||||
|
// Pero el raton fue presionado en
|
||||||
|
// algun sitio...
|
||||||
|
break;
|
||||||
|
case -2: // Hay una tecla normal en BUFFER
|
||||||
|
switch( getch() ) { // La utilizamos
|
||||||
|
// ESC ( CANCELAR )
|
||||||
|
case 14:
|
||||||
|
inst = 0;
|
||||||
|
ok = 1;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case -1: // Hay una tecla especial en BUFFER
|
||||||
|
getch(); // La eliminamos
|
||||||
|
break;
|
||||||
|
// Boton Aceptar
|
||||||
|
case 1:
|
||||||
|
inst = 1;
|
||||||
|
ok = 1;
|
||||||
|
break;
|
||||||
|
// Boton Cancelar
|
||||||
|
case 2:
|
||||||
|
inst = 0;
|
||||||
|
ok = 1;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
putimage(200, 212, C_Texto, COPY_PUT);
|
||||||
|
putimage(200, 270, C_Aceptar, COPY_PUT);
|
||||||
|
putimage(360, 270, C_Cancelar, COPY_PUT);
|
||||||
|
|
||||||
|
free ( C_Texto );
|
||||||
|
free ( C_Aceptar );
|
||||||
|
free ( C_Cancelar );
|
||||||
|
|
||||||
|
|
||||||
|
settextstyle(textinfo.font, textinfo.direction, textinfo.charsize );
|
||||||
|
settextjustify(textinfo.horiz, textinfo.vert);
|
||||||
|
|
||||||
|
return inst;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int file_exists(char *filename)
|
||||||
|
{
|
||||||
|
return (access(filename, 0) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int Comprueba_Impresora(void){
|
||||||
|
/*
|
||||||
|
unsigned int tmp;
|
||||||
|
union REGS Impresora_in, Impresora_out;
|
||||||
|
struct byte {
|
||||||
|
int a : 1;
|
||||||
|
int b : 1;
|
||||||
|
int c : 1;
|
||||||
|
int d : 1;
|
||||||
|
int e : 1;
|
||||||
|
int f : 1;
|
||||||
|
int g : 1;
|
||||||
|
int h : 1;
|
||||||
|
};
|
||||||
|
union bits {
|
||||||
|
char ch;
|
||||||
|
struct byte bit;
|
||||||
|
} Imp_out;
|
||||||
|
|
||||||
|
Impresora_in.h.ah = 0x02;
|
||||||
|
Impresora_in.x.dx = 0x0;
|
||||||
|
|
||||||
|
int86(0x17, &Impresora_in, &Impresora_out);
|
||||||
|
|
||||||
|
|
||||||
|
return ( Impresora_out.h.ah ? 1 : 0 );
|
||||||
|
*/
|
||||||
|
|
||||||
|
return ( biosprint(2, 0, 0) & 0x80 );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CodigoImpresora( char *codigo )
|
||||||
|
{
|
||||||
|
int i = 0; char code_hex[3], *endptr;
|
||||||
|
code_hex[2] = '\0';
|
||||||
|
|
||||||
|
for( i=0; codigo[i+1] != '\0'; i+=2 )
|
||||||
|
{
|
||||||
|
code_hex[1] = codigo[i];
|
||||||
|
code_hex[2] = codigo[i+1];
|
||||||
|
fputc( (int)strtol(code_hex, &endptr, 16), stdprn );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define IGNORE 0
|
||||||
|
#define RETRY 1
|
||||||
|
#define ABORT 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
pragma warn -par reduces warnings which occur
|
||||||
|
due to the non use of the parameters errval,
|
||||||
|
bp and si to the handler.
|
||||||
|
*/
|
||||||
|
#pragma warn -par
|
||||||
|
|
||||||
|
int handler(int errval,int ax,int bp,int si)
|
||||||
|
{
|
||||||
|
static char msg[80];
|
||||||
|
unsigned di;
|
||||||
|
int drive;
|
||||||
|
int errorno;
|
||||||
|
|
||||||
|
di= _DI;
|
||||||
|
/*
|
||||||
|
if this is not a disk error then it was
|
||||||
|
another device having trouble
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (ax < 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
while ( !kbhit() )
|
||||||
|
{
|
||||||
|
sound(1000); delay(5000); nosound();
|
||||||
|
}
|
||||||
|
getch();
|
||||||
|
/* and return to the program directly requesting abort */
|
||||||
|
hardresume(RETRY);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
return to the program via dos interrupt 0x23 with abort, retry,
|
||||||
|
or ignore as input by the user.
|
||||||
|
*/
|
||||||
|
hardretn(ABORT);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ABORT;
|
||||||
|
|
||||||
|
}
|
||||||
|
#pragma warn +par
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define SEC_OPTAR 5
|
||||||
|
int Optar( int optar, ... )
|
||||||
|
{
|
||||||
|
static void far *fondo, far *fd_aceptar, far *fd_cancelar;
|
||||||
|
static char Memoria = 0;
|
||||||
|
|
||||||
|
int DEV = 0, ok = 0, linea = 0;
|
||||||
|
int Center; char *buff;
|
||||||
|
struct textsettingstype texttypeinfo;
|
||||||
|
|
||||||
|
va_list ap;
|
||||||
|
va_start( ap, &optar );
|
||||||
|
|
||||||
|
if ( Memoria == 1 )
|
||||||
|
{
|
||||||
|
putimage( 170, 165, fondo , COPY_PUT );
|
||||||
|
putimage( 170, 320, fd_aceptar , COPY_PUT );
|
||||||
|
putimage( 370, 320, fd_cancelar, COPY_PUT );
|
||||||
|
|
||||||
|
farfree( fondo );
|
||||||
|
farfree( fd_aceptar );
|
||||||
|
farfree( fd_cancelar );
|
||||||
|
|
||||||
|
Memoria = 0;
|
||||||
|
|
||||||
|
if ( optar == ENCUADRE ) return DEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ( fondo = farmalloc( JD_imagesize( 170, 165, 470, 315 ) ) ) != NULL &&
|
||||||
|
( fd_aceptar = farmalloc( JD_imagesize( 170, 320, 270, 350 ) ) ) != NULL &&
|
||||||
|
( fd_cancelar = farmalloc( JD_imagesize( 370, 320, 470, 350 ) ) ) != NULL )
|
||||||
|
{
|
||||||
|
Memoria = 1;
|
||||||
|
|
||||||
|
getimage( 170, 165, 470, 315, fondo );
|
||||||
|
getimage( 170, 320, 270, 350, fd_aceptar );
|
||||||
|
getimage( 370, 320, 470, 350, fd_cancelar);
|
||||||
|
|
||||||
|
gettextsettings( &texttypeinfo );
|
||||||
|
|
||||||
|
Imprime_Estaticos( 150, "herm.img" );
|
||||||
|
|
||||||
|
settextstyle( SMALL_FONT, HORIZ_DIR, 6 );
|
||||||
|
|
||||||
|
setcolor( 63 );
|
||||||
|
|
||||||
|
while ( (buff = va_arg(ap, char *)) != NULL )
|
||||||
|
{
|
||||||
|
Center = (296 - textwidth( buff ) ) / 2;
|
||||||
|
outtextxy( 172+Center, ( (linea == 0 ) ? 167 : 200 + 20*linea ), buff );
|
||||||
|
linea++;
|
||||||
|
}
|
||||||
|
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
settextstyle( texttypeinfo.font, texttypeinfo.direction, texttypeinfo.charsize );
|
||||||
|
|
||||||
|
|
||||||
|
if ( optar != ENCUADRE )
|
||||||
|
{
|
||||||
|
ok = 0; while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER
|
||||||
|
do {
|
||||||
|
switch( Comprueba_Secuencia( SEC_OPTAR, NULL ) )
|
||||||
|
{
|
||||||
|
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 );
|
||||||
|
|
||||||
|
putimage( 170, 165, fondo , COPY_PUT );
|
||||||
|
putimage( 170, 320, fd_aceptar , COPY_PUT );
|
||||||
|
putimage( 370, 320, fd_cancelar, COPY_PUT );
|
||||||
|
|
||||||
|
farfree( fondo );
|
||||||
|
farfree( fd_aceptar );
|
||||||
|
farfree( fd_cancelar );
|
||||||
|
|
||||||
|
Memoria = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return DEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int DifDate( struct date FechaF, struct date FechaO, struct date *FechaD )
|
||||||
|
{
|
||||||
|
struct date FechaTmp;
|
||||||
|
|
||||||
|
FechaF.da_mon = Config.MesVotacion;
|
||||||
|
|
||||||
|
if ( FechaO.da_year >= FechaF.da_year && FechaO.da_mon >= FechaF.da_mon )
|
||||||
|
{
|
||||||
|
if ( FechaD != NULL )
|
||||||
|
{
|
||||||
|
FechaD -> da_day = 0;
|
||||||
|
FechaD -> da_mon = 0;
|
||||||
|
FechaD -> da_year = 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( FechaO.da_year == FechaF.da_year )
|
||||||
|
{
|
||||||
|
if ( FechaD != NULL )
|
||||||
|
{
|
||||||
|
FechaD -> da_day = 0;
|
||||||
|
FechaD -> da_mon = FechaF.da_mon - FechaO.da_mon;
|
||||||
|
FechaD -> da_year = 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
FechaTmp.da_day = 0;
|
||||||
|
FechaTmp.da_year = 0;
|
||||||
|
|
||||||
|
FechaTmp.da_mon = 12 - FechaO.da_mon;
|
||||||
|
FechaTmp.da_mon += FechaF.da_mon;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
FechaTmp.da_year = FechaF.da_year - (FechaO.da_year + 1);
|
||||||
|
FechaTmp.da_year+= FechaTmp.da_mon / 12;
|
||||||
|
FechaTmp.da_mon = FechaTmp.da_mon % 12;
|
||||||
|
|
||||||
|
if ( FechaD != NULL )
|
||||||
|
*FechaD = FechaTmp;
|
||||||
|
|
||||||
|
// Esto es incorecto pero asi funcionar ( Devuelvo los a¤os + 1 si hay
|
||||||
|
// alg£n mes suelto... )
|
||||||
|
return ( (FechaD -> da_mon != 0 ? 1 : 0) + FechaTmp . da_year );
|
||||||
|
}
|
||||||
|
|
BIN
INSIGNIA.BMP
Normal file
BIN
INSIGNIA.BMP
Normal file
Binary file not shown.
After (image error) Size: 17 KiB |
BIN
INSIGNIA.PCX
Normal file
BIN
INSIGNIA.PCX
Normal file
Binary file not shown.
BIN
LITT.CHR
Normal file
BIN
LITT.CHR
Normal file
Binary file not shown.
116
MENUS.CPP
Normal file
116
MENUS.CPP
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
/**************************************************************************\
|
||||||
|
|* *|
|
||||||
|
|* Menus *|
|
||||||
|
|* *|
|
||||||
|
|* Descripci¢n: *|
|
||||||
|
|* M¢dulo encargado de generar menus, una vez se le pasa *|
|
||||||
|
|* el puntero a la estructura definida. *|
|
||||||
|
|* *|
|
||||||
|
|* Fecha: 21-07-96 14.34 / 18.00 *|
|
||||||
|
\**************************************************************************/
|
||||||
|
|
||||||
|
#define CONTRAIDO 0
|
||||||
|
#define DESPLEGADO 1
|
||||||
|
|
||||||
|
typedef struct menu
|
||||||
|
{
|
||||||
|
char NombreTopico[80];
|
||||||
|
char TExplicacion[80];
|
||||||
|
char NSubTopicos;
|
||||||
|
char SubTopicos[40][15];
|
||||||
|
char Explicacion[80][15];
|
||||||
|
|
||||||
|
} GENERAR_MENU;
|
||||||
|
|
||||||
|
|
||||||
|
// Archivo Gestion de: Hermanos Hermanas Listados
|
||||||
|
// | | | |
|
||||||
|
// |Configurar |Altas |Altas |Votantes
|
||||||
|
// |Mantenimiento |Bajas |Bajas |Papeletas
|
||||||
|
// | |Consultas |Consultas |Hermanos
|
||||||
|
// |Salir | | |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 1§ byte TOPICO 2§ byte SUBTOPICO
|
||||||
|
int GeneraMenu( GENERAR_MENU *mi_menu, char Topicos )
|
||||||
|
{
|
||||||
|
int Topico=0, SubTopico=0;
|
||||||
|
char DespCont = CONTRAIDO;
|
||||||
|
char Ok = 0;
|
||||||
|
|
||||||
|
ImprimeMenuContraido( mi_menu );
|
||||||
|
do
|
||||||
|
{
|
||||||
|
|
||||||
|
while( !kbhit() );
|
||||||
|
switch ( getch() )
|
||||||
|
{
|
||||||
|
// Selecciona algo
|
||||||
|
case 27:
|
||||||
|
if ( DespCont == CONTRAIDO )
|
||||||
|
ImprimeMenuDesplegado( mi_menu[Topico] );
|
||||||
|
else
|
||||||
|
return ( ( (Topico+1) <<8)+(SubTopico+1) );
|
||||||
|
break;
|
||||||
|
// Escape
|
||||||
|
case 13:
|
||||||
|
if ( DespCont != CONTRAIDO )
|
||||||
|
ContraeMenuDesplegado();
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
switch( getch() )
|
||||||
|
{
|
||||||
|
// Derecha
|
||||||
|
case
|
||||||
|
if ( DespCont == CONTRAIDO )
|
||||||
|
{
|
||||||
|
Topico = (Topico++)%Topicos;
|
||||||
|
SeleccionaMenu( Topico );
|
||||||
|
} else {
|
||||||
|
ContraeMenuDesplegado();
|
||||||
|
Topico = (Topico++)%Topicos;
|
||||||
|
ImprimeMenuDesplegado( mi_menu[Topico] );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Izquierda
|
||||||
|
case
|
||||||
|
if ( DespCont == CONTRAIDO )
|
||||||
|
{
|
||||||
|
Topico --; if ( Topico < 0 ) Topico = Topicos-1
|
||||||
|
SeleccionaMenu( mi_menu, Topico );
|
||||||
|
} else {
|
||||||
|
ContraeMenuDesplegado();
|
||||||
|
Topico --; if ( Topico < 0 ) Topico = Topicos-1
|
||||||
|
ImprimeMenuDesplegado( mi_menu[Topico] );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Arriba
|
||||||
|
case
|
||||||
|
if ( DespCont != CONTRAIDO )
|
||||||
|
{
|
||||||
|
SubTopico--; if ( SubTopico < 0 ) SubTopico = NSubTopicos - 1;
|
||||||
|
SeleccionaSubTopico( mi_menu, SubTopico );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Abajo
|
||||||
|
case
|
||||||
|
if ( DespCont == CONTRAIDO )
|
||||||
|
ImprimeMenuDesplegado( mi_menu[Topico] );
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SubTopico = ( SubTopico ++ ) % NSubTopicos;
|
||||||
|
SeleccionaSubTopico( mi_menu, SubTopico );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}while( 1 );
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
379
ORDENA.C
Normal file
379
ORDENA.C
Normal file
@ -0,0 +1,379 @@
|
|||||||
|
/*
|
||||||
|
Este programa forma parte del Curso de C
|
||||||
|
Copyright (C) 1991 Grupo Editorial Jackson
|
||||||
|
Todos los derechos reservados
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* ORDENA: comparaci¢n entre varias t‚cnicas de ordenaci¢n */
|
||||||
|
|
||||||
|
|
||||||
|
/* Este programa se linka con la librer¡a de consola de Jackson, utilizando
|
||||||
|
el fichero ORDENA.PRJ para Turbo C 2.0, u ORDENA.MAK para Quick C 2.0.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
#include "Jconio.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* prototipos de funciones: */
|
||||||
|
|
||||||
|
void ExtraeDatos(double d[], int n);
|
||||||
|
void MuestraDatos(double d[], int n);
|
||||||
|
void Seleccion(double d[], int n);
|
||||||
|
void Insercion(double d[], int n);
|
||||||
|
void BubbleSort(double d[], int n);
|
||||||
|
void ShellSort(double d[], int n);
|
||||||
|
void Quicksort(double d[], int n);
|
||||||
|
int Compara(double *d1, double *d2);
|
||||||
|
void PulseReturn(void);
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* main
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
enum { NDATOS = 200 }; /*n£mero datos a reordenar*/
|
||||||
|
enum { F1 = 1059, F2, F3, F4, F5, F6 }; /*c¢digos teclas <1>*/
|
||||||
|
|
||||||
|
double datos[NDATOS]; /*datos a reordenar <2>*/
|
||||||
|
clock_t inicio,fin; /*tiempo inicial, final <3>*/
|
||||||
|
char buf[80];
|
||||||
|
int c,ok,terminado;
|
||||||
|
|
||||||
|
srand( (unsigned int)time(NULL)); /*inicia random*/
|
||||||
|
Jcursor(0); /*elimina cursor*/
|
||||||
|
|
||||||
|
do {
|
||||||
|
Jclrscr(); /*borra pantalla*/
|
||||||
|
Jclrkey(); /*y buffer teclado*/
|
||||||
|
Jputs("\r\n\n\n\n- Comparaci¢n entre t‚cnicas de ordenaci¢n -\r\n\n"
|
||||||
|
" F1) Ordenaci¢n por selecci¢n\r\n"
|
||||||
|
" F2) Ordenaci¢n por inserci¢n\r\n"
|
||||||
|
" F3) Burbuja\r\n"
|
||||||
|
" F4) Shell\r\n"
|
||||||
|
" F5) Quicksort\r\n"
|
||||||
|
" F6) Salir\r\n\n"
|
||||||
|
"Seleccione F1..F6: ");
|
||||||
|
do { /*lee tecla v lida*/
|
||||||
|
c = Jgetkey(1);
|
||||||
|
ok = (c >= F1 && c <= F6); /*(est n en orden) <4>*/
|
||||||
|
if (! ok) Jputch('\a');
|
||||||
|
} while (! ok);
|
||||||
|
terminado = (c == F6);
|
||||||
|
|
||||||
|
if (! terminado) {
|
||||||
|
ExtraeDatos(datos,NDATOS); /*datos a reordenar*/
|
||||||
|
Jclrscr(); /*los imprime*/
|
||||||
|
Jputs("Extracci¢n aleatoria de datos para ordenar:\r\n\n");
|
||||||
|
MuestraDatos(datos,NDATOS);
|
||||||
|
|
||||||
|
Jclrscr();
|
||||||
|
inicio = clock(); /*tiempo inicial*/
|
||||||
|
if (c == F1) { /*ejecuta ord. elegida*/
|
||||||
|
Seleccion(datos, NDATOS);
|
||||||
|
} else if (c == F2) {
|
||||||
|
Insercion(datos,NDATOS);
|
||||||
|
} else if (c == F3) {
|
||||||
|
BubbleSort(datos,NDATOS);
|
||||||
|
} else if (c == F4) {
|
||||||
|
ShellSort(datos,NDATOS);
|
||||||
|
} else if (c == F5) {
|
||||||
|
Quicksort(datos,NDATOS);
|
||||||
|
}
|
||||||
|
fin = clock(); /*tiempo final <5>*/
|
||||||
|
sprintf(buf,"ejecutado en %3.2f segundos.\r\n\n",
|
||||||
|
((double)(fin-inicio))/CLK_TCK);
|
||||||
|
Jputs(buf);
|
||||||
|
MuestraDatos(datos,NDATOS); /*imprime datos en orden*/
|
||||||
|
}
|
||||||
|
|
||||||
|
} while (! terminado);
|
||||||
|
|
||||||
|
Jclrscr(); /*borra pantalla*/
|
||||||
|
Jcursor(1); /*muestra cursor*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notas sobre main:
|
||||||
|
<1> Como los c¢digos de las teclas indicadas son n£meros progresivos,
|
||||||
|
basta con asignar el primero. enum se ocupa despu‚s autom ticamente
|
||||||
|
de asignar valores crecientes (1060,1061,...) a las siguientes
|
||||||
|
constantes.
|
||||||
|
<2> Utilizamos un array de double porque la reordenaci¢n de un array int
|
||||||
|
es demasiado r pida. Las comparaciones y asignaciones de double dan
|
||||||
|
una mejor idea del comportamiento t¡pico en condiciones reales.
|
||||||
|
<3> Utilizamos clock en vez de time para obtener una mayor resoluci¢n
|
||||||
|
(cerca de 1/18.2 segundos en los PC). La funci¢n time tiene, sin
|
||||||
|
embargo, y siempre en los IBM PC y compatibles, una resoluci¢n
|
||||||
|
t¡pica de un segundo.
|
||||||
|
<4> Funciona porque los c¢digos de las teclas F1..F6 son n£meros enteros
|
||||||
|
progresivos (ver nota 1).
|
||||||
|
<5> Dividiendo el tiempo empleado para la constante CLK_TCK (definida en
|
||||||
|
<time.h>), se obtiene el tiempo en segundos. Recuerde el uso de
|
||||||
|
(double) para asegurar que la divisi¢n se ejecute en double, evitando
|
||||||
|
el riesgo de una divisi¢n entera que perder¡a la parte fraccionaria
|
||||||
|
(dependiendo de como est‚ definido CLK_TCK, es mejor no arriesgarse
|
||||||
|
y utilizar double).
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* ExtraeDatos: extrae n enteros casuales en el array d[].
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
void ExtraeDatos(double d[], int n)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < n; i++) { /*en cada elemento*/
|
||||||
|
d[i] = rand()/100.0; /*un double casual <1>*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notas sobre ExtraeDatos:
|
||||||
|
<1> Pone dos cifras decimales s¢lo con fines est‚ticos: los valores de
|
||||||
|
los datos no interesan, basta que vengan ordenados correctamente.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* MuestraDatos: muestra los n enteros contenidos en el array d[].
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
void MuestraDatos(double d[], int n)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
char buf[80];
|
||||||
|
|
||||||
|
for (i = 0; i < n; i++) { /*por cada elemento*/
|
||||||
|
sprintf(buf,"%7.2f",d[i]); /*imprime en 7 espacios*/
|
||||||
|
if(Jposx() > 72) { /*a sig. l¡n. si no est */
|
||||||
|
Jputs("\r\n");
|
||||||
|
}
|
||||||
|
Jputs(buf); /*muestra dato*/
|
||||||
|
}
|
||||||
|
Jputs("\r\n");
|
||||||
|
PulseReturn(); /*espera un Return*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* Seleccion: reordena por selecci¢n el array d[] de n elementos.
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
void Seleccion(double d[], int n) /*<1>*/
|
||||||
|
{
|
||||||
|
int i,j,imin;
|
||||||
|
double temp;
|
||||||
|
|
||||||
|
Jputs("Ordenaci¢n por selecci¢n en curso...");
|
||||||
|
for (i = 0; i < n; i++) { /*para cada n£mero*/
|
||||||
|
imin = i; /*¡ndice m¡nimo de i <2>*/
|
||||||
|
for (j = i+1; j < n; j++) {
|
||||||
|
if (d[j] < d[imin]) { /*recuerda ¡ndice m¡nimo*/
|
||||||
|
imin = j;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
temp = d[i]; /*intercamb. con m¡n. <3>*/
|
||||||
|
d[i] = d[imin];
|
||||||
|
d[imin] = temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notas sobre Selecci¢n:
|
||||||
|
<1> A partir del primer elemento del array, se selecciona el elemento de
|
||||||
|
valor m s bajo y se coloca en primer lugar, intercambi ndolo con el
|
||||||
|
que estaba en primer lugar; despu‚s se avanza i al segundo elemento,
|
||||||
|
se busca el nuevo m¡nimo y se intercambia con el segundo, etc‚tera.
|
||||||
|
En la pr ctica, se seleccionan los elementos uno cada vez en orden
|
||||||
|
creciente, y se colocan a partir del inicio del array.
|
||||||
|
<2> imin es el ¡ndice del elemento de valor m s bajo entre los que ya hay
|
||||||
|
para ordenar. Para buscar el elemento de valor m s bajo, se supone
|
||||||
|
que es el primero (imin = i). Si despu‚s encuentra uno m s bajo, se
|
||||||
|
cambia imin de forma que contenga el ¡ndice del elemento m s bajo.
|
||||||
|
<3> Para el intercambio es necesaria una variable intermedia: el C no
|
||||||
|
tiene instrucciones para intercambiar dos variables, y una funci¢n
|
||||||
|
ser¡a demasiado ineficaz.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* Insercion: reordena por inserci¢n el array d[] de n elementos.
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
void Insercion(double d[], int n) /*<1>*/
|
||||||
|
{
|
||||||
|
int i,j;
|
||||||
|
double z;
|
||||||
|
|
||||||
|
Jputs("Ordenaci¢n por inserci¢n en curso...");
|
||||||
|
for (i = 1; i < n; i++) {
|
||||||
|
z = d[i]; /*n£m. a insertar <2>*/
|
||||||
|
j = i; /*busca hacia atr s*/
|
||||||
|
while (j > 0 && d[j-1] > z) { /*<3>*/
|
||||||
|
d[j] = d[j-1]; /*hace sitio <4>*/
|
||||||
|
j--;
|
||||||
|
}
|
||||||
|
d[j] = z; /*inserta*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notas sobre Inserci¢n:
|
||||||
|
<1> Cada elemento se inserta en el lugar adecuado entre los ya
|
||||||
|
ordenados. Al principio se considera ordenado s¢lo el primer elemento,
|
||||||
|
por lo que se parte del segundo. Cada elemento se inserta como
|
||||||
|
cuando se ordena una mano de cartas de una baraja.
|
||||||
|
<2> z es el valor a insertar en el lugar adecuado entre los anteriores.
|
||||||
|
<3> Vuelve hacia atr s entre los elementos ya ordenados hasta que no
|
||||||
|
encuentra uno menor o igual a z. z puede insertarse por lo tanto
|
||||||
|
justo despu‚s del elemento encontrado. Recuerde que si la primera
|
||||||
|
condici¢n (j > 0) no es cierta, la segunda ni siquiera se prueba,
|
||||||
|
evitando as¡ acceder a un elemento inexistente del array d[].
|
||||||
|
<4> Mientras va hacia atr s, coloca delante los elementos aprovechando
|
||||||
|
el lugar en el que estaba z. De este modo, cuando encuentra el lugar
|
||||||
|
adecuado s¢lo debe escribir en ‚l z (el contenido original ya se ha
|
||||||
|
colocado delante).
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* BubbleSort: reordena por intercambios el array d[] de n elementos.
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
void BubbleSort(double d[], int n) /*<1>*/
|
||||||
|
{
|
||||||
|
int i,intercambio;
|
||||||
|
double temp;
|
||||||
|
|
||||||
|
Jputs("Ordenaci¢n por burbuja en curso...");
|
||||||
|
do {
|
||||||
|
intercambio = 0;
|
||||||
|
for (i = 1; i < n; i++) { /*explora por pares*/
|
||||||
|
if (d[i] < d[i-1]) {
|
||||||
|
temp = d[i];
|
||||||
|
d[i] = d[i-1];
|
||||||
|
d[i-1] = temp;
|
||||||
|
intercambio = 1; /*e indica <2>*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} while (intercambio); /*sale si no intercambia*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notas sobre BubbleSort:
|
||||||
|
<1> A partir del primer par de elementos, el array se explora comparando
|
||||||
|
pares de elementos adyacentes. Si no est n bien ordenados, se
|
||||||
|
intercambian entre ellos. Se repite el procedimiento hasta que en
|
||||||
|
una pasada no se realiza ning£n intercambio, porque los elementos
|
||||||
|
est n todos en orden.
|
||||||
|
<2> El flag (variable l¢gica) intercambio sirve para indicar que se ha
|
||||||
|
realizado al menos un intercambio, y por ello se debe dar otra pasada.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* ShellSort: reordena por Shell sort el array d[] de n elementos.
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
void ShellSort(double d[], int n) /*<1>*/
|
||||||
|
{
|
||||||
|
int dist; /*distancia entre los elementos a ordenar en una pasada*/
|
||||||
|
int i,j;
|
||||||
|
double z;
|
||||||
|
|
||||||
|
Jputs("Ordenaci¢n Shell en curso...");
|
||||||
|
for (dist = 1; dist < n; dist = dist*3+1) /*distancia inicial <2>*/
|
||||||
|
;
|
||||||
|
|
||||||
|
while ( (dist = dist/3) > 0) { /*hasta distancia 1*/
|
||||||
|
for (i = dist; i < n; i++) { /*<3>*/
|
||||||
|
z = d[i]; /*n£m. a insertar*/
|
||||||
|
j = i; /*busca hacia atr s*/
|
||||||
|
while (j-dist >= 0 && d[j-dist] > z) {
|
||||||
|
d[j] = d[j-dist]; /*hace sitio*/
|
||||||
|
j -= dist;
|
||||||
|
}
|
||||||
|
d[j] = z; /*inserta*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notas sobre ShellSort:
|
||||||
|
<1> Se realiza una ordenaci¢n por inserci¢n considerando s¢lo un elemento
|
||||||
|
cada dist elementos, partiendo con dist bastante grande. Esto coloca
|
||||||
|
r pidamente hacia los extremos los elementos que tienen que moverse
|
||||||
|
mucho para lograr colocarse en su lugar adecuado. dist se reduce
|
||||||
|
despu‚s gradualmente hasta 1, es decir, a una ordenaci¢n por
|
||||||
|
inserci¢n, que sin embargo es rapid¡sima, porque los elementos est n
|
||||||
|
ya en sus lugares correctos.
|
||||||
|
<2> Una secuencia particularmente eficaz para dist es (al rev‚s) la
|
||||||
|
serie 1, 4, 13, 40, 121, ... (multiplica por tres y a¤ade uno).
|
||||||
|
Observe que todo el trabajo se hace en la misma for: la instrucci¢n
|
||||||
|
dependiente de for es una instrucci¢n vac¡a.
|
||||||
|
<3> El ciclo interno es una ordenaci¢n normal por inserci¢n, s¢lo que se
|
||||||
|
considera £nicamente un elemento cada dist.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* Quicksort: reordena con Quicksort el array d[] de n elementos.
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
void Quicksort(double d[], int n)
|
||||||
|
{
|
||||||
|
Jputs("Ordenaci¢n Quicksort en curso...");
|
||||||
|
qsort(d,n,sizeof(d[0]),
|
||||||
|
(int(*)(const void*, const void*)) Compara); /*<1>*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***** Compara: compara dos elementos, por Quicksort. *****/
|
||||||
|
|
||||||
|
int Compara(double *d1, double *d2)
|
||||||
|
{
|
||||||
|
if (*d1 > *d2) return 1; /*<2>*/
|
||||||
|
else if (*d1 < *d2) return -1;
|
||||||
|
else return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notas sobre Quicksort:
|
||||||
|
<1> En este complejo programa se declara que Compara es un puntero a una
|
||||||
|
funci¢n que recibe dos punteros a void y devuelve un int. Es necesario
|
||||||
|
con los compiladores 100% ANSI porque la funci¢n de librer¡a qsort no
|
||||||
|
puede conocer con anticipaci¢n el tipo exacto de los argumentos que
|
||||||
|
debe pasarle a la funci¢n de comparaci¢n, y por ello los declara como
|
||||||
|
punteros a void. El programa finje que los argumentos son del tipo
|
||||||
|
deseado por qsort, aunque en realidad sean de otro tipo (en este caso,
|
||||||
|
se trata de punteros a double).
|
||||||
|
Obviamente, haci‚ndolo de esta forma se impide al compilador que
|
||||||
|
controle la exactitud de la llamada; por ello es necesario prestar
|
||||||
|
mucha atenci¢n. Como alternativa, se podr¡a modificar la declaraci¢n
|
||||||
|
de Compara utilizando void* y efectuando en su interior los pasos de
|
||||||
|
void* a double*.
|
||||||
|
<2> No se puede hacer simplemente *d1-*d2, porque el valor devuelto por
|
||||||
|
la funci¢n debe ser un int: se perder¡a la parte fraccionaria y
|
||||||
|
n£meros como 12.47 y 12.34 (distintos s¢lo en su parte fraccionaria)
|
||||||
|
ser¡an considerados iguales. De este modo, entre otras cosas, la
|
||||||
|
ejecuci¢n es m s r pida. Se aceptan tres return, ya que dadas las
|
||||||
|
exiguas dimensiones de la funci¢n, no hay problemas de legibilidad.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* PulseReturn: espera una tecla Return.
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
void PulseReturn(void)
|
||||||
|
{
|
||||||
|
Jclrkey();
|
||||||
|
Jputs("\r\nPulse Return para continuar: ");
|
||||||
|
while (Jgetkey(1) != '\r') {
|
||||||
|
Jputch('\a');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
BIN
P.EXE
Normal file
BIN
P.EXE
Normal file
Binary file not shown.
1
R.BAT
Normal file
1
R.BAT
Normal file
@ -0,0 +1 @@
|
|||||||
|
edit agenda.img
|
9
README.md
Normal file
9
README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#HERM
|
||||||
|
|
||||||
|
|
||||||
|
*11/11/1991*
|
||||||
|
|
||||||
|
ToDo: wwtcf?
|
||||||
|
|
||||||
|
|
||||||
|

|
BIN
SUPERVGA.OBJ
Normal file
BIN
SUPERVGA.OBJ
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user