mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
add color-free binary build target "tionc"
This commit is contained in:
parent
95389f4dde
commit
fc79fea777
3 changed files with 31 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,6 +1,7 @@
|
||||||
*.tar.xz
|
*.tar.xz
|
||||||
src/*.o
|
src/*.o
|
||||||
src/tio
|
src/tio
|
||||||
|
src/tionc
|
||||||
Makefile.in
|
Makefile.in
|
||||||
Makefile
|
Makefile
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
|
|
@ -22,3 +23,4 @@ src/include/stamp-h1
|
||||||
*.swp
|
*.swp
|
||||||
/tio-*
|
/tio-*
|
||||||
/src/bash-completion/tio
|
/src/bash-completion/tio
|
||||||
|
\#*
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
AM_CPPFLAGS = -I$(srcdir)/include
|
AM_CPPFLAGS = -I$(srcdir)/include
|
||||||
AM_CFLAGS = -Wall
|
AM_CFLAGS = -Wall
|
||||||
bin_PROGRAMS = tio
|
bin_PROGRAMS = tio tionc
|
||||||
tio_SOURCES = tty.c \
|
tio_SOURCES = tty.c \
|
||||||
options.c \
|
options.c \
|
||||||
time.c \
|
time.c \
|
||||||
|
|
@ -14,8 +14,24 @@ tio_SOURCES = tty.c \
|
||||||
include/tio/log.h \
|
include/tio/log.h \
|
||||||
include/tio/error.h
|
include/tio/error.h
|
||||||
|
|
||||||
|
tionc_SOURCES = tty.c \
|
||||||
|
options.c \
|
||||||
|
time.c \
|
||||||
|
main.c \
|
||||||
|
log.c \
|
||||||
|
error.c \
|
||||||
|
include/tio/tty.h \
|
||||||
|
include/tio/options.h \
|
||||||
|
include/tio/time.h \
|
||||||
|
include/tio/print.h \
|
||||||
|
include/tio/log.h \
|
||||||
|
include/tio/error.h
|
||||||
|
|
||||||
|
tionc_CFLAGS = -D TIO_NOCOLOR
|
||||||
|
|
||||||
if ADD_SETSPEED2
|
if ADD_SETSPEED2
|
||||||
tio_SOURCES += setspeed2.c
|
tio_SOURCES += setspeed2.c
|
||||||
|
tionc_SOURCES += setspeed2.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ENABLE_BASH_COMPLETION
|
if ENABLE_BASH_COMPLETION
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,17 @@
|
||||||
#ifndef PRINT_H
|
#ifndef PRINT_H
|
||||||
#define PRINT_H
|
#define PRINT_H
|
||||||
|
|
||||||
|
#ifdef TIO_NOCOLOR
|
||||||
|
#define ANSI_COLOR_GRAY ""
|
||||||
|
#define ANSI_COLOR_RED ""
|
||||||
|
#define ANSI_COLOR_GREEN ""
|
||||||
|
#define ANSI_COLOR_YELLOW ""
|
||||||
|
#define ANSI_COLOR_BLUE ""
|
||||||
|
#define ANSI_COLOR_PINK ""
|
||||||
|
#define ANSI_COLOR_CYAN ""
|
||||||
|
#define ANSI_COLOR_WHITE ""
|
||||||
|
#define ANSI_COLOR_RESET ""
|
||||||
|
#else
|
||||||
#define ANSI_COLOR_GRAY "\x1b[1;30m"
|
#define ANSI_COLOR_GRAY "\x1b[1;30m"
|
||||||
#define ANSI_COLOR_RED "\x1b[1;31m"
|
#define ANSI_COLOR_RED "\x1b[1;31m"
|
||||||
#define ANSI_COLOR_GREEN "\x1b[1;32m"
|
#define ANSI_COLOR_GREEN "\x1b[1;32m"
|
||||||
|
|
@ -31,6 +42,7 @@
|
||||||
#define ANSI_COLOR_CYAN "\x1b[1;36m"
|
#define ANSI_COLOR_CYAN "\x1b[1;36m"
|
||||||
#define ANSI_COLOR_WHITE "\x1b[1;37m"
|
#define ANSI_COLOR_WHITE "\x1b[1;37m"
|
||||||
#define ANSI_COLOR_RESET "\x1b[0m"
|
#define ANSI_COLOR_RESET "\x1b[0m"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define color_printf(format, args...) \
|
#define color_printf(format, args...) \
|
||||||
{ \
|
{ \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue