Skip to content

Add query for terminal size #982

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

Open
zoziha opened this issue Apr 21, 2025 · 0 comments · May be fixed by #983
Open

Add query for terminal size #982

zoziha opened this issue Apr 21, 2025 · 0 comments · May be fixed by #983
Labels
idea Proposition of an idea and opening an issue to discuss it

Comments

@zoziha
Copy link
Contributor

zoziha commented Apr 21, 2025

Motivation

Fortran is often used to develop console backend programs. In certain scenarios, there may be a need to obtain the terminal size to display content appropriately.

Similar to Python, this routine is suitable to be placed in stdlib_system (OS, Operating System).

Prior Art

  • C/C++:
    • Unix/Linux: Obtain the winsize structure through the ioctl system call and the TIOCGWINSZ command;
    • Windows: Use the GetConsoleScreenBufferInfo API to obtain console buffer information.
  • os.get_terminal_size in Python.

Additional Information

No response

@zoziha zoziha added the idea Proposition of an idea and opening an issue to discuss it label Apr 21, 2025
@zoziha zoziha linked a pull request Apr 21, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Proposition of an idea and opening an issue to discuss it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant