Skip to content
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

Error output stream? #97

Open
stevesims opened this issue Nov 21, 2024 · 1 comment
Open

Error output stream? #97

stevesims opened this issue Nov 21, 2024 · 1 comment

Comments

@stevesims
Copy link
Contributor

Further to #80, #81 and #82 it may be sensible to consider adding support for a distinct error output stream.

Currently on MOS we have a logical model that uses only one output stream. Many operating systems support the concept of having a separate "error" stream. This will often/usually point to the same place as the standard output stream, but does not have to.

RISC OS followed the simplistic approach of having only one output stream, as did the BBC Micro. Acorn's PANOS had an error: stream that was by default set to be the screen, but could be changed to a different file or device. Unix systems have stderr as a logically different output than stdout.

@stevesims
Copy link
Contributor Author

all output in the MOS code is currently basically just printf or putch function calls. essentially all actual output is contained within mos.c, except for the line-editor (mos_editor.c, which is inherently screen-based in its output)

inside mos.c the mos_error function is used to print the current error. mos_cmdDIR prints to screen when an invalid flag is detected altho that won't cause the command itself to error out. similarly mos_cmdHELP prints a "Command not found" message out but does not actually result in an error being returned. that's it - all the places where we have output that could go to an error stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant