ncreader: allow NCREADER_OPTION_HORSCROLL #839

This commit is contained in:
nick black 2020-08-24 04:07:02 -04:00 committed by Nick Black
parent d610bd3ece
commit fbaa451ff9
2 changed files with 6 additions and 4 deletions

View File

@ -40,11 +40,11 @@ typedef struct notcurses_options {
} notcurses_options;
```
**int notcurses_lex_margins(const char* op, notcurses_options* opts);**
**struct notcurses* notcurses_init(const notcurses_options* opts, FILE* fp);**
**void notcurses_version_components(int* major, int* minor, int* patch, int* tweak);**
**struct notcurses* notcurses_init(const notcurses_options* opts, FILE* fp);**
**int notcurses_lex_margins(const char* op, notcurses_options* opts);**
**int notcurses_cursor_enable(struct notcurses* nc, int y, int x);**

View File

@ -2,10 +2,12 @@
ncreader* ncreader_create(ncplane* n, int y, int x, const ncreader_options* opts){
if(opts->physrows <= 0 || opts->physcols <= 0){
logerror(n->nc, "Provided illegal geometry %dx%d\n", opts->physcols, opts->physrows);
return NULL;
}
if(opts->flags){
return NULL; // FIXME none yet handled
if(opts->flags > NCREADER_OPTION_HORSCROLL){
logerror(n->nc, "Provided unsupported flags %016lx\n", opts->flags);
return NULL;
}
ncreader* nr = malloc(sizeof(*nr));
if(nr){