r/C_Programming • u/Just_Government3790 • Sep 12 '26
Question What C function would you delete and rewrite first, and why?
For me it's fnmatch - mostly because it's 40 year's old and smell's funny.
92
Upvotes
View all comments
Show parent comment
3
u/bluetomcat Sep 13 '26
Because they designed the API to be record-oriented, not byte-oriented. You are mostly expected to be reading an array of structs, and the return value indicates the number of structs completely read.
For reading arbitrary binary data, this is a bit unintuitive.