Eko wrote:
>Instead of pre-defining a static string space, how about replacing
>it with a dynamic buffer? Something like
>
> #include <alloc.h>
> char *hostname = malloc(41);
Yes of course this is better. But (there's that word), the URL is saved in
a struct that is saved to disk (cache.idx) so the process of reading the
string would be more complex.
It is doable of course, but I will not craft a sollution until I've talked
to Michael.
>IMHO, this will keep memory usage as low as possible. Whenever
>the URL parser encountering a hostname that longer than 40 chars,
>then it could increase the string space to either 63 or 255 as
>needed:
Why not allocate the size completly dynamical?
>BTW, if you came as a guest with Arachne, Yahoo! WebRing's login
>page at the link "Join the Ring" (see URLs at my sig below) will
>redirect you to a wrong URL *after* login. Arachne will get a
>single character added to the target URL (i.e. "http:<blah>dosnet"
>will become "http:<blah>dosneti"). Is this Yahoo!'s fault or just
>another Arachne bug? As usual, both IE and Netscape has no such
>problem.
Interesting, I'll check it out.