nmh-workers
[Top] [All Lists]

Modernizing core code (was Re: [Nmh-workers] tempfile creation

2005-04-27 16:53:56
On 27 April 2005 at 13:41, Neil W Rickert 
<rickert+nmh(_at_)cs(_dot_)niu(_dot_)edu> wrote:

The real problem here is that recent nmh "development" has been in
the form of creeping featurism.  But the code base is rotten to the
core, and badly needs revamping and modernizing.  Some documenting
would also be in order.

As a long time user of MH (I still have Jerry Peek's 1st edition of the
classic MH & Xmh), I've ported it to several exotic Unix platforms when 
I've needed to.  Never could figure out who to get the code changes back
to - and of course now they're gone :-(

Recently attemped to port 1.1RC2 to QNX Neutrino 6.2.  Why you ask?
For lack of anything better to do at the time :-)  Unfortunately, nmh
doesn't port easily to non-Unix systems, even those that provide a POSIX
compliant API set.  My biggest hurdle, which lead to my abandonment of
the porting effort, was the fact that the code uses intimate knowledge
of stdio.h.  More specifically, m_getfld.c, is full of porting issues:

/* 
   This routine "knows" that struct FILEs have a _ptr
   and a _cnt to describe the current state of the buffer and
   it knows that _filbuf ignores the _ptr & _cnt and simply fills
   the buffer.  If stdio on your system doesn't work this way, you
   may have to make small changes in this routine.
*/

And trying to map QNX's FILE definition to that used by nmh became
too much of a nightmare.

As a question, is it worth attempting to abstract this out, so this
particular pitfall doesn't exist in the future?  It would make porting
nmh to non-Unix systems significantly easier in the future.   Several 
times I have thought about it - and even posted to what I thought was 
the right place to get on this list - only to never receive a response...


 -NWR

jerry
       //  Jerry Heyman      | "Software is the difference between
      //   Amiga Forever :-) |  hardware and reality"
  \\ //    heymanj(_at_)acm(_dot_)org   | 
   \X/


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>