mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Improve printed output
Get rid of inconsistencies in the printed output (error printing, colors, etc.). Prepare for user configurable color. Cleanup.
This commit is contained in:
parent
5efd519d2e
commit
b6eac3f001
8 changed files with 122 additions and 66 deletions
11
src/main.c
11
src/main.c
|
|
@ -33,7 +33,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
int status = 0;
|
||||
|
||||
/* Install error exit handler */
|
||||
/* Add error exit handler */
|
||||
atexit(&error_exit);
|
||||
|
||||
/* Parse options */
|
||||
|
|
@ -55,13 +55,20 @@ int main(int argc, char *argv[])
|
|||
/* Configure output terminal */
|
||||
stdout_configure();
|
||||
|
||||
/* Install log exit handler */
|
||||
/* Add log exit handler */
|
||||
atexit(&log_exit);
|
||||
|
||||
/* Create log file */
|
||||
if (option.log)
|
||||
log_open(option.log_filename);
|
||||
|
||||
/* Enable color printing */
|
||||
print_set_color_mode(true);
|
||||
|
||||
/* Print launch hints */
|
||||
tio_printf("tio v%s", VERSION);
|
||||
tio_printf("Press ctrl-t q to quit");
|
||||
|
||||
/* Connect to tty device */
|
||||
if (option.no_autoconnect)
|
||||
status = tty_connect();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue