Commit Graph

954 Commits

Author SHA1 Message Date
Vincent Sanders
7d22759f5e display some system and environment values in CI build script 2018-08-15 16:52:54 +01:00
Vincent Sanders
c1fb25e074 correct package name for artifact generation 2018-08-15 16:24:03 +01:00
Michael Drake
fa546661ad nsurl: Move debug logging over to nslog. 2018-08-09 16:19:42 +01:00
Michael Drake
add6dcc015 nsurl: Add variant of nsurl_access for logging. 2018-08-09 16:19:42 +01:00
Michael Drake
bc280f0e3f nsurl: Add data to scheme type enum. 2018-08-09 16:19:42 +01:00
Daniel Silverstone
527541ddbd Make CI NetSurf builds compile in DEBUG level logging 2018-07-28 14:10:26 +01:00
Vincent Sanders
7c3da95a07 Resolve resource leak on error (coverity issue 1390560) 2018-05-18 10:02:03 +01:00
Vincent Sanders
43582c5055 allow hash table add inline to be uncompressed 2018-04-22 14:03:18 +01:00
Vincent Sanders
b94b96e272 add hash table population from file or memory 2018-04-22 14:03:18 +01:00
John-Mark Bell
f2121d1c0f NSURL: add ability to create replacement scheme 2018-04-22 11:39:12 +00:00
John-Mark Bell
1c05280b5c HSTS: add parser for Strict-Transport-Security 2018-04-22 11:39:12 +00:00
Daniel Silverstone
e864997842 Fix last uses of !NetSurf outside of riscos build 2018-04-22 10:55:22 +01:00
Daniel Silverstone
83e8f377ad Support compression on output stream 2018-04-22 10:11:11 +01:00
Michael Drake
7bd1fb50c6 Utils: Filename: Squash warning: -Wformat-truncation=
We need to check the snprintf return value, or GCC7 whinges:

    warning: ‘snprintf’ output may be truncated before the last
             format character [-Wformat-truncation=]
2018-01-01 13:51:40 +00:00
Vincent Sanders
3b88e0ef9e fix amigaos3 building 2017-12-11 13:17:14 +00:00
Vincent Sanders
3ac65ef6e2 add m68k to amigaos targets builds 2017-12-11 12:48:28 +00:00
Daniel Silverstone
8123e65351 Finalise nslog layer properly in closedown 2017-09-10 14:22:05 +01:00
Vincent Sanders
c1c8ed794d Revert "Hopefully quash INFO confusion on Atari MINT platform"
This reverts commit 9c93ed1bca.
2017-09-08 21:49:59 +01:00
Daniel Silverstone
bb056e55b1 Sort out the logging so that -v etc do the right thing 2017-09-08 21:15:54 +01:00
Daniel Silverstone
9c93ed1bca Hopefully quash INFO confusion on Atari MINT platform 2017-09-08 19:56:23 +01:00
Vincent Sanders
3f3e7de6d9 do not attempt to log when output is not enabled 2017-09-07 21:07:03 +01:00
Vincent Sanders
86c3f3e005 update layout logging to use a catagory 2017-09-07 18:26:53 +01:00
Vincent Sanders
5d6f189d8b Fixup everything the semantic patch missed 2017-09-07 18:12:09 +01:00
Vincent Sanders
2b0a5ef2e7 update framebuffer toolkit logging to use a ctagory 2017-09-07 16:57:58 +01:00
Vincent Sanders
b9bdc279f2 Update scheduler logging to use catagory 2017-09-07 15:30:08 +01:00
Vincent Sanders
b346790cf6 update plotter logging to use a catagory 2017-09-06 18:45:35 +01:00
Vincent Sanders
71225624f6 update fetch debug logging to use catagory 2017-09-06 18:45:35 +01:00
Vincent Sanders
72e6050eb3 add low level cache category and use it 2017-09-06 18:45:35 +01:00
Vincent Sanders
75018632a9 Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done

