* misc changes and additions
formatting changes and add structs/constants for terminal work
* match write_to_error_file and add error_global_data
* console work
* requested changes
* terminal work
100% match all terminal functions
* Formatting
---------
Co-authored-by: punpckhdq <121350336+punpckhdq@users.noreply.github.com>