Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/f89f7192efc43daa64c1fb591d0cfcc098b82c82
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/f89f7192efc43daa64c1fb591d0cfcc098b82c82
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/f89f7192efc43daa64c1fb591d0cfcc098b82c82

The branch, vince/nslog has been updated
       via  f89f7192efc43daa64c1fb591d0cfcc098b82c82 (commit)
       via  3f3e7de6d94d66d515d43d4e921092f340788e4f (commit)
      from  3a633acc3f3eb4d1199e9a7193ff293a25947031 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=f89f7192efc43daa64c1fb591d0cfcc098b82c82
commit f89f7192efc43daa64c1fb591d0cfcc098b82c82
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    fix size+t formatting in logging

diff --git a/frontends/gtk/layout_pango.c b/frontends/gtk/layout_pango.c
index 9e17c3b..a5964eb 100644
--- a/frontends/gtk/layout_pango.c
+++ b/frontends/gtk/layout_pango.c
@@ -30,6 +30,7 @@
 
 #include "utils/log.h"
 #include "utils/nsoption.h"
+#include "netsurf/inttypes.h"
 #include "netsurf/layout.h"
 #include "netsurf/plot_style.h"
 
@@ -85,8 +86,8 @@ nsfont_width(const plot_font_style_t *fstyle,
        pango_layout_get_pixel_size(nsfont_pango_layout, width, 0);
 
        NSLOG(netsurf, DEEPDEBUG,
-             "fstyle: %p string:\"%.*s\", length: %u, width: %dpx",
-             fstyle, length, string, length, *width);
+             "fstyle: %p string:\"%.*s\", length: %" PRIsizet ", width: %dpx",
+             fstyle, (int)length, string, length, *width);
         
 
        return NSERROR_OK;
diff --git a/render/layout.c b/render/layout.c
index ba1d8e1..8c3374b 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -47,6 +47,7 @@
 #include "utils/talloc.h"
 #include "utils/utils.h"
 #include "utils/nsoption.h"
+#include "netsurf/inttypes.h"
 #include "netsurf/content.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/layout.h"
@@ -2442,7 +2443,7 @@ static bool layout_block_object(struct box *block)
                        block->type == BOX_TABLE_CELL);
        assert(block->object);
 
-       NSLOG(layout, DEBUG,  "block %p, object %s, width %i", block,
+       NSLOG(layout, DEBUG,  "block %p, object %p, width %i", block,
              hlcache_handle_get_url(block->object), block->width);
 
        if (content_get_type(block->object) == CONTENT_HTML) {
@@ -3888,12 +3889,17 @@ layout_text_box_split(html_content *content,
                c2->parent->last = c2;
 
        NSLOG(layout, DEBUG,
-             "split_box %p len: %u \"%.*s\"",
-             split_box, split_box->length, split_box->length,
+             "split_box %p len: %" PRIsizet " \"%.*s\"",
+             split_box,
+             split_box->length,
+             (int)split_box->length,
              split_box->text);
        NSLOG(layout, DEBUG,
-             "  new_box %p len: %u \"%.*s\"", c2,
-             c2->length, c2->length, c2->text);
+             "  new_box %p len: %" PRIsizet " \"%.*s\"",
+             c2,
+             c2->length,
+             (int)c2->length,
+             c2->text);
 
        return true;
 }


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=3f3e7de6d94d66d515d43d4e921092f340788e4f
commit 3f3e7de6d94d66d515d43d4e921092f340788e4f
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    do not attempt to log when output is not enabled

diff --git a/utils/log.c b/utils/log.c
index 3dbb5c6..5ebe51f 100644
--- a/utils/log.c
+++ b/utils/log.c
@@ -105,20 +105,21 @@ netsurf_render_log(void *_ctx,
                   const char *fmt,
                   va_list args)
 {
+       if (verbose_log) {
+               fprintf(logfile,
+                       "%s %.*s:%i %.*s: ",
+                       nslog_gettime(),
+                       ctx->filenamelen,
+                       ctx->filename,
+                       ctx->lineno,
+                       ctx->funcnamelen,
+                       ctx->funcname);
 
-       fprintf(logfile,
-               "%s %.*s:%i %.*s: ",
-               nslog_gettime(),
-               ctx->filenamelen,
-               ctx->filename,
-               ctx->lineno,
-               ctx->funcnamelen,
-               ctx->funcname);
-
-       vfprintf(logfile, fmt, args);
+               vfprintf(logfile, fmt, args);
 
-       /* Log entries aren't newline terminated add one for clarity */
-       fputc('\n', logfile);
+               /* Log entries aren't newline terminated add one for clarity */
+               fputc('\n', logfile);
+       }
 }
 
 #else


-----------------------------------------------------------------------

Summary of changes:
 frontends/gtk/layout_pango.c |    5 +++--
 render/layout.c              |   16 +++++++++++-----
 utils/log.c                  |   25 +++++++++++++------------
 3 files changed, 27 insertions(+), 19 deletions(-)

diff --git a/frontends/gtk/layout_pango.c b/frontends/gtk/layout_pango.c
index 9e17c3b..a5964eb 100644
--- a/frontends/gtk/layout_pango.c
+++ b/frontends/gtk/layout_pango.c
@@ -30,6 +30,7 @@
 
 #include "utils/log.h"
 #include "utils/nsoption.h"
+#include "netsurf/inttypes.h"
 #include "netsurf/layout.h"
 #include "netsurf/plot_style.h"
 
@@ -85,8 +86,8 @@ nsfont_width(const plot_font_style_t *fstyle,
        pango_layout_get_pixel_size(nsfont_pango_layout, width, 0);
 
        NSLOG(netsurf, DEEPDEBUG,
-             "fstyle: %p string:\"%.*s\", length: %u, width: %dpx",
-             fstyle, length, string, length, *width);
+             "fstyle: %p string:\"%.*s\", length: %" PRIsizet ", width: %dpx",
+             fstyle, (int)length, string, length, *width);
         
 
        return NSERROR_OK;
diff --git a/render/layout.c b/render/layout.c
index ba1d8e1..8c3374b 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -47,6 +47,7 @@
 #include "utils/talloc.h"
 #include "utils/utils.h"
 #include "utils/nsoption.h"
+#include "netsurf/inttypes.h"
 #include "netsurf/content.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/layout.h"
@@ -2442,7 +2443,7 @@ static bool layout_block_object(struct box *block)
                        block->type == BOX_TABLE_CELL);
        assert(block->object);
 
