netsurf: branch master updated. release/3.5-189-g0758af6
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/0758af6631674d2ca88ca...
...commit http://git.netsurf-browser.org/netsurf.git/commit/0758af6631674d2ca88ca12...
...tree http://git.netsurf-browser.org/netsurf.git/tree/0758af6631674d2ca88ca127c...
The branch, master has been updated
via 0758af6631674d2ca88ca127c4b42842821ab7d0 (commit)
from 85d76a0e045b9e98c16e4398995af62cec1f3d0b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=0758af6631674d2ca88...
commit 0758af6631674d2ca88ca127c4b42842821ab7d0
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
remove unecessary core window header usage
diff --git a/frontends/atari/certview.c b/frontends/atari/certview.c
index 66122a6..6950d31 100644
--- a/frontends/atari/certview.c
+++ b/frontends/atari/certview.c
@@ -28,7 +28,6 @@
#include "utils/messages.h"
#include "utils/utils.h"
#include "desktop/sslcert_viewer.h"
-#include "desktop/core_window.h"
#include "atari/gui.h"
#include "atari/misc.h"
diff --git a/frontends/atari/cookies.c b/frontends/atari/cookies.c
index 78b8d60..b7f7309 100644
--- a/frontends/atari/cookies.c
+++ b/frontends/atari/cookies.c
@@ -23,7 +23,6 @@
#include "netsurf/mouse.h"
#include "netsurf/plotters.h"
#include "desktop/cookie_manager.h"
-#include "desktop/core_window.h"
#include "atari/treeview.h"
#include "atari/cookies.h"
diff --git a/frontends/atari/history.c b/frontends/atari/history.c
index d8b582e..56aafd0 100644
--- a/frontends/atari/history.c
+++ b/frontends/atari/history.c
@@ -23,7 +23,6 @@
#include "utils/messages.h"
#include "netsurf/mouse.h"
#include "desktop/global_history.h"
-#include "desktop/core_window.h"
#include "atari/treeview.h"
#include "atari/history.h"
diff --git a/frontends/atari/hotlist.c b/frontends/atari/hotlist.c
index afe3d60..577344f 100644
--- a/frontends/atari/hotlist.c
+++ b/frontends/atari/hotlist.c
@@ -31,7 +31,6 @@
#include "content/content.h"
#include "desktop/hotlist.h"
#include "desktop/tree.h"
-#include "desktop/core_window.h"
#include "desktop/textinput.h"
#include "atari/gui.h"
diff --git a/frontends/atari/treeview.c b/frontends/atari/treeview.c
index 231b893..4298fca 100644
--- a/frontends/atari/treeview.c
+++ b/frontends/atari/treeview.c
@@ -30,6 +30,7 @@
#include "netsurf/plotters.h"
#include "netsurf/mouse.h"
#include "desktop/treeview.h"
+#include "desktop/core_window.h"
#include "atari/gui.h"
#include "atari/plot/plot.h"
diff --git a/frontends/atari/treeview.h b/frontends/atari/treeview.h
index a6b4a62..d10129e 100644
--- a/frontends/atari/treeview.h
+++ b/frontends/atari/treeview.h
@@ -19,10 +19,11 @@
#ifndef NSATARI_TREEVIEW_H
#define NSATARI_TREEVIEW_H
-#include "desktop/core_window.h"
#include "atari/gui.h"
#include "atari/gemtk/gemtk.h"
+struct core_window_callback_table;
+
/**
* Default AES Window widgets for a treeview window, can be passed to
* atari_treeview_create as the flags parameter to have an standardized treeview
-----------------------------------------------------------------------
Summary of changes:
frontends/atari/certview.c | 1 -
frontends/atari/cookies.c | 1 -
frontends/atari/history.c | 1 -
frontends/atari/hotlist.c | 1 -
frontends/atari/treeview.c | 1 +
frontends/atari/treeview.h | 3 ++-
6 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/frontends/atari/certview.c b/frontends/atari/certview.c
index 66122a6..6950d31 100644
--- a/frontends/atari/certview.c
+++ b/frontends/atari/certview.c
@@ -28,7 +28,6 @@
#include "utils/messages.h"
#include "utils/utils.h"
#include "desktop/sslcert_viewer.h"
-#include "desktop/core_window.h"
#include "atari/gui.h"
#include "atari/misc.h"
diff --git a/frontends/atari/cookies.c b/frontends/atari/cookies.c
index 78b8d60..b7f7309 100644
--- a/frontends/atari/cookies.c
+++ b/frontends/atari/cookies.c
@@ -23,7 +23,6 @@
#include "netsurf/mouse.h"
#include "netsurf/plotters.h"
#include "desktop/cookie_manager.h"
-#include "desktop/core_window.h"
#include "atari/treeview.h"
#include "atari/cookies.h"
diff --git a/frontends/atari/history.c b/frontends/atari/history.c
index d8b582e..56aafd0 100644
--- a/frontends/atari/history.c
+++ b/frontends/atari/history.c
@@ -23,7 +23,6 @@
#include "utils/messages.h"
#include "netsurf/mouse.h"
#include "desktop/global_history.h"
-#include "desktop/core_window.h"
#include "atari/treeview.h"
#include "atari/history.h"
diff --git a/frontends/atari/hotlist.c b/frontends/atari/hotlist.c
index afe3d60..577344f 100644
--- a/frontends/atari/hotlist.c
+++ b/frontends/atari/hotlist.c
@@ -31,7 +31,6 @@
#include "content/content.h"
#include "desktop/hotlist.h"
#include "desktop/tree.h"
-#include "desktop/core_window.h"
#include "desktop/textinput.h"
#include "atari/gui.h"
diff --git a/frontends/atari/treeview.c b/frontends/atari/treeview.c
index 231b893..4298fca 100644
--- a/frontends/atari/treeview.c
+++ b/frontends/atari/treeview.c
@@ -30,6 +30,7 @@
#include "netsurf/plotters.h"
#include "netsurf/mouse.h"
#include "desktop/treeview.h"
+#include "desktop/core_window.h"
#include "atari/gui.h"
#include "atari/plot/plot.h"
diff --git a/frontends/atari/treeview.h b/frontends/atari/treeview.h
index a6b4a62..d10129e 100644
--- a/frontends/atari/treeview.h
+++ b/frontends/atari/treeview.h
@@ -19,10 +19,11 @@
#ifndef NSATARI_TREEVIEW_H
#define NSATARI_TREEVIEW_H
-#include "desktop/core_window.h"
#include "atari/gui.h"
#include "atari/gemtk/gemtk.h"
+struct core_window_callback_table;
+
/**
* Default AES Window widgets for a treeview window, can be passed to
* atari_treeview_create as the flags parameter to have an standardized treeview
--
NetSurf Browser
7 years, 2 months
netsurf: branch master updated. release/3.5-188-g85d76a0
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/85d76a0e045b9e98c16e4...
...commit http://git.netsurf-browser.org/netsurf.git/commit/85d76a0e045b9e98c16e439...
...tree http://git.netsurf-browser.org/netsurf.git/tree/85d76a0e045b9e98c16e43989...
The branch, master has been updated
via 85d76a0e045b9e98c16e4398995af62cec1f3d0b (commit)
from 0ae788752cdeb259eaadb756a18e9065da1c6d22 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=85d76a0e045b9e98c16...
commit 85d76a0e045b9e98c16e4398995af62cec1f3d0b
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
fix missing includes caused by header cleanups
diff --git a/frontends/atari/hotlist.c b/frontends/atari/hotlist.c
index 93145cf..afe3d60 100644
--- a/frontends/atari/hotlist.c
+++ b/frontends/atari/hotlist.c
@@ -32,6 +32,7 @@
#include "desktop/hotlist.h"
#include "desktop/tree.h"
#include "desktop/core_window.h"
+#include "desktop/textinput.h"
#include "atari/gui.h"
#include "atari/misc.h"
diff --git a/frontends/cocoa/BookmarksController.m b/frontends/cocoa/BookmarksController.m
index 2d574f3..f04a084 100644
--- a/frontends/cocoa/BookmarksController.m
+++ b/frontends/cocoa/BookmarksController.m
@@ -22,6 +22,7 @@
#import "netsurf/browser_window.h"
#import "desktop/hotlist.h"
#import "desktop/tree.h"
+#import "desktop/textinput.h"
#import "cocoa/BookmarksController.h"
#import "cocoa/Tree.h"
-----------------------------------------------------------------------
Summary of changes:
frontends/atari/hotlist.c | 1 +
frontends/cocoa/BookmarksController.m | 1 +
2 files changed, 2 insertions(+)
diff --git a/frontends/atari/hotlist.c b/frontends/atari/hotlist.c
index 93145cf..afe3d60 100644
--- a/frontends/atari/hotlist.c
+++ b/frontends/atari/hotlist.c
@@ -32,6 +32,7 @@
#include "desktop/hotlist.h"
#include "desktop/tree.h"
#include "desktop/core_window.h"
+#include "desktop/textinput.h"
#include "atari/gui.h"
#include "atari/misc.h"
diff --git a/frontends/cocoa/BookmarksController.m b/frontends/cocoa/BookmarksController.m
index 2d574f3..f04a084 100644
--- a/frontends/cocoa/BookmarksController.m
+++ b/frontends/cocoa/BookmarksController.m
@@ -22,6 +22,7 @@
#import "netsurf/browser_window.h"
#import "desktop/hotlist.h"
#import "desktop/tree.h"
+#import "desktop/textinput.h"
#import "cocoa/BookmarksController.h"
#import "cocoa/Tree.h"
--
NetSurf Browser
7 years, 2 months
netsurf: branch master updated. release/3.5-187-g0ae7887
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/0ae788752cdeb259eaadb...
...commit http://git.netsurf-browser.org/netsurf.git/commit/0ae788752cdeb259eaadb75...
...tree http://git.netsurf-browser.org/netsurf.git/tree/0ae788752cdeb259eaadb756a...
The branch, master has been updated
via 0ae788752cdeb259eaadb756a18e9065da1c6d22 (commit)
via 012b7977139b506220e8dffa4367877dbe6f2594 (commit)
via 690066bb56e49fb21c66b47cdbe33ca6e51e16ec (commit)
from 4f59f5309f6648e3c1508b53560bbf541e67ebde (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=0ae788752cdeb259eaa...
commit 0ae788752cdeb259eaadb756a18e9065da1c6d22
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
remove unecessary textinput header use from treeview header
diff --git a/desktop/tree.c b/desktop/tree.c
index d1af766..bfe8e98 100644
--- a/desktop/tree.c
+++ b/desktop/tree.c
@@ -30,12 +30,13 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
+#include "utils/nsoption.h"
+#include "netsurf/browser_window.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "utils/nsoption.h"
-#include "netsurf/browser_window.h"
#include "desktop/tree.h"
+#include "desktop/core_window.h"
struct tree {
unsigned int flags; /* Tree flags */
diff --git a/desktop/treeview.c b/desktop/treeview.c
index b8d3d13..8f0afcb 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -26,17 +26,19 @@
#include "utils/nsurl.h"
#include "netsurf/bitmap.h"
#include "netsurf/content.h"
+#include "netsurf/plotters.h"
+#include "netsurf/clipboard.h"
+#include "netsurf/layout.h"
#include "content/hlcache.h"
#include "css/utils.h"
#include "desktop/system_colour.h"
#include "desktop/knockout.h"
-#include "netsurf/plotters.h"
#include "desktop/textarea.h"
#include "desktop/treeview.h"
-#include "netsurf/clipboard.h"
-#include "netsurf/layout.h"
#include "desktop/gui_internal.h"
+#include "desktop/textinput.h"
+#include "desktop/core_window.h"
/** @todo get rid of REDRAW_MAX -- need to be able to know window size */
#define REDRAW_MAX 8000
diff --git a/desktop/treeview.h b/desktop/treeview.h
index e5baaf2..25349ad 100644
--- a/desktop/treeview.h
+++ b/desktop/treeview.h
@@ -16,8 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Treeview handling (interface).
+/**
+ * \file
+ * Treeview handling interface.
*/
#ifndef _NETSURF_DESKTOP_TREEVIEW_H_
@@ -28,10 +29,10 @@
#include <libwapcaplet/libwapcaplet.h>
#include "netsurf/mouse.h"
-#include "desktop/core_window.h"
-#include "desktop/textinput.h"
struct redraw_context;
+struct core_window;
+struct core_window_callback_table;
typedef struct treeview treeview;
typedef struct treeview_node treeview_node;
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=012b7977139b506220e...
commit 012b7977139b506220e8dffa4367877dbe6f2594
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
remove unecessary textinput header use from global history header
diff --git a/desktop/browser.c b/desktop/browser.c
index 5f99a84..d3648d7 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -72,6 +72,7 @@
#include "desktop/selection.h"
#include "desktop/theme.h"
#include "desktop/gui_internal.h"
+#include "desktop/textinput.h"
/** maximum frame depth */
diff --git a/desktop/global_history.h b/desktop/global_history.h
index bfbd132..f289a5b 100644
--- a/desktop/global_history.h
+++ b/desktop/global_history.h
@@ -22,14 +22,13 @@
#include <stdbool.h>
#include <stdint.h>
-#include "desktop/core_window.h"
-#include "desktop/textinput.h"
#include "utils/errors.h"
+#include "netsurf/mouse.h"
+struct core_window_callback_table;
struct redraw_context;
struct nsurl;
-
-enum browser_mouse_state;
+struct rect;
/**
* Initialise the global history.
@@ -67,7 +66,7 @@ nserror global_history_fini(void);
*/
nserror global_history_add(struct nsurl *url);
-/*
+/**
* Save global history to file (html)
*
* \param path The path to save history to
diff --git a/frontends/amiga/tree.c b/frontends/amiga/tree.c
index 033e356..c46eee4 100644
--- a/frontends/amiga/tree.c
+++ b/frontends/amiga/tree.c
@@ -60,6 +60,7 @@
#include "desktop/global_history.h"
#include "desktop/hotlist.h"
#include "desktop/sslcert_viewer.h"
+#include "desktop/textinput.h"
#include "amiga/gui.h"
#include "amiga/tree.h"
diff --git a/frontends/riscos/global_history.c b/frontends/riscos/global_history.c
index edef331..8e339e6 100644
--- a/frontends/riscos/global_history.c
+++ b/frontends/riscos/global_history.c
@@ -34,9 +34,10 @@
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/log.h"
+#include "netsurf/window.h"
#include "desktop/global_history.h"
#include "desktop/tree.h"
-#include "netsurf/window.h"
+#include "desktop/textinput.h"
#include "riscos/dialog.h"
#include "riscos/global_history.h"
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=690066bb56e49fb21c6...
commit 690066bb56e49fb21c66b47cdbe33ca6e51e16ec
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
remove unecessary textinput header use from hotlist header
diff --git a/desktop/hotlist.h b/desktop/hotlist.h
index 2733d58..c0f4dec 100644
--- a/desktop/hotlist.h
+++ b/desktop/hotlist.h
@@ -22,14 +22,13 @@
#include <stdbool.h>
#include <stdint.h>
-#include "desktop/core_window.h"
-#include "desktop/textinput.h"
#include "utils/errors.h"
+#include "netsurf/mouse.h"
+struct core_window_callback_table;
struct redraw_context;
struct nsurl;
-
-enum browser_mouse_state;
+struct rect;
/**
* Initialise the hotlist.
diff --git a/frontends/gtk/hotlist.c b/frontends/gtk/hotlist.c
index 06fd5cd..82ea3e3 100644
--- a/frontends/gtk/hotlist.c
+++ b/frontends/gtk/hotlist.c
@@ -23,6 +23,7 @@
#include "utils/nsoption.h"
#include "desktop/hotlist.h"
#include "desktop/tree.h"
+#include "desktop/textinput.h"
#include "gtk/plotters.h"
#include "gtk/scaffolding.h"
diff --git a/frontends/riscos/hotlist.c b/frontends/riscos/hotlist.c
index 6041658..f3daad0 100644
--- a/frontends/riscos/hotlist.c
+++ b/frontends/riscos/hotlist.c
@@ -40,6 +40,7 @@
#include "netsurf/window.h"
#include "desktop/hotlist.h"
#include "desktop/tree.h"
+#include "desktop/textinput.h"
#include "riscos/gui.h"
#include "riscos/dialog.h"
-----------------------------------------------------------------------
Summary of changes:
desktop/browser.c | 1 +
desktop/global_history.h | 9 ++++-----
desktop/hotlist.h | 7 +++----
desktop/tree.c | 5 +++--
desktop/treeview.c | 8 +++++---
desktop/treeview.h | 9 +++++----
frontends/amiga/tree.c | 1 +
frontends/gtk/hotlist.c | 1 +
frontends/riscos/global_history.c | 3 ++-
frontends/riscos/hotlist.c | 1 +
10 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/desktop/browser.c b/desktop/browser.c
index 5f99a84..d3648d7 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -72,6 +72,7 @@
#include "desktop/selection.h"
#include "desktop/theme.h"
#include "desktop/gui_internal.h"
+#include "desktop/textinput.h"
/** maximum frame depth */
diff --git a/desktop/global_history.h b/desktop/global_history.h
index bfbd132..f289a5b 100644
--- a/desktop/global_history.h
+++ b/desktop/global_history.h
@@ -22,14 +22,13 @@
#include <stdbool.h>
#include <stdint.h>
-#include "desktop/core_window.h"
-#include "desktop/textinput.h"
#include "utils/errors.h"
+#include "netsurf/mouse.h"
+struct core_window_callback_table;
struct redraw_context;
struct nsurl;
-
-enum browser_mouse_state;
+struct rect;
/**
* Initialise the global history.
@@ -67,7 +66,7 @@ nserror global_history_fini(void);
*/
nserror global_history_add(struct nsurl *url);
-/*
+/**
* Save global history to file (html)
*
* \param path The path to save history to
diff --git a/desktop/hotlist.h b/desktop/hotlist.h
index 2733d58..c0f4dec 100644
--- a/desktop/hotlist.h
+++ b/desktop/hotlist.h
@@ -22,14 +22,13 @@
#include <stdbool.h>
#include <stdint.h>
-#include "desktop/core_window.h"
-#include "desktop/textinput.h"
#include "utils/errors.h"
+#include "netsurf/mouse.h"
+struct core_window_callback_table;
struct redraw_context;
struct nsurl;
-
-enum browser_mouse_state;
+struct rect;
/**
* Initialise the hotlist.
diff --git a/desktop/tree.c b/desktop/tree.c
index d1af766..bfe8e98 100644
--- a/desktop/tree.c
+++ b/desktop/tree.c
@@ -30,12 +30,13 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
+#include "utils/nsoption.h"
+#include "netsurf/browser_window.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "utils/nsoption.h"
-#include "netsurf/browser_window.h"
#include "desktop/tree.h"
+#include "desktop/core_window.h"
struct tree {
unsigned int flags; /* Tree flags */
diff --git a/desktop/treeview.c b/desktop/treeview.c
index b8d3d13..8f0afcb 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -26,17 +26,19 @@
#include "utils/nsurl.h"
#include "netsurf/bitmap.h"
#include "netsurf/content.h"
+#include "netsurf/plotters.h"
+#include "netsurf/clipboard.h"
+#include "netsurf/layout.h"
#include "content/hlcache.h"
#include "css/utils.h"
#include "desktop/system_colour.h"
#include "desktop/knockout.h"
-#include "netsurf/plotters.h"
#include "desktop/textarea.h"
#include "desktop/treeview.h"
-#include "netsurf/clipboard.h"
-#include "netsurf/layout.h"
#include "desktop/gui_internal.h"
+#include "desktop/textinput.h"
+#include "desktop/core_window.h"
/** @todo get rid of REDRAW_MAX -- need to be able to know window size */
#define REDRAW_MAX 8000
diff --git a/desktop/treeview.h b/desktop/treeview.h
index e5baaf2..25349ad 100644
--- a/desktop/treeview.h
+++ b/desktop/treeview.h
@@ -16,8 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Treeview handling (interface).
+/**
+ * \file
+ * Treeview handling interface.
*/
#ifndef _NETSURF_DESKTOP_TREEVIEW_H_
@@ -28,10 +29,10 @@
#include <libwapcaplet/libwapcaplet.h>
#include "netsurf/mouse.h"
-#include "desktop/core_window.h"
-#include "desktop/textinput.h"
struct redraw_context;
+struct core_window;
+struct core_window_callback_table;
typedef struct treeview treeview;
typedef struct treeview_node treeview_node;
diff --git a/frontends/amiga/tree.c b/frontends/amiga/tree.c
index 033e356..c46eee4 100644
--- a/frontends/amiga/tree.c
+++ b/frontends/amiga/tree.c
@@ -60,6 +60,7 @@
#include "desktop/global_history.h"
#include "desktop/hotlist.h"
#include "desktop/sslcert_viewer.h"
+#include "desktop/textinput.h"
#include "amiga/gui.h"
#include "amiga/tree.h"
diff --git a/frontends/gtk/hotlist.c b/frontends/gtk/hotlist.c
index 06fd5cd..82ea3e3 100644
--- a/frontends/gtk/hotlist.c
+++ b/frontends/gtk/hotlist.c
@@ -23,6 +23,7 @@
#include "utils/nsoption.h"
#include "desktop/hotlist.h"
#include "desktop/tree.h"
+#include "desktop/textinput.h"
#include "gtk/plotters.h"
#include "gtk/scaffolding.h"
diff --git a/frontends/riscos/global_history.c b/frontends/riscos/global_history.c
index edef331..8e339e6 100644
--- a/frontends/riscos/global_history.c
+++ b/frontends/riscos/global_history.c
@@ -34,9 +34,10 @@
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/log.h"
+#include "netsurf/window.h"
#include "desktop/global_history.h"
#include "desktop/tree.h"
-#include "netsurf/window.h"
+#include "desktop/textinput.h"
#include "riscos/dialog.h"
#include "riscos/global_history.h"
diff --git a/frontends/riscos/hotlist.c b/frontends/riscos/hotlist.c
index 6041658..f3daad0 100644
--- a/frontends/riscos/hotlist.c
+++ b/frontends/riscos/hotlist.c
@@ -40,6 +40,7 @@
#include "netsurf/window.h"
#include "desktop/hotlist.h"
#include "desktop/tree.h"
+#include "desktop/textinput.h"
#include "riscos/gui.h"
#include "riscos/dialog.h"
--
NetSurf Browser
7 years, 2 months
netsurf: branch master updated. release/3.5-184-g4f59f53
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/4f59f5309f6648e3c1508...
...commit http://git.netsurf-browser.org/netsurf.git/commit/4f59f5309f6648e3c1508b5...
...tree http://git.netsurf-browser.org/netsurf.git/tree/4f59f5309f6648e3c1508b535...
The branch, master has been updated
via 4f59f5309f6648e3c1508b53560bbf541e67ebde (commit)
from 8dd5b560a5fb9ab59062b9f6c629df036f007c64 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=4f59f5309f6648e3c15...
commit 4f59f5309f6648e3c1508b53560bbf541e67ebde
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
fix missing keycode include on atari platform
diff --git a/frontends/atari/misc.c b/frontends/atari/misc.c
index 7a8ec61..013304b 100644
--- a/frontends/atari/misc.c
+++ b/frontends/atari/misc.c
@@ -25,17 +25,18 @@
#include <sys/types.h>
#include <mint/osbind.h>
-#include "utils/dirent.h"
-#include "content/content.h"
-#include "content/hlcache.h"
-#include "desktop/cookie_manager.h"
-#include "netsurf/mouse.h"
-#include "desktop/tree.h"
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/log.h"
#include "utils/file.h"
+#include "utils/dirent.h"
+#include "netsurf/mouse.h"
+#include "content/content.h"
+#include "content/hlcache.h"
+#include "desktop/textinput.h"
+#include "desktop/cookie_manager.h"
+#include "desktop/tree.h"
#include "atari/gui.h"
#include "atari/toolbar.h"
-----------------------------------------------------------------------
Summary of changes:
frontends/atari/misc.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/frontends/atari/misc.c b/frontends/atari/misc.c
index 7a8ec61..013304b 100644
--- a/frontends/atari/misc.c
+++ b/frontends/atari/misc.c
@@ -25,17 +25,18 @@
#include <sys/types.h>
#include <mint/osbind.h>
-#include "utils/dirent.h"
-#include "content/content.h"
-#include "content/hlcache.h"
-#include "desktop/cookie_manager.h"
-#include "netsurf/mouse.h"
-#include "desktop/tree.h"
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/log.h"
#include "utils/file.h"
+#include "utils/dirent.h"
+#include "netsurf/mouse.h"
+#include "content/content.h"
+#include "content/hlcache.h"
+#include "desktop/textinput.h"
+#include "desktop/cookie_manager.h"
+#include "desktop/tree.h"
#include "atari/gui.h"
#include "atari/toolbar.h"
--
NetSurf Browser
7 years, 2 months
netsurf: branch master updated. release/3.5-183-g8dd5b56
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/8dd5b560a5fb9ab59062b...
...commit http://git.netsurf-browser.org/netsurf.git/commit/8dd5b560a5fb9ab59062b9f...
...tree http://git.netsurf-browser.org/netsurf.git/tree/8dd5b560a5fb9ab59062b9f6c...
The branch, master has been updated
via 8dd5b560a5fb9ab59062b9f6c629df036f007c64 (commit)
from c313524998377db92e5387d209e1ea79fbc30ba6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=8dd5b560a5fb9ab5906...
commit 8dd5b560a5fb9ab59062b9f6c629df036f007c64
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
remove unecessary textinput header use
diff --git a/desktop/cookie_manager.h b/desktop/cookie_manager.h
index b7acfe9..65690d6 100644
--- a/desktop/cookie_manager.h
+++ b/desktop/cookie_manager.h
@@ -26,14 +26,13 @@
#include <stdbool.h>
#include <stdint.h>
-#include "desktop/core_window.h"
-#include "desktop/textinput.h"
#include "utils/errors.h"
+#include "netsurf/mouse.h"
struct redraw_context;
struct cookie_data;
-
-enum browser_mouse_state;
+struct core_window_callback_table;
+struct rect;
/**
* Initialise the cookie manager.
-----------------------------------------------------------------------
Summary of changes:
desktop/cookie_manager.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/desktop/cookie_manager.h b/desktop/cookie_manager.h
index b7acfe9..65690d6 100644
--- a/desktop/cookie_manager.h
+++ b/desktop/cookie_manager.h
@@ -26,14 +26,13 @@
#include <stdbool.h>
#include <stdint.h>
-#include "desktop/core_window.h"
-#include "desktop/textinput.h"
#include "utils/errors.h"
+#include "netsurf/mouse.h"
struct redraw_context;
struct cookie_data;
-
-enum browser_mouse_state;
+struct core_window_callback_table;
+struct rect;
/**
* Initialise the cookie manager.
--
NetSurf Browser
7 years, 2 months
netsurf: branch master updated. release/3.5-182-gc313524
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/c313524998377db92e538...
...commit http://git.netsurf-browser.org/netsurf.git/commit/c313524998377db92e5387d...
...tree http://git.netsurf-browser.org/netsurf.git/tree/c313524998377db92e5387d20...
The branch, master has been updated
via c313524998377db92e5387d209e1ea79fbc30ba6 (commit)
from c523bb47a0c884f58ab267eb9ad699ccbed907d5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=c313524998377db92e5...
commit c313524998377db92e5387d209e1ea79fbc30ba6
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
reduce curl usage to fetcher, url unescaping and time parsing
diff --git a/desktop/browser.c b/desktop/browser.c
index 453db2f..5f99a84 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -59,7 +59,6 @@
#include "render/form_internal.h"
#include "render/html.h"
#include "render/box.h"
-#include "curl/curl.h"
#include "javascript/js.h"
#include "desktop/browser_history.h"
diff --git a/frontends/amiga/misc.c b/frontends/amiga/misc.c
index 1fc0373..39a4bbf 100755
--- a/frontends/amiga/misc.c
+++ b/frontends/amiga/misc.c
@@ -217,7 +217,7 @@ static nserror amiga_nsurl_to_path(struct nsurl *url, char **path_out)
return NSERROR_BAD_PARAMETER;
}
- res = url_unescape(lwc_string_data(urlpath) + 1, &path);
+ res = url_unescape(lwc_string_data(urlpath) + 1, 0, &path);
lwc_string_unref(urlpath);
if (res != NSERROR_OK) {
return res;
diff --git a/frontends/atari/file.c b/frontends/atari/file.c
index 499edd6..7bc11da 100644
--- a/frontends/atari/file.c
+++ b/frontends/atari/file.c
@@ -138,7 +138,9 @@ static nserror atari_nsurl_to_path(struct nsurl *url, char **path_out)
return NSERROR_BAD_PARAMETER;
}
- res = url_unescape(lwc_string_data(urlpath), &path);
+ res = url_unescape(lwc_string_data(urlpath),
+ lwc_string_length(urlpath),
+ &path);
lwc_string_unref(urlpath);
if (res != NSERROR_OK) {
return res;
diff --git a/frontends/beos/gui.cpp b/frontends/beos/gui.cpp
index 93b304a..53387ad 100644
--- a/frontends/beos/gui.cpp
+++ b/frontends/beos/gui.cpp
@@ -30,7 +30,6 @@
#include <sys/select.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <curl/curl.h>
#include <Alert.h>
#include <Application.h>
@@ -795,12 +794,14 @@ static void gui_quit(void)
static char *url_to_path(const char *url)
{
- char *url_path = curl_unescape(url, 0);
- char *path;
+ char *url_path;
+ char *path = NULL;
- /* return the absolute path including leading / */
- path = strdup(url_path + (FILE_SCHEME_PREFIX_LEN - 1));
- curl_free(url_path);
+ if (url_unescape(url, 0, &url_path) == NSERROR_OK) {
+ /* return the absolute path including leading / */
+ path = strdup(url_path + (FILE_SCHEME_PREFIX_LEN - 1));
+ free(url_path);
+ }
return path;
}
diff --git a/frontends/riscos/download.c b/frontends/riscos/download.c
index 7dd61b7..1a0249e 100644
--- a/frontends/riscos/download.c
+++ b/frontends/riscos/download.c
@@ -33,7 +33,6 @@
#include <assert.h>
#include <string.h>
#include <time.h>
-#include <curl/curl.h>
#include <libwapcaplet/libwapcaplet.h>
#include "oslib/mimemap.h"
@@ -53,6 +52,7 @@
#include "utils/utf8.h"
#include "utils/utils.h"
#include "utils/string.h"
+#include "utils/url.h"
#include "utils/corestrings.h"
#include "netsurf/download.h"
#include "desktop/download.h"
@@ -239,11 +239,11 @@ static nserror download_ro_filetype(download_context *ctx, bits *ftype_out)
lwc_string *path = nsurl_get_component(url, NSURL_PATH);
if (path != NULL && lwc_string_length(path) != 0) {
char *raw_path;
- raw_path = curl_unescape(lwc_string_data(path),
- lwc_string_length(path));
- if (raw_path != NULL) {
+ if (url_unescape(lwc_string_data(path),
+ lwc_string_length(path),
+ &raw_path) == NSERROR_OK) {
ftype = ro_filetype_from_unix_path(raw_path);
- curl_free(raw_path);
+ free(raw_path);
}
}
}
diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c
index 2b369ec..f55392f 100644
--- a/frontends/riscos/gui.c
+++ b/frontends/riscos/gui.c
@@ -1513,7 +1513,9 @@ static nserror ro_nsurl_to_path(struct nsurl *url, char **path_out)
return NSERROR_BAD_PARAMETER;
}
- res = url_unescape(lwc_string_data(urlpath), &unpath);
+ res = url_unescape(lwc_string_data(urlpath),
+ lwc_string_length(urlpath),
+ &unpath);
lwc_string_unref(urlpath);
if (res != NSERROR_OK) {
return res;
diff --git a/frontends/windows/download.c b/frontends/windows/download.c
index f1a0287..9c8cefa 100644
--- a/frontends/windows/download.c
+++ b/frontends/windows/download.c
@@ -17,9 +17,7 @@
*/
#include <limits.h>
-
-#include "utils/config.h"
-
+#include "utils/inet.h" /* get correct winsock ordering */
#include <shlobj.h>
#include <windows.h>
diff --git a/frontends/windows/file.c b/frontends/windows/file.c
index 5c5b1f0..7583790 100644
--- a/frontends/windows/file.c
+++ b/frontends/windows/file.c
@@ -141,7 +141,9 @@ static nserror windows_nsurl_to_path(struct nsurl *url, char **path_out)
return NSERROR_BAD_PARAMETER;
}
- res = url_unescape(lwc_string_data(urlpath), &path);
+ res = url_unescape(lwc_string_data(urlpath),
+ lwc_string_length(urlpath),
+ &path);
lwc_string_unref(urlpath);
if (res != NSERROR_OK) {
return res;
diff --git a/frontends/windows/findfile.c b/frontends/windows/findfile.c
index 8c8906a..e1c9595 100644
--- a/frontends/windows/findfile.c
+++ b/frontends/windows/findfile.c
@@ -27,9 +27,6 @@
#include <stdlib.h>
#include <string.h>
-
-#include <curl/curl.h>
-
#include "utils/log.h"
#include "utils/url.h"
#include "utils/utils.h"
diff --git a/test/Makefile b/test/Makefile
index 66b8aa7..9fdb3f2 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -80,7 +80,7 @@ TESTCFLAGS := -std=c99 -g -Wall \
-D_BSD_SOURCE \
-D_POSIX_C_SOURCE=200809L \
-D_XOPEN_SOURCE=600 \
- -Itest -Iinclude -Ifrontends -I. -I.. \
+ -Itest -Iinclude -Icontent/handlers -Ifrontends -I. -I.. \
-Dnsgtk \
$(shell pkg-config --cflags libcurl libparserutils libwapcaplet libdom libnsutils libutf8proc libidn) \
$(LIB_CFLAGS) \
diff --git a/test/llcache.c b/test/llcache.c
index 850f060..df51386 100644
--- a/test/llcache.c
+++ b/test/llcache.c
@@ -20,8 +20,6 @@
#include <stdlib.h>
#include <string.h>
-#include <curl/curl.h>
-
#include "content/fetch.h"
#include "content/llcache.h"
#include "utils/ring.h"
@@ -94,12 +92,14 @@ char *path_to_url(const char *path)
/* utils/url.h */
char *url_to_path(const char *url)
{
- char *url_path = curl_unescape(url, 0);
- char *path;
+ char *url_path;
+ char *path = NULL;
- /* return the absolute path including leading / */
- path = strdup(url_path + (FILE_SCHEME_PREFIX_LEN - 1));
- curl_free(url_path);
+ if (url_unescape(url, 0, &url_path) == NSERROR_OK) {
+ /* return the absolute path including leading / */
+ path = strdup(url_path + (FILE_SCHEME_PREFIX_LEN - 1));
+ free(url_path);
+ }
return path;
}
diff --git a/test/urldbtest.c b/test/urldbtest.c
index 2d14c0f..338ce1f 100644
--- a/test/urldbtest.c
+++ b/test/urldbtest.c
@@ -27,8 +27,6 @@
#include <strings.h>
#include <time.h>
-#include <curl/curl.h>
-
#include "utils/errors.h"
#include "utils/nsurl.h"
#include "netsurf/bitmap.h"
diff --git a/utils/file.c b/utils/file.c
index 8888110..6224d1c 100644
--- a/utils/file.c
+++ b/utils/file.c
@@ -136,7 +136,9 @@ static nserror posix_nsurl_to_path(struct nsurl *url, char **path_out)
return NSERROR_BAD_PARAMETER;
}
- res = url_unescape(lwc_string_data(urlpath), &path);
+ res = url_unescape(lwc_string_data(urlpath),
+ lwc_string_length(urlpath),
+ &path);
lwc_string_unref(urlpath);
if (res != NSERROR_OK) {
return res;
diff --git a/utils/url.c b/utils/url.c
index 1e3ef42..4fcbccd 100644
--- a/utils/url.c
+++ b/utils/url.c
@@ -33,12 +33,12 @@
/* exported interface documented in utils/url.h */
-nserror url_unescape(const char *str, char **result)
+nserror url_unescape(const char *str, int length, char **result)
{
char *curlstr;
char *retstr;
- curlstr = curl_unescape(str, 0);
+ curlstr = curl_unescape(str, length);
if (curlstr == NULL) {
return NSERROR_NOMEM;
}
diff --git a/utils/url.h b/utils/url.h
index aafdf1e..94579e3 100644
--- a/utils/url.h
+++ b/utils/url.h
@@ -46,9 +46,10 @@ nserror url_escape(const char *unescaped, size_t toskip, bool sptoplus,
* Convert an escaped string to plain.
*
* \param[in] str String to unescape.
+ * \parm[in] length Length of string or 0 to use strlen
* \param[out] result unescaped string owned by caller must be freed with free()
- * \return NSERROR_OK on success
+ * \return NSERROR_OK on success
*/
-nserror url_unescape(const char *str, char **result);
+nserror url_unescape(const char *str, int length, char **result);
#endif
-----------------------------------------------------------------------
Summary of changes:
desktop/browser.c | 1 -
frontends/amiga/misc.c | 2 +-
frontends/atari/file.c | 4 +++-
frontends/beos/gui.cpp | 13 +++++++------
frontends/riscos/download.c | 10 +++++-----
frontends/riscos/gui.c | 4 +++-
frontends/windows/download.c | 4 +---
frontends/windows/file.c | 4 +++-
frontends/windows/findfile.c | 3 ---
test/Makefile | 2 +-
test/llcache.c | 14 +++++++-------
test/urldbtest.c | 2 --
utils/file.c | 4 +++-
utils/url.c | 4 ++--
utils/url.h | 5 +++--
15 files changed, 39 insertions(+), 37 deletions(-)
diff --git a/desktop/browser.c b/desktop/browser.c
index 453db2f..5f99a84 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -59,7 +59,6 @@
#include "render/form_internal.h"
#include "render/html.h"
#include "render/box.h"
-#include "curl/curl.h"
#include "javascript/js.h"
#include "desktop/browser_history.h"
diff --git a/frontends/amiga/misc.c b/frontends/amiga/misc.c
index 1fc0373..39a4bbf 100755
--- a/frontends/amiga/misc.c
+++ b/frontends/amiga/misc.c
@@ -217,7 +217,7 @@ static nserror amiga_nsurl_to_path(struct nsurl *url, char **path_out)
return NSERROR_BAD_PARAMETER;
}
- res = url_unescape(lwc_string_data(urlpath) + 1, &path);
+ res = url_unescape(lwc_string_data(urlpath) + 1, 0, &path);
lwc_string_unref(urlpath);
if (res != NSERROR_OK) {
return res;
diff --git a/frontends/atari/file.c b/frontends/atari/file.c
index 499edd6..7bc11da 100644
--- a/frontends/atari/file.c
+++ b/frontends/atari/file.c
@@ -138,7 +138,9 @@ static nserror atari_nsurl_to_path(struct nsurl *url, char **path_out)
return NSERROR_BAD_PARAMETER;
}
- res = url_unescape(lwc_string_data(urlpath), &path);
+ res = url_unescape(lwc_string_data(urlpath),
+ lwc_string_length(urlpath),
+ &path);
lwc_string_unref(urlpath);
if (res != NSERROR_OK) {
return res;
diff --git a/frontends/beos/gui.cpp b/frontends/beos/gui.cpp
index 93b304a..53387ad 100644
--- a/frontends/beos/gui.cpp
+++ b/frontends/beos/gui.cpp
@@ -30,7 +30,6 @@
#include <sys/select.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <curl/curl.h>
#include <Alert.h>
#include <Application.h>
@@ -795,12 +794,14 @@ static void gui_quit(void)
static char *url_to_path(const char *url)
{
- char *url_path = curl_unescape(url, 0);
- char *path;
+ char *url_path;
+ char *path = NULL;
- /* return the absolute path including leading / */
- path = strdup(url_path + (FILE_SCHEME_PREFIX_LEN - 1));
- curl_free(url_path);
+ if (url_unescape(url, 0, &url_path) == NSERROR_OK) {
+ /* return the absolute path including leading / */
+ path = strdup(url_path + (FILE_SCHEME_PREFIX_LEN - 1));
+ free(url_path);
+ }
return path;
}
diff --git a/frontends/riscos/download.c b/frontends/riscos/download.c
index 7dd61b7..1a0249e 100644
--- a/frontends/riscos/download.c
+++ b/frontends/riscos/download.c
@@ -33,7 +33,6 @@
#include <assert.h>
#include <string.h>
#include <time.h>
-#include <curl/curl.h>
#include <libwapcaplet/libwapcaplet.h>
#include "oslib/mimemap.h"
@@ -53,6 +52,7 @@
#include "utils/utf8.h"
#include "utils/utils.h"
#include "utils/string.h"
+#include "utils/url.h"
#include "utils/corestrings.h"
#include "netsurf/download.h"
#include "desktop/download.h"
@@ -239,11 +239,11 @@ static nserror download_ro_filetype(download_context *ctx, bits *ftype_out)
lwc_string *path = nsurl_get_component(url, NSURL_PATH);
if (path != NULL && lwc_string_length(path) != 0) {
char *raw_path;
- raw_path = curl_unescape(lwc_string_data(path),
- lwc_string_length(path));
- if (raw_path != NULL) {
+ if (url_unescape(lwc_string_data(path),
+ lwc_string_length(path),
+ &raw_path) == NSERROR_OK) {
ftype = ro_filetype_from_unix_path(raw_path);
- curl_free(raw_path);
+ free(raw_path);
}
}
}
diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c
index 2b369ec..f55392f 100644
--- a/frontends/riscos/gui.c
+++ b/frontends/riscos/gui.c
@@ -1513,7 +1513,9 @@ static nserror ro_nsurl_to_path(struct nsurl *url, char **path_out)
return NSERROR_BAD_PARAMETER;
}
- res = url_unescape(lwc_string_data(urlpath), &unpath);
+ res = url_unescape(lwc_string_data(urlpath),
+ lwc_string_length(urlpath),
+ &unpath);
lwc_string_unref(urlpath);
if (res != NSERROR_OK) {
return res;
diff --git a/frontends/windows/download.c b/frontends/windows/download.c
index f1a0287..9c8cefa 100644
--- a/frontends/windows/download.c
+++ b/frontends/windows/download.c
@@ -17,9 +17,7 @@
*/
#include <limits.h>
-
-#include "utils/config.h"
-
+#include "utils/inet.h" /* get correct winsock ordering */
#include <shlobj.h>
#include <windows.h>
diff --git a/frontends/windows/file.c b/frontends/windows/file.c
index 5c5b1f0..7583790 100644
--- a/frontends/windows/file.c
+++ b/frontends/windows/file.c
@@ -141,7 +141,9 @@ static nserror windows_nsurl_to_path(struct nsurl *url, char **path_out)
return NSERROR_BAD_PARAMETER;
}
- res = url_unescape(lwc_string_data(urlpath), &path);
+ res = url_unescape(lwc_string_data(urlpath),
+ lwc_string_length(urlpath),
+ &path);
lwc_string_unref(urlpath);
if (res != NSERROR_OK) {
return res;
diff --git a/frontends/windows/findfile.c b/frontends/windows/findfile.c
index 8c8906a..e1c9595 100644
--- a/frontends/windows/findfile.c
+++ b/frontends/windows/findfile.c
@@ -27,9 +27,6 @@
#include <stdlib.h>
#include <string.h>
-
-#include <curl/curl.h>
-
#include "utils/log.h"
#include "utils/url.h"
#include "utils/utils.h"
diff --git a/test/Makefile b/test/Makefile
index 66b8aa7..9fdb3f2 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -80,7 +80,7 @@ TESTCFLAGS := -std=c99 -g -Wall \
-D_BSD_SOURCE \
-D_POSIX_C_SOURCE=200809L \
-D_XOPEN_SOURCE=600 \
- -Itest -Iinclude -Ifrontends -I. -I.. \
+ -Itest -Iinclude -Icontent/handlers -Ifrontends -I. -I.. \
-Dnsgtk \
$(shell pkg-config --cflags libcurl libparserutils libwapcaplet libdom libnsutils libutf8proc libidn) \
$(LIB_CFLAGS) \
diff --git a/test/llcache.c b/test/llcache.c
index 850f060..df51386 100644
--- a/test/llcache.c
+++ b/test/llcache.c
@@ -20,8 +20,6 @@
#include <stdlib.h>
#include <string.h>
-#include <curl/curl.h>
-
#include "content/fetch.h"
#include "content/llcache.h"
#include "utils/ring.h"
@@ -94,12 +92,14 @@ char *path_to_url(const char *path)
/* utils/url.h */
char *url_to_path(const char *url)
{
- char *url_path = curl_unescape(url, 0);
- char *path;
+ char *url_path;
+ char *path = NULL;
- /* return the absolute path including leading / */
- path = strdup(url_path + (FILE_SCHEME_PREFIX_LEN - 1));
- curl_free(url_path);
+ if (url_unescape(url, 0, &url_path) == NSERROR_OK) {
+ /* return the absolute path including leading / */
+ path = strdup(url_path + (FILE_SCHEME_PREFIX_LEN - 1));
+ free(url_path);
+ }
return path;
}
diff --git a/test/urldbtest.c b/test/urldbtest.c
index 2d14c0f..338ce1f 100644
--- a/test/urldbtest.c
+++ b/test/urldbtest.c
@@ -27,8 +27,6 @@
#include <strings.h>
#include <time.h>
-#include <curl/curl.h>
-
#include "utils/errors.h"
#include "utils/nsurl.h"
#include "netsurf/bitmap.h"
diff --git a/utils/file.c b/utils/file.c
index 8888110..6224d1c 100644
--- a/utils/file.c
+++ b/utils/file.c
@@ -136,7 +136,9 @@ static nserror posix_nsurl_to_path(struct nsurl *url, char **path_out)
return NSERROR_BAD_PARAMETER;
}
- res = url_unescape(lwc_string_data(urlpath), &path);
+ res = url_unescape(lwc_string_data(urlpath),
+ lwc_string_length(urlpath),
+ &path);
lwc_string_unref(urlpath);
if (res != NSERROR_OK) {
return res;
diff --git a/utils/url.c b/utils/url.c
index 1e3ef42..4fcbccd 100644
--- a/utils/url.c
+++ b/utils/url.c
@@ -33,12 +33,12 @@
/* exported interface documented in utils/url.h */
-nserror url_unescape(const char *str, char **result)
+nserror url_unescape(const char *str, int length, char **result)
{
char *curlstr;
char *retstr;
- curlstr = curl_unescape(str, 0);
+ curlstr = curl_unescape(str, length);
if (curlstr == NULL) {
return NSERROR_NOMEM;
}
diff --git a/utils/url.h b/utils/url.h
index aafdf1e..94579e3 100644
--- a/utils/url.h
+++ b/utils/url.h
@@ -46,9 +46,10 @@ nserror url_escape(const char *unescaped, size_t toskip, bool sptoplus,
* Convert an escaped string to plain.
*
* \param[in] str String to unescape.
+ * \parm[in] length Length of string or 0 to use strlen
* \param[out] result unescaped string owned by caller must be freed with free()
- * \return NSERROR_OK on success
+ * \return NSERROR_OK on success
*/
-nserror url_unescape(const char *str, char **result);
+nserror url_unescape(const char *str, int length, char **result);
#endif
--
NetSurf Browser
7 years, 2 months
netsurf: branch master updated. release/3.5-181-gc523bb4
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/c523bb47a0c884f58ab26...
...commit http://git.netsurf-browser.org/netsurf.git/commit/c523bb47a0c884f58ab267e...
...tree http://git.netsurf-browser.org/netsurf.git/tree/c523bb47a0c884f58ab267eb9...
The branch, master has been updated
via c523bb47a0c884f58ab267eb9ad699ccbed907d5 (commit)
from be1ff548cb3c877335bfd6cf389b4d01283d6f41 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=c523bb47a0c884f58ab...
commit c523bb47a0c884f58ab267eb9ad699ccbed907d5
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Actually use utils/inet.h instead of sys/select.h
diff --git a/content/fetch.h b/content/fetch.h
index 6037faf..51e08cf 100644
--- a/content/fetch.h
+++ b/content/fetch.h
@@ -23,12 +23,11 @@
#ifndef _NETSURF_DESKTOP_FETCH_H_
#define _NETSURF_DESKTOP_FETCH_H_
-#include <sys/select.h>
-
#include <stdbool.h>
#include "utils/config.h"
#include "utils/nsurl.h"
+#include "utils/inet.h"
struct content;
struct fetch;
-----------------------------------------------------------------------
Summary of changes:
content/fetch.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/content/fetch.h b/content/fetch.h
index 6037faf..51e08cf 100644
--- a/content/fetch.h
+++ b/content/fetch.h
@@ -23,12 +23,11 @@
#ifndef _NETSURF_DESKTOP_FETCH_H_
#define _NETSURF_DESKTOP_FETCH_H_
-#include <sys/select.h>
-
#include <stdbool.h>
#include "utils/config.h"
#include "utils/nsurl.h"
+#include "utils/inet.h"
struct content;
struct fetch;
--
NetSurf Browser
7 years, 2 months
netsurf: branch master updated. release/3.5-179-g47ccd98
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/47ccd9855db44881339e6...
...commit http://git.netsurf-browser.org/netsurf.git/commit/47ccd9855db44881339e680...
...tree http://git.netsurf-browser.org/netsurf.git/tree/47ccd9855db44881339e68093...
The branch, master has been updated
via 47ccd9855db44881339e68093655247a78fd8598 (commit)
via 767b73f5c703e447a3041423ff220a88a7c0c569 (commit)
from a468b409901236ecf77f0cbd81dfeda96cebc758 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=47ccd9855db44881339...
commit 47ccd9855db44881339e68093655247a78fd8598
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Move fetcher_fdset to fetch.h (and rename to fetch_fdset). Maybe not ideal but better
diff --git a/content/fetch.c b/content/fetch.c
index decb261..11adf9c 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -379,8 +379,9 @@ fetcher_add(lwc_string *scheme, const struct fetcher_operation_table *ops)
return NSERROR_OK;
}
-/* exported interface documented in content/fetchers.h */
-nserror fetcher_fdset(fd_set *read_fd_set,
+/* exported interface documented in content/fetch.h */
+nserror
+fetch_fdset(fd_set *read_fd_set,
fd_set *write_fd_set,
fd_set *except_fd_set,
int *maxfd_out)
diff --git a/content/fetch.h b/content/fetch.h
index 3c1f1cc..6694ffd 100644
--- a/content/fetch.h
+++ b/content/fetch.h
@@ -210,5 +210,30 @@ const char *fetch_get_referer_to_send(struct fetch *fetch);
*/
void fetch_set_cookie(struct fetch *fetch, const char *data);
+/**
+ * Get the set of file descriptors the fetchers are currently using.
+ *
+ * This obtains the file descriptors the fetch system is using to
+ * obtain data. It will cause the fetchers to make progress, if
+ * possible, potentially completing fetches before requiring activity
+ * on file descriptors.
+ *
+ * If a set of descriptors is returned (maxfd is not -1) The caller is
+ * expected to wait on them (with select etc.) and continue to obtain
+ * the fdset with this call. This will switch the fetchers from polled
+ * mode to waiting for network activity which is much more efficient.
+ *
+ * \note If the caller does not subsequently obtain the fdset again
+ * the fetchers will fall back to the less efficient polled
+ * operation. The fallback to polled operation will only occour after
+ * a timeout which introduces additional delay.
+ *
+ * \param[out] read_fd_set The fd set for read.
+ * \param[out] write_fd_set The fd set for write.
+ * \param[out] except_fd_set The fd set for exceptions.
+ * \param[out] maxfd The highest fd number in the set or -1 if no fd available.
+ * \return NSERROR_OK on success or appropriate error code.
+ */
+nserror fetch_fdset(fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, int *maxfd);
#endif
diff --git a/content/fetchers.h b/content/fetchers.h
index cd09e92..6392e24 100644
--- a/content/fetchers.h
+++ b/content/fetchers.h
@@ -129,30 +129,4 @@ nserror fetcher_init(void);
void fetcher_quit(void);
-/**
- * Get the set of file descriptors the fetchers are currently using.
- *
- * This obtains the file descriptors the fetch system is using to
- * obtain data. It will cause the fetchers to make progress, if
- * possible, potentially completing fetches before requiring activity
- * on file descriptors.
- *
- * If a set of descriptors is returned (maxfd is not -1) The caller is
- * expected to wait on them (with select etc.) and continue to obtain
- * the fdset with this call. This will switch the fetchers from polled
- * mode to waiting for network activity which is much more efficient.
- *
- * \note If the caller does not subsequently obtain the fdset again
- * the fetchers will fall back to the less efficient polled
- * operation. The fallback to polled operation will only occour after
- * a timeout which introduces additional delay.
- *
- * \param[out] read_fd_set The fd set for read.
- * \param[out] write_fd_set The fd set for write.
- * \param[out] except_fd_set The fd set for exceptions.
- * \param[out] maxfd The highest fd number in the set or -1 if no fd available.
- * \return NSERROR_OK on success or appropriate error code.
- */
-nserror fetcher_fdset(fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, int *maxfd);
-
#endif
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 8d7c69d..ba7f979 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -108,7 +108,7 @@
#include "netsurf/cookie_db.h"
#include "netsurf/url_db.h"
#include "content/backing_store.h"
-#include "content/fetchers.h"
+#include "content/fetch.h"
#include "desktop/browser_history.h"
#include "desktop/hotlist.h"
#include "desktop/version.h"
@@ -2788,7 +2788,7 @@ void ami_get_msg(void)
uint32 signalmask = winsignal | appsig | schedulesig | rxsig |
printsig | applibsig | helpsignal;
- if ((fetcher_fdset(&read_fd_set, &write_fd_set, &except_fd_set, &max_fd) == NSERROR_OK) &&
+ if ((fetch_fdset(&read_fd_set, &write_fd_set, &except_fd_set, &max_fd) == NSERROR_OK) &&
(max_fd != -1)) {
/* max_fd is the highest fd in use, but waitselect() needs to know how many
* are in use, so we add 1. */
diff --git a/frontends/beos/gui.cpp b/frontends/beos/gui.cpp
index 0dcbd6b..93b304a 100644
--- a/frontends/beos/gui.cpp
+++ b/frontends/beos/gui.cpp
@@ -64,7 +64,7 @@ extern "C" {
#include "netsurf/browser_window.h"
#include "netsurf/cookie_db.h"
#include "netsurf/url_db.h"
-#include "content/fetchers.h"
+#include "content/fetch.h"
}
@@ -739,7 +739,7 @@ void nsbeos_gui_poll(void)
bigtime_t next_schedule = 0;
/* get any active fetcher fd */
- fetcher_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
+ fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
/* run the scheduler */
schedule_run();
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index 16d9199..d358b43 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -38,7 +38,7 @@
#include "utils/utils.h"
#include "utils/file.h"
#include "utils/nsoption.h"
-#include "content/fetchers.h"
+#include "content/fetch.h"
#include "netsurf/url_db.h"
#include "netsurf/cookie_db.h"
#include "content/backing_store.h"
@@ -401,7 +401,7 @@ static void nsgtk_main(void)
FD_ZERO(&write_fd_set);
FD_ZERO(&exc_fd_set);
- fetcher_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
+ fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
for (int i = 0; i <= max_fd; i++) {
if (FD_ISSET(i, &read_fd_set)) {
GPollFD *fd = malloc(sizeof *fd);
diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c
index 0ddfd9a..0059ff0 100644
--- a/frontends/monkey/main.c
+++ b/frontends/monkey/main.c
@@ -35,7 +35,7 @@
#include "netsurf/netsurf.h"
#include "netsurf/url_db.h"
#include "netsurf/cookie_db.h"
-#include "content/fetchers.h"
+#include "content/fetch.h"
#include "monkey/dispatch.h"
#include "monkey/browser.h"
@@ -258,7 +258,7 @@ static void monkey_run(void)
while (!monkey_done) {
/* clears fdset */
- fetcher_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
+ fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
/* add stdin to the set */
if (max_fd < 0) {
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=767b73f5c703e447a30...
commit 767b73f5c703e447a3041423ff220a88a7c0c569
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Add NULL for silly frontend which can't use a useful compiler
diff --git a/frontends/beos/fetch_rsrc.cpp b/frontends/beos/fetch_rsrc.cpp
index 0218055..4df246f 100644
--- a/frontends/beos/fetch_rsrc.cpp
+++ b/frontends/beos/fetch_rsrc.cpp
@@ -369,6 +369,7 @@ void fetch_rsrc_register(void)
fetch_rsrc_abort,
fetch_rsrc_free,
fetch_rsrc_poll,
+ NULL,
fetch_rsrc_finalise
};
-----------------------------------------------------------------------
Summary of changes:
content/fetch.c | 5 +++--
content/fetch.h | 25 +++++++++++++++++++++++++
content/fetchers.h | 26 --------------------------
frontends/amiga/gui.c | 4 ++--
frontends/beos/fetch_rsrc.cpp | 1 +
frontends/beos/gui.cpp | 4 ++--
frontends/gtk/gui.c | 4 ++--
frontends/monkey/main.c | 4 ++--
8 files changed, 37 insertions(+), 36 deletions(-)
diff --git a/content/fetch.c b/content/fetch.c
index decb261..11adf9c 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -379,8 +379,9 @@ fetcher_add(lwc_string *scheme, const struct fetcher_operation_table *ops)
return NSERROR_OK;
}
-/* exported interface documented in content/fetchers.h */
-nserror fetcher_fdset(fd_set *read_fd_set,
+/* exported interface documented in content/fetch.h */
+nserror
+fetch_fdset(fd_set *read_fd_set,
fd_set *write_fd_set,
fd_set *except_fd_set,
int *maxfd_out)
diff --git a/content/fetch.h b/content/fetch.h
index 3c1f1cc..6694ffd 100644
--- a/content/fetch.h
+++ b/content/fetch.h
@@ -210,5 +210,30 @@ const char *fetch_get_referer_to_send(struct fetch *fetch);
*/
void fetch_set_cookie(struct fetch *fetch, const char *data);
+/**
+ * Get the set of file descriptors the fetchers are currently using.
+ *
+ * This obtains the file descriptors the fetch system is using to
+ * obtain data. It will cause the fetchers to make progress, if
+ * possible, potentially completing fetches before requiring activity
+ * on file descriptors.
+ *
+ * If a set of descriptors is returned (maxfd is not -1) The caller is
+ * expected to wait on them (with select etc.) and continue to obtain
+ * the fdset with this call. This will switch the fetchers from polled
+ * mode to waiting for network activity which is much more efficient.
+ *
+ * \note If the caller does not subsequently obtain the fdset again
+ * the fetchers will fall back to the less efficient polled
+ * operation. The fallback to polled operation will only occour after
+ * a timeout which introduces additional delay.
+ *
+ * \param[out] read_fd_set The fd set for read.
+ * \param[out] write_fd_set The fd set for write.
+ * \param[out] except_fd_set The fd set for exceptions.
+ * \param[out] maxfd The highest fd number in the set or -1 if no fd available.
+ * \return NSERROR_OK on success or appropriate error code.
+ */
+nserror fetch_fdset(fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, int *maxfd);
#endif
diff --git a/content/fetchers.h b/content/fetchers.h
index cd09e92..6392e24 100644
--- a/content/fetchers.h
+++ b/content/fetchers.h
@@ -129,30 +129,4 @@ nserror fetcher_init(void);
void fetcher_quit(void);
-/**
- * Get the set of file descriptors the fetchers are currently using.
- *
- * This obtains the file descriptors the fetch system is using to
- * obtain data. It will cause the fetchers to make progress, if
- * possible, potentially completing fetches before requiring activity
- * on file descriptors.
- *
- * If a set of descriptors is returned (maxfd is not -1) The caller is
- * expected to wait on them (with select etc.) and continue to obtain
- * the fdset with this call. This will switch the fetchers from polled
- * mode to waiting for network activity which is much more efficient.
- *
- * \note If the caller does not subsequently obtain the fdset again
- * the fetchers will fall back to the less efficient polled
- * operation. The fallback to polled operation will only occour after
- * a timeout which introduces additional delay.
- *
- * \param[out] read_fd_set The fd set for read.
- * \param[out] write_fd_set The fd set for write.
- * \param[out] except_fd_set The fd set for exceptions.
- * \param[out] maxfd The highest fd number in the set or -1 if no fd available.
- * \return NSERROR_OK on success or appropriate error code.
- */
-nserror fetcher_fdset(fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, int *maxfd);
-
#endif
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 8d7c69d..ba7f979 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -108,7 +108,7 @@
#include "netsurf/cookie_db.h"
#include "netsurf/url_db.h"
#include "content/backing_store.h"
-#include "content/fetchers.h"
+#include "content/fetch.h"
#include "desktop/browser_history.h"
#include "desktop/hotlist.h"
#include "desktop/version.h"
@@ -2788,7 +2788,7 @@ void ami_get_msg(void)
uint32 signalmask = winsignal | appsig | schedulesig | rxsig |
printsig | applibsig | helpsignal;
- if ((fetcher_fdset(&read_fd_set, &write_fd_set, &except_fd_set, &max_fd) == NSERROR_OK) &&
+ if ((fetch_fdset(&read_fd_set, &write_fd_set, &except_fd_set, &max_fd) == NSERROR_OK) &&
(max_fd != -1)) {
/* max_fd is the highest fd in use, but waitselect() needs to know how many
* are in use, so we add 1. */
diff --git a/frontends/beos/fetch_rsrc.cpp b/frontends/beos/fetch_rsrc.cpp
index 0218055..4df246f 100644
--- a/frontends/beos/fetch_rsrc.cpp
+++ b/frontends/beos/fetch_rsrc.cpp
@@ -369,6 +369,7 @@ void fetch_rsrc_register(void)
fetch_rsrc_abort,
fetch_rsrc_free,
fetch_rsrc_poll,
+ NULL,
fetch_rsrc_finalise
};
diff --git a/frontends/beos/gui.cpp b/frontends/beos/gui.cpp
index 0dcbd6b..93b304a 100644
--- a/frontends/beos/gui.cpp
+++ b/frontends/beos/gui.cpp
@@ -64,7 +64,7 @@ extern "C" {
#include "netsurf/browser_window.h"
#include "netsurf/cookie_db.h"
#include "netsurf/url_db.h"
-#include "content/fetchers.h"
+#include "content/fetch.h"
}
@@ -739,7 +739,7 @@ void nsbeos_gui_poll(void)
bigtime_t next_schedule = 0;
/* get any active fetcher fd */
- fetcher_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
+ fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
/* run the scheduler */
schedule_run();
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index 16d9199..d358b43 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -38,7 +38,7 @@
#include "utils/utils.h"
#include "utils/file.h"
#include "utils/nsoption.h"
-#include "content/fetchers.h"
+#include "content/fetch.h"
#include "netsurf/url_db.h"
#include "netsurf/cookie_db.h"
#include "content/backing_store.h"
@@ -401,7 +401,7 @@ static void nsgtk_main(void)
FD_ZERO(&write_fd_set);
FD_ZERO(&exc_fd_set);
- fetcher_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
+ fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
for (int i = 0; i <= max_fd; i++) {
if (FD_ISSET(i, &read_fd_set)) {
GPollFD *fd = malloc(sizeof *fd);
diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c
index 0ddfd9a..0059ff0 100644
--- a/frontends/monkey/main.c
+++ b/frontends/monkey/main.c
@@ -35,7 +35,7 @@
#include "netsurf/netsurf.h"
#include "netsurf/url_db.h"
#include "netsurf/cookie_db.h"
-#include "content/fetchers.h"
+#include "content/fetch.h"
#include "monkey/dispatch.h"
#include "monkey/browser.h"
@@ -258,7 +258,7 @@ static void monkey_run(void)
while (!monkey_done) {
/* clears fdset */
- fetcher_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
+ fetch_fdset(&read_fd_set, &write_fd_set, &exc_fd_set, &max_fd);
/* add stdin to the set */
if (max_fd < 0) {
--
NetSurf Browser
7 years, 2 months
netsurf: branch master updated. release/3.5-177-ga468b40
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/a468b409901236ecf77f0...
...commit http://git.netsurf-browser.org/netsurf.git/commit/a468b409901236ecf77f0cb...
...tree http://git.netsurf-browser.org/netsurf.git/tree/a468b409901236ecf77f0cbd8...
The branch, master has been updated
via a468b409901236ecf77f0cbd81dfeda96cebc758 (commit)
from ab6c03f3112ef01e41a8a1e931a6990636edbae4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=a468b409901236ecf77...
commit a468b409901236ecf77f0cbd81dfeda96cebc758
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Refactor the fdset acquisition into the fetchers to stop fetch.c including curl.h
diff --git a/content/fetch.c b/content/fetch.c
index c5928ba..decb261 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -39,7 +39,6 @@
#include <strings.h>
#include <time.h>
#include <libwapcaplet/libwapcaplet.h>
-#include <curl/curl.h>
#include "utils/config.h"
#include "utils/corestrings.h"
@@ -386,8 +385,7 @@ nserror fetcher_fdset(fd_set *read_fd_set,
fd_set *except_fd_set,
int *maxfd_out)
{
- CURLMcode code;
- int maxfd;
+ int maxfd = -1;
int fetcherd; /* fetcher index */
if (!fetch_dispatch_jobs()) {
@@ -408,12 +406,19 @@ nserror fetcher_fdset(fd_set *read_fd_set,
FD_ZERO(read_fd_set);
FD_ZERO(write_fd_set);
FD_ZERO(except_fd_set);
- code = curl_multi_fdset(fetch_curl_multi,
- read_fd_set,
- write_fd_set,
- except_fd_set,
- &maxfd);
- assert(code == CURLM_OK);
+
+ for (fetcherd = 0; fetcherd < MAX_FETCHERS; fetcherd++) {
+ if ((fetchers[fetcherd].refcount > 0) &&
+ (fetchers[fetcherd].ops.fdset != NULL)) {
+ /* fetcher present */
+ int fetcher_maxfd;
+ fetcher_maxfd = fetchers[fetcherd].ops.fdset(
+ fetchers[fetcherd].scheme, read_fd_set,
+ write_fd_set, except_fd_set);
+ if (fetcher_maxfd > maxfd)
+ maxfd = fetcher_maxfd;
+ }
+ }
if (maxfd >= 0) {
/* change the scheduled poll to happen is a 1000ms as
diff --git a/content/fetchers.h b/content/fetchers.h
index 92b11dc..cd09e92 100644
--- a/content/fetchers.h
+++ b/content/fetchers.h
@@ -91,6 +91,12 @@ struct fetcher_operation_table {
void (*poll)(lwc_string *scheme);
/**
+ * update an fdset with the FDs needed to poll cleanly
+ */
+ int (*fdset)(lwc_string *scheme, fd_set *read_set, fd_set *write_set,
+ fd_set *error_set);
+
+ /**
* Finalise the fetcher.
*/
void (*finalise)(lwc_string *scheme);
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index 10a0d99..66970ef 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -1374,6 +1374,23 @@ fetch_curl_header(char *data, size_t size, size_t nmemb, void *_f)
#undef SKIP_ST
}
+static int fetch_curl_fdset(lwc_string *scheme, fd_set *read_set,
+ fd_set *write_set, fd_set *error_set)
+{
+ CURLMcode code;
+ int maxfd = -1;
+
+ code = curl_multi_fdset(fetch_curl_multi,
+ read_set,
+ write_set,
+ error_set,
+ &maxfd);
+ assert(code == CURLM_OK);
+
+ return maxfd;
+}
+
+
/* exported function documented in content/fetchers/curl.h */
nserror fetch_curl_register(void)
@@ -1390,6 +1407,7 @@ nserror fetch_curl_register(void)
.abort = fetch_curl_abort,
.free = fetch_curl_free,
.poll = fetch_curl_poll,
+ .fdset = fetch_curl_fdset,
.finalise = fetch_curl_finalise
};
-----------------------------------------------------------------------
Summary of changes:
content/fetch.c | 23 ++++++++++++++---------
content/fetchers.h | 6 ++++++
content/fetchers/curl.c | 18 ++++++++++++++++++
3 files changed, 38 insertions(+), 9 deletions(-)
diff --git a/content/fetch.c b/content/fetch.c
index c5928ba..decb261 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -39,7 +39,6 @@
#include <strings.h>
#include <time.h>
#include <libwapcaplet/libwapcaplet.h>
-#include <curl/curl.h>
#include "utils/config.h"
#include "utils/corestrings.h"
@@ -386,8 +385,7 @@ nserror fetcher_fdset(fd_set *read_fd_set,
fd_set *except_fd_set,
int *maxfd_out)
{
- CURLMcode code;
- int maxfd;
+ int maxfd = -1;
int fetcherd; /* fetcher index */
if (!fetch_dispatch_jobs()) {
@@ -408,12 +406,19 @@ nserror fetcher_fdset(fd_set *read_fd_set,
FD_ZERO(read_fd_set);
FD_ZERO(write_fd_set);
FD_ZERO(except_fd_set);
- code = curl_multi_fdset(fetch_curl_multi,
- read_fd_set,
- write_fd_set,
- except_fd_set,
- &maxfd);
- assert(code == CURLM_OK);
+
+ for (fetcherd = 0; fetcherd < MAX_FETCHERS; fetcherd++) {
+ if ((fetchers[fetcherd].refcount > 0) &&
+ (fetchers[fetcherd].ops.fdset != NULL)) {
+ /* fetcher present */
+ int fetcher_maxfd;
+ fetcher_maxfd = fetchers[fetcherd].ops.fdset(
+ fetchers[fetcherd].scheme, read_fd_set,
+ write_fd_set, except_fd_set);
+ if (fetcher_maxfd > maxfd)
+ maxfd = fetcher_maxfd;
+ }
+ }
if (maxfd >= 0) {
/* change the scheduled poll to happen is a 1000ms as
diff --git a/content/fetchers.h b/content/fetchers.h
index 92b11dc..cd09e92 100644
--- a/content/fetchers.h
+++ b/content/fetchers.h
@@ -91,6 +91,12 @@ struct fetcher_operation_table {
void (*poll)(lwc_string *scheme);
/**
+ * update an fdset with the FDs needed to poll cleanly
+ */
+ int (*fdset)(lwc_string *scheme, fd_set *read_set, fd_set *write_set,
+ fd_set *error_set);
+
+ /**
* Finalise the fetcher.
*/
void (*finalise)(lwc_string *scheme);
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index 10a0d99..66970ef 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -1374,6 +1374,23 @@ fetch_curl_header(char *data, size_t size, size_t nmemb, void *_f)
#undef SKIP_ST
}
+static int fetch_curl_fdset(lwc_string *scheme, fd_set *read_set,
+ fd_set *write_set, fd_set *error_set)
+{
+ CURLMcode code;
+ int maxfd = -1;
+
+ code = curl_multi_fdset(fetch_curl_multi,
+ read_set,
+ write_set,
+ error_set,
+ &maxfd);
+ assert(code == CURLM_OK);
+
+ return maxfd;
+}
+
+
/* exported function documented in content/fetchers/curl.h */
nserror fetch_curl_register(void)
@@ -1390,6 +1407,7 @@ nserror fetch_curl_register(void)
.abort = fetch_curl_abort,
.free = fetch_curl_free,
.poll = fetch_curl_poll,
+ .fdset = fetch_curl_fdset,
.finalise = fetch_curl_finalise
};
--
NetSurf Browser
7 years, 2 months