Commit Graph

11702 Commits

Author SHA1 Message Date
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
20d29c0537 fixup logging macros that incorrectly override the LOG() macro name 2015-05-28 17:33:18 +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
30c2962faa Fixup javascript logging to cope with new varadic LOG macro 2015-05-28 16:33:30 +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
20f2c86a51 Clean up atari source linendings, whitespace damage and executable status 2015-05-28 09:11:32 +01:00
Vincent Sanders
a098626ff1 Fix warnings about using integer absolute operations on floating point values 2015-05-21 13:04:29 +01:00
Vincent Sanders
a29e9589f6 Change how GDK image resources are compiled in.
The compiled in image resources were being created as a structure in a
generated c source file. The generation of this file caused constness
warning as a guint8 * was initialised from a const char array.

This changes the generation and use of these compiled in resources to
use the raw inline form as suggested by the documentation removing the
const warning.
2015-05-20 16:43:48 +01:00
Michael Drake
8f1c9673d7 Fix format string type missmatches on 32-bit systems.
Use C99 inttypes header for format string macros.
2015-05-12 10:19:38 +01:00
Michael Drake
82237d7070 Avoid generating confusing warning.
Now the disc cache will be disabled silently if its too slow.
2015-05-12 10:01:06 +01:00
Vincent Sanders
d038af3178 Fix the PNG handler crashing in low memory situations.
Obtaining a netsurf bitmap buffer may fail on some frontends (RISC OS
especially) as the bitmap allocation is not performed until the
buffer is requested. The PNG image handler failed to check for this
when populating the row pointer structure.
2015-05-12 08:32:32 +01:00
Vincent Sanders
37aad9c749 Improve the logge dinformation about written cache data 2015-05-08 15:42:49 +01:00
Vincent Sanders
2c51dabfeb put assert back to protect against bad logic in frontend drag implementations 2015-05-08 15:30:41 +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
35751f3faa Move the setting of block file extents to background maintinance.
On some OS the ftruncate operation can take some time so move it to
occour in the background maintinance operations instead of when data
blocks are initialy opened. This should improve browsing responsiveness.
2015-05-04 09:54:03 +01:00
Vincent Sanders
31f8c363be remove assert if drag message contains an unknown type.
Instead of asserting if a message contains an unsupported drag type
the message is now logged and ignored.
2015-05-03 17:49:19 +01:00
Vincent Sanders
a375e58bb8 Silence incorrect warning from gcc 4.9
This makes the box_move_xy function return a value on all code
paths. This was not really necessary as there is an assert in the path
that could have returned without a value. The gcc optimiser seems
unable to reason about this in this case causing a warning.
2015-05-03 17:40:27 +01:00
Vincent Sanders
7e6b86eb1a make global history treeview directory creation return error instead of aborting 2015-05-03 17:40:27 +01:00
Michael Drake
3020dd698d Remove legacy #undef 2015-05-03 16:50:38 +01:00
Vincent Sanders
a14b689b7a Use standard macros for monkey frontend mandantory pkg-config based libraries 2015-05-03 14:56:42 +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
f6dde27dd2 On OpenBSD framebuffer resource building should link the correct library 2015-05-03 14:10:34 +01:00
Vincent Sanders
3c129b3221 Improve handling of compiler flags for resource tools with framebuffer 2015-05-03 14:06:11 +01:00
Vincent Sanders
2aef095f27 Ensure bandwidth minimum check is only performed when enough data has
been written.
2015-04-30 14:28:18 +01:00
Vincent Sanders
05538c0264 Ensure small block cache files allocate their entire extent at open.
It seems many filesystems are greatly more efficient if the block file
is allocated its entire extent once rather than trying to
continuously grown the file later.

The size of the block files is known at their creation time so this
change ensures they are grown to the full possible extent hence removing
future inefficient writes.
2015-04-30 13:49:25 +01:00
Vincent Sanders
c6a6c8e7fa Remove unecessary dll from windows installer script 2015-04-29 00:29:43 +01:00
Vincent Sanders
55f8a41cfe Updated mingw32 toolchain names the regex library something different 2015-04-28 16:23:35 +01:00
Chris Young
7bc29f7782 Attempt to fix spurious plotter crashes 2015-04-27 18:32:49 +01:00
Chris Young
ad779dc38a Revert "Attempt to avoid a crash in ami_plot()"
This reverts commit e64d48980e.
2015-04-27 18:26:58 +01:00
Vincent Sanders
3cabd331ee Ensure result of ftell is checked for errors
The ftell call in the html renderer handling of drag and drop was not
checking its return value for errors which could have resulted in
attempting to read -1 bytes.

coverity 1251038
2015-04-26 00:32:42 +01:00
Chris Young
e64d48980e Attempt to avoid a crash in ami_plot() 2015-04-25 23:04:56 +01:00
Chris Young
b879bed114 Remove bogus comment 2015-04-25 13:20:59 +01:00
Chris Young
c8caf08ef1 As the content interface is now doing the scaling, we render to a native BitMap and then copy that to the RGBA32 bitmap buffer without re-scaling.
The native BitMap is currently discarded and will be re-created when it is displayed.
2015-04-25 13:13:30 +01:00
Chris Young
5b5e621c7a Keep the size of the bitmap and layers used for rendering in the structure itself, rather than assuming it is the same as the tile size. 2015-04-25 12:02:08 +01:00
Vincent Sanders
9729febf72 Merge branch 'thumbnail-rework' 2015-04-24 23:52:10 +01:00
Vincent Sanders
75d3fdc42e Convert RISC OS to use bitmap render operation 2015-04-24 23:49:49 +01:00
Vincent Sanders
596a62e20e Convert cocoa to use bitmap render API 2015-04-24 15:46:40 +01:00
Vincent Sanders
2df03e2d85 Convert windows to use the bitmap render interface 2015-04-24 15:29:10 +01:00
Vincent Sanders
217aa3adc1 Convert beos to bitmap render API 2015-04-24 13:52:39 +01:00
Vincent Sanders
818b8276df Convert atari to bitmap render interface 2015-04-24 13:28:20 +01:00
Vincent Sanders
124de5775a Update amiga to use bitmap render API 2015-04-24 11:56:19 +01:00
Vincent Sanders
4e7dcde2b0 Update monkey to use bitmap render API 2015-04-24 10:54:32 +01:00
Vincent Sanders
1a22eb2b65 Convert framebuffer to use bitmap render from thumbnail API 2015-04-23 22:50:16 +01:00
Vincent Sanders
7e2f1094ce Remove unused thumbnail sources from core and gtk 2015-04-23 22:50:16 +01:00
Vincent Sanders
ee78742363 change browser history to use bitmap render interface for thumbnails 2015-04-23 22:50:16 +01:00
Vincent Sanders
8ccbc960d3 Change gtk bitmap render to use scaled content redraw. 2015-04-23 22:50:10 +01:00
Michael Drake
921f15bb7d Highlight the mark element. 2015-04-23 16:47:57 +01:00
Michael Drake
98171fae62 Style HTML5's new block level elements as blocks. 2015-04-23 16:06:31 +01:00