Gitweb links:

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

The branch, master has been updated
       via  7d06021e21784ffec6a8925423b3a790ed16c63f (commit)
      from  2c549b28fb508b859702f0c2e1122c6ccd3aa34c (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=7d06021e21784ffec6a8925423b3a790ed16c63f
commit 7d06021e21784ffec6a8925423b3a790ed16c63f
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    nsurl: Make nusrl component dump more usable.
    
    This is only a development aid, and not something that should
    be called in production.

diff --git a/utils/nsurl.h b/utils/nsurl.h
index c6590bd..a80deef 100644
--- a/utils/nsurl.h
+++ b/utils/nsurl.h
@@ -369,4 +369,14 @@ nserror nsurl_nice(const nsurl *url, char **result, bool 
remove_extensions);
  */
 nserror nsurl_parent(const nsurl *url, nsurl **new_url);
 
+/**
+ * Dump a NetSurf URL's internal components to stderr
+ *
+ * This is helper functionality for developers, and shouldn't be called
+ * generally.
+ *
+ * \param url  The NetSurf URL to dump components of
+ */
+void nsurl_dump(const nsurl *url);
+
 #endif
diff --git a/utils/nsurl/nsurl.c b/utils/nsurl/nsurl.c
index 38c0e53..5e90405 100644
--- a/utils/nsurl/nsurl.c
+++ b/utils/nsurl/nsurl.c
@@ -36,6 +36,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <strings.h>
+#include <inttypes.h>
 
 #include "utils/ascii.h"
 #include "utils/corestrings.h"
@@ -955,3 +956,36 @@ nserror nsurl_parent(const nsurl *url, nsurl **new_url)
 
        return NSERROR_OK;
 }
+
+/* exported interface, documented in nsurl.h */
+void nsurl_dump(const nsurl *url)
+{
+       fprintf(stderr, "nsurl components for %p "
+                       "(refs: %i hash: %"PRIx32"):\n",
+                       url, url->count, url->hash);
+
+       if (url->components.scheme)
+               fprintf(stderr, "  Scheme: %s\n",
+                               lwc_string_data(url->components.scheme));
+       if (url->components.username)
+               fprintf(stderr, "Username: %s\n",
+                               lwc_string_data(url->components.username));
+       if (url->components.password)
+               fprintf(stderr, "Password: %s\n",
+                               lwc_string_data(url->components.password));
+       if (url->components.host)
+               fprintf(stderr, "    Host: %s\n",
+                               lwc_string_data(url->components.host));
+       if (url->components.port)
+               fprintf(stderr, "    Port: %s\n",
+                               lwc_string_data(url->components.port));
+       if (url->components.path)
+               fprintf(stderr, "    Path: %s\n",
+                               lwc_string_data(url->components.path));
+       if (url->components.query)
+               fprintf(stderr, "   Query: %s\n",
+                               lwc_string_data(url->components.query));
+       if (url->components.fragment)
+               fprintf(stderr, "Fragment: %s\n",
+                               lwc_string_data(url->components.fragment));
+}
diff --git a/utils/nsurl/private.h b/utils/nsurl/private.h
index 06f143f..08973e5 100644
--- a/utils/nsurl/private.h
+++ b/utils/nsurl/private.h
@@ -174,49 +174,4 @@ static inline void nsurl__components_destroy(struct 
nsurl_components *c)
                lwc_string_unref(c->fragment);
 }
 
-
-
-#ifdef NSURL_DEBUG
-/**
- * Dump a NetSurf URL's internal components
- *
- * \param url  The NetSurf URL to dump components of
- */
-static inline void nsurl__dump(const nsurl *url)
-{
-       if (url->components.scheme)
-               NSLOG(netsurf, DEEPDEBUG, "  Scheme: %s",
-                               lwc_string_data(url->components.scheme));
-
-       if (url->components.username)
-               NSLOG(netsurf, DEEPDEBUG, "Username: %s",
-                               lwc_string_data(url->components.username));
-
-       if (url->components.password)
-               NSLOG(netsurf, DEEPDEBUG, "Password: %s",
-                               lwc_string_data(url->components.password));
-
-       if (url->components.host)
-               NSLOG(netsurf, DEEPDEBUG, "    Host: %s",
-                               lwc_string_data(url->components.host));
-
-       if (url->components.port)
-               NSLOG(netsurf, DEEPDEBUG, "    Port: %s",
-                               lwc_string_data(url->components.port));
-
-       if (url->components.path)
-               NSLOG(netsurf, DEEPDEBUG, "    Path: %s",
-                               lwc_string_data(url->components.path));
-
-       if (url->components.query)
-               NSLOG(netsurf, DEEPDEBUG, "   Query: %s",
-                               lwc_string_data(url->components.query));
-
-       if (url->components.fragment)
-               NSLOG(netsurf, DEEPDEBUG, "Fragment: %s",
-                               lwc_string_data(url->components.fragment));
-}
-#endif
-
-
 #endif


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

