Re: Zip V8 (Re-releasing Zip)


Mon, 27 Nov 1995 09:35:55 GMT

>>>>> "Bjorn" == Bjorn Gustavsson <ermbgus@at.ericsson.se> writes:

> In article ic2@bubba.NMSU.Edu, jholder@nmsu.edu (John Holder)
> writes:
>> Bruce Stephens (bruce@liverpool.ac.uk) mentioned on Tue, 21 Nov
>> 1995 09:55:00 GMT in rec.arts.int-fiction that::
>>> I'd prefer a reimplementation in C, preferably with the core of
>>> the code #ifdefless. I
>> Sadly, this is impossible if you want to be portable even only
>> among UNIX platforms. At the moment, the large majority of
>> #ifdef's support portability. And really, it's not that hard to
>> get the hang of.

> I wouldn't say it is impossible. The implementation of Tcl (Tool
> Command Language) has a very clean interface to various variants of
> Unices, so that most of the code is mainly #ifdefless. (BTW, the
> source code for Tcl is the best written C program I've ever seen, in
> terms of maintainbility and readability. It is sheer joy reading
> it!)

That's the kind of example I had in mind. Put the things that have to
be #ifdefed in header files (and use autoconf to choose them, on
machines where the configure script can run), and perhaps have a
library of standard functions which may or may not exist on particular
machines in a separate file. I don't mind a file or two with #ifdefs,
but I find them distracting when they're all over the place, and I'd
prefer them to be minimized. This also helps portability and
maintainability, even if you don't mind reading lots of #ifdefs.

-- 
Bruce                   Institute of Advanced Scientific Computation
bruce@liverpool.ac.uk   University of Liverpool
http://supr.scm.liv.ac.uk/~bruce/