home *** CD-ROM | disk | FTP | other *** search
- /************************************************************
-
- PCMD.h
- Last Modified: Tuesday, January 22, 1990 at 9:46 PM
- Interface to Preditor PCMD modules
-
- PCMD's must take the following form:
-
- long MyPCMD(
- unsigned char *sourceText,
- long sourceLength,
- unsigned char *destText,
- long *destSpace,
- PCMDInfo *info
- )
- {
- return(kPCMDSuccess);
- }
-
- And are compiled as CODE resources, with id = 100 (PCMD
- changes the text) or id = 101 (PCMD only reads the text)
-
- © Copyright Evatac Software 1988-1991
- All rights reserved
-
- ************************************************************/
-
- #ifndef __PCMD__
- #define __PCMD__
-
- /*
- * Valid return values for PCMD module
- */
-
- #define kPCMDError (-1)
- #define kPCMDSuccess 0
- #define kPCMDMoreSpace 1
- #define kPCMDStop 2
-
- #define FirstLine(info) ((info)->currentLineNum == (info)->startLineNum)
- /*
- * Typedef for the structure space passed in
- * to the PCMD module
- */
-
- typedef struct PCMDInfo {
- long currentLineNum;
- long startLineNum;
- long linesAffected;
- long linesAdded;
- long textGrowth;
- long startPosThisLine;
- short startColThisLine;
- short endColThisLine;
- short startCol;
- short endCol;
- char *globals; /* 20 bytes of global data */
- } PCMDInfo;
-
- /*
- * Typedef for a pointer to a PCMD function
- */
-
- typedef long (*PCMDProcPtr)(
- unsigned char *sourceText,
- long sourceLength,
- unsigned char *destText,
- long *destSpace,
- PCMDInfo *info
- );
-
- #endif
-