@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 18:45:27 +01:00
Vincent Sanders
8d9b2efc11 use nslog library for logging if available. 2017-09-03 23:40:32 +01:00
Michael Drake
c6717f1ade Messages: Correct code comment. 2017-08-30 09:47:49 +01:00
Michael Drake
c2ac1a713f Errorcodes: Add SPRITE_ERROR and use it in sprite content handler. 2017-08-30 09:43:13 +01:00
Michael Drake
41f30992aa Messages: Return the unknown message if we get to the unhandled errorcode.
We shouldn't get there though.
2017-08-28 12:21:03 +01:00
Michael Drake
7ba93407ad Messages: Do message lookups for all errorcodes. 2017-08-28 11:39:21 +01:00
Michael Drake
3a0e87e89f Errorcodes: Remove redundant MNG error. 2017-08-28 11:11:40 +01:00
Michael Drake
9fd0e06501 Whitespace: Tidy up errorcodes. 2017-08-28 11:08:18 +01:00
Michael Drake
9e64f37846 RSVG content handler: Convert to using content_broadcast_errorcode(). 2017-08-28 10:21:11 +01:00
Michael Drake
cae1c44f8f PNG content handler: Convert to using content_broadcast_errorcode(). 2017-08-28 10:14:22 +01:00
Michael Drake
d1a493f569 ICO content handler: Convert to using content_broadcast_errorcode(). 2017-08-27 13:32:53 +01:00
Michael Drake
d83f6ea3c1 GIF content handler: Convert to using content_broadcast_errorcode(). 2017-08-27 13:28:21 +01:00
Michael Drake
337bd98f6c BMP content handler: Convert to using content_broadcast_errorcode(). 2017-08-27 13:28:21 +01:00
Michael Drake
7338f3ce88 nsurl: Remove redundant code path. 2017-03-27 18:09:29 +01:00
Michael Drake
8b4df800be nsurl: Use ascii header for hex to value conversion. 2017-03-27 15:40:08 +01:00
Michael Drake
0e7ebb4ee0 ASCII: Add function for converting two hex chars to value. 2017-03-27 15:37:25 +01:00
Michael Drake
b14aa97a2a ASCII: Add hex char to value conversion function. 2017-03-27 15:35:59 +01:00
Michael Drake
8caae83d35 ASCII: Split out a-f test. 2017-03-27 14:57:56 +01:00
Michael Drake
3ec522429a ASCII: Split out A-F test. 2017-03-27 14:50:36 +01:00
Michael Drake
8e96e9bc27 nsurl: Don't allow credentials or host for file: URLs. 2017-03-27 12:20:33 +01:00
Michael Drake
372df59f28 nsurl: Set path of "/" for file: URLs with empty path. 2017-03-27 12:11:16 +01:00
Michael Drake
465ad9f0ab nsurl: Add detection of "file:" URL schemes. 2017-03-27 12:09:45 +01:00
Michael Drake
b605270d42 nsurl: Add "file:" entry to enum of known URL schemes. 2017-03-27 12:05:11 +01:00
Vincent Sanders
6fb654d356 rework corestring implementation
This removes special casing for some strings and importantly the
multiple huge lists of variables in code.
2017-03-19 14:27:05 +00:00
Vincent Sanders
0f69965805 clean up some of the doxygen generation warnings 2017-02-19 11:32:17 +00:00
Michael Drake
3f5d8d1a2e nsurl: Tidy up shared components code. 2017-02-08 17:27:13 +00:00
Michael Drake
5c8f4c9c8c nsurl: Rationalise debug build option. 2017-02-08 17:27:13 +00:00
Michael Drake
91a7fffd56 nsurl: Tidy up component helper macros. 2017-02-08 17:27:13 +00:00
Michael Drake
2acd90e28a nsurl: Consolidate conversion to string. 2017-02-08 17:27:13 +00:00
Michael Drake
95e5ede775 nsurl: Split out URL parsing. 2017-02-08 17:27:13 +00:00
Michael Drake
4c47f9c046 nsurl: Split internal structure out into private header. 2017-02-08 17:27:13 +00:00
Michael Drake
299a85fa7a nusrl: Move into utils/nsurl directory. 2017-02-08 17:27:13 +00:00
Daniel Silverstone
108cc0cebd Support fixed nsgenbind bindings 2017-02-05 11:20:08 +00:00
Vincent Sanders
6075feb487 create netsurf inttypes header to have portable integer formatting macros 2017-01-21 14:20:55 +00:00
Vincent Sanders
70d700b26c rationalise use of utils/utils.h header 2017-01-19 21:15:08 +00:00
Vincent Sanders
7dab7cb43d move plot style header to netsurf include directory
move plotter style header and adjust all callers to use only what they
actually require.
2017-01-13 10:03:24 +00:00
Vincent Sanders
7a5b50be94 move test script into utils 2016-12-16 14:45:16 +00:00
Chris Young
407e58406b Remove nonsense comments 2016-12-11 17:33:31 +00:00
Chris Young
4ad375c3b0 Ensure memory used by Messages is freed on exit 2016-12-11 16:43:48 +00:00
Michael Drake
67b7854737 IDNA: Update to upstream-compatible utf8proc API. 2016-11-23 15:43:37 +00:00
Daniel Silverstone
1fb06929d9 Remove internal BASE64 in favour of nsutils' one 2016-11-19 14:40:10 +00:00
Vincent Sanders
43e91251ad windows frontend netsurf options 2016-10-19 23:07:43 +01:00
Michael Drake
b42d253f86 Table cell nowrap attribute is presentational hint, not UA style. 2016-10-13 12:44:27 +01:00
Vincent Sanders
22d917c92d allow gtk3 target in CI system 2016-10-08 20:32:15 +01:00
Vincent Sanders
a2396edde4 complete transition to locale independant core operation
The netsurf core no longer uses any locale dependant operations
excepting the mall number or cases where such operations are
explicitly wanted.

