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=1e79aed5ea82c111f6829b9532ba4cce88db3fad;hp=a9b3ec78f9e3035249d0f892534a3848a3bd057d;hb=8cae8696beb7f1fa2dfc4e85be2fd5d9cf52a265;hpb=a4536cf08230dba14f221b661abd7804fcc1ebbc diff --git a/libvisor/include/visor.h b/libvisor/include/visor.h index a9b3ec7..1e79aed 100644 --- a/libvisor/include/visor.h +++ b/libvisor/include/visor.h @@ -142,8 +142,11 @@ 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); +/* find the span which corresponds to the specified text position + * if soffs is not null, the relative offset of the specified address from the + * start of the span is stored there. + */ +struct vi_span *vi_buf_find_span(struct vi_buffer *vb, vi_addr at, vi_addr *soffs); const char *vi_buf_span_text(struct vi_buffer *vb, struct vi_span *span); void vi_buf_ins_begin(struct vi_buffer *vb, vi_motion mot);