• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
    • RDF quality heuristics
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

4.34 Terminal Control
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Terminal Control
          • tty_get_capability/3
          • tty_goto/2
          • tty_put/2
          • tty_size/2
    • Packages
Availability:built-in
tty_size(-Rows, -Columns)
Determine the size of the terminal. Platforms:
Unix
If the system provides ioctl calls for this, these are used and tty_size/2 properly reflects the actual size after a user resize of the window. The ioctl is issued on the file descriptor associated with the user_input stream. As a fallback, the system uses tty_get_capability/3 using li and co capabilities. In this case the reported size reflects the size at the first call and is not updated after a user-initiated resize of the terminal.
Windows
Getting the size of the terminal is provided for swipl-win.exe. The requested value reflects the current size. For the multithreaded version the console that is associated with the user_input stream is used.
ClioPatria (version V3.1.1-40-g9d9e003)