-
Notifications
You must be signed in to change notification settings - Fork 46
Add COB_SET_RUNTIME_STDOUT_FILE and COB_SET_RUNTIME_STDERR_FILE runtime options to enable redirection of stdout/stderr output #296
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
Draft
oguzcankirmemis
wants to merge
24
commits into
OCamlPro:gitside-gnucobol-3.x
Choose a base branch
from
oguzcankirmemis:feature/stdout-stderr-redirect
base: gitside-gnucobol-3.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0a1296e
Redirect stdout and stderr to COB_STDOUT_FILE and COB_STDERR_FILE
oguzcankirmemis f2974c4
Add test for stdout/stderr redirection
oguzcankirmemis bce45ee
Add changelogs, documentation for stdout/stderr redirection
oguzcankirmemis 3baccc5
Fix cob_runtime_warning stderr when cobsetptr is not initialized yet
oguzcankirmemis 7613e53
Fix cob_runtime_warning and cob_runtime_error to use default stderr i…
oguzcankirmemis e6d0122
Delete unnecessary include of common.h in common.c
oguzcankirmemis 822c7eb
Rename stdout/stderr redirection test
oguzcankirmemis ea9954b
Default back to process stdout/stderr if parameter is empty
oguzcankirmemis 66e4dae
Redirect stdin to COB_STDIN_FILE
oguzcankirmemis 78ffb5e
Add test for stdin redirection
oguzcankirmemis bfb102d
Use getc to enable stdin redirection at termio.c
oguzcankirmemis 1698600
Fix stdin redirection test
oguzcankirmemis 7725087
Reset bdb_env stderr only if it configured and initialized in fileio.c
oguzcankirmemis 181009a
Fix WIN32 cobc using libcob with stdin/stdout/stderr redirection
oguzcankirmemis 586f85e
Add environment variables for redirection variables
oguzcankirmemis 6967535
Make stdin/stdout/stderr redirection test platform agnostic
oguzcankirmemis fe56f38
Do not ignore return of fgets in redirection test
oguzcankirmemis d94cbfa
Update documentations/changelogs for stdin/stdout/stderr redirection
oguzcankirmemis 6de4868
Refactor join_environment to use cob_settings_fileio in fileio.c
oguzcankirmemis 889f5df
Adjust documentation/changelog
oguzcankirmemis 4686881
Refactor variable declarations in common.c and run_misc.at
oguzcankirmemis 0f40d43
Support SET ENVIRONMENT for redirection
oguzcankirmemis 2ca1219
Use offsetof to determine config set
oguzcankirmemis f32e15c
Add tests for set environment redirection
oguzcankirmemis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -326,6 +326,8 @@ process_long_option (const int argc, char * const *argv, const char *optstring, | |
| { | ||
| if (ambig_fallback) | ||
| { | ||
| /* TODO: Decide how to do stdout/stderr redirection here | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think about here? Solve it similarly by adding an exported init function? |
||
| (and in examples below), or not at all */ | ||
| fprintf (stderr, _("%s: option '%s%s' is ambiguous"), | ||
| argv[0], prefix, nextchar); | ||
| fputc ('\n', stderr); | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.