Commit Graph

106 Commits

Author SHA1 Message Date
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
e8df81fdb3 add tests for utility string handling 2016-08-04 00:19:48 +01:00
Vincent Sanders
6da3b3102c remove unused warn_user API 2016-05-02 16:09:28 +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
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
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
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
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
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
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
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
Vincent Sanders
e39606c411 make regex wrapper return errors instead of just aborting 2014-10-25 23:07:00 +01:00
Vincent Sanders
ef00272e2f add helpers for time_t reading/writing 2014-05-15 01:18:52 +01:00
Vincent Sanders
07e4924254 make vsnstrjoin correctly check for null arguments. 2014-05-13 17:39:56 +01:00
Vincent Sanders
4784273195 fix typo in nsc_time_strptime 2014-05-13 16:59:30 +01:00
Vincent Sanders
6532346277 add struct tm definition and fix build error 2014-05-13 16:46:48 +01:00
Vincent Sanders
1a3ee6090d add strptime compatability 2014-05-13 16:37:49 +01:00
Vincent Sanders
39b0393d31 cleanup utils header, remove cruft and add documentation 2014-05-11 21:31:14 +01:00
Vincent Sanders
c1e2da80df add string utility to join strings 2014-05-07 16:24:30 +01:00
Michael Drake
cde62790f6 Update for new lpu API. 2013-12-14 23:17:50 +00:00
Michael Drake
c933b0aff9 Sort non zero-padded numerical filename parts correctly. 2013-11-14 21:01:51 +00:00
Michael Drake
2a09b66040 Add own implementations of alphasort and scandir when not available. 2013-11-14 19:01:16 +00:00
Vincent Sanders
52c5cccdeb cleanup tree_create_leaf_node text ownership 2013-05-04 09:49:11 +01:00
John Mark Bell
5b644acf61 Move timeval_subtract to utils/log.c & make it static, as it's not used anywhere else
svn path=/trunk/netsurf/; revision=13059
2011-10-15 13:11:04 +00:00
John Mark Bell
f55474bf78 Make strchrnul stupid.
svn path=/trunk/netsurf/; revision=12174
2011-04-08 07:18:27 +00:00
John Mark Bell
ff60007458 Fix build with NDEBUG defined
svn path=/trunk/netsurf/; revision=12154
2011-04-03 22:23:14 +00:00
Vincent Sanders
aa2865c7a4 add compatability for inet_pton and inet_aton
svn path=/trunk/netsurf/; revision=11627
2011-02-07 14:41:44 +00:00
Vincent Sanders
07c62407e2 Fix windows url bar
Clean up toolbar and urlbar creation and subclassing 

svn path=/trunk/netsurf/; revision=10891
2010-10-17 00:08:35 +00:00
Vincent Sanders
4d6534622e add realpath compatability for windows
svn path=/trunk/netsurf/; revision=10873
2010-10-09 17:11:28 +00:00
Daniel Silverstone
5e887908b3 Consolidate several 'myrealloc' functions into ns_realloc, rename one which *is* different, thereby eliminating the word 'myrealloc' from the NS codebase
svn path=/trunk/netsurf/; revision=10530
2010-04-30 16:06:03 +00:00
Vincent Sanders
bd9c0d9a7e hopefully fix the _GNU_SOURCE mess
svn path=/trunk/netsurf/; revision=10487
2010-04-26 09:27:16 +00:00
Vincent Sanders
03bb3e8636 remove _GNU_SOURCE define from everywhere.
strndup is not standard so provide an implementation.

svn path=/trunk/netsurf/; revision=10474
2010-04-24 15:22:17 +00:00
Vincent Sanders
55162445db Add Windows frontend
svn path=/trunk/netsurf/; revision=9940
2010-01-31 00:36:02 +00:00
John Mark Bell
355799ce0b Merge branches/MarkieB/gtkmain to trunk.
svn path=/trunk/netsurf/; revision=9729
2009-12-17 23:55:02 +00:00
John Mark Bell
ddeadd1c02 Merge LibCSS port to trunk.
svn path=/trunk/netsurf/; revision=8752
2009-07-23 23:05:34 +00:00
John Mark Bell
243c1ba03f Limit scope of manually-defined NDEBUG. Purge a bunch of redundant #undef NDEBUG.
svn path=/trunk/netsurf/; revision=7593
2009-05-28 10:39:53 +00:00
John Mark Bell
25018c455b Make nsgtk compile on Mac OS X.
svn path=/trunk/netsurf/; revision=5031
2008-08-11 16:44:12 +00:00
John Tytgat
4be25b2951 Update my e-mail address.
svn path=/trunk/netsurf/; revision=4908
2008-08-05 01:30:31 +00:00
François Revel
4c6006e6f4 C89
svn path=/trunk/netsurf/; revision=4795
2008-07-29 09:34:43 +00:00
Vincent Sanders
2f864eeecc Update all source code file headers to reflect GPL version 2 only and contain appropriate licence text
svn path=/trunk/netsurf/; revision=3486
2007-08-08 16:16:03 +00:00