]> diplodocus.org Git - nmh/commit
m_getfld() et al: Add wrapper without FILE *iob parameter.
authorRalph Corderoy <ralph@inputplus.co.uk>
Thu, 10 Aug 2017 14:44:20 +0000 (15:44 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 10 Aug 2017 14:44:20 +0000 (15:44 +0100)
commit0ff76f3b2823f98e75b76dc93f2b5be293171610
tree86dbad345dbfc32917c354c9a461303e56b9519d
parent4165ce30f81bc078f3635a2a198f3a2ab5fc9b75
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.
h/prototypes.h
sbr/m_getfld.c