home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Contains all prototypes and types definitions needed to patch libraries
- ** functions safely.
- **
- ** Author: Gael Marziou
- ** Created: 14 July 1994 (Bastille Day ;-)
- **
- */
-
- #include <exec/types.h>
- #include <exec/execbase.h>
- #include <exec/memory.h>
- #include <exec/semaphores.h>
- #include <dos/dos.h>
- #include <libraries/commodities.h>
- #include <string.h>
- #include <proto/dos.h>
- #include <proto/exec.h>
-
- #include "code.h"
-
- /* Use a table and an array to make it a little more generic and easier to
- * add functions.
- */
-
- struct LVOTable
- {
- LONG lt_LVO;
- struct Library *lt_LibBase;
- ULONG lt_oldFunction;
- ULONG lt_newFunction;
- };
-
- struct JumpTable
- {
- struct SignalSemaphore jt_Semaphore;
- UWORD pad_word;
- struct Task *jt_Owner;
- UBYTE jt_Function[6]; /* at least there is one function to patch, each set of
- * patches will extend this array to store the right number
- * of functions
- */
- };
-
- /* protos */
- BOOL InstallWedge(UBYTE *JTName, struct LVOTable *LVOArray, UBYTE NumberOfFunctions);
- BOOL RemoveWedge(UBYTE *JTName, struct LVOTable *LVOArray, UBYTE NumberOfFunctions);
-
- /* prototypes for the functions to be SetFunction()'ed. */
- #define DEC_LVO(lvoname) extern lvoname
-
-
-
-