-
Notifications
You must be signed in to change notification settings - Fork 10
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
less/more verbose? #11
Comments
I tried to just redirect stdout to /dev/null, but it looks like all errors are printed on stdout, too! Looks like the error messages just needs to be changed from;
Can change all error messages with these;
Then use this to edit the file;
Compiled and ran as expected! But i also noticed there is no error message for using a [GAME_NAME] greater than 32 characters. It just outputs the usage message. Found this in iso2opl.c;
I think it is checking string length of argv 3 -> the GAME_NAME, but this should have a dedicated error message, since the usage message does not mention the 3-32 character requirement. If it did, i guess printing the usage message would be fine. |
this line in iso2opl.c is all that needs to be changed. (I mistakenly said there is two, below. The first is in a comment block. I initially didn't have colours on in my editor and missed that.)
change the /n to a /r and add a fflush(sdtout), so;
and a new line added after the file is closed;
TL;DR
Can you add an option to make this less/more verbose?
I'm specifically interested in this line;
Writing 256 sectors to /home/user/ul.AB6C56EC.SLUS_218.65.01 - LBA: 4162559
Writing 256 sectors to /home/user/ul.AB6C56EC.SLUS_218.65.01 - LBA: 4162815
...
Can this line be updated inplace until it is finished writing so that it never takes more than one line in the terminal?
Maybe use a pause and reset combo or something?
Something like this after the printf(...
Above found here;
https://www.geeksforgeeks.org/clear-console-c-language/
The printf(regex... is supposed to be the fastest.
I found these two lines in iso2opl.c that i think are relevant;
Maybe add that regex after those lines?
That change made an error during compile;
Tried with;
returned;
Trying with;
Last one works, but need a sleep command or it clears too fast to read any thing.
Moved the system("clear"); before the printf( "Writing... line, and added a sleep(2);
Success!
Here is how i edited the file;
The text is the same on both lines, just the indenting is different.
Actually, the sleep command is not even needed. Just change to;
The only thing i don't like is that it clears the whole screen. I would prefer if it only cleared that line. But at least it works.
The text was updated successfully, but these errors were encountered: