- From: Tony Goodwin <tony.goodwin@bfs.phone.com>
- Date: Wed, 08 Nov 2000 09:36:45 +0000
- To: André Blavier <ablavier@wanadoo.fr>
- CC: html-tidy@w3.org
Andre I have done some work in relation to this already by wrapping some of the modules in C++ classes. However, it is not true C++ as I made a conscious decision to try an retain most of the structure of Dave's code so that refreshes of code could be easily implemented. The main area of thread safety is of course the globals, though most of the non thread safe code occurs in pprint.c. I also believe that the C version of tidy could be made thread safe in itself without the need for C++ by packaging off the statics and being more careful in initialising (reinitialising/ tidying up) On a not unrelated point, I have made quite a few changes to patch up memory leaks within tidy, which is a major concern to me as tidy is encapsulated into a library. In particular, the numerous ReportWarnings etc within a loop, which then uses continue to restart the loop, is leaving many nodes unfreed. Tony André Blavier wrote: > Hi everybody, > > I'm the author of TidyGUI (a Windows GUI port of tidy) and TidyCOM (a > Windows COM component wrapper for tidy). I'd like to investigate your > opinion about a port of tidy as a Standard C++ library. > I've come up with this idea because TidyCOM has a significant drawback: it > is not reentrant, so it can't be safely used on multi-threaded servers. I > often receive requests asking me to make TidyCOM thread-safe. However, > TidyCOM is just a thin wrapper around Dave's C code and the numerous global > variables of the original code are still there. > I think the way to go is to rewrite tidy as a pure C++ library: I could then > make TidyCOM reentrant and, as a side effect, we would also be able to embed > tidy more easily in various C++ applications, on multiple platforms. > Now, I'm aware of the following: > - We already have a very nice object-oriented, multi-platform port of tidy: > JTidy. > - Porting to C++ will require a lot of work. > - Keeping the C++ code synchronised with Dave's code won't be easy. > So, before I start working on this project, I'd be glad to know what you > think about it: Would Tidy++ be a valuable asset for the community? Or do > you think Java is a one-size-fits-all solution? > > Thanks for your input. > > -- André Blavier (ablavier@wanadoo.fr) -- =============== Tony Goodwin mailto:tony.goodwin@bfs.phone.com
Received on Wednesday, 8 November 2000 04:54:21 UTC