Commit Graph

685 Commits

Author SHA1 Message Date
Vincent Sanders
8e26870e15 Fix logging to stderr if verbose_log was set before nslog_init was called 2015-07-05 00:51:29 +01:00
Vincent Sanders
ccac301176 Fix a signed comparison error in nsurl parsing.
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.
2015-07-04 09:36:46 +01:00
Vincent Sanders
a94ae7a80a Allow translation messages to be compiled in as GTK resources 2015-06-21 23:27:22 +01:00
Vincent Sanders
67ded2a02a This moves message loading out of netsurf_init into each frontend
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.
2015-06-21 23:27:22 +01:00
Vincent Sanders
335bbe4f52 Move the browser identification and machine info logging.
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.
2015-06-21 23:27:21 +01:00
Vincent Sanders
25d7f0c657 use logfile as variable name as cocoa gives an error about the symbol type of logf 2015-05-29 16:32:12 +01:00
Vincent Sanders
faf9b9d919 Improve logging interface to reduce overhead
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.
2015-05-29 16:18:18 +01:00
Vincent Sanders
4324bf535f Allow verbose logging to be directed to a file 2015-05-29 16:14:42 +01:00
Vincent Sanders
0d811963c1 fixup all the remaining logging macro callsites
The semantic patch tool appears to have missed some difficult to
reason about callsites which have now been manually cleaned up
2015-05-28 17:06:18 +01:00
Vincent Sanders
c105738fa3 Change LOG() macro to be varadic
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.
2015-05-28 16:08:46 +01:00
Vincent Sanders
2092ab252f utility to translate public suffix data into a c code 2015-05-06 23:45:48 +01:00
Vincent Sanders
408e818cbe Update posix source version on monkey frontend to reflect oyr usage of scandir 2015-05-03 14:46:29 +01:00
Vincent Sanders
47d08b6506 Revert "Fix RISC OS not having a pread/pwrite implementation."
This reverts commit 82c7a7a4ba.

Conflicts:
	content/fs_backing_store.c
2015-04-02 16:37:04 +01:00
Vincent Sanders
82c7a7a4ba Fix RISC OS not having a pread/pwrite implementation. 2015-03-31 22:41:37 +01:00
Michael Drake
78663e9111 Remove fragment from nsurl hash. 2015-03-27 11:58:52 +00:00
Vincent Sanders
a487f7e611 Move win32 window operations into their own module
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.
2015-03-12 23:48:53 +00:00
Michael Drake
7247f48d2f Remove unused #include. 2015-03-05 20:17:42 +00:00
Michael Drake
ac636100e8 Remove include of nsurl from corestrings.h 2015-02-26 16:58:41 +00:00
Michael Drake
30909f8ed5 Move FILE_SCHEME_PREFIX to corestrings. 2015-02-26 16:14:23 +00:00
Vincent Sanders
d61444e703 add missing errno include 2015-01-30 17:13:35 +00:00
Vincent Sanders
791a45141d Updated time_t fallback reading to not fail if the value is 0
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.
2015-01-30 17:04:34 +00:00
Chris Young
989a5da334 Cast timeval.usec calculations to int as AmigaOS3 has some conflicting headers which means it can be treated as an unsigned value.
This ensures the log time is always correct.
2015-01-19 19:15:48 +00:00
Vincent Sanders
2d58f8360e jenkins helper script quoting in shell wilidcard case was wrong 2014-12-21 14:15:58 +00:00
Vincent Sanders
3f331a701a add freebsd to jenkins build script for gtk, framebuffer and monkey 2014-12-21 13:59:39 +00:00
Vincent Sanders
8e60d32831 remove some warnings from freebsd build 2014-12-21 02:01:45 +00:00
Vincent Sanders
6684b938e2 Update the coverity build script for buildsystem HOST/BUILD changes 2014-12-19 16:56:43 +00:00
Vincent Sanders
876b6cbeb0 fix BUILD/HOST usage to work with fixed buildsystem 2014-12-19 13:30:20 +00:00
Vincent Sanders
0f6f0a0169 Improve message split generation
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
2014-12-02 16:27:24 +00:00
Vincent Sanders
9bc07e8d8f make coverity build script use updated environment variables 2014-11-30 00:37:35 +00:00
Vincent Sanders
669df172ec Fix my spelling of teh everywhere 2014-11-18 17:16:26 +00:00
Vincent Sanders
1deb36759b uipdate jenkins build script to confirm to new core buildsystem 2014-11-16 13:33:08 +00:00
Vincent Sanders
97759f62af USe the externally built conveniance utf8proc library 2014-11-14 13:46:08 +00:00
Vincent Sanders
9fde3502b6 doxygen cleanups in utils 2014-11-12 23:27:13 +00:00
Vincent Sanders
e32a2ad46e Doxygen fixes 2014-11-09 15:28:03 +00:00
Vincent Sanders
8f64d5d223 Improve Doxygen documentation 2014-11-08 12:35:11 +00:00
Vincent Sanders
f287379a7c Fix several doxygen issues 2014-11-08 11:38:20 +00:00
Vincent Sanders
3fc1fe0493 fix dumb mistake in missing a close bracket. 2014-11-04 20:53:19 +00:00
Vincent Sanders
d85b74fd72 change logic to check for false instead of not true to fix coverity 1250328 2014-11-04 20:41:31 +00:00
Vincent Sanders
ad343eccb1 remove unecessary utils/types.h
This cleans up this header and moves the functionality into more
useful places while reducing the include complexity but only pulling
in whats required.
2014-11-02 20:10:32 +00:00
Vincent Sanders
c31c4babe1 Change contextual content retrieval to browser features.
Update the API which allows frontends to acquire the page features
(images, link urls or form elements) present at the given coordinates
within a browser window.

