home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / msgapi38.zip / INCLUDE / API_SDMP.H < prev    next >
Text File  |  1991-11-16  |  4KB  |  85 lines

  1. /***************************************************************************
  2.  *                                                                         *
  3.  *  MSGAPI Source Code, Version 2.00                                       *
  4.  *  Copyright 1989-1991 by Scott J. Dudley.  All rights reserved.          *
  5.  *                                                                         *
  6.  *  Priivate *.MSG include file                                            *
  7.  *                                                                         *
  8.  *  For complete details of the licensing restrictions, please refer to    *
  9.  *  the licence agreement, which is published in its entirety in           *
  10.  *  README.1ST.                                                            *
  11.  *                                                                         *
  12.  *  USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE       *
  13.  *  MSGAPI LICENSING AGREEMENT.  IF YOU DO NOT FIND THE TEXT OF THIS       *
  14.  *  AGREEMENT IN ANY OF THE AFOREMENTIONED FILES, OR IF YOU DO NOT HAVE    *
  15.  *  THESE FILES, YOU SHOULD IMMEDIATELY CONTACT THE AUTHOR AT ONE OF THE   *
  16.  *  ADDRESSES LISTED BELOW.  IN NO EVENT SHOULD YOU PROCEED TO USE THIS    *
  17.  *  FILE WITHOUT HAVING ACCEPTED THE TERMS OF THE MSGAPI LICENSING         *
  18.  *  AGREEMENT, OR SUCH OTHER AGREEMENT AS YOU ARE ABLE TO REACH WITH THE   *
  19.  *  AUTHOR.                                                                *
  20.  *                                                                         *
  21.  *  You can contact the author at one of the address listed below:         *
  22.  *                                                                         *
  23.  *  Scott Dudley           FidoNet  1:249/106                              *
  24.  *  777 Downing St.        Internet f106.n249.z1.fidonet.org               *
  25.  *  Kingston, Ont.         BBS      (613) 389-8315   HST/14.4k, 24hrs      *
  26.  *  Canada - K7M 5N3                                                       *
  27.  *                                                                         *
  28.  ***************************************************************************/
  29.  
  30. /* $Id: api_sdmp.h_v 1.0 1991/11/16 16:16:51 sjd Rel sjd $ */
  31.  
  32. static sword EXPENTRY SdmCloseArea(MSG *mh);
  33. static MSGH * EXPENTRY SdmOpenMsg(MSG *mh,word mode,dword msgnum);
  34. static sword EXPENTRY SdmCloseMsg(MSGH *msgh);
  35. static dword EXPENTRY SdmReadMsg(MSGH *msgh,XMSG *msg,dword offset,dword bytes,byte *text,dword clen,byte *ctxt);
  36. static sword EXPENTRY SdmWriteMsg(MSGH *msgh,word append,XMSG *msg,byte *text,dword textlen,dword totlen,dword clen,byte *ctxt);
  37. static sword EXPENTRY SdmKillMsg(MSG *mh,dword msgnum);
  38. static sword EXPENTRY SdmLock(MSG *mh);
  39. static sword EXPENTRY SdmUnlock(MSG *mh);
  40. static sword EXPENTRY SdmSetCurPos(MSGH *msgh,dword pos);
  41. static dword EXPENTRY SdmGetCurPos(MSGH *msgh);
  42. static UMSGID EXPENTRY SdmMsgnToUid(MSG *mh,dword msgnum);
  43. static dword EXPENTRY SdmUidToMsgn(MSG *mh,UMSGID umsgid,word type);
  44. static dword EXPENTRY SdmGetHighWater(MSG *mh);
  45. static sword EXPENTRY SdmSetHighWater(MSG *sq,dword hwm);
  46. static dword EXPENTRY SdmGetTextLen(MSGH *msgh);
  47. static dword EXPENTRY SdmGetCtrlLen(MSGH *msgh);
  48.  
  49. static void Convert_Fmsg_To_Xmsg(struct _omsg *fmsg,XMSG *msg,word def_zone);
  50. static void Convert_Xmsg_To_Fmsg(XMSG *msg,struct _omsg *fmsg);
  51. static void Init_Xmsg(XMSG *msg);
  52. static sword near _SdmRescanArea(MSG *mh);
  53. static sword near _Grab_Clen(MSGH *msgh);
  54. static void _stdc OS2LOADDS WriteToFd(byte *str);
  55. static void near Get_Binary_Date(struct _stamp *todate,struct _stamp *fromdate,byte *asciidate);
  56.  
  57.  
  58. static int statfd; /* file handle for WriteToFd */
  59. static byte *sd_msg="%s%u.msg";
  60.  
  61. /* Pointer to 'struct _sdmdata' so we can get Turbo Debugger to use         *
  62.  * the _sdmdata structure...                                                */
  63.  
  64. static struct _sdmdata *_junksqd;
  65.  
  66. static struct _apifuncs sdm_funcs=
  67. {
  68.   SdmCloseArea,
  69.   SdmOpenMsg,
  70.   SdmCloseMsg,
  71.   SdmReadMsg,
  72.   SdmWriteMsg,
  73.   SdmKillMsg,
  74.   SdmLock,
  75.   SdmUnlock,
  76.   SdmSetCurPos,
  77.   SdmGetCurPos,
  78.   SdmMsgnToUid,
  79.   SdmUidToMsgn,
  80.   SdmGetHighWater,
  81.   SdmSetHighWater,
  82.   SdmGetTextLen,
  83.   SdmGetCtrlLen,
  84. };
  85.