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

  1. Xref: sparky comp.graphics:8168 alt.graphics.pixutils:1821
  2. Newsgroups: comp.graphics,alt.graphics.pixutils
  3. Path: sparky!uunet!decwrl!netcomsv!mork!jef
  4. From: jef@netcom.com (Jef Poskanzer)
  5. Subject: Re: PBMPLUS
  6. Message-ID: <#+lmf=b.jef@netcom.com>
  7. Date: Mon, 27 Jul 92 01:27:05 GMT
  8. Organization: Paratheo-Anametamystikhood Of Eris Esoteric
  9. References: <5543@umriscc.isc.umr.edu>
  10. Reply-To: Jef Poskanzer <jef@netcom.com>
  11. Lines: 26
  12.  
  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.