Subject: Re: libwww
Date: Wed, 13 Jul 1994 18:18:56 +0200
>Replace all memory allocation functions with macros which can
>expand to something other than malloc on systems where malloc
>is not usable (like the Mac). This means using W3_MALLOC, W3_FREE,
>W3_CALLOC and so on.
This could be overriddent in HTUtils.h where there are macros. I think
it should be better not to use malloc as the name though so that a
collection of source can be checked with a grep for stray mallocs...
>Change all the source files names to be legal with MSDOS 8.3 filename
>Add support for a different error reporting API which will work on
>all platforms. Something like ERR_ReportError(...) where the ERR_
>API is implemented outside the library, probably in platform specific
Henrik did something like this...
>Remove all uses of the outofmem() macro, which basically calls fprintf
>and then exit()! Commercial software requires much cleaner error
>handling than this, particularly on Mac/Windows platforms.
Agree... I don't like this either...
>Define an API for progress indicators, adding calls throughout the
>library back into a platform-specific library of routines which keep
>the user informed of when things are happening. Our API includes
>support for thermometers which show percentage completion of a task,
>as well as a spinning NCSA-like globe which simply shows that something
>is happening. The actual presentation of the information could vary.
>That's simply the way we implemented the API. This same API polls
>for user aborts, so all operations are abortable and the termination
>of the network transfer (or whatever is happening) is handled cleanly.
>Remove all calls to getenv(), which is not portable to anything but
>UNIX. Our library references an externally defined structure which
>corresponds to user "Preferences".
Well it does work on VMS :-)
Should be more general though. Under X11 you want to use Xt resources
Perhaps as a stopgap we could introduce a GETENV macro???
>The same goes for system(). The implementation of "external viewers"
>is totally system dependent.
>Remove/fix all the places where a static local variable is malloc-ed
>but not free until the next time the function is executed. For example:
>On Windows, this causes a memory leak, since Windows platforms do
>not release a process' memory when the process is killed.
>Fix the other memory leaks, including the free-ing of the anchors,
>atoms, suffix structures, and so on, which are allocated but never
Should have been done!!!
>Toss out HTHistory or rewrite it so it can be used with a multi-window
>If HTML.c is to be shared (and it could be), remove its assumptions
>about styles. In fact, none of the styles stuff in the library was
>useful for us. HTML.c now references styles by integer index, not
>by pointer, so the index can be used to find a style within a current
>style sheet, and the style sheet can be swapped with another easily.
>Don't define HTStream differently in multiple files. Most debuggers
That is the last vestige of object orientedness :-)...
>Rearrange the include files so they don't #include each other so
Shen has lots of include files....
I have been putting checks to see if a #include has been included already
before including it from an include file. Prevents accidental double loading
before the lexical analyser stage (ie its fast)... We X11 people have all
the X11 sillyness so optimising libwww in this way would not make much
difference. On a Mac...
>Add support for redirection and forms post.
Agree it should be there....
>Make MIME type matching case-insensitive, as per RFC 1521.
We want to completely rewrite the MIME parser proper so there is only one of
>Cache the last call to gethostbyname()
Hah! Have we got caching for you... H. can tell you more but it is pretty
nifty all round!
>In SGML.c, add support for capturing the HTML source as it comes through,
>for supporting dialogs which allow the user to see the underlying HTML
>behind a page.
How about a Tee Stream? In the short term it might be simpler to have a
`migration' library where the SGML stuff can be overidden and only raw ASCII
>#ifdef all the code which assumes all filenames are UNIX format.
>These sections have to be rewritten for Mac and Windows.
We should move to 8x3 filnames which should help... Rest should be possible...
Hmm... Dosen't look Tooooo bad...