X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=visor;a=blobdiff_plain;f=libvisor%2Fsrc%2Fvimpl.h;h=22f4252e25bc04323d743b13be0b371b1d4605df;hp=1e6d201c041b2d060472d17a1a7461d54fa9a328;hb=519bb5db64dd400724d8beedd10bf54d8cf2b7af;hpb=dc83bdff56d4dd7454559f5e918652f32f7e9d6d diff --git a/libvisor/src/vimpl.h b/libvisor/src/vimpl.h index 1e6d201..22f4252 100644 --- a/libvisor/src/vimpl.h +++ b/libvisor/src/vimpl.h @@ -1,3 +1,20 @@ +/* +visor - lightweight system-independent embeddable text editor framework +Copyright (C) 2019 John Tsiombikas + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this program. If not, see . +*/ #ifndef VIMPL_H_ #define VIMPL_H_ @@ -6,6 +23,11 @@ struct visor { struct vi_fileops fop; struct vi_buffer *buflist; /* circular linked list of buffers cur first */ + struct vi_alloc mm; + struct vi_ttyops tty; + void *tty_cls; + + int term_width, term_height; }; struct vi_buffer { @@ -16,8 +38,11 @@ struct vi_buffer { vi_addr cursor, view_start; int view_xscroll; + vi_file *fp; + int file_mapped; + char *orig; - long orig_size; + unsigned long orig_size; char *add; int add_size, add_max; @@ -25,4 +50,6 @@ struct vi_buffer { int num_spans, max_spans; }; +enum { SPAN_ORIG, SPAN_ADD }; + #endif /* VIMPL_H_ */