-       NSLOG(layout, DEBUG,  "block %p, object %s, width %i", block,
+       NSLOG(layout, DEBUG,  "block %p, object %p, width %i", block,
              hlcache_handle_get_url(block->object), block->width);
 
        if (content_get_type(block->object) == CONTENT_HTML) {
@@ -3888,12 +3889,17 @@ layout_text_box_split(html_content *content,
                c2->parent->last = c2;
 
        NSLOG(layout, DEBUG,
-             "split_box %p len: %u \"%.*s\"",
-             split_box, split_box->length, split_box->length,
+             "split_box %p len: %" PRIsizet " \"%.*s\"",
+             split_box,
+             split_box->length,
+             (int)split_box->length,
              split_box->text);
        NSLOG(layout, DEBUG,
-             "  new_box %p len: %u \"%.*s\"", c2,
-             c2->length, c2->length, c2->text);
+             "  new_box %p len: %" PRIsizet " \"%.*s\"",
+             c2,
+             c2->length,
+             (int)c2->length,
+             c2->text);
 
        return true;
 }
diff --git a/utils/log.c b/utils/log.c
index 3dbb5c6..5ebe51f 100644
--- a/utils/log.c
+++ b/utils/log.c
@@ -105,20 +105,21 @@ netsurf_render_log(void *_ctx,
                   const char *fmt,
                   va_list args)
 {
+       if (verbose_log) {
+               fprintf(logfile,
+                       "%s %.*s:%i %.*s: ",
+                       nslog_gettime(),
+                       ctx->filenamelen,
+                       ctx->filename,
+                       ctx->lineno,
+                       ctx->funcnamelen,
+                       ctx->funcname);
 
-       fprintf(logfile,
-               "%s %.*s:%i %.*s: ",
-               nslog_gettime(),
-               ctx->filenamelen,
-               ctx->filename,
-               ctx->lineno,
-               ctx->funcnamelen,
-               ctx->funcname);
-
-       vfprintf(logfile, fmt, args);
+               vfprintf(logfile, fmt, args);
 
-       /* Log entries aren't newline terminated add one for clarity */
-       fputc('\n', logfile);
+               /* Log entries aren't newline terminated add one for clarity */
+               fputc('\n', logfile);
+       }
 }
 
 #else


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to