[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: othersrc/external/bsd/bufgap
Module Name: othersrc
Committed By: agc
Date: Sun Jun 12 07:48:29 UTC 2011
Update of /cvsroot/othersrc/external/bsd/bufgap
In directory ivanova.netbsd.org:/tmp/cvs-serv28782
Import buffer gap routines into othersrc.
These routines were originally written in 1996 to support various
editors, and are still in use where text may change at beginning and
ends of buffers, with a need to be able to move forwards and backwards
within a buffer efficiently, counting characters and line positions.
A buffer gap structure works by having a number of characters after
the gap, and a number of characters before the gap. To move forwards,
the next character before the gap is copied to the group of characters
after the gap, and the count of before characters decremented, and the
after count incremented. Moving backwards is the opposite operation.
Text is inserted at the end of the "after" characters.
A small program is included which exercises the routines by moving to
the end of the file character by character, reversing character by
character, and then moving forwards once again.
Vendor Tag: CROOKS
Release Tags: bufgap-base
No conflicts created by this import
Main Index |
Thread Index |