digitalmars.D.learn - gap buffer in D2
- BLS (3/3) Nov 04 2009 yep, mean it...
- Spacen Jasset (3/9) Nov 04 2009 Did one in C once for an editor (of course). Does that count? I might be...
- BLS (3/12) Nov 04 2009 YEP,would be nice to have a look. thanks!
- Spacen Jasset (10/24) Nov 06 2009 Perhaps, if you expect things to be inserted in the middle and at the
- Spacen Jasset (3/31) Nov 06 2009 By the way. it's isn't very quick at all. Some memcpy's would be
yep, mean it... has somebody done it before...to me it seems to be not as trivial as it looks on the very first view. (speed matters)
Nov 04 2009
BLS wrote:yep, mean it... has somebody done it before...to me it seems to be not as trivial as it looks on the very first view. (speed matters)Did one in C once for an editor (of course). Does that count? I might be able to find the code. It might not be pretty I can't remember.
Nov 04 2009
On 05/11/2009 01:04, Spacen Jasset wrote:BLS wrote:YEP,would be nice to have a look. thanks! would be interesting to have a 2 gaps buffer for beyond-end insert (append)yep, mean it... has somebody done it before...to me it seems to be not as trivial as it looks on the very first view. (speed matters)Did one in C once for an editor (of course). Does that count? I might be able to find the code. It might not be pretty I can't remember.
Nov 04 2009
BLS wrote:On 05/11/2009 01:04, Spacen Jasset wrote:Perhaps, if you expect things to be inserted in the middle and at the end at the same time/alternately. I can't quite remember why I have this gap buffer. I do remember that I was going to have some sort of linked list of gap buffers for editing large files. The code should work. It's used in an old hex editor which works ok. http://dl.dropbox.com/u/731271/GapBuffer/GapBuffer.C and http://dl.dropbox.com/u/731271/GapBuffer/GapBuffer.hBLS wrote:YEP,would be nice to have a look. thanks! would be interesting to have a 2 gaps buffer for beyond-end insert (append)yep, mean it... has somebody done it before...to me it seems to be not as trivial as it looks on the very first view. (speed matters)Did one in C once for an editor (of course). Does that count? I might be able to find the code. It might not be pretty I can't remember.
Nov 06 2009
Spacen Jasset wrote:BLS wrote:By the way. it's isn't very quick at all. Some memcpy's would be required at least, rather than the for loops.On 05/11/2009 01:04, Spacen Jasset wrote:Perhaps, if you expect things to be inserted in the middle and at the end at the same time/alternately. I can't quite remember why I have this gap buffer. I do remember that I was going to have some sort of linked list of gap buffers for editing large files. The code should work. It's used in an old hex editor which works ok. http://dl.dropbox.com/u/731271/GapBuffer/GapBuffer.C and http://dl.dropbox.com/u/731271/GapBuffer/GapBuffer.hBLS wrote:YEP,would be nice to have a look. thanks! would be interesting to have a 2 gaps buffer for beyond-end insert (append)yep, mean it... has somebody done it before...to me it seems to be not as trivial as it looks on the very first view. (speed matters)Did one in C once for an editor (of course). Does that count? I might be able to find the code. It might not be pretty I can't remember.
Nov 06 2009