#include <textfile.h>
Inheritance diagram for ht_ltextfile:
Public Member Functions | |
void | init (ht_streamfile *streamfile, bool own_streamfile, ht_syntax_lexer *lexer) |
virtual void | done () |
virtual void | copy_to (ht_stream *stream) |
virtual int | extend (UINT newsize) |
virtual UINT | get_size () |
virtual void | pstat (pstat_t *s) |
virtual UINT | read (void *buf, UINT size) |
virtual void | set_layered (ht_streamfile *streamfile) |
virtual int | seek (FILEOFS offset) |
virtual FILEOFS | tell () |
virtual int | truncate (UINT newsize) |
virtual int | vcntl (UINT cmd, va_list vargs) |
virtual UINT | write (const void *buf, UINT size) |
virtual bool | convert_ofs2line (FILEOFS o, UINT *line, UINT *pofs) |
virtual bool | convert_line2ofs (UINT line, UINT pofs, FILEOFS *o) |
virtual void | delete_lines (UINT line, UINT count) |
virtual void | delete_chars (UINT line, UINT ofs, UINT count) |
virtual bool | get_char (UINT line, char *ch, UINT pos) |
virtual bool | getline (UINT line, UINT pofs, void *buf, UINT buflen, UINT *retlen, lexer_state *state) |
virtual UINT | getlinelength (UINT line) |
virtual void | insert_lines (UINT before, UINT count, void **line_ends, int *lineendlens) |
virtual void | insert_chars (UINT line, UINT ofs, void *chars, UINT len) |
virtual bool | has_line (UINT line) |
virtual UINT | linecount () |
virtual void | set_layered_assume (ht_streamfile *streamfile, bool changes_applied) |
virtual void | set_lexer (ht_syntax_lexer *lexer) |
Protected Member Functions | |
void | cache_invd () |
void | cache_flush () |
void | dirty_nofs (UINT line) |
void | dirty_parse (UINT line) |
UINT | find_linelen_forwd (byte *buf, UINT maxbuflen, FILEOFS ofs, int *le_len) |
virtual ht_ltextfile_line * | fetch_line (UINT line) |
ht_ltextfile_line * | fetch_line_nofs_ok (UINT line) |
ht_ltextfile_line * | fetch_line_into_memory (UINT line) |
UINT | getlinelength_i (ht_ltextfile_line *e) |
bool | is_dirty_nofs (UINT line) |
bool | is_dirty_parse (UINT line) |
byte * | match_lineend_forwd (byte *buf, UINT buflen, int *le_len) |
lexer_state | next_instate (UINT line) |
FILEOFS | next_nofs (ht_ltextfile_line *l) |
void | split_line (UINT a, UINT pos, void *line_end, int line_end_len) |
void | update_nofs (UINT line) |
void | update_parse (UINT line) |
void | reread () |
Protected Attributes | |
FILEOFS | ofs |
ht_clist * | lines |
ht_clist * | orig_lines |
ht_syntax_lexer * | lexer |
UINT | first_parse_dirty_line |
UINT | first_nofs_dirty_line |
bool | dirty |
|
Definition at line 170 of file textfile.cc. Referenced by vcntl(). |
|
Definition at line 156 of file textfile.cc. References ht_clist::append(), ht_clist::count(), dirty, dirty_parse(), ht_clist::empty(), ht_clist::get(), lines, orig_lines, and UINT. Referenced by set_layered_assume(), and vcntl(). |
|
Implements ht_textfile. Definition at line 174 of file textfile.cc. References fetch_line_nofs_ok(), FILEOFS, getlinelength_i(), ht_ltextfile_line::nofs, and UINT. Referenced by get_size(). |
|
Implements ht_textfile. Definition at line 190 of file textfile.cc. References assert, fetch_line_nofs_ok(), FILEOFS, linecount(), ht_ltextfile_line::nofs, and UINT. Referenced by read(), ht_info_textfile::set_node(), and write(). |
|
Reimplemented from ht_layer_streamfile. Definition at line 218 of file textfile.cc. References buf, byte, malloc(), read(), STREAM_COPYBUF_SIZE, UINT, and ht_stream::write(). |
|
Implements ht_textfile. Definition at line 242 of file textfile.cc. References dirty, dirty_nofs(), dirty_parse(), fetch_line_into_memory(), ht_ltextfile_line::in_memory, malloc(), and UINT. Referenced by split_line(). |
|
Implements ht_textfile. Definition at line 264 of file textfile.cc. References ht_list::del_multiple(), dirty, dirty_nofs(), dirty_parse(), lines, and UINT. |
|
Definition at line 277 of file textfile.cc. References first_nofs_dirty_line, and UINT. Referenced by delete_chars(), delete_lines(), insert_chars(), and insert_lines(). |
|
Definition at line 272 of file textfile.cc. References first_parse_dirty_line, and UINT. Referenced by cache_invd(), delete_chars(), delete_lines(), insert_chars(), insert_lines(), and set_lexer(). |
|
Reimplemented from ht_layer_streamfile. Reimplemented in ht_info_textfile, and Terminal. Definition at line 147 of file textfile.cc. References ht_clist::destroy(), ht_layer_streamfile::done(), lines, and orig_lines. Referenced by Terminal::done(), ht_info_textfile::done(), and ht_aviewer::showComments(). |
|
Reimplemented from ht_layer_streamfile. Definition at line 282 of file textfile.cc. References UINT. |
|
Reimplemented in ht_info_textfile. Definition at line 288 of file textfile.cc. References ht_clist::get(), lines, and UINT. Referenced by ht_info_textfile::fetch_line(), fetch_line_into_memory(), fetch_line_nofs_ok(), get_char(), getline(), getlinelength(), has_line(), insert_chars(), insert_lines(), read(), update_nofs(), and update_parse(). |
|
Definition at line 335 of file textfile.cc. References fetch_line(), ht_ltextfile_line::in_memory, ht_ltextfile_line::is_in_memory, malloc(), ht_ltextfile_line::on_disk, ht_stream::read(), ht_streamfile::seek(), and UINT. Referenced by delete_chars(), and insert_chars(). |
|
Definition at line 293 of file textfile.cc. References fetch_line(), is_dirty_nofs(), UINT, and update_nofs(). Referenced by convert_line2ofs(), convert_ofs2line(), and set_layered_assume(). |
|
Definition at line 299 of file textfile.cc. References buf, byte, FILEOFS, len, match_lineend_forwd(), ht_stream::read(), ht_streamfile::seek(), TEXTFILE_MAX_LINEENDLEN, TEXTFILE_MAX_LINELEN, TEXTFILE_READSIZE, and UINT. Referenced by reread(). |
|
Implements ht_textfile. Definition at line 360 of file textfile.cc. References fetch_line(), ht_ltextfile_line::in_memory, ht_ltextfile_line::is_in_memory, ht_ltextfile_line::on_disk, ht_stream::read(), ht_streamfile::seek(), and UINT. |
|
Reimplemented from ht_layer_streamfile. Definition at line 352 of file textfile.cc. References convert_line2ofs(), FILEOFS, getlinelength(), linecount(), and UINT. Referenced by TerminalViewer::handlemsg(), pstat(), and Terminal::update(). |
|
Implements ht_textfile. Definition at line 381 of file textfile.cc. References buf, fetch_line(), ht_ltextfile_line::in_memory, ht_ltextfile_line::instate, is_dirty_nofs(), is_dirty_parse(), ht_ltextfile_line::is_in_memory, lexer_state, ht_ltextfile_line::on_disk, ht_stream::read(), ht_streamfile::seek(), UINT, update_nofs(), and update_parse(). Referenced by next_instate(), ht_aviewer::showComments(), and split_line(). |
|
Implements ht_textfile. Definition at line 427 of file textfile.cc. References fetch_line(), getlinelength_i(), and UINT. Referenced by get_size(), and split_line(). |
|
Definition at line 433 of file textfile.cc. References ht_ltextfile_line::in_memory, ht_ltextfile_line::is_in_memory, ht_ltextfile_line::on_disk, and UINT. Referenced by convert_line2ofs(), and getlinelength(). |
|
Implements ht_textfile. Definition at line 504 of file textfile.cc. References fetch_line(), NULL, and UINT. |
|
Reimplemented in ht_info_textfile. Definition at line 130 of file textfile.cc. References dirty, first_nofs_dirty_line, first_parse_dirty_line, ht_layer_streamfile::get_error(), ht_clist::init(), ht_stream::init(), lexer, linecount(), lines, ofs, orig_lines, and reread(). Referenced by ht_app::create_window_file_text(), ht_app::handlemsg(), and ht_aviewer::showComments(). |
|
Implements ht_textfile. Definition at line 472 of file textfile.cc. References dirty, dirty_nofs(), dirty_parse(), fetch_line(), fetch_line_into_memory(), ht_ltextfile_line::in_memory, ht_ltextfile_line::is_in_memory, len, malloc(), ht_ltextfile_line::on_disk, and UINT. Referenced by split_line(), and write(). |
|
Implements ht_textfile. Definition at line 445 of file textfile.cc. References dirty, dirty_nofs(), dirty_parse(), fetch_line(), ht_ltextfile_line::in_memory, ht_clist::insert_before(), ht_ltextfile_line::instate, ht_ltextfile_line::is_in_memory, ht_ltextfile_line::lineend, ht_ltextfile_line::lineendlen, lines, malloc(), ht_ltextfile_line::nofs, ht_ltextfile_line::on_disk, and UINT. Referenced by split_line(). |
|
Definition at line 509 of file textfile.cc. References first_nofs_dirty_line, and UINT. Referenced by fetch_line_nofs_ok(), and getline(). |
|
Definition at line 514 of file textfile.cc. References first_parse_dirty_line, and UINT. Referenced by getline(). |
|
Implements ht_textfile. Reimplemented in ht_info_textfile. Definition at line 519 of file textfile.cc. References ht_clist::count(), lines, and UINT. Referenced by convert_ofs2line(), get_size(), init(), ht_info_textfile::set_node(), and ht_aviewer::showComments(). |
|
Definition at line 524 of file textfile.cc. References buf, byte, NULL, and UINT. Referenced by find_linelen_forwd(), and write(). |
|
Definition at line 541 of file textfile.cc. References buf, byte, getline(), ht_syntax_lexer::gettoken(), lexer, lexer_state, text_pos::line, text_pos::pofs, TEXTFILE_MAX_LINELEN, and UINT. Referenced by update_parse(). |
|
Definition at line 571 of file textfile.cc. References FILEOFS, ht_ltextfile_line::in_memory, ht_ltextfile_line::is_in_memory, ht_ltextfile_line::lineendlen, ht_ltextfile_line::nofs, and ht_ltextfile_line::on_disk. Referenced by update_nofs(). |
|
Reimplemented from ht_layer_streamfile. Definition at line 580 of file textfile.cc. References get_size(), ht_streamfile::pstat(), pstat_t::size, and pstat_t::size_high. |
|
Reimplemented from ht_layer_streamfile. Definition at line 587 of file textfile.cc. References buf, byte, convert_ofs2line(), fetch_line(), FILEOFS, ht_ltextfile_line::in_memory, ht_ltextfile_line::is_in_memory, ht_ltextfile_line::lineend, ht_ltextfile_line::lineendlen, MIN, ofs, ht_ltextfile_line::on_disk, ht_stream::read(), ht_streamfile::seek(), size, tell(), and UINT. Referenced by copy_to(). |
|
Definition at line 641 of file textfile.cc. References ht_clist::append(), assert, buf, byte, dirty, ht_clist::empty(), FILEOFS, find_linelen_forwd(), ht_syntax_lexer::getinitstate(), ht_syntax_lexer::gettoken(), ht_ltextfile_line::instate, ht_ltextfile_line::is_in_memory, lexer, lexer_state, text_pos::line, ht_ltextfile_line::lineend, ht_ltextfile_line::lineendlen, lines, ht_ltextfile_line::nofs, ofs, ht_ltextfile_line::on_disk, orig_lines, text_pos::pofs, ht_stream::read(), ht_streamfile::seek(), TEXTFILE_MAX_LINELEN, and UINT. Referenced by init(), and set_layered(). |
|
Reimplemented from ht_layer_streamfile. Definition at line 731 of file textfile.cc. Referenced by TerminalViewer::handlemsg(), and Terminal::update(). |
|
Reimplemented from ht_layer_streamfile. Definition at line 737 of file textfile.cc. References reread(), and ht_layer_streamfile::set_layered(). |
|
Implements ht_textfile. Definition at line 743 of file textfile.cc. References ht_clist::append(), cache_invd(), ht_clist::count(), ht_clist::empty(), fetch_line_nofs_ok(), ht_ltextfile_line::in_memory, ht_ltextfile_line::is_in_memory, lines, ht_ltextfile_line::nofs, ht_ltextfile_line::on_disk, orig_lines, ht_layer_streamfile::set_layered(), and UINT. |
|
Implements ht_textfile. Definition at line 765 of file textfile.cc. References dirty_parse(), and lexer. |
|
Definition at line 712 of file textfile.cc. References delete_chars(), getline(), getlinelength(), insert_chars(), insert_lines(), malloc(), NULL, and UINT. Referenced by write(). |
|
Reimplemented from ht_layer_streamfile. Definition at line 773 of file textfile.cc. |
|
Reimplemented from ht_layer_streamfile. Definition at line 778 of file textfile.cc. References UINT. |
|
Definition at line 812 of file textfile.cc. References fetch_line(), FILEOFS, first_nofs_dirty_line, next_nofs(), ht_ltextfile_line::nofs, and UINT. Referenced by fetch_line_nofs_ok(), and getline(). |
|
Definition at line 784 of file textfile.cc. References fetch_line(), first_parse_dirty_line, ht_syntax_lexer::getinitstate(), ht_ltextfile_line::instate, lexer, lexer_state, next_instate(), and UINT. Referenced by getline(). |
|
Reimplemented from ht_layer_streamfile. Definition at line 835 of file textfile.cc. References cache_flush(), cache_invd(), dirty, FCNTL_MODS_CLEAR_DIRTY, FCNTL_MODS_FLUSH, FCNTL_MODS_INVD, FCNTL_MODS_IS_DIRTY, FILEOFS, UINT, and ht_layer_streamfile::vcntl(). |
|
Reimplemented from ht_layer_streamfile. Reimplemented in Terminal. Definition at line 861 of file textfile.cc. References buf, byte, convert_ofs2line(), FILEOFS, insert_chars(), match_lineend_forwd(), ofs, size, split_line(), tell(), and UINT. Referenced by Terminal::write(). |
|
Definition at line 108 of file textfile.h. Referenced by cache_invd(), delete_chars(), delete_lines(), init(), insert_chars(), insert_lines(), reread(), and vcntl(). |
|
Definition at line 107 of file textfile.h. Referenced by dirty_nofs(), init(), is_dirty_nofs(), and update_nofs(). |
|
Definition at line 106 of file textfile.h. Referenced by dirty_parse(), init(), is_dirty_parse(), and update_parse(). |
|
Definition at line 105 of file textfile.h. Referenced by init(), next_instate(), reread(), set_lexer(), and update_parse(). |
|
Definition at line 103 of file textfile.h. Referenced by cache_invd(), delete_lines(), done(), fetch_line(), init(), insert_lines(), linecount(), reread(), and set_layered_assume(). |
|
Definition at line 102 of file textfile.h. Referenced by init(), read(), reread(), seek(), tell(), and write(). |
|
Definition at line 104 of file textfile.h. Referenced by cache_invd(), done(), init(), reread(), and set_layered_assume(). |