fix silly errors in atari and amiga file operation table change

This commit is contained in:
Vincent Sanders 2014-05-07 16:38:58 +01:00
parent c56642819e
commit 6349704b5e
3 changed files with 17 additions and 5 deletions

View File

@ -238,7 +238,7 @@ static void gui_window_place_caret(struct gui_window *g, int x, int y, int heigh
* @return NSERROR_OK and the complete path is written to str
* or error code on faliure.
*/
static nserror amiga_mkpath(char **str, size_t *size, size_t nelm, va_list ap)
static nserror amiga_vmkpath(char **str, size_t *size, size_t nelm, va_list ap)
{
const char *elm[16];
size_t elm_len[16];
@ -300,6 +300,18 @@ static nserror amiga_mkpath(char **str, size_t *size, size_t nelm, va_list ap)
return NSERROR_OK;
}
static nserror amiga_mkpath(char **str, size_t *size, size_t nelm, ...)
{
va_list ap;
nserror ret;
va_start(ap, nelm);
ret = amiga_vmkpath(str, size, nelm, ap);
va_end(ap);
return ret;
}
/**
* Get the basename of a file using posix path handling.
*
@ -5195,7 +5207,7 @@ static struct gui_window_table amiga_window_table = {
/* amiga file handling operations */
static struct gui_file_table amiga_file_table = {
.mkpath = amiga_mkpath,
.mkpath = amiga_vmkpath,
.basename = amiga_basename,
};

View File

@ -231,7 +231,7 @@ hlcache_handle *load_icon(const char *name, hlcache_handle_callback cb,
err = netsurf_mkpath(&native_path, NULL, 2, icons_dir, name);
if (err != NSERROR_OK) {
warn_user(messages_get_errorcode(err));
warn_user(messages_get_errorcode(err), 0);
return NULL;
}

View File

@ -43,7 +43,7 @@
* @return NSERROR_OK and the complete path is written to str
* or error code on faliure.
*/
static nserror posix_mkpath(char **str, size_t *size, size_t nelm, va_list ap)
static nserror posix_vmkpath(char **str, size_t *size, size_t nelm, va_list ap)
{
return vsnstrjoin(str, size, '/', nelm, ap);
}
@ -110,7 +110,7 @@ nserror netsurf_mkpath(char **str, size_t *size, size_t nelm, ...)
/* default to using the posix file handling */
static struct gui_file_table file_table = {
.mkpath = posix_mkpath,
.mkpath = posix_vmkpath,
.basename = posix_basename,
};