[dev] using vis (libtermkey) and netbsd-curses (was: oasis: small linux system inspired by stali)

From: Daniel Cegiełka <daniel.cegielka_AT_gmail.com>
Date: Sat, 24 Nov 2018 12:36:01 +0100

Hi,

https://lists.suckless.org/dev/1811/33025.html

I prepared a more detailed description of how to compile vis + netbsd-curses.

1) copy from ncurses/ncurses/names.c strnames & strfnames:

DCL(strnames) = {
    "cbt",
    "bel",
    (...)
    "box1",
    (NCURSES_CONST char *)0,
};

DCL(strfnames) = {
    "back_tab",
    "bell",
    (...)
    "box_chars_1",
    (NCURSES_CONST char *)0,
};


2) replace ncurses macros (DCL etc.) with C declarations:

const char *strnames[] = {
    "cbt",
    "bel",
    (...)
    "box1",
    NULL,
};

const char *strfnames[] = {
    "back_tab",
    "bell",
    (...)
    "box_chars_1",
    NULL,
};


3) edit driver-ti.c (libtermkey) and include names.c:

#ifdef HAVE_UNIBILIUM
# include <unibilium.h>
#else
# include <curses.h>
# include <term.h>

/* strnames and strfnames */
#include "names.c"

/* curses.h has just poluted our namespace. We want this back */
# undef buttons
#endif


vis works fine, however, there is a problem when I use ':!' or ':e *'.
I think that the terminal settings are not restored. Does anyone have
an idea here how it can be solved?

Daniel
Received on Sat Nov 24 2018 - 12:36:01 CET

This archive was generated by hypermail 2.3.0 : Sat Nov 24 2018 - 12:48:09 CET