3 ms·
Skimming or folding to only show the names of the functions might make it easier to grok. For example, there are about 75 OSStatus messages this driver supports
by 1123581321 2y ago
Skimming or folding to only show the names of the functions might make it easier to grok. For example, there are about 75 OSStatus messages this driver supports.
There are a ton of case statements; each one represents a situation that must be supported.
3500 lines goes quickly when you divide it by a few hundred situations/statuses.
As comments in another discussion tree have said, it's a shame that macOS doesn't provide some of this natively. If it did then this would probably be higher level code and shorter. Knowing where the boundary lies between the system and the application is part of having an understanding of why all this was written.
I wouldn't feel bad about this; it's just a domain knowledge thing. Be excited by the opportunity to learn with a toy project or a deep code review!