root readme, directory structure, and copyright headers
[visor] / libvisor / src / vimpl.h
index b2d978f..c7b8ab4 100644 (file)
@@ -1,3 +1,20 @@
+/*
+visor - lightweight system-independent embeddable text editor framework
+Copyright (C)  2019 John Tsiombikas <nuclear@member.fsf.org>
+
+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 <https://www.gnu.org/licenses/>.
+*/
 #ifndef VIMPL_H_
 #define VIMPL_H_
 
@@ -19,8 +36,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;
 
@@ -28,4 +48,6 @@ struct vi_buffer {
        int num_spans, max_spans;
 };
 
+enum { SPAN_ORIG, SPAN_ADD };
+
 #endif /* VIMPL_H_ */