aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/userdel.c
diff options
context:
space:
mode:
authorJarno Mäkipää <jmakip87@gmail.com>2020-01-11 00:36:02 +0800
committerRob Landley <rob@landley.net>2020-02-02 09:32:19 -0600
commit055f07aab7bbf56c9ecd0ef404e38726bb5c2d2d (patch)
tree1dc4ecad8ef3916975ed915aa107820670f0c085 /toys/pending/userdel.c
parentdf19a448f6e05f73dddabcf6f6da142cedccbbd6 (diff)
downloadtoybox-055f07aab7bbf56c9ecd0ef404e38726bb5c2d2d.tar.gz
vi: Replace linelist with Piece table based design
Replaced dlist linelist with continuous memory blocks. This will allow editing huge files without billion mallocs. File is first opened with mmap() and mapped region is fully described in block_list as one block. Currently "valid" data is described as slices, when first loading file there is only one slice that points to memory existing in block_list. When cutting text, block_list is not freed or modified, but instead slice_list is modified to have "hole" between 2 slices. when inserting new mem_block is added, previos slices are cut in cursor position and new slice is added... Added functions to handling data inside block_list+slice_list insert_str(), cut_str() are used for all delete and add operations text_strrchr(), text_strchr() are used for searching lineendings text_byte(), text_codepoint(), text_getline() are for simple data access Implemented: more or less all previous functionality Implemented more proper file write: file is saved to .swp, blocks are unloaded, file permissions are copied, and atomic rename is called, block is reloaded chmod some defaults(rw-rw-r--) if original file could not be fstat (does not exist) FIX make all tests pass Removed: Some unused functions
Diffstat (limited to 'toys/pending/userdel.c')
0 files changed, 0 insertions, 0 deletions