summaryrefslogtreecommitdiff
path: root/utils/nsurl
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-09-06 18:28:12 +0100
committerVincent Sanders <vince@kyllikki.org>2017-09-06 18:45:27 +0100
commit75018632a9b953aafeae6f4e8aea607fd1d89dca (patch)
treed661d2fded2ad4b80c4cf019dee2954c052ab090 /utils/nsurl
parent8d9b2efc11529da8cb5870b39ff15249c648b10a (diff)
downloadnetsurf-75018632a9b953aafeae6f4e8aea607fd1d89dca.tar.gz
netsurf-75018632a9b953aafeae6f4e8aea607fd1d89dca.tar.bz2
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done @@ expression E; @@ -LOG(E); +NSLOG(netsurf, INFO, E); @@ expression E, E1; @@ -LOG(E, E1); +NSLOG(netsurf, INFO, E, E1); @@ expression E, E1, E2; @@ -LOG(E, E1, E2); +NSLOG(netsurf, INFO, E, E1, E2); @@ expression E, E1, E2, E3; @@ -LOG(E, E1, E2, E3); +NSLOG(netsurf, INFO, E, E1, E2, E3); @@ expression E, E1, E2, E3, E4; @@ -LOG(E, E1, E2, E3, E4); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4); @@ expression E, E1, E2, E3, E4, E5; @@ -LOG(E, E1, E2, E3, E4, E5); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5); @@ expression E, E1, E2, E3, E4, E5, E6; @@ -LOG(E, E1, E2, E3, E4, E5, E6); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6); @@ expression E, E1, E2, E3, E4, E5, E6, E7; @@ -LOG(E, E1, E2, E3, E4, E5, E6, E7); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
Diffstat (limited to 'utils/nsurl')
-rw-r--r--utils/nsurl/nsurl.c6
-rw-r--r--utils/nsurl/parse.c27
2 files changed, 18 insertions, 15 deletions
diff --git a/utils/nsurl/nsurl.c b/utils/nsurl/nsurl.c
index 7166a2707..3b0af9328 100644
--- a/utils/nsurl/nsurl.c
+++ b/utils/nsurl/nsurl.c
@@ -230,7 +230,8 @@ lwc_string *nsurl_get_component(const nsurl *url, nsurl_component part)
lwc_string_ref(url->components.fragment) : NULL;
default:
- LOG("Unsupported value passed to part param.");
+ NSLOG(netsurf, INFO,
+ "Unsupported value passed to part param.");
assert(0);
}
@@ -296,7 +297,8 @@ bool nsurl_has_component(const nsurl *url, nsurl_component part)
return false;
default:
- LOG("Unsupported value passed to part param.");
+ NSLOG(netsurf, INFO,
+ "Unsupported value passed to part param.");
assert(0);
}
diff --git a/utils/nsurl/parse.c b/utils/nsurl/parse.c
index 7474a612d..ce6f4435d 100644
--- a/utils/nsurl/parse.c
+++ b/utils/nsurl/parse.c
@@ -451,19 +451,19 @@ static void nsurl__get_string_markers(const char * const url_s,
}
#ifdef NSURL_DEBUG
- LOG("marker.start: %i", marker.start);
- LOG("marker.scheme_end: %i", marker.scheme_end);
- LOG("marker.authority: %i", marker.authority);
+ NSLOG(netsurf, INFO, "marker.start: %i", marker.start);
+ NSLOG(netsurf, INFO, "marker.scheme_end: %i", marker.scheme_end);
+ NSLOG(netsurf, INFO, "marker.authority: %i", marker.authority);
- LOG("marker.colon_first: %i", marker.colon_first);
- LOG("marker.at: %i", marker.at);
- LOG("marker.colon_last: %i", marker.colon_last);
+ NSLOG(netsurf, INFO, "marker.colon_first: %i", marker.colon_first);
+ NSLOG(netsurf, INFO, "marker.at: %i", marker.at);
+ NSLOG(netsurf, INFO, "marker.colon_last: %i", marker.colon_last);
- LOG("marker.path: %i", marker.path);
- LOG("marker.query: %i", marker.query);
- LOG("marker.fragment: %i", marker.fragment);
+ NSLOG(netsurf, INFO, "marker.path: %i", marker.path);
+ NSLOG(netsurf, INFO, "marker.query: %i", marker.query);
+ NSLOG(netsurf, INFO, "marker.fragment: %i", marker.fragment);
- LOG("marker.end: %i", marker.end);
+ NSLOG(netsurf, INFO, "marker.end: %i", marker.end);
#endif
/* Got all the URL components pegged out now */
@@ -485,8 +485,8 @@ static size_t nsurl__remove_dot_segments(char *path, char *output)
while (*path_pos != '\0') {
#ifdef NSURL_DEBUG
- LOG(" in:%s", path_pos);
- LOG("out:%.*s", output_pos - output, output);
+ NSLOG(netsurf, INFO, " in:%s", path_pos);
+ NSLOG(netsurf, INFO, "out:%.*s", output_pos - output, output);
#endif
if (*path_pos == '.') {
if (*(path_pos + 1) == '.' &&
@@ -1324,7 +1324,8 @@ nserror nsurl_join(const nsurl *base, const char *rel, nsurl **joined)
assert(rel != NULL);
#ifdef NSURL_DEBUG
- LOG("base: \"%s\", rel: \"%s\"", nsurl_access(base), rel);
+ NSLOG(netsurf, INFO, "base: \"%s\", rel: \"%s\"", nsurl_access(base),
+ rel);
#endif
/* Peg out the URL sections */