Closed mach-kernel closed 6 years ago
This might have been a good opportunity to change all the printf()s to some logging calls, and then have that use globals - rather than passing down a bool through APIs that are totally unrelated. Good old separation of concerns. Just an opinion. ; - )
That's a great idea! I'll get on that and try to have it out soon. 👍
Have a look around at some C logging APIs. E.g. just did a quick google and found this - not necessarily to use, but perhaps a good example of a simple logging API: https://github.com/rxi/log.c
I made a small delegator to vprintf
. In the future we can probably make levels but IMO doesn't need it. I was playing around in my head with adding something to manage the number of spaces/tabs prefixed to the output so that they wouldn't have to be prepended in the strings passed to the logger.
Nice! I like it. I see what you mean about the indentations. Tedious ...
The nice thing about log levels is differentiating between errors and other info. For instance when I now ask if you could squeeze in a -quiet (no logging (except errors?)) option into this release. ; - )
The nice thing about log levels is differentiating between errors and other info. For instance when I now ask if you could squeeze in a -quiet (no logging (except errors?)) option into this release. ; - )
I knew I should have used a struct! I'll try to get to this tonight also. :+1:
@sicklittlemonkey will try to get this out by the end of the week. Haven't forgotten, work has been picking up. 🙈
It's a lot of work.
Probably better to split this out to another issue and release the REPLACEFILE fix etc.
I added support for quiet and cleaned up how we're parsing the flags. I think that barring any tweaks / bugs discovered this should cover it. 😸
GetProdosFile()
,DeleteProdosFile()