ncreader: allow NCREADER_OPTION_HORSCROLL #839

pull/956/head
nick black 4 years ago committed by Nick Black
parent d610bd3ece
commit fbaa451ff9

@ -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);**

@ -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){

Loading…
Cancel
Save