home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / graphics / 8231 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  2.3 KB

  1. Xref: sparky comp.graphics:8231 alt.graphics.pixutils:1832
  2. Path: sparky!uunet!olivea!decwrl!csus.edu!netcomsv!mork!mcaldwel
  3. From: mcaldwel@netcom.com (Michael Caldwell)
  4. Newsgroups: comp.graphics,alt.graphics.pixutils
  5. Subject: Re: PBMPLUS
  6. Message-ID: <nxmmmbb.mcaldwel@netcom.com>
  7. Date: 28 Jul 92 15:43:19 GMT
  8. References: <5543@umriscc.isc.umr.edu> <#+lmf=b.jef@netcom.com>
  9. Organization: Netcom - Online Communication Services (408 241-9760 guest)
  10. Lines: 38
  11.  
  12. In article <#+lmf=b.jef@netcom.com> Jef Poskanzer <jef@netcom.com> writes:
  13. >johns@mcs213c.cs.umr.edu (John Stone):
  14. >}    If anyone out there is using OS/2 2.0, I've got a fair portion of 
  15. >}pbmplus ported now... I'm about halfway done... All that had to be done
  16. >}to port each program is build a .lib file out of the libp?m*.c files,
  17. >}and then to edit all of the file I/O stuff so that it uses binary
  18. >}I/O instead of text (OS/2 and Dos both default to text mode on the
  19. >}stdin and stdout)  
  20. >}The hardest part about the OS/2 port is that IBM C Set/2 won't let you
  21. >}use setmode() on a stream (which is how a friend of mine did a port of it
  22. >}to dos...)  So I had to use fdopen(); to do it.
  23. >}Using fdopen, means that I have to edit every call to a file I/O function
  24. >}and make sure it calls my binary file handle, and not the regular stdout 
  25. >}handle etc.
  26. >
  27. >I've seen other people doing DOS ports do the same thing, and I still
  28. >can't figure out why.  How about just *replacing* stdout and stdin
  29. >with binary-mode handles?  Seems like doing that and then fixing
  30. >any bugs it introduces would be a lot less editing, and more
  31. >importantly would not, if done right, need #ifdefs all over the
  32. >place.
  33. >---
  34. >Jef
  35. >
  36. >           Jef Poskanzer  jef@netcom.com  jef@well.sf.ca.us
  37. >"If you don't use Saber to develop your next C program, you're a dork."
  38. >                             -- Brian Reid
  39.  
  40. I have already ported pbmplus to OS/2 2.0.  The libraries are dlls so they
  41. can be shared by all the exes and not included to make each exe larger.
  42. I have uploaded it to hobbes.nmsu.edu.  I put it in there downloads
  43. directory which is for incoming files.  I don't know if they moved it or
  44. if they deleted it.  The only changes I made were to the library files,
  45. because the libc malloc does not work when linked in a dll, so I used
  46. DosAllocMem.  Also included in the upload are the new .def files and the
  47. new make files.
  48.  
  49. Michael
  50.