-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-txtout command line action #2288
-txtout command line action #2288
Conversation
…(error is with fopen, not e)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good - just one small change needed.
Okay, that change has been made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops
Are you sure about this one? I made that change because I tested the error case there and the onscreen message looks like Could you test that error and verify that this is really what you want? You can trigger it by using a path to a nonexistent folder, or write protecting a pre-existing file with that name. Though if you are looking for an error string and not just the filename, we might consider using fopen's reported error via Though I have one other question about whether these should be using |
By using I have also switch I also reduced the boilerplate test of all four output strings with a single boolean for convenience. I also removed Outside the scope of this PR, I would imagine that what we really want instead of |
Never mind then.
Yeah. Sounds like a good idea.
Indeed. You should use |
Yes, it is. Thank you!
Exactly.
Yeah. I have adapted ZSM export to the ROM export framework, so -zsmout is a leftover. |
Edited Summary
-txtout
command line option to export text file.fopen
failures (usingstrerror(errno)
).ps_fopen
instead offopen
for command line output, permitting unicode filenames on Windows.-zsmout
command from documentation.Original explanation
Add
-txtout
to allow command line export to text file. The desire for this feature is so that I can use it for export into a game engine's needed format, because the text export is easy to parse. I had written the text export feature for Famitracker years ago, and found it extremely useful in this way.Included one other commit noting that
-cmdout
and-vgmout
were giving an empty error iffopen
fails, assuming it was intended to output the filename instead.An aside note, I see
-zsmout
listed in the documentation, but it does not appear to exist in the code. Is this a mistake?