And oddly enough, BDB is exactly how I would have implemented it... The
basic datum is a line after all (I have no idea about EMACS, and don't
want to know) so it makes sense to use a structure that can rapidly access
arbitrary line numbers.
I'd use SQLite nowadays, because it takes extraordinary care to make sure that no data is lost short of disk failure. It is considerably more robust than the underlying filesystem, and runs embedded in its process. It also means you can readily carry about arbitrary data in additional columns; for example, you could make line marks persistent, including dot.
John Cowan
http://vrici.lojban.org/~cowan cowan@ccil.orgWell, I have news for our current leaders and the leaders of tomorrow:
the Bill of Rights is not a frivolous luxury, in force only during
times of peace and prosperity. We don't just push it to the side
when the going gets tough. --Molly Ivins (pbuh)