By making this an explicit browser_window API and using the browser.h
header for the associated data structure with a more appropriate API
naming the usage is much more obvious and contained.

Additionally the link url is now passed around as a nsurl stopping it
being converted from nsurl to text and back again several times.
2014-11-02 15:46:42 +00:00
Michael Drake
98b6d02df6 Move host_is_ip_address into urldb, as that's the only thing that cares. 2014-10-31 14:31:06 +00:00
Vincent Sanders
02ff3920ce remove unused url_init function 2014-10-31 00:50:32 +00:00
Vincent Sanders
ce3d991918 use nsurl_nice and remove url_nice
change all callers over to using new API for generating nice filenames
from a url and remove the old API.
2014-10-31 00:24:57 +00:00
Michael Drake
07376fc96b Remove unused variable. 2014-10-30 22:47:25 +00:00
Michael Drake
13832a453a Add a nsurl_nice, which can replace url_nice. 2014-10-30 22:34:09 +00:00
Michael Drake
3ff7557c34 Add a lwc corestring for "/". 2014-10-30 22:34:09 +00:00
Vincent Sanders
c646d05ae5 update nsurl file header to contain references to the specifications it implements 2014-10-29 23:41:13 +00:00
Vincent Sanders
d204d6d555 Clean up saving as PDF
This removes the global PDF_Password interface that had completely
bitrotted and moves it into the standard misc operation table with a
sensible defualt implementation.

This also cleans up and fixes the gtk frontend implementation of the
pdf password callback so it compiles.

Finally this moves the implementation to a sensible place alongside
the other exporters reducing target makefile complexity futher.
2014-10-26 23:53:14 +00:00
Vincent Sanders
14e2829489 remove the die API from the core.
The die() API for abnormal termination does not belong within the core
of netsurf and instead errors are propogated back to the callers.

This is the final part of this change and the API is now only used within
some parts of the frontends
2014-10-26 12:42:53 +00:00
Michael Drake
64d591676b Remove unused url_components stuff. 2014-10-26 10:23:28 +00:00