home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / sqdev200.zip / h / msgapi.h < prev    next >
C/C++ Source or Header  |  1994-05-23  |  18KB  |  508 lines

  1. /***************************************************************************
  2.  *                                                                         *
  3.  *  Squish Developers Kit Source, Version 2.00                             *
  4.  *  Copyright 1989-1994 by SCI Communications.  All rights reserved.       *
  5.  *                                                                         *
  6.  *  USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE       *
  7.  *  SQUISH DEVELOPERS KIT LICENSING AGREEMENT IN SQDEV.PRN.  IF YOU DO NOT *
  8.  *  FIND THE TEXT OF THIS AGREEMENT IN THE AFOREMENTIONED FILE, OR IF YOU  *
  9.  *  DO NOT HAVE THIS FILE, YOU SHOULD IMMEDIATELY CONTACT THE AUTHOR AT    *
  10.  *  ONE OF THE ADDRESSES LISTED BELOW.  IN NO EVENT SHOULD YOU PROCEED TO  *
  11.  *  USE THIS FILE WITHOUT HAVING ACCEPTED THE TERMS OF THE SQUISH          *
  12.  *  DEVELOPERS KIT LICENSING AGREEMENT, OR SUCH OTHER AGREEMENT AS YOU ARE *
  13.  *  ABLE TO REACH WITH THE AUTHOR.                                         *
  14.  *                                                                         *
  15.  *  You can contact the author at one of the address listed below:         *
  16.  *                                                                         *
  17.  *  Scott Dudley       FidoNet     1:249/106                               *
  18.  *  777 Downing St.    Internet    sjd@f106.n249.z1.fidonet.org            *
  19.  *  Kingston, Ont.     CompuServe  >INTERNET:sjd@f106.n249.z1.fidonet.org  *
  20.  *  Canada  K7M 5N3    BBS         1-613-634-3058, V.32bis                 *
  21.  *                                                                         *
  22.  ***************************************************************************/
  23.  
  24. /* $Id: MSGAPI.H 1.4 1994/04/01 12:15:26 sjd Exp sjd $ */
  25.  
  26. #ifndef __SQAPI_H_DEFINED
  27. #define __SQAPI_H_DEFINED
  28. #define __MSGAPI_H_DEFINED
  29.  
  30. #include <stdio.h>
  31. #include <stdlib.h>
  32. #include "stamp.h"
  33. #include "typedefs.h"
  34. #include "compiler.h"
  35.  
  36. #define MSGAPI
  37. #define MSGAPI_VERSION  1
  38.  
  39. struct _msgapi;
  40. struct _msgh;
  41. struct _netaddr;
  42. struct _xmsg;
  43.  
  44.  
  45. /* Compatibility with MSGAPI v0.0 */
  46.  
  47. #if !defined(MSGAPI_NO_OLD_TYPES) && !defined(_WINDOWS_)
  48.   typedef struct _msgapi MSG;
  49.   typedef struct _msgh MSGH;
  50. #endif
  51.  
  52.  
  53. /* Handle special code for OS/2 DLLs */
  54.  
  55. #if defined(OS_2)
  56.  
  57.   #ifdef __FLAT__ /* OS/2 2.0 */
  58.     #ifndef EXPENTRY
  59.       #define EXPENTRY _System
  60.     #endif
  61.  
  62.     #define OS2LOADDS
  63.     #define OS2FAR
  64.  
  65.     #ifndef MSGAPI_NO_OLD_TYPES
  66.       #define MSG MSG
  67.       #define MSGH MSGH
  68.     #endif
  69.   #else
  70.     #ifndef EXPENTRY
  71.       #define EXPENTRY pascal far _loadds
  72.     #endif
  73.  
  74.     #define OS2LOADDS _loadds
  75.     #define OS2FAR far
  76.  
  77.     #ifndef MSGAPI_NO_OLD_TYPES
  78.       #define MSG MSG far
  79.       #define MSGH MSGH far
  80.     #endif
  81.   #endif
  82.  
  83. #elif defined(NT)
  84.     #define OS2LOADDS
  85.     #define OS2FAR
  86.  
  87.     #define EXPENTRY pascal
  88. #else
  89.   #define EXPENTRY pascal
  90.   #define OS2LOADDS
  91.   #define OS2FAR
  92. #endif
  93.  
  94. #ifdef __WATCOMC__
  95.   #if defined(OS_2) && !defined(__FLAT__)
  96.     #define MAPIENTRY far pascal  /* WC segmented model doesn't need loadds */
  97.   #else
  98.     #define MAPIENTRY EXPENTRY
  99.   #endif
  100. #else
  101.   #define MAPIENTRY EXPENTRY
  102. #endif
  103.  
  104. /* Definitions for MsgAPI 0.4+ */
  105.  
  106. typedef struct _msgapi OS2FAR *HAREA;
  107. typedef struct _msgh OS2FAR *HMSG;
  108.  
  109. typedef struct _xmsg XMSG;
  110. typedef struct _xmsg OS2FAR *PXMSG;
  111.  
  112. typedef struct _netaddr NETADDR;
  113. typedef NETADDR OS2FAR *PNETADDR;
  114.  
  115. typedef dword UMSGID;
  116.  
  117.  
  118. /* MsgOpenArea(name, MODE, type); */
  119.  
  120. #define MSGAREA_NORMAL  0x00
  121. #define MSGAREA_CREATE  0x01
  122. #define MSGAREA_CRIFNEC 0x02
  123.  
  124.  
  125. /* MsgOpenArea(name, mode, TYPE); */
  126.  
  127. #define MSGTYPE_SDM     0x01
  128. #define MSGTYPE_SQUISH  0x02
  129. #define MSGTYPE_ECHO    0x80
  130.  
  131.  
  132. /* MsgOpenMsg(mh, mode, N); */
  133.  
  134. #define MSGNUM_CUR      (dword)-1L
  135. #define MSGNUM_PREV     (dword)-2L
  136. #define MSGNUM_NEXT     (dword)-3L
  137.  
  138. #define MSGNUM_current  MSGNUM_CUR
  139. #define MSGNUM_previous MSGNUM_PREV
  140. #define MSGNUM_next     MSGNUM_NEXT
  141.  
  142. /* MsgOpenMsg(mh, MODE, n); */
  143.  
  144. #define MOPEN_CREATE    0
  145. #define MOPEN_READ      1
  146. #define MOPEN_WRITE     2
  147. #define MOPEN_RW        3
  148.  
  149. /* MsgUidToMsgn(mh, umsgid, TYPE) */
  150.  
  151. #define UID_EXACT     0x00
  152. #define UID_NEXT      0x01
  153. #define UID_PREV      0x02
  154.  
  155. /* Values for 'msgapierr' */
  156.  
  157. #define MERR_NONE   0     /* No error                                       */
  158. #define MERR_BADH   1     /* Invalid handle passed to function              */
  159. #define MERR_BADF   2     /* Invalid or corrupted file                      */
  160. #define MERR_NOMEM  3     /* Not enough memory for specified operation      */
  161. #define MERR_NODS   4     /* Maybe not enough disk space for operation      */
  162. #define MERR_NOENT  5     /* File/message does not exist                    */
  163. #define MERR_BADA   6     /* Bad argument passed to msgapi function         */
  164. #define MERR_EOPEN  7     /* Couldn't close - messages still open           */
  165. #define MERR_NOLOCK 8     /* Base needs to be locked to perform operation   */
  166. #define MERR_SHARE  9     /* Resource in use by other process               */
  167. #define MERR_EACCES 10    /* Access denied (can't write to read-only, etc)  */
  168. #define MERR_BADMSG 11    /* Bad message frame (Squish)                     */
  169. #define MERR_TOOBIG 12    /* Too much text/ctrlinfo to fit in frame (Squish)*/
  170.  
  171.  
  172. /* Bitmasks for XMSG.attr */
  173.  
  174. #define MSGPRIVATE 0x0001
  175. #define MSGCRASH   0x0002
  176. #define MSGREAD    0x0004
  177. #define MSGSENT    0x0008
  178. #define MSGFILE    0x0010
  179. #define MSGFWD     0x0020
  180. #define MSGORPHAN  0x0040
  181. #define MSGKILL    0x0080
  182. #define MSGLOCAL   0x0100
  183. #define MSGHOLD    0x0200
  184. #define MSGXX2     0x0400
  185. #define MSGFRQ     0x0800
  186. #define MSGRRQ     0x1000
  187. #define MSGCPT     0x2000
  188. #define MSGARQ     0x4000
  189. #define MSGURQ     0x8000
  190.  
  191. #define MSGSCANNED 0x00010000L  /* Message has been exported to the network */
  192. #define MSGUID     0x00020000L  /* xmsg.uid field contains umsgid of msg */
  193.  
  194.  
  195. /* Field sizes in XMSG */
  196.  
  197. #define XMSG_FROM_SIZE  36
  198. #define XMSG_TO_SIZE    36
  199. #define XMSG_SUBJ_SIZE  72
  200.  
  201.  
  202. /* Number of reply fields in XMSG.replies */
  203.  
  204. #define MAX_REPLY 9
  205.  
  206. #ifndef cpp_begin
  207.   #ifdef __cplusplus
  208.     #define cpp_begin()   extern "C" {
  209.     #define cpp_end()     }
  210.   #else
  211.     #define cpp_begin()
  212.     #define cpp_end()
  213.   #endif
  214. #endif
  215.  
  216.  
  217.  
  218. /* Initialization structure */
  219.  
  220. cpp_begin()
  221.   struct _minf
  222.   {
  223.     /* Version 0 information */
  224.  
  225.     word req_version;                       /* Should always be MSGAPI_VERSION */
  226.     word def_zone;
  227.     word haveshare;           /* no need to set - filled in by msgapi routines */
  228.  
  229.     /* Version 1 information */
  230.  
  231.     void OS2FAR * (MAPIENTRY *palloc)(size_t size);
  232.     void (MAPIENTRY *pfree)(void OS2FAR *ptr);
  233.     void OS2FAR * (MAPIENTRY *repalloc)(void OS2FAR *ptr, size_t size);
  234.  
  235.     void far * (MAPIENTRY *farpalloc)(size_t size);
  236.     void (MAPIENTRY *farpfree)(void far *ptr);
  237.     void far * (MAPIENTRY *farrepalloc)(void far *ptr, size_t size);
  238.   };
  239. cpp_end()
  240.  
  241. /* The network address structure.  The z/n/n/p fields are always             *
  242.  * maintained in parallel to the 'ascii' field, which is simply an ASCII     *
  243.  * representation of the address.  In addition, the 'ascii' field can        *
  244.  * be used for other purposes (such as internet addresses), so the           *
  245.  * contents of this field are implementation-defined, but for most cases,    *
  246.  * should be in the format "1:123/456.7" for Fido addresses.                 */
  247.  
  248. struct _netaddr
  249. {
  250.   word zone;
  251.   word net;
  252.   word node;
  253.   word point;
  254. };
  255.  
  256.  
  257. /* The eXtended message structure.  Translation between this structure, and *
  258.  * the structure used by the individual message base formats, is done       *
  259.  * on-the-fly by the API routines.                                          */
  260.  
  261. struct _xmsg
  262. {
  263.   dword attr;
  264.  
  265.   byte from[XMSG_FROM_SIZE];
  266.   byte to[XMSG_TO_SIZE];
  267.   byte subj[XMSG_SUBJ_SIZE];
  268.  
  269.   NETADDR orig;        /* Origination and destination addresses             */
  270.   NETADDR dest;
  271.  
  272.   struct _stamp date_written;   /* When user wrote the msg (UTC)            */
  273.   struct _stamp date_arrived;   /* When msg arrived on-line (UTC)           */
  274.   sword utc_ofs;                /* Offset from UTC of message writer, in    *
  275.                                  * minutes.                                 */
  276.  
  277.   UMSGID replyto;               /* This is a reply to message #x            */
  278.   UMSGID replies[MAX_REPLY];    /* Replies to this message                  */
  279.   dword umsgid;                 /* UMSGID of this message, if (attr&MSGUID) */
  280.                                 /* This field is only stored on disk -- it  *
  281.                                  * is not read into memory.                 */
  282.  
  283.   byte __ftsc_date[20];/* Obsolete date information.  If it weren't for the *
  284.                         * fact that FTSC standards say that one cannot      *
  285.                         * modify an in-transit message, I'd be VERY         *
  286.                         * tempted to axe this field entirely, and recreate  *
  287.                         * an FTSC-compatible date field using               *
  288.                         * the information in 'date_written' upon            *
  289.                         * export.  Nobody should use this field, except     *
  290.                         * possibly for tossers and scanners.  All others    *
  291.                         * should use one of the two binary datestamps,      *
  292.                         * above.                                            */
  293. };
  294.  
  295.  
  296.  
  297.  
  298.  
  299. /* This is a 'message area handle', as returned by MsgOpenArea(), and       *
  300.  * required by calls to all other message functions.  This structure        *
  301.  * must always be accessed through the API functions, and never             *
  302.  * modified directly.                                                       */
  303.  
  304. cpp_begin()
  305. struct _msgapi
  306. {
  307.   #define MSGAPI_ID   0x0201414dL
  308.     
  309.   dword id;                       /* Must always equal MSGAPI_ID */
  310.  
  311.   word len;                       /* LENGTH OF THIS STRUCTURE! */
  312.   word type;                      /* Type of this base - MSGTYPE_SDM, etc */
  313.  
  314.   dword num_msg;                  /* Number of msgs in this area */
  315.   dword cur_msg;                  /* Current message number */
  316.   dword high_msg;                 /* Highest message number in this area */
  317.   dword high_water;               /* Message number of high water marker */
  318.  
  319.   word sz_xmsg;                   /* Size of _xmsg structure */
  320.  
  321.   byte locked;                    /* Base is locked from use by other tasks */
  322.   byte isecho;                    /* Is this an EchoMail area?              */
  323.  
  324.   /* Function pointers for manipulating messages within this area.          */
  325.   struct _apifuncs
  326.   {
  327.     sword  (MAPIENTRY *CloseArea)(HAREA mh);
  328.     HMSG   (MAPIENTRY *OpenMsg)  (HAREA mh,word mode,dword n);
  329.     sword  (MAPIENTRY *CloseMsg) (HMSG msgh);
  330.     dword  (MAPIENTRY *ReadMsg)  (HMSG msgh, PXMSG msg, dword ofs,
  331.                                  dword bytes, byte OS2FAR *text, dword cbyt,
  332.                                  byte OS2FAR *ctxt);
  333.     sword  (MAPIENTRY *WriteMsg) (HMSG msgh, word append, PXMSG msg,
  334.                                  byte OS2FAR *text, dword textlen,
  335.                                  dword totlen, dword clen, byte OS2FAR *ctxt);
  336.     sword  (MAPIENTRY *KillMsg)  (HAREA mh, dword msgnum);
  337.     sword  (MAPIENTRY *Lock)     (HAREA mh);
  338.     sword  (MAPIENTRY *Unlock)   (HAREA mh);
  339.     sword  (MAPIENTRY *SetCurPos)(HMSG msgh, dword pos);
  340.     dword  (MAPIENTRY *GetCurPos)(HMSG msgh);
  341.     UMSGID (MAPIENTRY *MsgnToUid)(HAREA mh, dword msgnum);
  342.     dword  (MAPIENTRY *UidToMsgn)(HAREA mh, UMSGID umsgid, word type);
  343.     dword  (MAPIENTRY *GetHighWater)(HAREA mh);
  344.     sword  (MAPIENTRY *SetHighWater)(HAREA mh, dword hwm);
  345.     dword  (MAPIENTRY *GetTextLen)(HMSG msgh);
  346.     dword  (MAPIENTRY *GetCtrlLen)(HMSG msgh);
  347.     UMSGID (MAPIENTRY *GetNextUid)(HAREA harea);
  348.   } OS2FAR *api;
  349.  
  350.   /* Pointer to application-specific data.  API_SQ.C and API_SDM.C use      *
  351.    * this for different things, so again, no applications should muck       *
  352.    * with anything in here.                                                 */
  353.  
  354.   void *apidata;
  355. };
  356. cpp_end()
  357.  
  358.  
  359.  
  360. /* This is a 'dummy' message handle.  The other message handlers (contained *
  361.  * in API_SQ.C and API_SDM.C) will define their own structures, with some   *
  362.  * application-specified variables instead of other[].  Applications should *
  363.  * not mess with anything inside the _msgh (or MSGH) structure.             */
  364.  
  365. #define MSGH_ID  0x0302484dL
  366.  
  367. #if !defined(MSGAPI_HANDLERS) && !defined(NO_MSGH_DEF)
  368. struct _msgh
  369. {
  370.   HAREA ha;
  371.   dword id;
  372.  
  373.   dword bytes_written;
  374.   dword cur_pos;
  375. };
  376. #endif
  377.  
  378.  
  379.  
  380. #include "api_brow.h"
  381.  
  382.  
  383.  
  384.  
  385.  
  386. /* This variable is modified whenever an error occurs with the Msg...()     *
  387.  * functions.  If msgapierr==0, then no error occurred.                     */
  388.  
  389. #ifdef OS_2 /* Imported .DLL variables are not in DGROUP */
  390. extern word far _stdc msgapierr;
  391. #else
  392. extern word _stdc msgapierr;
  393. #endif
  394.  
  395. extern struct _minf _stdc mi;
  396.  
  397.  
  398.  
  399. /* Now, a set of macros, which call the specified API function.  These      *
  400.  * will map calls for 'MsgOpenMsg()' into 'SquishOpenMsg()',                *
  401.  * 'SdmOpenMsg()', or '<insert fave message type here>'.  Applications      *
  402.  * should always call these macros, instead of trying to call the           *
  403.  * manipulation functions directly.                                         */
  404.  
  405. #define MsgCloseArea(mh)       (*(mh)->api->CloseArea) (mh)
  406. #define MsgOpenMsg(mh,mode,n)  (*(mh)->api->OpenMsg)          (mh,mode,n)
  407. #define MsgCloseMsg(msgh)      ((*(((HMSG)msgh)->ha->api->CloseMsg))(msgh))
  408. #define MsgReadMsg(msgh,msg,ofs,b,t,cl,ct) (*(((HMSG)msgh)->ha->api->ReadMsg))(msgh,msg,ofs,b,t,cl,ct)
  409. #define MsgWriteMsg(gh,a,m,t,tl,ttl,cl,ct) (*(((HMSG)gh)->ha->api->WriteMsg))(gh,a,m,t,tl,ttl,cl,ct)
  410. #define MsgKillMsg(mh,msgnum)  (*(mh)->api->KillMsg)(mh,msgnum)
  411. #define MsgLock(mh)            (*(mh)->api->Lock)(mh)
  412. #define MsgUnlock(mh)          (*(mh)->api->Unlock)(mh)
  413. #define MsgGetCurPos(msgh)     (*(((HMSG)msgh)->ha->api->GetCurPos))(msgh)
  414. #define MsgSetCurPos(msgh,pos) (*(((HMSG)msgh)->ha->api->SetCurPos))(msgh,pos)
  415. #define MsgMsgnToUid(mh,msgn)  (*(mh)->api->MsgnToUid)(mh,msgn)
  416. #define MsgUidToMsgn(mh,umsgid,t) (*(mh)->api->UidToMsgn)(mh,umsgid,t)
  417. #define MsgGetHighWater(mh)   (*(mh)->api->GetHighWater)(mh)
  418. #define MsgSetHighWater(mh,n) (*(mh)->api->SetHighWater)(mh,n)
  419. #define MsgGetTextLen(msgh)   (*(((HMSG)msgh)->ha->api->GetTextLen))(msgh)
  420. #define MsgGetCtrlLen(msgh)   (*(((HMSG)msgh)->ha->api->GetCtrlLen))(msgh)
  421. #define MsgGetNextUid(ha)     (*(ha)->api->GetNextUid)(ha)
  422.  
  423. /* These don't actually call any functions, but are macros used to access    *
  424.  * private data inside the _msgh structure.                                  */
  425.  
  426. #define MsgCurMsg(mh)         ((mh)->cur_msg)
  427. #define MsgNumMsg(mh)         ((mh)->num_msg)
  428. #define MsgHighMsg(mh)        ((mh)->high_msg)
  429.  
  430. #define MsgGetCurMsg(mh)      ((mh)->cur_msg)
  431. #define MsgGetNumMsg(mh)      ((mh)->num_msg)
  432. #define MsgGetHighMsg(mh)     ((mh)->high_msg)
  433.  
  434. #define MsgStripDebris(str)          StripNasties(str)
  435. #define MsgCreateCtrlBuf(t, n, l)    CopyToControlBuf(t, n, l)
  436. #define MsgGetCtrlToken(where, what) GetCtrlToken(where, what)
  437. #define MsgCvt4D(c, o, d)            ConvertControlInfo(c, o, d)
  438. #define MsgCvtCtrlToKludge(ctrl)     CvtCtrlToKludge(ctrl)
  439. #define MsgRemoveToken(c, w)         RemoveFromCtrl(c, w)
  440. #define MsgGetNumKludges(txt)        NumKludges(txt)
  441. #define MsgWrite4D(msg, wf, ctrl)    WriteZPInfo(msg, wf, ctrl)
  442. #define MsgInvalidHmsg(mh)           InvalidMsgh(mh)
  443. #define MsgInvalidHarea(mh)          InvalidMh(mh)
  444.  
  445.  
  446. cpp_begin()
  447.   sword MAPIENTRY MsgOpenApi(struct _minf OS2FAR *minf);
  448.   sword MAPIENTRY MsgCloseApi(void);
  449.  
  450.   HAREA MAPIENTRY MsgOpenArea(byte OS2FAR *name, word mode, word type);
  451.   sword MAPIENTRY MsgValidate(word type, byte OS2FAR *name);
  452.   sword MAPIENTRY MsgBrowseArea(BROWSE *b);
  453.  
  454.  
  455.   void MAPIENTRY MsgFreeCtrlBuf(char *cbuf);
  456.   void MAPIENTRY MsgFreeCtrlToken(char *cbuf);
  457.  
  458.   byte * MAPIENTRY StripNasties(byte *str);
  459.   byte OS2FAR * MAPIENTRY CopyToControlBuf(byte OS2FAR *txt, byte OS2FAR * OS2FAR *newtext, unsigned OS2FAR *length);
  460.   byte OS2FAR * MAPIENTRY GetCtrlToken(byte OS2FAR *where, byte OS2FAR *what);
  461.   void MAPIENTRY ConvertControlInfo(byte OS2FAR *ctrl, PNETADDR orig, PNETADDR dest);
  462.   byte OS2FAR * MAPIENTRY CvtCtrlToKludge(byte OS2FAR *ctrl);
  463.   void MAPIENTRY RemoveFromCtrl(byte OS2FAR *ctrl,byte OS2FAR *what);
  464.   word MAPIENTRY NumKludges(char OS2FAR *txt);
  465.   int MAPIENTRY WriteZPInfo(PXMSG msg, void (MAPIENTRY *wfunc)(byte OS2FAR *str), byte OS2FAR *kludges);
  466.  
  467.  
  468.  
  469.   void MAPIENTRY SquishSetMaxMsg(HAREA sq, dword max_msgs, dword skip_msgs, dword age);
  470.   dword MAPIENTRY SquishHash(byte OS2FAR *f);
  471.  
  472.  
  473.  
  474.   HAREA MSGAPI SdmOpenArea(byte OS2FAR *name, word mode, word type);
  475.   sword MSGAPI SdmValidate(byte OS2FAR *name);
  476.  
  477.   HAREA MSGAPI SquishOpenArea(byte OS2FAR *name, word mode, word type);
  478.   sword MSGAPI SquishValidate(byte OS2FAR *name);
  479.  
  480.   sword MAPIENTRY InvalidMsgh(HMSG msgh);
  481.   sword MAPIENTRY InvalidMh(HAREA mh);
  482.  
  483.   void _fast ParseNNN(char *netnode, NETADDR *pn, word all);
  484.  
  485.   /*sword far pascal farread(sword handle,byte far *buf,word len);
  486.   sword far pascal farwrite(sword handle,byte far *buf,word len);*/
  487.  
  488.   int far pascal farread(int handle, byte far *buf, unsigned len);
  489.   int far pascal farwrite(int handle, byte far *buf, unsigned len);
  490.  
  491.   byte * _fast Address(NETADDR *a);
  492.  
  493.  
  494.   #ifndef MSGAPI_INIT
  495.     extern void OS2FAR * (MAPIENTRY *palloc)(size_t size);
  496.     extern void (MAPIENTRY *pfree)(void OS2FAR *ptr);
  497.     extern void OS2FAR * (MAPIENTRY *repalloc)(void OS2FAR *ptr, size_t size);
  498.  
  499.     extern void far * (MAPIENTRY *farpalloc)(size_t size);
  500.     extern void (MAPIENTRY *farpfree)(void far *ptr);
  501.     extern void far * (MAPIENTRY *farrepalloc)(void far *ptr, size_t size);
  502.   #endif
  503.  
  504. cpp_end()
  505.  
  506. #endif
  507.  
  508.