[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-workers] unused m_getfld() states

From: David Levine
Subject: [Nmh-workers] unused m_getfld() states
Date: Sun, 06 Jan 2013 21:57:47 -0500

Something to consider when everyone (:-) is reviewing the
m_getfld() update:  it has two states, FLDEOF and BODYEOF,
that it never uses.  And based on the old MH RCS file, it
has never used them.  So there's an opportunity to clean up
callers a bit by removing their handling of those states.

Here are all of the states:

 #define FMTERR  (-3)           /* Message Format error             */
 #define FLD      0             /* Field returned                   */
 #define FLDPLUS  1             /* Field returned with more to come */
 #define FLDEOF   2  [UNUSED!]  /* Field returned ending at eom     */
 #define BODY     3             /* Body  returned with more to come */
 #define BODYEOF  4  [UNUSED!]  /* Body  returned ending at eom     */
 #define FILEEOF  5             /* Reached end of input file        */

Maybe we could replace some current uses of FILEEOF with
FLDEOF/BODYEOF, but we've gotten this far without them.  And
then the calling code would have to be examined because
there's no telling if it would do the right thing.

Back to the m_getfld() review.  To quickly see the critical
changes to m_getfld.c:

  git diff -w --color=auto d3d007e8 6195e9e4 sbr/m_getfld.c

You don't even need to switch to the branch.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]