From: Ralph Corderoy Date: Thu, 10 Aug 2017 14:44:20 +0000 (+0100) Subject: m_getfld() et al: Add wrapper without FILE *iob parameter. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/0ff76f3b2823f98e75b76dc93f2b5be293171610?hp=0ff76f3b2823f98e75b76dc93f2b5be293171610 m_getfld() et al: Add wrapper without FILE *iob parameter. m_getfld(), m_getfld_track_filepos(), and m_unknown() all take a FILE *iob that's used to update *m_getfld_state_t, even though it's probably, hopefully, the same as the previous calls. Create wrapper functions for these with an arbitrary `2' suffix that don't have this parameter. After checking the m_getfld_state_t is initialised, they pass in its existing FILE *iob. This allows callers to transition to the wrappers in the cases where it's obviously the same FILE *iob being passed in. It isn't always obvious, in part because of the convention for calling this variable `in', even when it's a file-level static, a word that also occurs in comments. ---