summaryrefslogtreecommitdiff
path: root/frontends/beos/gui.cpp
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-09-06 18:27:19 +0100
committerVincent Sanders <vince@kyllikki.org>2017-09-06 18:45:27 +0100
commit9e81082355a54daf468589f5c4f351d869ec5a21 (patch)
tree24686103c8d9bf25154b92d539f10ae043750560 /frontends/beos/gui.cpp
parent75018632a9b953aafeae6f4e8aea607fd1d89dca (diff)
downloadnetsurf-9e81082355a54daf468589f5c4f351d869ec5a21.tar.gz
netsurf-9e81082355a54daf468589f5c4f351d869ec5a21.tar.bz2
Use coccinelle to change logging macro calls in c++
for F in $(git ls-files '*.cpp');do spatch --c++ --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 'frontends/beos/gui.cpp')
-rw-r--r--frontends/beos/gui.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/frontends/beos/gui.cpp b/frontends/beos/gui.cpp
index d3321b58d..f2c991777 100644
--- a/frontends/beos/gui.cpp
+++ b/frontends/beos/gui.cpp
@@ -112,7 +112,7 @@ static int sEventPipe[2];
/* exported function defined in beos/gui.h */
nserror beos_warn_user(const char *warning, const char *detail)
{
- LOG("warn_user: %s (%s)", warning, detail);
+ NSLOG(netsurf, INFO, "warn_user: %s (%s)", warning, detail);
BAlert *alert;
BString text(warning);
if (detail)
@@ -354,14 +354,15 @@ static void check_homedir(void)
if (err < B_OK) {
/* we really can't continue without a home directory. */
- LOG("Can't find user settings directory - nowhere to store state!");
+ NSLOG(netsurf, INFO,
+ "Can't find user settings directory - nowhere to store state!");
die("NetSurf needs to find the user settings directory in order to run.\n");
}
path.Append("NetSurf");
err = create_directory(path.Path(), 0644);
if (err < B_OK) {
- LOG("Unable to create %s", path.Path());
+ NSLOG(netsurf, INFO, "Unable to create %s", path.Path());
die("NetSurf could not create its settings directory.\n");
}
}
@@ -387,7 +388,7 @@ static nsurl *gui_get_resource_url(const char *path)
path = "favicon.png";
u << path;
- LOG("(%s) -> '%s'\n", path, u.String());
+ NSLOG(netsurf, INFO, "(%s) -> '%s'\n", path, u.String());
nsurl_create(u.String(), &url);
return url;
}
@@ -588,7 +589,7 @@ static void gui_init(int argc, char** argv)
die("Unable to load throbber image.\n");
find_resource(buf, "Choices", "%/Choices");
- LOG("Using '%s' as Preferences file", buf);
+ NSLOG(netsurf, INFO, "Using '%s' as Preferences file", buf);
options_file_location = strdup(buf);
nsoption_read(buf, NULL);
@@ -631,12 +632,12 @@ static void gui_init(int argc, char** argv)
if (nsoption_charp(cookie_file) == NULL) {
find_resource(buf, "Cookies", "%/Cookies");
- LOG("Using '%s' as Cookies file", buf);
+ NSLOG(netsurf, INFO, "Using '%s' as Cookies file", buf);
nsoption_set_charp(cookie_file, strdup(buf));
}
if (nsoption_charp(cookie_jar) == NULL) {
find_resource(buf, "Cookies", "%/Cookies");
- LOG("Using '%s' as Cookie Jar file", buf);
+ NSLOG(netsurf, INFO, "Using '%s' as Cookie Jar file", buf);
nsoption_set_charp(cookie_jar, strdup(buf));
}
if ((nsoption_charp(cookie_file) == NULL) ||
@@ -645,13 +646,13 @@ static void gui_init(int argc, char** argv)
if (nsoption_charp(url_file) == NULL) {
find_resource(buf, "URLs", "%/URLs");
- LOG("Using '%s' as URL file", buf);
+ NSLOG(netsurf, INFO, "Using '%s' as URL file", buf);
nsoption_set_charp(url_file, strdup(buf));
}
if (nsoption_charp(ca_path) == NULL) {
find_resource(buf, "certs", "/etc/ssl/certs");
- LOG("Using '%s' as certificate path", buf);
+ NSLOG(netsurf, INFO, "Using '%s' as certificate path", buf);
nsoption_set_charp(ca_path, strdup(buf));
}
@@ -1038,7 +1039,7 @@ int main(int argc, char** argv)
char path[12];
sprintf(path,"%.2s/Messages", getenv("LC_MESSAGES"));
- LOG("Loading messages from resource %s\n", path);
+ NSLOG(netsurf, INFO, "Loading messages from resource %s\n", path);
const uint8_t* res = (const uint8_t*)resources.LoadResource('data', path, &size);
if (size > 0 && res != NULL) {