Skip to main content

Module platform

Module platform 

Source
Expand description

Operating-system conditional abstractions.

Platform initialization (initialize_platform) is the FIRST operation executada no main(). Ela configura:

  • Windows: codepage UTF-8 (65001) via SetConsoleOutputCP e SetConsoleCP
  • Linux: sandbox detection (Flatpak/Snap) and XDG paths
  • macOS: config path resolution under ~/Library/Application Support

Functions§

e_tty
Returns true if stdout is connected to a terminal (TTY).
initialize_platform
Initializes the platform before any I/O.
normalize_stdin_line
Normalizes a stdin line by stripping trailing \r (CRLF → LF).