Wednesday, July 12, 2006

About libraries

The release of DScript was delayed by a showstopper bug, but now it is done and I am free to work on other things. Well, at least partially. Version 0.10 is really too incomplete to keep it that way for an extended period of time, so I will have to start working on 0.20 very soon. But for now I will concentrate on some maintenance work, that was long overdue.

Back in 1998 when I started to use C++ there was a lack of C++ libraries for the RISC OS platform. So I started to write my own, which acted as a foundation for all further C++ development (hence the name foundation library). It contains:
  • some very low level stuff
  • some OS dependent stuff
  • a replacement for a subset of the STL (STL wasn't a very big topic at that time and my understanding of templates wasn't too good, therefore I didn't even consider using the STL)
  • a lot of GUI stuff (including a complete replacement for the toolbox library, included in the AcornC/C++ package)
  • some more stuff
Later I created the framework library, which provided basic editor functionality:
  • document handling
  • multiple views of the same document
  • undo/redo
(you can find out which versions of these libraries are used in my software by opening a taskwindow and typing ".!RunImage -ver" and "DScript -v")

Both libraries look very old and dated now and though they received a lot of improvements and modernisations over the years, they won't compile with a modern C++ compiler. Namespaces are a problem, as well as things like
class ostream;
That was perfectly legal C++ once, but now it isn't anymore (because stream classes are templates now).

With the current state of these libraries I am stuck with version 2.95 of gcc. Much too old to be used for productive work. Its time to change to the 3.x line of gnu compilers (and I am really looking forward to the 4.x version), so I finally decided to start updating the code.

It isn't a very complicated task, but a time consuming one, because the changes are spread all over the source. The foundation library for example consists of 6 subsystems and it took me the whole yesterday evening to update only one of these.


Post a Comment

<< Home