On Thu, 31 Jul 2008, Chris Young wrote:
On Thu, 31 Jul 2008 00:01:25 +0100, Rob Kendrick wrote:
On 30 Jul 2008 23:44:20 +0100
"Chris Young" <[EMAIL PROTECTED]> wrote:
I now have lots of work to do writing native code, currently it opens
a window, fetches a page and sets the window's title - and then sits
in an endless loop doing nothing, as that's as far as I got.
If you want a Subversion account to check your current work in, please
ask. Checking in often and early is worthwhile; especially given we've
made quite large changes to the Make system recently.
Yes please - that will be very useful. I'm working with an SVN
snapshot at the moment and I can see it getting further and further
behind.
Send us a username, and it'll be done. :)
I can't see anything relevant in there. There is some code in
fetch_curl.c which handles the filetypes:
if (strncmp(f->url, "file:///", 8) == 0)
url_path = curl_unescape(f->url + 7,
(int) strlen(f->url) - 7);
Changing the two 7s to 8s here appears to send the correct path to
the local MIME type routine.
Aha. No. :)
All paths passed up from the core will be in Unix format (as it basically
just strips the scheme + authority off the front). Thus, fetch_filetype()
should be expecting a Unix path.
I'm told that file:/// is correct (and there is certainly code
elsewhere which converts file:// to file:///), but path_to_url in
urldb.c only adds two?
That's because the urldb builds a unix-format path, so the third slash is
provided by the tree traversal code. Note that that code is simply a test
stub, anyway.
I think I probably need an #ifdef in the code which picks out the path
from the URL, so it starts at the eighth character instead of the
seventh. Maybe this can be a global variable or defined in
utils/config.h, as I can see it being a problem for other platforms as
well (eg. Windows).
I really don't like this idea. Platform-specific ifdefs in the core code
suck -- we're trying to phase any remaining ones out.
J.