Implement the "ring buffer in the ring buffer" concept.
commit0c074217e1a632cc55c22290781b306250b3f33f
authornico <nico@9862a28c-4e93-4879-ac26-10afcf840a8f>
Tue, 17 Jul 2007 03:34:30 +0000 (17 03:34 +0000)
committernico <nico@9862a28c-4e93-4879-ac26-10afcf840a8f>
Tue, 17 Jul 2007 03:34:30 +0000 (17 03:34 +0000)
treec202a376fd6a3e907be3375f1001dfdc2e94c2b0
parente510ab3231400bbee4dfbb6baeca604a442dec0c
Implement the "ring buffer in the ring buffer" concept.
Each individual buffer is now potentially a ring buffer of its own. This capability is used for files that are too long to fit in the buffer and will (hopefully) make it easy to have several files on the buffer.
It still needs a lot of testing and polishing but it worked with the files I threw at it (a very long one and a series of moderately short ones, i.e. big but not bigger than the buffer).

NB: It is important to note that the ridx and widx fields of the memory_handle struct are no longer absolute pointers in the main buffer. They are now relative to the handle's data buffer, thus their value is always positive and <= data_len.

git-svn-id: svn://jdgordon.mine.nu/mob@54 9862a28c-4e93-4879-ac26-10afcf840a8f
testplugin.c