home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / msgapi38.zip / README
Text File  |  1995-06-07  |  9KB  |  254 lines

  1.                      Squish MsgAPI - 32-bit Port
  2.                      ---------------------------
  3.  
  4.  
  5. Latest update: 1995-06-07
  6.  
  7. See Addendum for latest info.
  8.  
  9.  
  10. Preface
  11. -------
  12.  
  13. This archive contains various files which will enable you to recompile
  14. Scott J. Dudley's MsgAPI routines with a 32-bit compiler under OS/2 2.1
  15. (OS/2 2.0 wasn't tested, but should it should work too).
  16.  
  17. These files arose from Paul Edwards' yearning for a 32-bit port of the
  18. MsgAPI library which he believed would lift certain restrictions in
  19. processing capacity.
  20.  
  21. In their present state, these patches have been tested to the point of
  22. compiling - nothing more;  the whole aim of this minimal port was to get the
  23. MsgAPI library compiling (at any cost) - making it *work* is an exercise
  24. left to the dear reader...
  25.  
  26. In no way should any of the binaries produced by these patches be used or
  27. construed as being "official replacements" for the current 16-bit MSGAPI.DLL
  28. library, or the 32-bit release of MsgAPI by Scott J. Dudley;  these
  29. files are being made available for "the curious", those experienced folk who
  30. know what they're doing, and *should* know better...
  31.  
  32.  
  33. Legal Stuff
  34. -----------
  35.  
  36. All the original MsgAPI code (which you can find in an archive called
  37. MSGAPI0.LZH in the same place you found this one) is:
  38.  
  39.         Copyright (C) 1991 by Scott J. Dudley.  All rights reserved.
  40.  
  41. Further:
  42.  
  43.         "Squish", "SquishMail" and "Maximus" are trademarks of
  44.         Scott J. Dudley.
  45.  
  46. All the alterations (including new makefiles) are hereby donated to the
  47. public domain, for the free use of all in whichever way is deemed fit.
  48.  
  49.  
  50. Supported Compilers
  51. -------------------
  52.  
  53. This archive contains patches that have been tested under OS/2 2.1 using
  54. the following compilers and tools:
  55.  
  56.         Borland C++ 1.5{1}
  57.         Turbo Librarian 4.00
  58.         Borland MAKE 3.6
  59.  
  60.         GNU C Compiler 2.6.3
  61.         EMX 0.9a Archive Managers (ar and emxomfar)
  62.         Dennis Vadura's DMAKE 3.80, PL 1{1}
  63.         GNU Make 3.70{2}
  64.  
  65.         IBM C Set++ 2.0
  66.         IBM Library Manager 1.1
  67.         IBM/Microsoft NMAKE 2.1
  68.         
  69.         Watcom C++ 10.0b
  70.         WLIB
  71.         WMAKE
  72.  
  73. {1}  Doesn't work well in passing arguments to shell - ends up passing
  74.      arguments to called application instead, so "rm" (or "erase" as the
  75.      case may be) may complain about an invalid parameter "2>/dev/nul".
  76.      GNU Make doesn't have this problem and lets the shell (CMD.EXE)
  77.      handle this parameter which redirects stderr to the NUL device.
  78.  
  79.      Otherwise, handles fine.
  80.  
  81. {2}  Doesn't like OMF format ".obj" extensions - never ever.
  82.  
  83. Creation of a DLL is only supported for the EMX development system;  all
  84. others (including EMX) have to suffice with a traditional static link
  85. library.
  86.  
  87. I have only worked with the EMX port;  to save me time and disk space, Paul
  88. Edwards worked on the Borland C++ and IBM C Set++ ports (or rather, sent
  89. comments/suggestions back to me for code changes).
  90.  
  91. There is absolutely no need for an assembler of any kind as none of the
  92. original assembler modules are used.  All above three targets assume a
  93. "flat" (linear) memory model.
  94.  
  95.  
  96. Archive Contents
  97. ----------------
  98.  
  99. This archive contains five subdirectories which correspond to the nested
  100. archives in Scott's original MSGAPI0.LZH release:
  101.  
  102.         src             Patches to MsgAPI source code and new makefiles
  103.         include         Patches to header files
  104.         lib             (empty)
  105.         os2             Patch for OS/2 module definition file
  106.         sample          Patch for one of the MsgAPI sample programs
  107.  
  108. To discourage people from taking this archive and blindly using the "all-new
  109. 32-bit" dynamic or static link libraries, there are *no* such libraries
  110. included - compile them yourself or go without.
  111.  
  112. Each "patch" consists of three files:
  113.  
  114.         *               Pre-patched file - ready to compile
  115.         *.old           Original file from MSGAPI0.LZH
  116.         *.patch         New-style context diffs
  117.  
  118. The suggested means for installing the complete source code is to first
  119. unpack MSGAPI0.LZH, then further unpack each of the nested archives into
  120. a subdirectory named after the archive from which it was formed - much
  121. like this archive.  For example:
  122.  
  123.         f:/msgapi               MSGAPI.DOC and README.1ST
  124.         f:/msgapi/include       Contents of INCLUDE.LZH
  125.         f:/msgapi/lib           Contents of LIB.LZH
  126.         f:/msgapi/os2           Contents of OS2.LZH
  127.         f:/msgapi/sample        Contents of SAMPLE.LZH
  128.         f:/msgapi/src           Contents of SRC.LZH
  129.  
  130. Now, unpack this archive over the same directory structure, automatically
  131. placing the pre-patched files into the correct directories.
  132.  
  133. The original makefile is not used at all - we supply our own:
  134.  
  135.         makefile.bcc    Borland C++     static library
  136.         makefile.dll    EMX/GCC         dynamic link library
  137.         makefile.emx    EMX/GCC         static library
  138.         makefile.ibm    IBM C Set++     static library
  139.  
  140. See the list earlier for the tested compilers/tools.
  141.  
  142. There exists a small bug in one of the samples included in MSGAPI0 - in
  143. particular, in SQCONVER.  A patch is provided should you wish to use it.
  144.  
  145.  
  146. Compiling MsgAPI32
  147. ------------------
  148.  
  149. Make ./src the current working directory, then invoke your make utility,
  150. calling the required makefile (see above) - for example:
  151.  
  152.                         dmake -f makefile.emx
  153.                         make -f makefile.dll
  154.                                 ...
  155.  
  156. If you have been following the same directory structure as outlined above,
  157. the makefile will find all the necessary header files - otherwise, you will
  158. have to make slight changes to the makefile first.
  159.  
  160. Should you so desire, make any other changes to the makefile (optimisations,
  161. whatever).
  162.  
  163. When compiling, ensure you are using native "ISO C" mode, *not* "C++" mode.
  164.  
  165. The DLL target also creates an import library, whilst the EMX target results
  166. in both Unix and OMF format libraries being produced (.a and .lib).  For
  167. the calling convention (Pascal vs. C), see the patches for your compiler.
  168.  
  169.  
  170. Linking MsgAPI32
  171. ----------------
  172.  
  173. When in Rome, do as the Romans do - link with either the static or import
  174. library as is the usual fashion for your compiler.  One point you may wish
  175. to note - when linking with the EMX development system, if you receive
  176. some linkage errors, try linking *twice* (ie., "-lmsgapi -lmsgapi" on the
  177. one command line) to resolve all references.
  178.  
  179. If you experience an unresolved symbol (Paul indicates this may occur with
  180. Borland C++), such as DosSleep, try linking in the DOSCALLS.LIB library
  181. (found in your \OS2 directory) if the function isn't already in your API
  182. library (and if it is, then try linking with that instead).
  183.  
  184. When compiling your own application (for linking/use with this port of
  185. MsgAPI), remember to define OS_2, __386__ and __FLAT__ if they are not
  186. already defined.
  187.  
  188.  
  189. Thanks...
  190. ---------
  191.  
  192. Paul Edwards            3:711/934@fidonet       Documentation comments
  193.                                                 Patches for structure packing
  194.  
  195. Craig Morrison          1:201/60@fidonet        Patches for ./src/ffind.c
  196.  
  197.  
  198. Contact Addresses
  199. -----------------
  200.  
  201. Complaints:     /dev/null
  202.  
  203. Money:          David J. N. Begley (3:711/934.4@fidonet, 3:712/515.3@fidonet)
  204.                 david@harpo.nepean.uws.edu.au
  205.                 dbegley@st.nepean.uws.edu.au
  206.  
  207. :-)
  208.  
  209. April 15, 1994
  210.  
  211.  
  212. Addendum
  213. --------
  214.  
  215. Paul Edwards has made the following changes:  
  216.  
  217. All files required to recompile the MSGAPI libraries are
  218. now included in this archive.
  219.  
  220. There is a MSGAPIC.LIB which has been compiled with CSET.
  221. There is a MSGAPIB.LIB which has been compiled with BCC.
  222. There is a MSGAPIW.LIB which has been compiled with Watcom.
  223. There is a MSGAPIE.LIB which has been compiled with GNU/EMX.
  224.  
  225. __386__, OS_2 and __FLAT__ are always defined, so that
  226. you don't have to add these defines in your own compile
  227. commands.
  228.  
  229. Circumvented the need to include doscalls.lib explicitly 
  230. when linking with the Borland-made library.
  231.  
  232.  
  233. To actually use this for your own applications, the minimum
  234. you need to do is copy the include\*.h files somewhere, 
  235. and copy the (say) msgapib.lib to a msgapi.lib, and then
  236. #include <msgapi.h> in your own programs, making sure the
  237. *.h files are in your include search path, and then link
  238. with msgapi.lib.
  239.  
  240. A bug was found with the writing of the index files for large
  241. messagebases.
  242.  
  243. A bug was found when converting UID to msg #.
  244.  
  245. A bug was found using the SQDEV200 version for DOS, and I decided
  246. to make this archive support DOS as well, so now it comes compiled
  247. for Borland, so that I can use it in MSGED/SQ.  MSGAPID.LIB is
  248. the DOS version for Borland.
  249.  
  250. Then I wanted to compile it under Watcom for DOS, so I created
  251. MAKEFILE.W16, and after a lot of effort got it to work too.
  252. MSGAPIW6.LIB contains the watcom stuff.  Now there is also a
  253. MSGAPIT.LIB which was compiled with TC++ 1.0 for DOS.
  254.