HTTrack Website Copier
Free software offline browser - FORUM
Subject: Re: development philosophy?
Author: Xavier Roche
Date: 10/26/2013 13:43
 
> Is there a document somewhere describing the
> "development philosophy" of HTTrack?  I'm looking at
> the source, with an aim to fixing some minor things,
> and want to know what kind of changes are acceptable
> (to be contributed back).
> 
> I see it is written in C, that's fine.  The windows
> branch doesn't seem to use WIN32 API much ... maybe
> mainly in the minizip subdir (which I think is open
> source imported here).  Is that by design?
httrack is written in a portable way, and is therefore using POSIX-like code
(on Windows, the MSVCRT library is used). There are some WIN32-specific
functions here and there, but the Microsoft "libc" layer is generally the
preferred way.

> Similarly, I don't see usages of SQLite, though it
> might be useful.  Is that by design?
httrack is using a regular ZIP file for its cache. It is simple to handle,
simple to use within external code. A sql-like backend might be useful, but I
fear it would be a bit cumbersome to use ; for example, there is some code to
repair a damaged cache if the program crashes or if the machine reboots - I'm
not sure sqlite blobs can be repaired easily ?
> That's the kind of question I'm wondering about: If
> I make a fix (or add a feature) what's the proper
> style?
I used the following indent style when I cleaned up a bit the messy code:
indent -l80 -lc80 -nhnl -nut -bad -bap -bbo -br -brf -bli2 -brs -bls -br -ss
-sai -pmt -nsaw -nsaf -nprs -i2 -ce -npsl -npcs -cs -sob -cdw
 -nbc -lp

(ie. braces on the same line, especially)

I will gladly accept patches, but beware: the code is really old (15 years)
and some parts are horribly written. The cache handling vs. live requests
handling part is especially embarrassingly badly designed :)


 
Reply Create subthread


All articles

Subject Author Date
development philosophy?

10/25/2013 21:30
Re: development philosophy?

10/26/2013 13:43




c

Created with FORUM 2.0.11