Re: C++

"Björn Höhrmann" wrote:
>
> * Lee Passey wrote:
> >I have recently successfully completed a conversion of tidy to C++.  Is
> >anyone interested?
> 
> Sure. Let us take a look! Is it based on the current CVS sources or the
> August 04 2000 release? As for the upcoming HTML Tidy library, we would
> make great use of some C++ wrapper for HTML Tidy.

The first pass that I have completed is based on the 04 August 2000
release.  It was primarily experimental and instructional, just to see
what the task was like and to determine a strategy.  I have since
abandoned that code, and am starting over with the CVS sources from
approximately mid-September.

In any project like this, the problem arises of how to maintain
synchronicity between two implementations of what is essentially the
same project (I'm sure the JTidy guys deal with this every day).  In
this second cut I am being a little less radical in my approach to
moving methods into different files; I am trying to maintain functions
in files of the same name as their C counterparts, even when the
functions end up as methods in different classes.  When files should be
split up to separate parsing and cleaning, for example, I have left the
first part of the file name the same.  For example, I have currently
split tidy.c into tidy.cpp (main code), tidy_mem.cpp (memory allocation
and string routines), and tidy_utf.cpp (UTF8/16 conversion fucntions). 
Hopefully this way I can diff my source with the CVS tree, identify
changes that are made, and have a fairly straightforward way of finding
where these changes belong in the C++ version.

I finally have a place on the web where I can put stuff for public
consumption.  There seems to be at least a modicum of interest, so I
will zip up what I have and put it up there this weekend.  As soon as I
do this I'll post the URL.

Received on Tuesday, 2 October 2001 14:47:30 UTC