mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 13:06:49 +03:00
[project @ 2006-01-01 18:52:30 by jmb]
Dump user options to stderr on abort. Dump box tree on failed assertion. Display Red/Yellow hourglass whilst dumping box tree (as this can take some time) svn path=/import/netsurf/; revision=1928
This commit is contained in:
parent
e9601cb35a
commit
cf657a2ffb
@ -221,6 +221,36 @@ void options_write(const char *path)
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dump user options to stderr
|
||||
*/
|
||||
void options_dump(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i != option_table_entries; i++) {
|
||||
fprintf(stderr, "%s:", option_table[i].key);
|
||||
switch (option_table[i].type) {
|
||||
case OPTION_BOOL:
|
||||
fprintf(stderr, "%c",
|
||||
*((bool *) option_table[i].p) ?
|
||||
'1' : '0');
|
||||
break;
|
||||
|
||||
case OPTION_INTEGER:
|
||||
fprintf(stderr, "%i",
|
||||
*((int *) option_table[i].p));
|
||||
break;
|
||||
|
||||
case OPTION_STRING:
|
||||
if (*((char **) option_table[i].p))
|
||||
fprintf(stderr, "%s",
|
||||
*((char **) option_table[i].p));
|
||||
break;
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a hotlist as a tree from a specified file.
|
||||
|
@ -48,6 +48,7 @@ extern int option_expire_url;
|
||||
|
||||
void options_read(const char *path);
|
||||
void options_write(const char *path);
|
||||
void options_dump(void);
|
||||
|
||||
struct tree *options_load_tree(const char *filename);
|
||||
bool options_save_tree(struct tree *tree, const char *filename,
|
||||
|
10
riscos/gui.c
10
riscos/gui.c
@ -621,12 +621,20 @@ void gui_quit(void)
|
||||
void ro_gui_signal(int sig)
|
||||
{
|
||||
struct content *c;
|
||||
if (sig == SIGFPE) {
|
||||
if (sig == SIGFPE || sig == SIGABRT) {
|
||||
os_colour old_sand, old_glass;
|
||||
|
||||
xhourglass_on();
|
||||
xhourglass_colours(0x0000ffff, 0x000000ff,
|
||||
&old_sand, &old_glass);
|
||||
for (c = content_list; c; c = c->next)
|
||||
if (c->type == CONTENT_HTML && c->data.html.layout) {
|
||||
LOG(("Dumping: '%s'", c->url));
|
||||
box_dump(c->data.html.layout, 0);
|
||||
}
|
||||
options_dump();
|
||||
xhourglass_colours(old_sand, old_glass, 0, 0);
|
||||
xhourglass_off();
|
||||
}
|
||||
ro_gui_cleanup();
|
||||
raise(sig);
|
||||
|
Loading…
Reference in New Issue
Block a user