Skip to content

Commit

Permalink
Touch up docs/comments
Browse files Browse the repository at this point in the history
Remove the mention of linking with libtermcap from einfo(3), and fix
some comments in libeinfo.c to more accurately reflect the new
situation.
  • Loading branch information
xxc3nsoredxx authored and williamh committed Apr 1, 2024
1 parent 536794d commit 957140c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
7 changes: 0 additions & 7 deletions man/einfo.3
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,6 @@ is true.
prefixes the string
.Fa prefix
to the above functions.
.Sh IMPLEMENTATION NOTES
einfo can optionally be linked against the
.Lb libtermcap
so that we can correctly query the connected console for our color and
cursor escape codes.
If not, then we have a hard coded list of terminals we know about that support
the commonly used codes for color and cursor position.
.Sh ENVIRONMENT
.Va EINFO_QUIET
when set to true makes the
Expand Down
5 changes: 2 additions & 3 deletions src/libeinfo/libeinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
#define HILITE 6
#define BRACKET 4

/* We fallback to these escape codes if termcap isn't available
* like say /usr isn't mounted */
/* ANSI escape codes which mimic termcap */
#define AF "\033[3%dm"
#define CE "\033[K"
#define CH "\033[%dC"
Expand Down Expand Up @@ -94,7 +93,7 @@ static char *goto_column = NULL;
static const char *term = NULL;
static bool term_is_cons25 = false;

/* No curses support, so we hardcode a list of colour capable terms
/* Hardcoded list of colour capable terms
* Only terminals without "color" in the name need to be explicitly listed */
static const char *const color_terms[] = {
"Eterm",
Expand Down

0 comments on commit 957140c

Please sign in to comment.