bsd fbuf implementation #1977

This commit is contained in:
nick black 2021-08-02 04:37:37 -05:00 committed by nick black
parent 07b7e0c13f
commit ffbebe9b8f
2 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,8 @@ extern "C" {
// come after. uses mmap (with huge pages, if possible) on unix and
// virtualalloc on windows. it can grow arbitrarily large. it does
// *not* maintain a NUL terminator, and can hold binary data.
// on Windows, we're using VirtualAlloc(). on BSD, we're using realloc().
// on Linux, we're using mmap()+mremap().
typedef struct fbuf {
uint64_t size;

View File

@ -679,6 +679,8 @@ int interrogate_terminfo(tinfo* ti, int fd, unsigned utf8, unsigned noaltscreen,
// FIXME set up pixel-drawing API for framebuffer #1369
}
}
#else
(void)nonewfonts;
#endif
if(fd >= 0){
if(tcgetattr(fd, &ti->tpreserved)){