s/bannner/banner/g, heh

This commit is contained in:
nick black 2019-12-28 18:37:44 -05:00
parent b7f54e6e5f
commit 21c3861804
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
15 changed files with 63 additions and 43 deletions

View File

@ -173,7 +173,7 @@ typedef struct notcurses_options {
bool no_winch_sighandler;
// Notcurses typically prints version info in notcurses_init() and
// performance info in notcurses_stop(). This inhibits that output.
bool suppress_bannner;
bool suppress_banner;
// Notcurses does not clear the screen on startup unless thus requested to.
bool clear_screen_start;
// If non-NULL, notcurses_render() will write each rendered frame to this

View File

@ -0,0 +1,51 @@
notcurses_init(3notcurses) -- initialize a notcurses instance
=============================================================
## SYNOPSIS
`#include <notcurses.h>`
<pre>typedef struct notcurses_options {
const char* termtype;
bool inhibit_alternate_screen;
bool retain_cursor;
bool no_quit_sighandlers;
bool no_winch_sighandler;
bool suppress_banner;
bool clear_screen_start;
FILE* renderfp;
} notcurses_options;</pre>
`struct notcurses*
notcurses_init(const struct notcurses_options* opts, FILE* fp);`
## DESCRIPTION
`notcurses_init` prepares the `FILE*` provided as `fp` (which must be attached
to a terminal) for cursor-addressable (multiline) mode. The `struct
notcurses_option` passed as `opts` controls behavior. Only one instance should
be associated with a given terminal at a time, though it is no problem to have
multiple instances in a given process. On success, a pointer to a valid `struct
notcurses` is returned. `NULL` is returned on failure. Before the process exits,
`notcurses_stop(3notcurses)` should be called to reset the terminal and free
up resources.
An appropriate `terminfo(5)` entry must exist for the terminal. This entry is
usually selected using the value of the `TERM` environment variable (see
`getenv(3)`), but a non-`NULL` value for `termtype` will override this. An
invalid `terminfo` specification will lead to reduced performance, reduced
display capabilities, or display errors.
## RETURN VALUES
`NULL` is returned on failure. Otherwise, the return value points at a valid
`struct notcurses`, which can be used until it is provided to `notcurses_stop`.
## AUTHORS
Nick Black <nickblack@linux.com>
## SEE ALSO
getenv(3), termios(3), notcurses(3notcurses), notcurses_stop(3notcurses),
terminfo(5)

View File

@ -1,31 +0,0 @@
notcurses_init(3notcurses) -- initialize a notcurses instance
=============================================================
## SYNOPSIS
`#include <notcurses.h>`
<pre>typedef struct notcurses_options {
const char* termtype;
bool inhibit_alternate_screen;
bool retain_cursor;
bool no_quit_sighandlers;
bool no_winch_sighandler;
bool suppress_bannner;
bool clear_screen_start;
FILE* renderfp;
} notcurses_options;</pre>
`struct notcurses*
notcurses_init(const struct notcurses_options* opts, FILE* fp);`
## DESCRIPTION
## AUTHORS
Nick Black <nickblack@linux.com>
## SEE ALSO
notcurses(3notcurses), notcurses_stop(3notcurses)

View File

@ -118,7 +118,7 @@ typedef struct notcurses_options {
bool no_winch_sighandler;
// Notcurses typically prints version info in notcurses_init() and performance
// info in notcurses_stop(). This inhibits that output.
bool suppress_bannner;
bool suppress_banner;
// Notcurses does not clear the screen on startup unless thus requested to.
bool clear_screen_start;
// If non-NULL, notcurses_render() will write each rendered frame to this

View File

@ -758,8 +758,8 @@ notcurses* notcurses_init(const notcurses_options* opts, FILE* outfp){
free_plane(ret->top);
goto err;
}
ret->suppress_banner = opts->suppress_bannner;
if(!opts->suppress_bannner){
ret->suppress_banner = opts->suppress_banner;
if(!opts->suppress_banner){
char prefixbuf[BPREFIXSTRLEN + 1];
fprintf(ret->ttyfp, "\n"
" notcurses %s by nick black\n"

View File

@ -97,7 +97,7 @@ void parse_args(int argc, char** argv, struct notcurses_options* opts,
break;
}
}
opts->suppress_bannner = true;
opts->suppress_banner = true;
opts->clear_screen_start = true;
}

View File

@ -12,7 +12,7 @@ TEST_CASE("Cell") {
REQUIRE(nullptr != outfp_);
notcurses_options nopts{};
nopts.inhibit_alternate_screen = true;
nopts.suppress_bannner = true;
nopts.suppress_banner = true;
struct notcurses* nc_ = notcurses_init(&nopts, outfp_);
REQUIRE(nullptr != nc_);
struct ncplane* n_ = notcurses_stdplane(nc_);

View File

@ -6,7 +6,7 @@ TEST_CASE("NotcursesInput") {
}
notcurses_options nopts{};
nopts.inhibit_alternate_screen = true;
nopts.suppress_bannner = true;
nopts.suppress_banner = true;
FILE* outfp_ = fopen("/dev/tty", "wb");
REQUIRE(outfp_);
struct notcurses* nc_ = notcurses_init(&nopts, outfp_);

View File

@ -13,7 +13,7 @@ TEST_CASE("Multimedia") {
}
notcurses_options nopts{};
nopts.inhibit_alternate_screen = true;
nopts.suppress_bannner = true;
nopts.suppress_banner = true;
FILE* outfp_ = fopen("/dev/tty", "wb");
REQUIRE(outfp_);
notcurses* nc_ = notcurses_init(&nopts, outfp_);

View File

@ -25,7 +25,7 @@ TEST_CASE("NCPlane") {
}
notcurses_options nopts{};
nopts.inhibit_alternate_screen = true;
nopts.suppress_bannner = true;
nopts.suppress_banner = true;
FILE* outfp_ = fopen("/dev/tty", "wb");
REQUIRE(outfp_);
struct notcurses* nc_ = notcurses_init(&nopts, outfp_);

View File

@ -12,7 +12,7 @@ TEST_CASE("NotcursesBase") {
}
notcurses_options nopts{};
nopts.inhibit_alternate_screen = true;
nopts.suppress_bannner = true;
nopts.suppress_banner = true;
FILE* outfp_ = fopen("/dev/tty", "wb");
REQUIRE(outfp_);
struct notcurses* nc_ = notcurses_init(&nopts, outfp_);

View File

@ -17,7 +17,7 @@ TEST_CASE("PanelReelTest") {
}
notcurses_options nopts{};
nopts.inhibit_alternate_screen = true;
nopts.suppress_bannner = true;
nopts.suppress_banner = true;
FILE* outfp_ = fopen("/dev/tty", "wb");
REQUIRE(outfp_);
struct notcurses* nc_ = notcurses_init(&nopts, outfp_);

View File

@ -8,7 +8,7 @@ TEST_CASE("ZAxisTest") {
}
notcurses_options nopts{};
nopts.inhibit_alternate_screen = true;
nopts.suppress_bannner = true;
nopts.suppress_banner = true;
FILE* outfp_ = fopen("/dev/tty", "wb");
REQUIRE(outfp_);
struct notcurses* nc_ = notcurses_init(&nopts, outfp_);