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