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

fix newterm functionality for vt platform #276

Closed
wants to merge 0 commits into from
Closed

fix newterm functionality for vt platform #276

wants to merge 0 commits into from

Conversation

okbob
Copy link
Contributor

@okbob okbob commented Jan 27, 2023

Move output_fd, input_fd to global space from opaque structure. These variables are necessary before this structure can be created and initialized (newterm can be called before initscr). Use input_fd instead stdin and fileno(input_fd) instead hardcoded STDIN (STDIN_FILENO).

@Bill-Gray
Copy link
Owner

Hmmm... maybe I'm missing something here (quite likely I am), but...

I set SP->opaque->input_fd after initscr() quite intentionally. The idea was that during initial setup, we need (on Windows and DOS) to get our input from the "real" terminal in order to get the screen size. After that, once SP->opaque->input_fd is set, we get our input from that source instead.

This does cause me to see one bug (fixed in commit 3a73630), and it also makes me see that in initscr.c, newterm() should be the "real" code; initscr() should call newterm( NULL, NULL, NULL), instead of newterm() calling initscr() and then setting the input/output fds.

@okbob
Copy link
Contributor Author

okbob commented Jan 30, 2023 via email

@okbob okbob closed this Feb 7, 2023
@GitMensch
Copy link
Collaborator

Why was this closed and empty-pushed from c318f0a?

@okbob
Copy link
Contributor Author

okbob commented Feb 7, 2023 via email

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

Successfully merging this pull request may close these issues.

None yet

3 participants