the netsurf_init now calls setlocale with the empty string and lets
the c library setup as per its specific implementation.

any core functionality that specificaly processes ascii text must use
the utils/ascii.h header to do so.
2016-09-29 22:37:10 +01:00
Michael Drake
f89ec1df37 Utils: Remove redundant genpubsuffix.pl (using libnspsl now). 2016-09-26 10:15:05 +01:00
Vincent Sanders
608a18caff remove junk references to old javascript implementations 2016-09-19 22:02:51 +01:00
Vincent Sanders
c830d14d0b cleanup seevral doxygen warnings 2016-09-13 09:16:31 +01:00
Michael Drake
30646c3145 Time: Micro-optimisation: Put GMT first in timezone list. 2016-08-17 09:07:44 +01:00
Vincent Sanders
02360ec7be add some corestrings API tests and fix corestrings fini. 2016-08-14 23:49:53 +01:00
Michael Drake
f23405f667 Time: Add date string to time_t parser. 2016-08-13 13:11:48 +01:00
Michael Drake
a1668f6c1e url: Use ascii module, rather than ctype for locale safetly. 2016-08-13 12:05:55 +01:00
Michael Drake
efeeacca86 nsurl: Update to use ascii_* helper functions. 2016-08-13 12:05:55 +01:00
Michael Drake
16b66d3af5 Utils: Add a set of ASCII string parsing helpers.
These are not affected by the current locale.
2016-08-13 12:05:54 +01:00
Michael Drake
477b65eac0 Time: Expose arrays of weekday and month names. 2016-08-13 12:05:54 +01:00
Michael Drake
1457a049bb Treeview: Add treeview_font_size to options.
Default is 11pt, and RISC OS overrides to 12pt.
2016-08-11 08:15:21 +01:00
Michael Drake
655b619fd4 Add header that may be needed for Windows build. (CI fix attempt.) 2016-08-08 15:17:56 +01:00
Michael Drake
4394587ab0 Utils: Split time handling functions out of utils.c into time.c. 2016-08-07 15:22:13 +01:00
Michael Drake
0e76523e4c Indentation: spaces to tabs. 2016-08-07 14:54:46 +01:00
Vincent Sanders
c0f4bbb308 remove erroneous parameter check to nsoption_snoptionf
The API check and bounds check for option indexes was from an unsigned
enum so checking for negative numbers was causing "comparison is always
false" errors in compilation.
2016-08-06 10:27:32 +01:00
Vincent Sanders
62b76bf31a improve option test coverage futher 2016-08-06 01:20:37 +01:00
Vincent Sanders
afc79d5912 Improve user option testing and API parameter checking 2016-08-05 22:34:44 +01:00
Vincent Sanders
e8df81fdb3 add tests for utility string handling 2016-08-04 00:19:48 +01:00
Vincent Sanders
eb5e0599af Improve percent escaping testing, parameter checking and documentation 2016-08-03 15:04:28 +01:00
Michael Drake
0c7649d030 URL escape: Improve API documentation. 2016-07-25 09:04:35 +01:00
Michael Drake
a122b94efd URL escape: Simplify to avoid unnecessary allocation.
This removes the toskip parameter, which was only used by the RISC OS
front end.  The toskip param was used to skip 8 characters which did
not need to be escaped from the start of the URL.  The RISC OS front
end now orders the steps of its URL construction to avoid the need
for this.
2016-07-25 09:04:35 +01:00
Michael Drake
7417a21bb1 Improve comments. 2016-07-24 19:48:03 +01:00
Michael Drake
e88d82f87f URL module: Remove unused curl #include. 2016-07-24 14:16:12 +01:00
Michael Drake
b4e21b76fd URL unescape: Calculate new_len at end, rather than maintaining it. 2016-07-24 14:03:28 +01:00
Michael Drake
fa2e3b7784 URL unescape: return the new length to the caller.
The avoids situations were we threw away the length, only for
the caller to have to strlen the returned string.

