Skip to content

Commit

Permalink
shim ncurses A_* constants on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Aug 4, 2021
1 parent 3c64469 commit d604247
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/compat/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ extern "C" {
#define SA_SIGINFO 0
#define SA_RESETHAND 0
#define SIGQUIT 0
#define A_ITALIC 0
#define A_BOLD 0
#define A_UNDERLINE 0
#define sigdelset(x, y)
#define sigaddset(x, y)
typedef struct siginfo_t {
Expand Down
5 changes: 2 additions & 3 deletions src/lib/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,15 +862,14 @@ ncdirect* ncdirect_core_init(const char* termtype, FILE* outfp, uint64_t flags){
ret->ctermfd = get_tty_fd(ret->ttyfp);
// FIXME factor this out, and share it with rendered mode
#ifndef __MINGW64__
const char* shortname_term;
int termerr;
if(setupterm(termtype, ret->ctermfd, &termerr) != OK){
fprintf(stderr, "Terminfo error %d (see terminfo(3ncurses))\n", termerr);
goto err;
}
shortname_term = termname();
const char* shortname_term = termname();
#else
shortname_term = "Windows Terminal";
const char* shortname_term = "Windows Terminal";
#endif
int cursor_y = -1;
int cursor_x = -1;
Expand Down

0 comments on commit d604247

Please sign in to comment.