summaryrefslogtreecommitdiff
path: root/src/rufl_init.c
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2022-06-02 23:33:20 +0100
committerJohn-Mark Bell <jmb@netsurf-browser.org>2022-06-02 23:33:20 +0100
commit294770f746d4bf95d04d8dce39ed05a03b2b0b29 (patch)
tree243991faf3b56d71c5631680deeb710d5d4a8120 /src/rufl_init.c
parenta25da61adc32f94cd304d6465cb1423723b31564 (diff)
downloadlibrufl-294770f746d4bf95d04d8dce39ed05a03b2b0b29.tar.gz
librufl-294770f746d4bf95d04d8dce39ed05a03b2b0b29.tar.bz2
Modernize logging
Ensure that only one copy of the storage for the log state is needed (previously, it injected these into every compilation unit, which now results in compiler warnings). Replace __PRETTY_FUNCTION__ with the standardised __func__. The output is the same in either case in our usage here (and testing all the way back to GCC 3.4.6 yields no difference in output). This also fixes compilation with GCC 10 (which warns about the use of __PRETTY_FUNCTION__ in -pedantic mode).
Diffstat (limited to 'src/rufl_init.c')
-rw-r--r--src/rufl_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rufl_init.c b/src/rufl_init.c
index 6c06a8f..a4fe618 100644
--- a/src/rufl_init.c
+++ b/src/rufl_init.c
@@ -45,6 +45,10 @@ bool rufl_old_font_manager = false;
static bool rufl_broken_font_enumerate_characters = false;
wimp_w rufl_status_w = 0;
char rufl_status_buffer[80];
+#if 1 /* ndef NDEBUG */
+bool rufl_log_got_start_time;
+time_t rufl_log_start_time;
+#endif
/** An entry in rufl_weight_table. */
struct rufl_weight_table_entry {