- Fix path to look for libnetwork to work also on non-hybrid systems
- Remove references to /boot/common as it is not used anymore
- Fix a few type errors
- Use compiler provided va_copy when available
Adds check based unit test for teh bloom filter implementation. This
is based on Roberts original test code in utils/bloom.c and uses
/usr/share/dict as a source of strings to check bloom creation, no
false negatives and the false positive rate is below 15%.
In utils/nsurl.c the function nsurl__create_from_section() has a
section dealing with non-redundant ports (starting line 973).
lwc_intern_string() was being called with negative lengths and as it
takes a size_t (unsigned) so is getting passed a very large length
which causes a segfault.
this is supposed to be protected by the flag setting on line 969
however the arithmetic is all *unsigned* so the condition never
matches
(gdb) p length - (colon - pegs->at + skip)
$9 = 18446744073709551608
changing the check arithmetic to be a simple comparison against length
prevents this issue and reduces the amount of computation required.
The translated message loading is dependant on configuration of
resource location in each frontend, additionally they should have the
ability to deal with errors in this loading in a implementation
specific manner.
This also extends the message loading API to be capable of loading
from an inline memory buffer instead of from a file.
Previously this information was logged when netsurf_init was called
which might be many lines out output into the log.
It is useful to have this information at the beginning of the log to
make it easily found. In addition it makes netsurf_init less complex.
This reduces logging overhead by only calling the log output function
once instead of three times.
Additionally the nslog_gettime interface no longer needs to be
exported and the static function is directly inlined further reducing
function call overhead.
Finally the appending of a newline uses fputc instead of a full printf
call which is considerably more simple and further reduces overhead
time.
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.
The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.
A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
This splits up a great deal of the win32 window code out from other
gui code. It also remove large quantities of unused and junk
variables and functions.
The non strptime fallback reading of time_t values would report
faliure if the value it read was 0 which is a valid time. This fixes
this path to only fail if there was an actual error processing the
value.
This changes the message splitting code to ensure that a translation
is generated for every different key using a specified language as a
fallback if no translation is available.
This also allows for a messages to be generated when there is no
fallback at all and when the translation is the same as the fallback
language