-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Make XMLVER always print version message
The current RPG code calls writeIFS to write directly to file descriptor 1 (stdout), but this descriptor is not guaranteed to be set up and most certainly is *not* when the program is called from a CL command line instead of from QSH. Instead, of calling write() we can call printf(), which ensures that this descriptor gets set up and a temporary terminal output window is shown when XMLVER is called from a CL prompt and the output is shown like normal when called from QSH. In addition, print a trailing newline so as to not mess up the prompt when called from a shell.
- Loading branch information
Showing
4 changed files
with
19 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <stdio.h> | ||
|
||
const char* version = "XML Toolkit 2.0.2-dev"; | ||
|
||
int main() | ||
{ | ||
printf("%s\n", version); | ||
return 0; | ||
} | ||
|
This file was deleted.
Oops, something went wrong.