Note, there seems to be a case of the amiga front end writing
beyond end of allocation.  Added a TODO for now.
2016-07-24 14:03:16 +01:00
Michael Drake
cf753f20cc Avoid using curl for URL unescaping.
This moves us towards working without curl.
2016-07-24 13:29:01 +01:00
Michael Drake
a543206075 URL unescape: Use size_t for length. 2016-07-24 12:33:51 +01:00
Michael Drake
90a260a2cc Doxygen: Fix instance of bad function comment syntax. 2016-07-24 12:21:23 +01:00
Vincent Sanders
c313524998 reduce curl usage to fetcher, url unescaping and time parsing 2016-06-29 23:06:53 +01:00
Vincent Sanders
aa5090c85b move utf8 header into public API 2016-05-30 11:20:15 +01:00
Vincent Sanders
5061687867 store toolbar config in standard options instead of a separate file 2016-05-21 12:17:49 +01:00
Vincent Sanders
e181a7fcf2 Fix several doxygen errors 2016-05-05 22:41:03 +01:00
Vincent Sanders
6da3b3102c remove unused warn_user API 2016-05-02 16:09:28 +01:00
Vincent Sanders
7b28db6249 message get API should not raise user errors itself 2016-04-29 09:41:10 +01:00
Vincent Sanders
bf3ee089cb use the miscellaneous table warning entry
change all the frontends to provide the warning callback in the
miscelaneous table instead of using the warn_user function.

Changing all the warn_user callsites still requires completion.
2016-04-25 23:11:55 +01:00
Vincent Sanders
a828150d9c for strtof to be redefined on haiku stdlib must be included beforehand 2016-04-21 23:56:16 +01:00
Vincent Sanders
04841668f0 attempt to fix haiku headers 2016-04-21 23:37:35 +01:00
Vincent Sanders
7d9c9dba36 Split utils header into string functions and everything else
split out the string handling API from the rest of the utils header
and fix up all the fallout.
2016-04-21 22:36:21 +01:00
Vincent Sanders
3488e337b6 remove unused wallclock API 2016-04-21 14:34:36 +01:00
Vincent Sanders
f33d9dcc8c cleanup unneeded includes in utils.h after API simplification 2016-04-20 23:56:29 +01:00
Vincent Sanders
dd31499bf9 move remove underscores utility to alongside the single gtk call site 2016-04-20 23:38:08 +01:00
Vincent Sanders
7ba291037b move regex helper to be with teh single remaining call site 2016-04-20 23:33:31 +01:00
Vincent Sanders
d29bccdb3a add missing explicit dirent includes 2016-04-19 15:56:57 +01:00
Vincent Sanders
afea659fef move dir_sort_alpha function from generic utils to one specific place it is used 2016-04-19 12:01:05 +01:00
Vincent Sanders
1bc010665e Reduce unecessary use of directory entry headers
The config header was causing many source files to unecessarily
include the dirent headers causing extra dependancies. This has been
fixed by providing a utility dirent header that provides a common API
across all platforms while removing the unecessary dirent header usage.
2016-04-19 11:21:06 +01:00
Vincent Sanders
4f38963337 move time function to apropriate header 2016-04-19 10:36:35 +01:00
Vincent Sanders
836ea5679e move sys/time.h support functionality out of generic header
The utils header is a large collection of functionality for several
system headers and API. This splits out the ones from sys/time.h into
a separate header reducing the need for many unconnected source files
to include the system header unecessarily.
2016-04-19 09:16:09 +01:00
Vincent Sanders
ade0cd8bb9 Reduce unecessary use of networking headers
The utility configuration header dragged in a number of bsd sockets
and related API as a side effect of setting up the configuration. By
splitting the header and API setup into a separate header only the
small number of places that need the functionality explitly include
it.
2016-04-17 13:42:28 +01:00
Vincent Sanders
0bc5d2ca4c create date and time to seconds since epoch processing utility function
currently NetSurf uses curl_getdate to convert textural date and time
strings into seconds since epoch. It is betetr to move this
functionality to a utility function so curl_getdate can easily be
replaced if required.
2016-04-16 23:50:22 +01:00
Vincent Sanders
d15ab96a51 Fix size_t printf formatting
The printf formatting for size_t is set in c99 as %zu but in windows
it is %Iu this is solved by adding and inttypes style PRI macro for size_t