Summary of changes:
 utils/nsurl.h         |   10 ++++++++++
 utils/nsurl/nsurl.c   |   34 ++++++++++++++++++++++++++++++++++
 utils/nsurl/private.h |   45 ---------------------------------------------
 3 files changed, 44 insertions(+), 45 deletions(-)

diff --git a/utils/nsurl.h b/utils/nsurl.h
index c6590bd..a80deef 100644
--- a/utils/nsurl.h
+++ b/utils/nsurl.h
@@ -369,4 +369,14 @@ nserror nsurl_nice(const nsurl *url, char **result, bool 
remove_extensions);
  */
 nserror nsurl_parent(const nsurl *url, nsurl **new_url);
 
+/**
+ * Dump a NetSurf URL's internal components to stderr
+ *
+ * This is helper functionality for developers, and shouldn't be called
+ * generally.
+ *
+ * \param url  The NetSurf URL to dump components of
+ */
+void nsurl_dump(const nsurl *url);
+
 #endif
diff --git a/utils/nsurl/nsurl.c b/utils/nsurl/nsurl.c
index 38c0e53..5e90405 100644
--- a/utils/nsurl/nsurl.c
+++ b/utils/nsurl/nsurl.c
@@ -36,6 +36,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <strings.h>
+#include <inttypes.h>
 
 #include "utils/ascii.h"
 #include "utils/corestrings.h"
@@ -955,3 +956,36 @@ nserror nsurl_parent(const nsurl *url, nsurl **new_url)
 
        return NSERROR_OK;
 }
+
+/* exported interface, documented in nsurl.h */
+void nsurl_dump(const nsurl *url)
+{
+       fprintf(stderr, "nsurl components for %p "
+                       "(refs: %i hash: %"PRIx32"):\n",
+                       url, url->count, url->hash);
+
+       if (url->components.scheme)
+               fprintf(stderr, "  Scheme: %s\n",
+                               lwc_string_data(url->components.scheme));
+       if (url->components.username)
+               fprintf(stderr, "Username: %s\n",
+                               lwc_string_data(url->components.username));
+       if (url->components.password)
+               fprintf(stderr, "Password: %s\n",
+                               lwc_string_data(url->components.password));
+       if (url->components.host)
+               fprintf(stderr, "    Host: %s\n",
+                               lwc_string_data(url->components.host));
+       if (url->components.port)
+               fprintf(stderr, "    Port: %s\n",
+                               lwc_string_data(url->components.port));
+       if (url->components.path)
+               fprintf(stderr, "    Path: %s\n",
+                               lwc_string_data(url->components.path));
+       if (url->components.query)
+               fprintf(stderr, "   Query: %s\n",
+                               lwc_string_data(url->components.query));
+       if (url->components.fragment)
+               fprintf(stderr, "Fragment: %s\n",
+                               lwc_string_data(url->components.fragment));
+}
diff --git a/utils/nsurl/private.h b/utils/nsurl/private.h
index 06f143f..08973e5 100644
--- a/utils/nsurl/private.h
+++ b/utils/nsurl/private.h
@@ -174,49 +174,4 @@ static inline void nsurl__components_destroy(struct 
nsurl_components *c)
                lwc_string_unref(c->fragment);
 }
 
-
-
-#ifdef NSURL_DEBUG
-/**
- * Dump a NetSurf URL's internal components
- *
- * \param url  The NetSurf URL to dump components of
- */
-static inline void nsurl__dump(const nsurl *url)
-{
-       if (url->components.scheme)
-               NSLOG(netsurf, DEEPDEBUG, "  Scheme: %s",
-                               lwc_string_data(url->components.scheme));
-
-       if (url->components.username)
-               NSLOG(netsurf, DEEPDEBUG, "Username: %s",
-                               lwc_string_data(url->components.username));
-
-       if (url->components.password)
-               NSLOG(netsurf, DEEPDEBUG, "Password: %s",
-                               lwc_string_data(url->components.password));
-
-       if (url->components.host)
-               NSLOG(netsurf, DEEPDEBUG, "    Host: %s",
-                               lwc_string_data(url->components.host));
-
-       if (url->components.port)
-               NSLOG(netsurf, DEEPDEBUG, "    Port: %s",
-                               lwc_string_data(url->components.port));
-
-       if (url->components.path)
-               NSLOG(netsurf, DEEPDEBUG, "    Path: %s",
-                               lwc_string_data(url->components.path));
-
-       if (url->components.query)
-               NSLOG(netsurf, DEEPDEBUG, "   Query: %s",
-                               lwc_string_data(url->components.query));
-
-       if (url->components.fragment)
-               NSLOG(netsurf, DEEPDEBUG, "Fragment: %s",
-                               lwc_string_data(url->components.fragment));
-}
-#endif
-
-
 #endif


-- 
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