add backing store storage path to browser initialisation

This commit is contained in:
Vincent Sanders 2014-03-23 11:33:32 +00:00
parent 05932293f6
commit 64f607760b
11 changed files with 13 additions and 14 deletions

View File

@ -5294,7 +5294,7 @@ int main(int argc, char** argv)
if (ami_locate_resource(messages, "Messages") == false)
die("Cannot open Messages file");
ret = netsurf_init(messages);
ret = netsurf_init(messages, NULL);
if (ret != NSERROR_OK) {
die("NetSurf failed to initialise");
}

View File

@ -1126,7 +1126,7 @@ int main(int argc, char** argv)
/* common initialisation */
LOG(("Initialising core..."));
ret = netsurf_init(messages);
ret = netsurf_init(messages, NULL);
if (ret != NSERROR_OK) {
die("NetSurf failed to initialise");
}

View File

@ -1062,7 +1062,7 @@ int main(int argc, char** argv)
/* common initialisation */
BPath messages = get_messages_path();
ret = netsurf_init(messages.Path());
ret = netsurf_init(messages.Path(), NULL);
if (ret != NSERROR_OK) {
die("NetSurf failed to initialise");
}
@ -1115,7 +1115,7 @@ int gui_init_replicant(int argc, char** argv)
/* common initialisation */
BPath messages = get_messages_path();
ret = netsurf_init(messages.Path());
ret = netsurf_init(messages.Path(), NULL);
if (ret != NSERROR_OK) {
// FIXME: must not die when in replicant!
die("NetSurf failed to initialise");

View File

@ -217,7 +217,7 @@ int main( int argc, char **argv )
nsoption_commandline(&argc, argv, NULL);
/* common initialisation */
error = netsurf_init(messages);
error = netsurf_init(messages, NULL);
if (error != NSERROR_OK) {
die("NetSurf failed to initialise");
}

View File

@ -128,7 +128,7 @@ nserror netsurf_register(struct netsurf_table *table)
}
/* exported interface documented in desktop/netsurf.h */
nserror netsurf_init(const char *messages)
nserror netsurf_init(const char *messages, const char *store_path)
{
nserror ret;
struct utsname utsname;
@ -197,8 +197,7 @@ nserror netsurf_init(const char *messages)
hlcache_parameters.llcache.store.hysteresis = (hlcache_parameters.llcache.store.limit * 20) / 100;;
/* set the path to the backing store */
/** \todo set the backing store path properly */
hlcache_parameters.llcache.store.path = "/tmp/ns";
hlcache_parameters.llcache.store.path = store_path;
/* image handler bitmap cache */
ret = image_cache_init(&image_cache_parameters);

View File

@ -43,7 +43,7 @@ nserror netsurf_register(struct netsurf_table *table);
* @param messages path to translation mesage file.
* @return NSERROR_OK on success or error code on faliure.
*/
nserror netsurf_init(const char *messages);
nserror netsurf_init(const char *messages, const char *store_path);
/**
* Run event loop.

View File

@ -1837,7 +1837,7 @@ main(int argc, char** argv)
/* common initialisation */
messages = filepath_find(respaths, "Messages");
ret = netsurf_init(messages);
ret = netsurf_init(messages, NULL);
free(messages);
if (ret != NSERROR_OK) {
die("NetSurf failed to initialise");

View File

@ -1211,7 +1211,7 @@ int main(int argc, char** argv)
messages = filepath_find(respaths, "Messages");
/* core initialisation */
ret = netsurf_init(messages);
ret = netsurf_init(messages, NULL);
free(messages);
if (ret != NSERROR_OK) {
fprintf(stderr, "NetSurf core failed to initialise (%s)\n",

View File

@ -155,7 +155,7 @@ main(int argc, char **argv)
/* common initialisation */
messages = filepath_find(respaths, "Messages");
ret = netsurf_init(messages);
ret = netsurf_init(messages, NULL);
free(messages);
if (ret != NSERROR_OK) {
die("NetSurf failed to initialise");

View File

@ -2542,7 +2542,7 @@ int main(int argc, char** argv)
}
/* common initialisation */
ret = netsurf_init(path);
ret = netsurf_init(path, NULL);
if (ret != NSERROR_OK) {
die("NetSurf failed to initialise");
}

View File

@ -164,7 +164,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd)
/* common initialisation */
messages = filepath_find(respaths, "messages");
ret = netsurf_init(messages);
ret = netsurf_init(messages, NULL);
free(messages);
if (ret != NSERROR_OK) {
free(options_file_location);