summaryrefslogtreecommitdiff
path: root/frontends/riscos/filetype.c
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/riscos/filetype.c')
-rw-r--r--frontends/riscos/filetype.c37
1 files changed, 24 insertions, 13 deletions
diff --git a/frontends/riscos/filetype.c b/frontends/riscos/filetype.c
index 75ff41414..73651cd63 100644
--- a/frontends/riscos/filetype.c
+++ b/frontends/riscos/filetype.c
@@ -72,7 +72,7 @@ const char *fetch_filetype(const char *unix_path)
int objtype;
if (!path) {
- LOG("Insufficient memory for calloc");
+ NSLOG(netsurf, INFO, "Insufficient memory for calloc");
ro_warn_user("NoMemory", 0);
return "application/riscos";
}
@@ -80,7 +80,7 @@ const char *fetch_filetype(const char *unix_path)
/* convert path to RISC OS format and read file type */
r = __riscosify(unix_path, 0, __RISCOSIFY_NO_SUFFIX, path, len, 0);
if (r == 0) {
- LOG("__riscosify failed");
+ NSLOG(netsurf, INFO, "__riscosify failed");
free(path);
return "application/riscos";
}
@@ -88,7 +88,9 @@ const char *fetch_filetype(const char *unix_path)
error = xosfile_read_stamped_no_path(path, &objtype, 0, 0, 0, 0,
&file_type);
if (error) {
- LOG("xosfile_read_stamped_no_path failed: %s", error->errmess);
+ NSLOG(netsurf, INFO,
+ "xosfile_read_stamped_no_path failed: %s",
+ error->errmess);
free(path);
return "application/riscos";
}
@@ -108,7 +110,10 @@ const char *fetch_filetype(const char *unix_path)
slash+1, &temp);
if (error)
/* ignore error and leave file_type alone */
- LOG("xmimemaptranslate_extension_to_filetype: ""0x%x %s", error->errnum, error->errmess);
+ NSLOG(netsurf, INFO,
+ "xmimemaptranslate_extension_to_filetype: ""0x%x %s",
+ error->errnum,
+ error->errmess);
else
file_type = temp;
}
@@ -126,7 +131,7 @@ const char *fetch_filetype(const char *unix_path)
/* not in internal table, so ask MimeMap */
error = xmimemaptranslate_filetype_to_mime_type(file_type, type_buf);
if (error) {
- LOG("0x%x %s", error->errnum, error->errmess);
+ NSLOG(netsurf, INFO, "0x%x %s", error->errnum, error->errmess);
free(path);
return "application/riscos";
}
@@ -139,7 +144,7 @@ const char *fetch_filetype(const char *unix_path)
free(path);
- LOG("mime type '%s'", type_buf);
+ NSLOG(netsurf, INFO, "mime type '%s'", type_buf);
return (const char *)type_buf;
}
@@ -155,14 +160,15 @@ char *fetch_mimetype(const char *ro_path)
struct type_entry *t;
if (!mime) {
- LOG("Insufficient memory for calloc");
+ NSLOG(netsurf, INFO, "Insufficient memory for calloc");
ro_warn_user("NoMemory", 0);
return 0;
}
e = xosfile_read_no_path(ro_path, &objtype, &load, 0, 0, 0);
if (e) {
- LOG("xosfile_read_no_path: 0x%x: %s", e->errnum, e->errmess);
+ NSLOG(netsurf, INFO, "xosfile_read_no_path: 0x%x: %s",
+ e->errnum, e->errmess);
free(mime);
return 0;
}
@@ -188,7 +194,7 @@ char *fetch_mimetype(const char *ro_path)
if (e)
/* if we get an error here, simply ignore it and
* leave filetype unchanged */
- LOG("0x%x %s", e->errnum, e->errmess);
+ NSLOG(netsurf, INFO, "0x%x %s", e->errnum, e->errmess);
else
filetype = load;
}
@@ -205,7 +211,10 @@ char *fetch_mimetype(const char *ro_path)
/* not in internal table, so ask MimeMap */
e = xmimemaptranslate_filetype_to_mime_type(filetype, mime);
if (e) {
- LOG("xmimemaptranslate_filetype_to_mime_type: 0x%x: %s", e->errnum, e->errmess);
+ NSLOG(netsurf, INFO,
+ "xmimemaptranslate_filetype_to_mime_type: 0x%x: %s",
+ e->errnum,
+ e->errmess);
free(mime);
return 0;
}
@@ -322,7 +331,7 @@ bits ro_filetype_from_unix_path(const char *unix_path)
bits file_type;
if (!path) {
- LOG("Insufficient memory for calloc");
+ NSLOG(netsurf, INFO, "Insufficient memory for calloc");
ro_warn_user("NoMemory", 0);
return osfile_TYPE_DATA;
}
@@ -330,7 +339,7 @@ bits ro_filetype_from_unix_path(const char *unix_path)
/* convert path to RISC OS format and read file type */
r = __riscosify(unix_path, 0, __RISCOSIFY_NO_SUFFIX, path, len, 0);
if (r == 0) {
- LOG("__riscosify failed");
+ NSLOG(netsurf, INFO, "__riscosify failed");
free(path);
return osfile_TYPE_DATA;
}
@@ -338,7 +347,9 @@ bits ro_filetype_from_unix_path(const char *unix_path)
error = xosfile_read_stamped_no_path(path, 0, 0, 0, 0, 0,
&file_type);
if (error) {
- LOG("xosfile_read_stamped_no_path failed: %s", error->errmess);
+ NSLOG(netsurf, INFO,
+ "xosfile_read_stamped_no_path failed: %s",
+ error->errmess);
free(path);
return osfile_TYPE_DATA;
}