This also uses this macro everywhere size_t is formatted.
2016-03-17 22:00:54 +00:00
Vincent Sanders
1d7b305db9 fixup nsurl handling to avoid locale specific character type implementation 2016-03-14 13:01:06 +00:00
Vincent Sanders
5e604235e4 Initial pass removing gtk frontend theme code 2016-03-08 15:45:28 +00:00
Michael Drake
ebfcc6d9a9 Add script for setting files to git last touched date.
This may help with whatever issue is causing a problem with RISC OS
!Boot and !System distributions.

From the base of the netsurf repo, you can run it like this:

  $ ./utils/git-date.sh riscos/distribution/
2016-02-19 15:25:06 +00:00
Vincent Sanders
8915a49b3f setup flags for building monkey on RISC OS 2016-02-15 15:16:23 +00:00
Vincent Sanders
eaed6b1dda Use compiler environment to control riscos header usage
Instead of relying on building the RISC OS frontend to determine correct
include compatability use the compiler __riscos__ macro.
2016-02-15 15:00:57 +00:00
Michael Drake
d39531ff55 Ensure fetch attempts is not reduced to less than 1. 2016-02-15 11:06:37 +00:00
Michael Drake
c207216fa2 Fix constraints on curl_fetch_timeout option.
5 <= n <= 60 seconds.
2016-02-15 09:55:57 +00:00
Vincent Sanders
157f05bc61 enable monkey to be built everywhere it is completely generic now 2016-02-12 14:16:31 +00:00
Vincent Sanders
90f65814c6 fix coverity build generated tar handling 2016-02-11 12:01:41 +00:00
Vincent Sanders
d0334c35e9 fix coverity submission for netsurf 2016-02-09 11:32:21 +00:00
Vincent Sanders
9610dbd210 remove possible null dereference on allocation faliure
fix null dereference is calloc fails. coverity 1316339
2016-02-09 10:31:46 +00:00
Vincent Sanders
1de182a349 ensure mac os x path is correct 2016-02-07 22:10:35 +00:00
Vincent Sanders
bfbd838395 update jenkins build script for yosemite 2016-02-07 21:59:28 +00:00
Vincent Sanders
94b913e5b3 update for aarch64 2016-02-01 16:27:58 +00:00
Vincent Sanders
6847fad653 remove javascript build option from jenkins script 2016-01-25 16:10:42 +00:00
Vincent Sanders
65bdef55ab move the container code to gtk directory as its only ever used there. 2016-01-19 15:10:29 +00:00
Michael Drake
fcaf43ddcc Add 'mailto' lwc corestring. 2016-01-08 17:16:42 +00:00
Vincent Sanders
74fdde2b57 remove necessity for header change in libutf8proc
The combining character class definition was put in the libutf8proc
header instead of being local to the IDNA implementation.
2016-01-03 16:07:40 +00:00
Chris Young
b962d3db82 Revert "Skip invalid commandline args instead of aborting"
This reverts commit 4ad94124a6.
2015-11-27 12:32:13 +00:00
Chris Young
4ad94124a6 Skip invalid commandline args instead of aborting 2015-11-24 23:55:40 +00:00
Daniel Silverstone
b42a910ed9 Ensure that those events listed in 8.1.5.2 as forwarded from body to window, don't get registered for listeners on body 2015-11-22 14:50:35 +00:00
Daniel Silverstone
4d1ef3bac4 Add support for retrying timed-out cURL fetches.
This is an attempt to amelioriate the situation found in #2384 where
we see the cURL connect() failing to complete.  Based on the pcap
from the bug log, we believe that RISC OS is likely failing to signal
the completion of the connection to cURL.  As such, cURL times out.

This change permits retries of timed out connections in the hope that
a fresh socket FD might subsequently function correctly.  The defaults
chosen mean that the previous behaviour of 30 seconds before timeout
is reported will remain the same, but in that time we will make 3 separate
attempts to connect the socket.
2015-11-10 21:51:54 +00:00
Vincent Sanders
c3b7e650c5 Fix segmentation fault when a string option is set to NULL
The check for a user option being a default value was not protecting
against the value being set to NULL.
2015-11-05 14:47:45 +00:00
Michael Drake
b1533a7f76 Stop utf8 conversion leaking its strings. 2015-10-31 13:44:14 +00:00
Michael Drake
67cbdf6bef Don't fail on URLs with no host. 2015-10-31 13:44:14 +00:00
Michael Drake
25cd49034c Style guide adherence. 2015-10-31 13:44:06 +00:00
Michael Drake
1bb7d295bb Make nsurl utf8 string conversion function consistent with nsurl API. 2015-10-25 09:03:20 +00:00