X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=visor;a=blobdiff_plain;f=libvisor%2Finclude%2Fvisor.h;fp=libvisor%2Finclude%2Fvisor.h;h=73fb7dc5aa956af80c5478770f91ab2bf3c4aa06;hp=55dcc48630639aefd5da934c9b0e0c86645978cb;hb=2e3cec9f53a10e7c71da4a0d999a00bddae2935c;hpb=b169b4382bad149e44ac3157e84cda48550e2b42 diff --git a/libvisor/include/visor.h b/libvisor/include/visor.h index 55dcc48..73fb7dc 100644 --- a/libvisor/include/visor.h +++ b/libvisor/include/visor.h @@ -26,8 +26,9 @@ struct visor; struct vi_buffer; struct vi_span { - vi_addr beg; + vi_addr start; unsigned long size; + int src; }; enum vi_motdir { @@ -135,6 +136,9 @@ int vi_buf_read(struct vi_buffer *vb, const char *path); int vi_buf_write(struct vi_buffer *vb, const char *path); long vi_buf_size(struct vi_buffer *vb); +/* find the span which corresponds to the specified text position */ +struct vi_span *vi_buf_find_span(struct vi_buffer *vb, vi_addr at); + void vi_buf_ins_begin(struct vi_buffer *vb, vi_motion mot); void vi_buf_insert(struct vi_buffer *vb, char *s); void vi_buf_ins_end(struct vi_buffer *vb);