216 lines
7.7 KiB
C
216 lines
7.7 KiB
C
//////////////// Recuadros de Selecci¢n
|
||
#define Fichero_EXE 1
|
||
#define Info_Fich_Cola 2
|
||
#define B_Browser 3
|
||
#define Files_Already_Added 4
|
||
#define Files_Added 5
|
||
|
||
//////////////// Botones
|
||
#define Select_EXE 1
|
||
#define Load_PRJ 2
|
||
#define Save_PRJ 3
|
||
#define Make_H 4
|
||
#define Sort_Cola 5
|
||
#define Join_Files 6
|
||
#define Ins 7
|
||
#define Supr 8
|
||
#define SWAP 9
|
||
#define Exit 10
|
||
#define Subir_Browser 11
|
||
#define Select_Browser 12
|
||
#define Bajar_Browser 13
|
||
|
||
|
||
/////
|
||
#define HIDE 0
|
||
#define SHOW 1
|
||
|
||
/************************************************************************\
|
||
³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³
|
||
\************************************************************************/
|
||
|
||
typedef struct
|
||
{
|
||
char Fichero[13];
|
||
long Longitud;
|
||
unsigned char attrs;
|
||
} BROWSER;
|
||
|
||
typedef struct
|
||
{
|
||
char Fichero[13];
|
||
long Longitud;
|
||
long Posicion;
|
||
} COLA;
|
||
|
||
typedef struct
|
||
{
|
||
BROWSER ExeInfo;
|
||
char DirectorioExe[200];
|
||
char DestName[13];
|
||
char FilesAdded;
|
||
COLA Cola[51];
|
||
char Directorio[51][200];
|
||
char Selected[51];
|
||
char Macro[51][15];
|
||
} PROJECT;
|
||
|
||
typedef struct
|
||
{
|
||
char ID_Code; // Debe contener una constante de comprobacion 'J'
|
||
char ID_check; // igual que el anterior pero conteniendo 'D'
|
||
char JD_string[11]; // aqui debe haber escrito "Jos‚ David" + NULL
|
||
long Org_Long; // Longitud original del EXE...
|
||
char N_Files_Added;
|
||
} EXE_COLA;
|
||
|
||
/************************************************************************\
|
||
³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³
|
||
\************************************************************************/
|
||
|
||
|
||
|
||
|
||
/************************************************************************\
|
||
³±±±±±±±±±±±±F±U±N±C±I±O±N±E±S±±±D±E±L±±±S±E±L±E±C±T±±±F±I±L±E±S±±±±±±±±±±±³
|
||
\************************************************************************/
|
||
|
||
#ifndef __Modulo_Principal
|
||
#define JD_ch extern
|
||
#else
|
||
#define JD_ch
|
||
#endif
|
||
|
||
JD_ch void formatea_long( long Numero, char *Inter_Chg );
|
||
JD_ch void ShowHideSelect( char Hide_Show ) ;
|
||
JD_ch void Delete_Added( void ) ;
|
||
JD_ch void Marca_Bordes( void ) ;
|
||
JD_ch void All_Screen( void ) ;
|
||
JD_ch void DownSelect( void ) ;
|
||
JD_ch void UpSelect( void ) ;
|
||
JD_ch void AddFile( void ) ;
|
||
JD_ch void ShowInfo( int Hide_Show ) ;
|
||
JD_ch void SelectFile( void ) ;
|
||
|
||
JD_ch void Start_Join(void) ;
|
||
JD_ch void Load_Project(void) ;
|
||
JD_ch void Save_Project(void) ;
|
||
JD_ch void Make_Header(void) ;
|
||
JD_ch void Check_EXE(void) ;
|
||
|
||
#ifdef __Modulo_Principal
|
||
void Start_Join(void) {}
|
||
void Load_Project(void) {}
|
||
void Save_Project(void) {}
|
||
void Make_Header(void) ;
|
||
void Check_EXE(void) {}
|
||
void FSort_Cola(void) ;
|
||
#endif
|
||
|
||
#undef JD_ch
|
||
|
||
/************************************************************************\
|
||
³±±±±±±±±±±±±±±F±U±N±C±I±O±N±E±S±±±D±E±L±±±B±R±O±W±S±E±R±±±±±±±±±±±±±±±±±±±³
|
||
\************************************************************************/
|
||
|
||
#ifndef __Modulo_Browser
|
||
#define JD_ch extern
|
||
#else
|
||
#define JD_ch
|
||
#endif
|
||
|
||
JD_ch unsigned int RasterScan( void ) ;
|
||
JD_ch void ShowHideBrowserRow( char Hide_Show ) ;
|
||
JD_ch void ReDraw_Browser( void ) ;
|
||
JD_ch void Fill_Directory( void ) ;
|
||
JD_ch int SelectBrowser( void ) ;
|
||
JD_ch void DownBrowser( void ) ;
|
||
JD_ch void UpBrowser( void ) ;
|
||
|
||
#undef JD_ch
|
||
|
||
/**************************************************************************\
|
||
³ ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ³
|
||
\**************************************************************************/
|
||
/*
|
||
|
||
,
|
||
\
|
||
\ !
|
||
___________________________\___ ÚÄ¿
|
||
/ / ³ ÚÄ¿\ ÀÂÙ
|
||
/ / ³ ÀÂÙ \ ÚÅÙ
|
||
/__/ ³__Ã-_ÿ \ ÚÁ¿ ÚÄ¿
|
||
----- ³ ____ ____ \____\___ ---------ÀÂÙ----
|
||
/ / __ \ / __ \ ³# ------ÚÅ¿
|
||
³/ / \ \ ________________ / / \ \ \¿ -------|ß|
|
||
ÚÙ | JD | ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ | JD | ÀÄÄÄÄÄÄÄÙ ________
|
||
À \ / \ / ________
|
||
______________ùù____________________________ùù_______________________________
|
||
|
||
|
||
|||||||||======
|
||
/ ___ \====
|
||
/ ___ / __
|
||
/ / __/ ³ \
|
||
| / ³ \ ÀÄÄ|
|
||
\ | ÀÄÄ| /
|
||
| \ / ù-------\
|
||
\ ùù ---------/
|
||
\ \======/ |
|
||
\_________/
|
||
|
||
*/
|
||
#ifndef __Modulo_Principal
|
||
#define JD_ch extern
|
||
#else
|
||
#define JD_ch
|
||
#endif
|
||
|
||
JD_ch char Borde_Activo; // Indica el recuadro actualmente activo
|
||
JD_ch char Comodin[13]; // Comodin de rastreo para el Browser
|
||
|
||
JD_ch char EXE_is_JD; // El EXE cargado ha sido tratado por JD
|
||
JD_ch char FilesAdded; // Numero de Ficheros a¤adidos a la cola
|
||
JD_ch char CurrRow; // Linea actual en la cola..............
|
||
JD_ch char BrowserRow;
|
||
JD_ch int BrowserTop;
|
||
JD_ch int maxfiles;
|
||
JD_ch char oldpath[229]; //internal. do not change
|
||
JD_ch unsigned char olddrive; //impossible drive name
|
||
JD_ch char olddisk, key;
|
||
JD_ch long LastPosicion; // Esta variable guarda la ultima posici¢n dentro
|
||
JD_ch char LastSelected; // del ejecutable y la siguiente, el £ltimo se¤alado
|
||
|
||
|
||
////////////////////////////////////////////////////////////////////////////
|
||
/***************************************************************************\
|
||
| Critical Disk Error handling routines (C) 1995 Jason Speight. |
|
||
| void interrupt critical_error_handler(__CPPARGS) is the interrupt which |
|
||
| captures disk io errors. (int 0x24, if you're interested!) Such errors |
|
||
| are : Disk not inserted in drive, seek error reading from a drive, general|
|
||
| disk failure etc. The only things the interrupt does is : |
|
||
| Suppress the dos ABORT,RETRY,FAIL,IGNORE statement |
|
||
| Sets a variable erroroccurred to the dos error statement. (!=0) |
|
||
| |
|
||
| StartCEH() and StopCEH() start and stop the error handler. YOU MUST |
|
||
| STOPCEH BEFORE THE EXIT OF THE PROGRAM. or else when you get a disk |
|
||
| error, the int 24 issued bu DOS points to the middle of nowhere! *HANG* |
|
||
| |
|
||
| diskerror() is my routine to display a disk IO error. It also sets the |
|
||
| global variable erroroccurred to 0 for future use. This procedure also |
|
||
| needs access to "SCRNHNDL.H" and "BOXES.H" |
|
||
| |
|
||
| BTW, anybody know how to trap the message "PLEASE INSERT DISK FOR DRIVE x"|
|
||
\***************************************************************************/
|
||
//for interrupt handlers
|
||
|
||
JD_ch void interrupt critical_error_handler(...) ; // interrupt prototype
|
||
JD_ch void interrupt (*old_int24)(...) ; // interrupt function pointer
|
||
JD_ch void startceh() ;
|
||
JD_ch void stopceh() ;
|
||
|
||
JD_ch int erroroccurred;
|
||
|
||
#undef JD_ch
|