netsurf: branch master updated. release/3.9-509-gbb5d724
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/bb5d72410bf9a3a997ade...
...commit http://git.netsurf-browser.org/netsurf.git/commit/bb5d72410bf9a3a997ade1e...
...tree http://git.netsurf-browser.org/netsurf.git/tree/bb5d72410bf9a3a997ade1e87...
The branch, master has been updated
via bb5d72410bf9a3a997ade1e8760b8f240d32af0d (commit)
from a47270c93eaa7bb76638c4c6dbef23359531651c (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=bb5d72410bf9a3a997a...
commit bb5d72410bf9a3a997ade1e8760b8f240d32af0d
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
fetchers: Rework the about, data, file, and resource fetcher poll loop
This simplifies the poll loops a little more and makes me less worried
that some other corner case will bite us in the future.
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index dda8fc8..0e85eff 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -1580,7 +1580,6 @@ static void fetch_about_free(void *ctx)
{
struct fetch_about_context *c = ctx;
nsurl_unref(c->url);
- RING_REMOVE(ring, c);
free(ctx);
}
@@ -1614,14 +1613,14 @@ static void fetch_about_abort(void *ctx)
*/
static void fetch_about_poll(lwc_string *scheme)
{
- struct fetch_about_context *c, *next;
- bool was_last_item = false;
-
- if (ring == NULL) return;
+ struct fetch_about_context *c, *save_ring = NULL;
/* Iterate over ring, processing each pending fetch */
- c = ring;
- do {
+ while (ring != NULL) {
+ /* Take the first entry from the ring */
+ c = ring;
+ RING_REMOVE(ring, c);
+
/* Ignore fetches that have been flagged as locked.
* This allows safe re-entrant calls to this function.
* Re-entrancy can occur if, as a result of a callback,
@@ -1629,7 +1628,7 @@ static void fetch_about_poll(lwc_string *scheme)
* again.
*/
if (c->locked == true) {
- next = c->r_next;
+ RING_INSERT(save_ring, c);
continue;
}
@@ -1639,32 +1638,15 @@ static void fetch_about_poll(lwc_string *scheme)
c->handler(c);
}
- /* Compute next fetch item at the last possible moment
- * as processing this item may have added to the ring
- */
- next = c->r_next;
- was_last_item = next == c;
-
+ /* And now finish */
fetch_remove_from_queues(c->fetchh);
fetch_free(c->fetchh);
+ }
- /* Having called into the fetch machinery, our ring might
- * have been updated
- */
- if (was_last_item) {
- /* We were previously the last item in the ring
- * so let's reset to the head of the ring
- * and try again
- */
- c = ring;
- } else {
- c = next;
- }
-
- /* Advance to next ring entry, exiting if we've reached
- * the start of the ring or the ring has become empty
- */
- } while (ring != NULL);
+ /* Finally, if we saved any fetches which were locked, put them back
+ * into the ring for next time
+ */
+ ring = save_ring;
}
diff --git a/content/fetchers/data.c b/content/fetchers/data.c
index 8316d15..c7de14c 100644
--- a/content/fetchers/data.c
+++ b/content/fetchers/data.c
@@ -135,7 +135,6 @@ static void fetch_data_free(void *ctx)
nsurl_unref(c->url);
free(c->data);
free(c->mimetype);
- RING_REMOVE(ring, c);
free(ctx);
}
@@ -245,14 +244,14 @@ static bool fetch_data_process(struct fetch_data_context *c)
static void fetch_data_poll(lwc_string *scheme)
{
fetch_msg msg;
- struct fetch_data_context *c, *next;
- bool was_last_item = false;
-
- if (ring == NULL) return;
+ struct fetch_data_context *c, *save_ring = NULL;
/* Iterate over ring, processing each pending fetch */
- c = ring;
- do {
+ while (ring != NULL) {
+ /* Take the first entry from the ring */
+ c = ring;
+ RING_REMOVE(ring, c);
+
/* Ignore fetches that have been flagged as locked.
* This allows safe re-entrant calls to this function.
* Re-entrancy can occur if, as a result of a callback,
@@ -260,7 +259,7 @@ static void fetch_data_poll(lwc_string *scheme)
* again.
*/
if (c->locked == true) {
- next = c->r_next;
+ RING_INSERT(save_ring, c);
continue;
}
@@ -311,32 +310,15 @@ static void fetch_data_poll(lwc_string *scheme)
assert(c->locked == false);
}
- /* Compute next fetch item at the last possible moment as
- * processing this item may have added to the ring.
- */
- next = c->r_next;
- was_last_item = next == c;
-
+ /* And now finish */
fetch_remove_from_queues(c->parent_fetch);
fetch_free(c->parent_fetch);
+ }
- /* Having called into the fetch machinery, our ring might
- * have been updated
- */
- if (was_last_item) {
- /* We were previously the last item in the ring
- * so let's reset to the head of the ring
- * and try again
- */
- c = ring;
- } else {
- c = next;
- }
-
- /* Advance to next ring entry, exiting if we've reached
- * the start of the ring or the ring has become empty
- */
- } while (ring != NULL);
+ /* Finally, if we saved any fetches which were locked, put them back
+ * into the ring for next time
+ */
+ ring = save_ring;
}
nserror fetch_data_register(void)
diff --git a/content/fetchers/file.c b/content/fetchers/file.c
index ede001f..bf2cc32 100644
--- a/content/fetchers/file.c
+++ b/content/fetchers/file.c
@@ -195,7 +195,6 @@ static void fetch_file_free(void *ctx)
struct fetch_file_context *c = ctx;
nsurl_unref(c->url);
free(c->path);
- RING_REMOVE(ring, c);
free(ctx);
}
@@ -791,14 +790,13 @@ static void fetch_file_process(struct fetch_file_context *ctx)
/** callback to poll for additional file fetch contents */
static void fetch_file_poll(lwc_string *scheme)
{
- struct fetch_file_context *c, *next;
- bool was_last_item = false;
+ struct fetch_file_context *c, *save_ring = NULL;
- if (ring == NULL) return;
+ while (ring != NULL) {
+ /* Take the first entry from the ring */
+ c = ring;
+ RING_REMOVE(ring, c);
- /* Iterate over ring, processing each pending fetch */
- c = ring;
- do {
/* Ignore fetches that have been flagged as locked.
* This allows safe re-entrant calls to this function.
* Re-entrancy can occur if, as a result of a callback,
@@ -806,7 +804,7 @@ static void fetch_file_poll(lwc_string *scheme)
* again.
*/
if (c->locked == true) {
- next = c->r_next;
+ RING_INSERT(save_ring, c);
continue;
}
@@ -816,32 +814,16 @@ static void fetch_file_poll(lwc_string *scheme)
fetch_file_process(c);
}
- /* Compute next fetch item at the last possible moment as
- * processing this item may have added to the ring.
- */
- next = c->r_next;
- was_last_item = next == c;
-
+ /* And now finish */
fetch_remove_from_queues(c->fetchh);
fetch_free(c->fetchh);
- /* Having called into the fetch machinery, our ring might
- * have been updated
- */
- if (was_last_item) {
- /* We were previously the last item in the ring
- * so let's reset to the head of the ring
- * and try again
- */
- c = ring;
- } else {
- c = next;
- }
+ }
- /* Advance to next ring entry, exiting if we've reached
- * the start of the ring or the ring has become empty
- */
- } while (ring != NULL);
+ /* Finally, if we saved any fetches which were locked, put them back
+ * into the ring for next time
+ */
+ ring = save_ring;
}
nserror fetch_file_register(void)
diff --git a/content/fetchers/resource.c b/content/fetchers/resource.c
index c17ffd9..c8176f3 100644
--- a/content/fetchers/resource.c
+++ b/content/fetchers/resource.c
@@ -406,7 +406,6 @@ static void fetch_resource_free(void *ctx)
struct fetch_resource_context *c = ctx;
if (c->url != NULL)
nsurl_unref(c->url);
- RING_REMOVE(ring, c);
free(ctx);
}
@@ -432,14 +431,13 @@ static void fetch_resource_abort(void *ctx)
/** callback to poll for additional resource fetch contents */
static void fetch_resource_poll(lwc_string *scheme)
{
- struct fetch_resource_context *c, *next;
- bool was_last_item = false;
+ struct fetch_resource_context *c, *save_ring = NULL;
- if (ring == NULL) return;
+ while (ring != NULL) {
+ /* Take the first entry from the ring */
+ c = ring;
+ RING_REMOVE(ring, c);
- /* Iterate over ring, processing each pending fetch */
- c = ring;
- do {
/* Ignore fetches that have been flagged as locked.
* This allows safe re-entrant calls to this function.
* Re-entrancy can occur if, as a result of a callback,
@@ -447,7 +445,7 @@ static void fetch_resource_poll(lwc_string *scheme)
* again.
*/
if (c->locked == true) {
- next = c->r_next;
+ RING_INSERT(save_ring, c);
continue;
}
@@ -457,32 +455,15 @@ static void fetch_resource_poll(lwc_string *scheme)
c->handler(c);
}
- /* Compute next fetch item at the last possible moment
- * as processing this item may have added to the ring
- */
- next = c->r_next;
- was_last_item = next == c;
-
+ /* And now finish */
fetch_remove_from_queues(c->fetchh);
fetch_free(c->fetchh);
+ }
- /* Having called into the fetch machinery, our ring might
- * have been updated
- */
- if (was_last_item) {
- /* We were previously the last item in the ring
- * so let's reset to the head of the ring
- * and try again
- */
- c = ring;
- } else {
- c = next;
- }
-
- /* Advance to next ring entry, exiting if we've reached
- * the start of the ring or the ring has become empty
- */
- } while (ring != NULL);
+ /* Finally, if we saved any fetches which were locked, put them back
+ * into the ring for next time
+ */
+ ring = save_ring;
}
nserror fetch_resource_register(void)
-----------------------------------------------------------------------
Summary of changes:
content/fetchers/about.c | 44 +++++++++++++------------------------------
content/fetchers/data.c | 44 +++++++++++++------------------------------
content/fetchers/file.c | 42 ++++++++++++-----------------------------
content/fetchers/resource.c | 43 ++++++++++++------------------------------
4 files changed, 50 insertions(+), 123 deletions(-)
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index dda8fc8..0e85eff 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -1580,7 +1580,6 @@ static void fetch_about_free(void *ctx)
{
struct fetch_about_context *c = ctx;
nsurl_unref(c->url);
- RING_REMOVE(ring, c);
free(ctx);
}
@@ -1614,14 +1613,14 @@ static void fetch_about_abort(void *ctx)
*/
static void fetch_about_poll(lwc_string *scheme)
{
- struct fetch_about_context *c, *next;
- bool was_last_item = false;
-
- if (ring == NULL) return;
+ struct fetch_about_context *c, *save_ring = NULL;
/* Iterate over ring, processing each pending fetch */
- c = ring;
- do {
+ while (ring != NULL) {
+ /* Take the first entry from the ring */
+ c = ring;
+ RING_REMOVE(ring, c);
+
/* Ignore fetches that have been flagged as locked.
* This allows safe re-entrant calls to this function.
* Re-entrancy can occur if, as a result of a callback,
@@ -1629,7 +1628,7 @@ static void fetch_about_poll(lwc_string *scheme)
* again.
*/
if (c->locked == true) {
- next = c->r_next;
+ RING_INSERT(save_ring, c);
continue;
}
@@ -1639,32 +1638,15 @@ static void fetch_about_poll(lwc_string *scheme)
c->handler(c);
}
- /* Compute next fetch item at the last possible moment
- * as processing this item may have added to the ring
- */
- next = c->r_next;
- was_last_item = next == c;
-
+ /* And now finish */
fetch_remove_from_queues(c->fetchh);
fetch_free(c->fetchh);
+ }
- /* Having called into the fetch machinery, our ring might
- * have been updated
- */
- if (was_last_item) {
- /* We were previously the last item in the ring
- * so let's reset to the head of the ring
- * and try again
- */
- c = ring;
- } else {
- c = next;
- }
-
- /* Advance to next ring entry, exiting if we've reached
- * the start of the ring or the ring has become empty
- */
- } while (ring != NULL);
+ /* Finally, if we saved any fetches which were locked, put them back
+ * into the ring for next time
+ */
+ ring = save_ring;
}
diff --git a/content/fetchers/data.c b/content/fetchers/data.c
index 8316d15..c7de14c 100644
--- a/content/fetchers/data.c
+++ b/content/fetchers/data.c
@@ -135,7 +135,6 @@ static void fetch_data_free(void *ctx)
nsurl_unref(c->url);
free(c->data);
free(c->mimetype);
- RING_REMOVE(ring, c);
free(ctx);
}
@@ -245,14 +244,14 @@ static bool fetch_data_process(struct fetch_data_context *c)
static void fetch_data_poll(lwc_string *scheme)
{
fetch_msg msg;
- struct fetch_data_context *c, *next;
- bool was_last_item = false;
-
- if (ring == NULL) return;
+ struct fetch_data_context *c, *save_ring = NULL;
/* Iterate over ring, processing each pending fetch */
- c = ring;
- do {
+ while (ring != NULL) {
+ /* Take the first entry from the ring */
+ c = ring;
+ RING_REMOVE(ring, c);
+
/* Ignore fetches that have been flagged as locked.
* This allows safe re-entrant calls to this function.
* Re-entrancy can occur if, as a result of a callback,
@@ -260,7 +259,7 @@ static void fetch_data_poll(lwc_string *scheme)
* again.
*/
if (c->locked == true) {
- next = c->r_next;
+ RING_INSERT(save_ring, c);
continue;
}
@@ -311,32 +310,15 @@ static void fetch_data_poll(lwc_string *scheme)
assert(c->locked == false);
}
- /* Compute next fetch item at the last possible moment as
- * processing this item may have added to the ring.
- */
- next = c->r_next;
- was_last_item = next == c;
-
+ /* And now finish */
fetch_remove_from_queues(c->parent_fetch);
fetch_free(c->parent_fetch);
+ }
- /* Having called into the fetch machinery, our ring might
- * have been updated
- */
- if (was_last_item) {
- /* We were previously the last item in the ring
- * so let's reset to the head of the ring
- * and try again
- */
- c = ring;
- } else {
- c = next;
- }
-
- /* Advance to next ring entry, exiting if we've reached
- * the start of the ring or the ring has become empty
- */
- } while (ring != NULL);
+ /* Finally, if we saved any fetches which were locked, put them back
+ * into the ring for next time
+ */
+ ring = save_ring;
}
nserror fetch_data_register(void)
diff --git a/content/fetchers/file.c b/content/fetchers/file.c
index ede001f..bf2cc32 100644
--- a/content/fetchers/file.c
+++ b/content/fetchers/file.c
@@ -195,7 +195,6 @@ static void fetch_file_free(void *ctx)
struct fetch_file_context *c = ctx;
nsurl_unref(c->url);
free(c->path);
- RING_REMOVE(ring, c);
free(ctx);
}
@@ -791,14 +790,13 @@ static void fetch_file_process(struct fetch_file_context *ctx)
/** callback to poll for additional file fetch contents */
static void fetch_file_poll(lwc_string *scheme)
{
- struct fetch_file_context *c, *next;
- bool was_last_item = false;
+ struct fetch_file_context *c, *save_ring = NULL;
- if (ring == NULL) return;
+ while (ring != NULL) {
+ /* Take the first entry from the ring */
+ c = ring;
+ RING_REMOVE(ring, c);
- /* Iterate over ring, processing each pending fetch */
- c = ring;
- do {
/* Ignore fetches that have been flagged as locked.
* This allows safe re-entrant calls to this function.
* Re-entrancy can occur if, as a result of a callback,
@@ -806,7 +804,7 @@ static void fetch_file_poll(lwc_string *scheme)
* again.
*/
if (c->locked == true) {
- next = c->r_next;
+ RING_INSERT(save_ring, c);
continue;
}
@@ -816,32 +814,16 @@ static void fetch_file_poll(lwc_string *scheme)
fetch_file_process(c);
}
- /* Compute next fetch item at the last possible moment as
- * processing this item may have added to the ring.
- */
- next = c->r_next;
- was_last_item = next == c;
-
+ /* And now finish */
fetch_remove_from_queues(c->fetchh);
fetch_free(c->fetchh);
- /* Having called into the fetch machinery, our ring might
- * have been updated
- */
- if (was_last_item) {
- /* We were previously the last item in the ring
- * so let's reset to the head of the ring
- * and try again
- */
- c = ring;
- } else {
- c = next;
- }
+ }
- /* Advance to next ring entry, exiting if we've reached
- * the start of the ring or the ring has become empty
- */
- } while (ring != NULL);
+ /* Finally, if we saved any fetches which were locked, put them back
+ * into the ring for next time
+ */
+ ring = save_ring;
}
nserror fetch_file_register(void)
diff --git a/content/fetchers/resource.c b/content/fetchers/resource.c
index c17ffd9..c8176f3 100644
--- a/content/fetchers/resource.c
+++ b/content/fetchers/resource.c
@@ -406,7 +406,6 @@ static void fetch_resource_free(void *ctx)
struct fetch_resource_context *c = ctx;
if (c->url != NULL)
nsurl_unref(c->url);
- RING_REMOVE(ring, c);
free(ctx);
}
@@ -432,14 +431,13 @@ static void fetch_resource_abort(void *ctx)
/** callback to poll for additional resource fetch contents */
static void fetch_resource_poll(lwc_string *scheme)
{
- struct fetch_resource_context *c, *next;
- bool was_last_item = false;
+ struct fetch_resource_context *c, *save_ring = NULL;
- if (ring == NULL) return;
+ while (ring != NULL) {
+ /* Take the first entry from the ring */
+ c = ring;
+ RING_REMOVE(ring, c);
- /* Iterate over ring, processing each pending fetch */
- c = ring;
- do {
/* Ignore fetches that have been flagged as locked.
* This allows safe re-entrant calls to this function.
* Re-entrancy can occur if, as a result of a callback,
@@ -447,7 +445,7 @@ static void fetch_resource_poll(lwc_string *scheme)
* again.
*/
if (c->locked == true) {
- next = c->r_next;
+ RING_INSERT(save_ring, c);
continue;
}
@@ -457,32 +455,15 @@ static void fetch_resource_poll(lwc_string *scheme)
c->handler(c);
}
- /* Compute next fetch item at the last possible moment
- * as processing this item may have added to the ring
- */
- next = c->r_next;
- was_last_item = next == c;
-
+ /* And now finish */
fetch_remove_from_queues(c->fetchh);
fetch_free(c->fetchh);
+ }
- /* Having called into the fetch machinery, our ring might
- * have been updated
- */
- if (was_last_item) {
- /* We were previously the last item in the ring
- * so let's reset to the head of the ring
- * and try again
- */
- c = ring;
- } else {
- c = next;
- }
-
- /* Advance to next ring entry, exiting if we've reached
- * the start of the ring or the ring has become empty
- */
- } while (ring != NULL);
+ /* Finally, if we saved any fetches which were locked, put them back
+ * into the ring for next time
+ */
+ ring = save_ring;
}
nserror fetch_resource_register(void)
--
NetSurf Browser
2 years, 11 months
netsurf: branch master updated. release/3.9-508-ga47270c
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/a47270c93eaa7bb76638c...
...commit http://git.netsurf-browser.org/netsurf.git/commit/a47270c93eaa7bb76638c4c...
...tree http://git.netsurf-browser.org/netsurf.git/tree/a47270c93eaa7bb76638c4c6d...
The branch, master has been updated
via a47270c93eaa7bb76638c4c6dbef23359531651c (commit)
from e59e52b8539b041153e4cdd80756806b06cf4892 (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=a47270c93eaa7bb7663...
commit a47270c93eaa7bb76638c4c6dbef23359531651c
Author: Michael Drake <michael.drake(a)codethink.co.uk>
Commit: Michael Drake <michael.drake(a)codethink.co.uk>
About fetches resources: Drop maps resource.
It had bitrotted.
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index 4b8562c..dda8fc8 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -686,28 +686,6 @@ static bool fetch_about_welcome_handler(struct fetch_about_context *ctx)
/**
- * Handler to generate about scheme maps page
- *
- * \param ctx The fetcher context.
- * \return true if handled false if aborted.
- */
-static bool fetch_about_maps_handler(struct fetch_about_context *ctx)
-{
- fetch_msg msg;
-
- /* content is going to return redirect */
- fetch_set_http_code(ctx->fetchh, 302);
-
- msg.type = FETCH_REDIRECT;
- msg.data.redirect = "resource:maps.html";
-
- fetch_about_send_callback(&msg, ctx);
-
- return true;
-}
-
-
-/**
* generate the description of the login query
*/
static nserror
@@ -1354,13 +1332,6 @@ struct about_handlers about_handler_list[] = {
false
},
{
- "maps",
- SLEN("maps"),
- NULL,
- fetch_about_maps_handler,
- false
- },
- {
"config",
SLEN("config"),
NULL,
diff --git a/content/fetchers/resource.c b/content/fetchers/resource.c
index 286f99e..c17ffd9 100644
--- a/content/fetchers/resource.c
+++ b/content/fetchers/resource.c
@@ -56,7 +56,6 @@ static const char *fetch_resource_paths[] = {
"credits.html",
"licence.html",
"welcome.html",
- "maps.html",
"favicon.ico",
"default.ico",
"netsurf.png",
diff --git a/frontends/atari/Makefile b/frontends/atari/Makefile
index 7a3573d..de4ca78 100644
--- a/frontends/atari/Makefile
+++ b/frontends/atari/Makefile
@@ -200,7 +200,6 @@ endif
$(Q)$(RM) $(ATARI_TARGET_DIR)res/messages
$(Q)$(SPLIT_MESSAGES) -l en -p atari -f messages -o $(ATARI_TARGET_DIR)res/messages resources/FatMessages
$(Q)cp resources/en/welcome.html $(ATARI_TARGET_DIR)res/welcome.html
- $(Q)cp resources/en/maps.html $(ATARI_TARGET_DIR)res/maps.html
$(Q)cp resources/en/licence.html $(ATARI_TARGET_DIR)res/licence.html
$(Q)cp resources/en/credits.html $(ATARI_TARGET_DIR)res/credits.html
diff --git a/frontends/beos/Makefile b/frontends/beos/Makefile
index 97fa848..46f12ec 100644
--- a/frontends/beos/Makefile
+++ b/frontends/beos/Makefile
@@ -110,7 +110,7 @@ RDEF_IMP_BEOS := $(addprefix $(OBJROOT)/,$(subst /,_,$(RDEF_IMP_BEOS)))
RDEP_BEOS := \
adblock.css beosdefault.css default.css internal.css quirks.css \
netsurf.png favicon.png ca-bundle.txt \
- credits.html licence.html welcome.html maps.html SearchEngines
+ credits.html licence.html welcome.html SearchEngines
RDEP_BEOS := $(addprefix $(FRONTEND_RESOURCES_DIR)/,$(RDEP_BEOS)) \
$(wildcard $(FRONTEND_RESOURCES_DIR)/icons/*.png) \
diff --git a/frontends/framebuffer/Makefile b/frontends/framebuffer/Makefile
index 9bb042f..e035afb 100644
--- a/frontends/framebuffer/Makefile
+++ b/frontends/framebuffer/Makefile
@@ -217,7 +217,7 @@ EXETARGET := nsfb
NETSURF_FRAMEBUFFER_RESOURCE_LIST := adblock.css credits.html \
default.css internal.css licence.html \
- netsurf.png quirks.css welcome.html maps.html
+ netsurf.png quirks.css welcome.html
install-framebuffer:
$(VQ)echo " INSTALL: $(DESTDIR)/$(PREFIX)"
diff --git a/frontends/gtk/Makefile b/frontends/gtk/Makefile
index ec9889e..02a5fdb 100644
--- a/frontends/gtk/Makefile
+++ b/frontends/gtk/Makefile
@@ -177,7 +177,7 @@ SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_RESOURCE) $(S_FRONTEND)
GTK_RESOURCES_LIST := \
languages SearchEngines ca-bundle.txt \
default.css adblock.css quirks.css internal.css \
- credits.html licence.html welcome.html maps.html Messages \
+ credits.html licence.html welcome.html Messages \
default.ico favicon.png netsurf.png netsurf.xpm netsurf-16x16.xpm
GTK_RESOURCES_LIST := \
diff --git a/frontends/gtk/res/netsurf.gresource.xml b/frontends/gtk/res/netsurf.gresource.xml
index a81500b..4335817 100644
--- a/frontends/gtk/res/netsurf.gresource.xml
+++ b/frontends/gtk/res/netsurf.gresource.xml
@@ -50,7 +50,6 @@
<file>it/welcome.html</file>
<file>ja/welcome.html</file>
<file>nl/welcome.html</file>
- <file>maps.html</file>
<file>adblock.css</file>
<file>default.css</file>
<file>internal.css</file>
diff --git a/frontends/gtk/resources.c b/frontends/gtk/resources.c
index 61853e4..a60119a 100644
--- a/frontends/gtk/resources.c
+++ b/frontends/gtk/resources.c
@@ -124,7 +124,6 @@ static struct nsgtk_resource_s direct_resource[] = {
RES_ENTRY("welcome.html"),
RES_ENTRY("credits.html"),
RES_ENTRY("licence.html"),
- RES_ENTRY("maps.html"),
RES_ENTRY("default.css"),
RES_ENTRY("adblock.css"),
RES_ENTRY("internal.css"),
diff --git a/resources/en/maps.html b/resources/en/maps.html
deleted file mode 100644
index 2427d8a..0000000
--- a/resources/en/maps.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<title>NetSurf: Static Maps</title>
-<style type="text/css">html,body{margin:0;padding:0;}body{color:#000;background:#fff;font-family:sans-serif;margin:0 auto;}a:link{text-decoration:underline;color:#00f;}a:visited{text-decoration:underline;color:#60a;}a:hover{text-decoration:none;}a:active{text-decoration:underline;color:#f00;}.banner{margin:0;padding:0;background:#94adff;text-align:left;}.banner img{border:none;color:#000;height:86px;width:308px;display:block;}.onlycontent{margin:0 1em;}.nslinks{display:table;width:100%;margin:0;border-spacing:0;padding:0;background:#ccd8ff;font-size:94%;}.nslinks li{display:table-cell;text-align:center;padding:0.2em 0.3em 0.3em;vertical-align:middle;}.nslinks li+li{border-left:2px solid #b1c3ff;}.version{padding:0;margin:1.2em auto 0;width:90%;color:#444;font-size:160%;}.intro{width:90%;margin:1em auto;color:#666;}.websearch{margin:1.5em auto;padding:0 0.3em 1.2em;background:#d8e2ff;border:2px solid #c5d3ff;width:80%;text-align:center;}.websearch p {text-align:left;color:#8c93a6;margin-left:1em; }.websearch input[type=text]{border:2px solid #b6c7ff;background:#f9faff;color:#000;margin:2px;}.websearch input[type=submit]{border:2px outset #cedaff;color:#000;background:#cedaff;margin:2px;}.footer{font-style:italic;color:#666;text-align:right; clear: both;}.footer p{margin-top:1.5em;padding-top:0.4em;border-top:2px solid #94adff;}.options {display:table;width:80%;margin:1.2em auto 3em; }.options-col {display:table-cell;}.options-col table {margin:0 auto;}</style>
-</head>
-
-<body>
-<h1 class="banner"><a href="http://www.netsurf-browser.org/"><img src="about:logo" alt="NetSurf"></a></h1>
-
-<ul class="nslinks">
-<li><a href="http://www.netsurf-browser.org/">NetSurf web site</a></li>
-<li><a href="http://www.netsurf-browser.org/documentation/">Documentation</a></li>
-<li><a href="http://www.netsurf-browser.org/downloads/">Download latest NetSurf</a></li>
-<li><a href="http://www.netsurf-browser.org/contact/">Contact the developers</a></li>
-</ul>
-
-<div class="onlycontent">
-<h2 class="version">Static Maps</h2>
-
-<p class="intro">Since NetSurf does not yet have enough JavaScript support
-to handle most mapping sites on the web, we provide here a simple interface
-to Google's Static Maps API.</p>
-
-<form method="get" action="https://maps.googleapis.com/maps/api/staticmap">
-<div class="websearch">
-<dl>
-<p>Example: <em>Oxford Street, London, UK</em></p>
-<input name="center" size="42" maxlength="255" type="text">
-<input type="submit" value="View Map!">
-</div>
-<div class="options">
-<div class="options-col">
-<table>
-<tr><td>Size</td><td><input name="size" size="10" maxlength="255" type="text" value="400x400"></td></tr>
-<tr><td>Scale</td><td><input type="radio" name="scale" value="1" checked>Standard<br>
-<input type="radio" name="scale" value="2">Double</td></tr>
-</table>
-</div>
-<div class="options-col">
-<table>
-<tr><td>Zoom</td><td><select name="zoom">
-<option value="0">Whole planet</option>
-<option value="1">1</option>
-<option value="2">2</option>
-<option value="3">3</option>
-<option value="4">4</option>
-<option value="5">5</option>
-<option value="6">6</option>
-<option value="7">7</option>
-<option value="8">8</option>
-<option value="9">9</option>
-<option value="10">10</option>
-<option value="11">11</option>
-<option value="12">12</option>
-<option value="13">13</option>
-<option value="14">14</option>
-<option value="15">15</option>
-<option value="16" selected>16</option>
-<option value="17">17</option>
-<option value="18">18</option>
-<option value="19">19</option>
-<option value="20">20</option>
-<option value="21">Really close</option>
-</select></td></tr>
-<tr><td>Type</td><td><select name="maptype">
-<option value="roadmap" selected>Road map</option>
-<option value="satellite">Satellite</option>
-<option value="terrain">Terrain</option>
-<option value="hybrid">Hybrid</option>
-</select></td></tr>
-</table>
-</div>
-</div>
-</form>
-
-
-
-<div class="footer">
-<p>NetSurf is licensed under the GNU Public Licence version 2</p>
-</div>
-</div>
-
-
-</body></html>
-----------------------------------------------------------------------
Summary of changes:
content/fetchers/about.c | 29 -----------
content/fetchers/resource.c | 1 -
frontends/atari/Makefile | 1 -
frontends/beos/Makefile | 2 +-
frontends/framebuffer/Makefile | 2 +-
frontends/gtk/Makefile | 2 +-
frontends/gtk/res/netsurf.gresource.xml | 1 -
frontends/gtk/resources.c | 1 -
resources/en/maps.html | 85 -------------------------------
9 files changed, 3 insertions(+), 121 deletions(-)
delete mode 100644 resources/en/maps.html
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index 4b8562c..dda8fc8 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -686,28 +686,6 @@ static bool fetch_about_welcome_handler(struct fetch_about_context *ctx)
/**
- * Handler to generate about scheme maps page
- *
- * \param ctx The fetcher context.
- * \return true if handled false if aborted.
- */
-static bool fetch_about_maps_handler(struct fetch_about_context *ctx)
-{
- fetch_msg msg;
-
- /* content is going to return redirect */
- fetch_set_http_code(ctx->fetchh, 302);
-
- msg.type = FETCH_REDIRECT;
- msg.data.redirect = "resource:maps.html";
-
- fetch_about_send_callback(&msg, ctx);
-
- return true;
-}
-
-
-/**
* generate the description of the login query
*/
static nserror
@@ -1354,13 +1332,6 @@ struct about_handlers about_handler_list[] = {
false
},
{
- "maps",
- SLEN("maps"),
- NULL,
- fetch_about_maps_handler,
- false
- },
- {
"config",
SLEN("config"),
NULL,
diff --git a/content/fetchers/resource.c b/content/fetchers/resource.c
index 286f99e..c17ffd9 100644
--- a/content/fetchers/resource.c
+++ b/content/fetchers/resource.c
@@ -56,7 +56,6 @@ static const char *fetch_resource_paths[] = {
"credits.html",
"licence.html",
"welcome.html",
- "maps.html",
"favicon.ico",
"default.ico",
"netsurf.png",
diff --git a/frontends/atari/Makefile b/frontends/atari/Makefile
index 7a3573d..de4ca78 100644
--- a/frontends/atari/Makefile
+++ b/frontends/atari/Makefile
@@ -200,7 +200,6 @@ endif
$(Q)$(RM) $(ATARI_TARGET_DIR)res/messages
$(Q)$(SPLIT_MESSAGES) -l en -p atari -f messages -o $(ATARI_TARGET_DIR)res/messages resources/FatMessages
$(Q)cp resources/en/welcome.html $(ATARI_TARGET_DIR)res/welcome.html
- $(Q)cp resources/en/maps.html $(ATARI_TARGET_DIR)res/maps.html
$(Q)cp resources/en/licence.html $(ATARI_TARGET_DIR)res/licence.html
$(Q)cp resources/en/credits.html $(ATARI_TARGET_DIR)res/credits.html
diff --git a/frontends/beos/Makefile b/frontends/beos/Makefile
index 97fa848..46f12ec 100644
--- a/frontends/beos/Makefile
+++ b/frontends/beos/Makefile
@@ -110,7 +110,7 @@ RDEF_IMP_BEOS := $(addprefix $(OBJROOT)/,$(subst /,_,$(RDEF_IMP_BEOS)))
RDEP_BEOS := \
adblock.css beosdefault.css default.css internal.css quirks.css \
netsurf.png favicon.png ca-bundle.txt \
- credits.html licence.html welcome.html maps.html SearchEngines
+ credits.html licence.html welcome.html SearchEngines
RDEP_BEOS := $(addprefix $(FRONTEND_RESOURCES_DIR)/,$(RDEP_BEOS)) \
$(wildcard $(FRONTEND_RESOURCES_DIR)/icons/*.png) \
diff --git a/frontends/framebuffer/Makefile b/frontends/framebuffer/Makefile
index 9bb042f..e035afb 100644
--- a/frontends/framebuffer/Makefile
+++ b/frontends/framebuffer/Makefile
@@ -217,7 +217,7 @@ EXETARGET := nsfb
NETSURF_FRAMEBUFFER_RESOURCE_LIST := adblock.css credits.html \
default.css internal.css licence.html \
- netsurf.png quirks.css welcome.html maps.html
+ netsurf.png quirks.css welcome.html
install-framebuffer:
$(VQ)echo " INSTALL: $(DESTDIR)/$(PREFIX)"
diff --git a/frontends/gtk/Makefile b/frontends/gtk/Makefile
index ec9889e..02a5fdb 100644
--- a/frontends/gtk/Makefile
+++ b/frontends/gtk/Makefile
@@ -177,7 +177,7 @@ SOURCES = $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_RESOURCE) $(S_FRONTEND)
GTK_RESOURCES_LIST := \
languages SearchEngines ca-bundle.txt \
default.css adblock.css quirks.css internal.css \
- credits.html licence.html welcome.html maps.html Messages \
+ credits.html licence.html welcome.html Messages \
default.ico favicon.png netsurf.png netsurf.xpm netsurf-16x16.xpm
GTK_RESOURCES_LIST := \
diff --git a/frontends/gtk/res/netsurf.gresource.xml b/frontends/gtk/res/netsurf.gresource.xml
index a81500b..4335817 100644
--- a/frontends/gtk/res/netsurf.gresource.xml
+++ b/frontends/gtk/res/netsurf.gresource.xml
@@ -50,7 +50,6 @@
<file>it/welcome.html</file>
<file>ja/welcome.html</file>
<file>nl/welcome.html</file>
- <file>maps.html</file>
<file>adblock.css</file>
<file>default.css</file>
<file>internal.css</file>
diff --git a/frontends/gtk/resources.c b/frontends/gtk/resources.c
index 61853e4..a60119a 100644
--- a/frontends/gtk/resources.c
+++ b/frontends/gtk/resources.c
@@ -124,7 +124,6 @@ static struct nsgtk_resource_s direct_resource[] = {
RES_ENTRY("welcome.html"),
RES_ENTRY("credits.html"),
RES_ENTRY("licence.html"),
- RES_ENTRY("maps.html"),
RES_ENTRY("default.css"),
RES_ENTRY("adblock.css"),
RES_ENTRY("internal.css"),
diff --git a/resources/en/maps.html b/resources/en/maps.html
deleted file mode 100644
index 2427d8a..0000000
--- a/resources/en/maps.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<title>NetSurf: Static Maps</title>
-<style type="text/css">html,body{margin:0;padding:0;}body{color:#000;background:#fff;font-family:sans-serif;margin:0 auto;}a:link{text-decoration:underline;color:#00f;}a:visited{text-decoration:underline;color:#60a;}a:hover{text-decoration:none;}a:active{text-decoration:underline;color:#f00;}.banner{margin:0;padding:0;background:#94adff;text-align:left;}.banner img{border:none;color:#000;height:86px;width:308px;display:block;}.onlycontent{margin:0 1em;}.nslinks{display:table;width:100%;margin:0;border-spacing:0;padding:0;background:#ccd8ff;font-size:94%;}.nslinks li{display:table-cell;text-align:center;padding:0.2em 0.3em 0.3em;vertical-align:middle;}.nslinks li+li{border-left:2px solid #b1c3ff;}.version{padding:0;margin:1.2em auto 0;width:90%;color:#444;font-size:160%;}.intro{width:90%;margin:1em auto;color:#666;}.websearch{margin:1.5em auto;padding:0 0.3em 1.2em;background:#d8e2ff;border:2px solid #c5d3ff;width:80%;text-align:center;}.websearch p {text-align:left;color:#8c93a6;margin-left:1em; }.websearch input[type=text]{border:2px solid #b6c7ff;background:#f9faff;color:#000;margin:2px;}.websearch input[type=submit]{border:2px outset #cedaff;color:#000;background:#cedaff;margin:2px;}.footer{font-style:italic;color:#666;text-align:right; clear: both;}.footer p{margin-top:1.5em;padding-top:0.4em;border-top:2px solid #94adff;}.options {display:table;width:80%;margin:1.2em auto 3em; }.options-col {display:table-cell;}.options-col table {margin:0 auto;}</style>
-</head>
-
-<body>
-<h1 class="banner"><a href="http://www.netsurf-browser.org/"><img src="about:logo" alt="NetSurf"></a></h1>
-
-<ul class="nslinks">
-<li><a href="http://www.netsurf-browser.org/">NetSurf web site</a></li>
-<li><a href="http://www.netsurf-browser.org/documentation/">Documentation</a></li>
-<li><a href="http://www.netsurf-browser.org/downloads/">Download latest NetSurf</a></li>
-<li><a href="http://www.netsurf-browser.org/contact/">Contact the developers</a></li>
-</ul>
-
-<div class="onlycontent">
-<h2 class="version">Static Maps</h2>
-
-<p class="intro">Since NetSurf does not yet have enough JavaScript support
-to handle most mapping sites on the web, we provide here a simple interface
-to Google's Static Maps API.</p>
-
-<form method="get" action="https://maps.googleapis.com/maps/api/staticmap">
-<div class="websearch">
-<dl>
-<p>Example: <em>Oxford Street, London, UK</em></p>
-<input name="center" size="42" maxlength="255" type="text">
-<input type="submit" value="View Map!">
-</div>
-<div class="options">
-<div class="options-col">
-<table>
-<tr><td>Size</td><td><input name="size" size="10" maxlength="255" type="text" value="400x400"></td></tr>
-<tr><td>Scale</td><td><input type="radio" name="scale" value="1" checked>Standard<br>
-<input type="radio" name="scale" value="2">Double</td></tr>
-</table>
-</div>
-<div class="options-col">
-<table>
-<tr><td>Zoom</td><td><select name="zoom">
-<option value="0">Whole planet</option>
-<option value="1">1</option>
-<option value="2">2</option>
-<option value="3">3</option>
-<option value="4">4</option>
-<option value="5">5</option>
-<option value="6">6</option>
-<option value="7">7</option>
-<option value="8">8</option>
-<option value="9">9</option>
-<option value="10">10</option>
-<option value="11">11</option>
-<option value="12">12</option>
-<option value="13">13</option>
-<option value="14">14</option>
-<option value="15">15</option>
-<option value="16" selected>16</option>
-<option value="17">17</option>
-<option value="18">18</option>
-<option value="19">19</option>
-<option value="20">20</option>
-<option value="21">Really close</option>
-</select></td></tr>
-<tr><td>Type</td><td><select name="maptype">
-<option value="roadmap" selected>Road map</option>
-<option value="satellite">Satellite</option>
-<option value="terrain">Terrain</option>
-<option value="hybrid">Hybrid</option>
-</select></td></tr>
-</table>
-</div>
-</div>
-</form>
-
-
-
-<div class="footer">
-<p>NetSurf is licensed under the GNU Public Licence version 2</p>
-</div>
-</div>
-
-
-</body></html>
--
NetSurf Browser
2 years, 11 months
netsurf-wiki: branch master updated. d8a37684fb44b59a2af22e361af0a2ce4721ae8a
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf-wiki.git/shortlog/d8a37684fb44b59a...
...commit http://git.netsurf-browser.org/netsurf-wiki.git/commit/d8a37684fb44b59a2a...
...tree http://git.netsurf-browser.org/netsurf-wiki.git/tree/d8a37684fb44b59a2af2...
The branch, master has been updated
via d8a37684fb44b59a2af22e361af0a2ce4721ae8a (commit)
from c1547b8aa8e421ac5e492e22ef131576bdd67f6d (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-wiki.git/commit/?id=d8a37684fb44b5...
commit d8a37684fb44b59a2af22e361af0a2ce4721ae8a
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Daniel fixed 2650
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/developer-weekend/feb-2020.mdwn b/developer-weekend/feb-2020.mdwn
index 333d206..8e2564a 100644
--- a/developer-weekend/feb-2020.mdwn
+++ b/developer-weekend/feb-2020.mdwn
@@ -172,7 +172,7 @@ Daniel
is freed without actually passing through one of the finish states
* Added surface enumeration to libnsfb
* Added support to use that to nsfb
-
+* Fixed [[!bug 2650]] by making windows port not use `NoMemory` where inappropriate.
Vince
-----
-----------------------------------------------------------------------
Summary of changes:
developer-weekend/feb-2020.mdwn | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/developer-weekend/feb-2020.mdwn b/developer-weekend/feb-2020.mdwn
index 333d206..8e2564a 100644
--- a/developer-weekend/feb-2020.mdwn
+++ b/developer-weekend/feb-2020.mdwn
@@ -172,7 +172,7 @@ Daniel
is freed without actually passing through one of the finish states
* Added surface enumeration to libnsfb
* Added support to use that to nsfb
-
+* Fixed [[!bug 2650]] by making windows port not use `NoMemory` where inappropriate.
Vince
-----
--
NetSurf Developer Wiki Backing Store
2 years, 11 months
netsurf: branch master updated. release/3.9-507-ge59e52b
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/e59e52b8539b041153e4c...
...commit http://git.netsurf-browser.org/netsurf.git/commit/e59e52b8539b041153e4cdd...
...tree http://git.netsurf-browser.org/netsurf.git/tree/e59e52b8539b041153e4cdd80...
The branch, master has been updated
via e59e52b8539b041153e4cdd80756806b06cf4892 (commit)
from 2fa06ed503fa18239b8d7a32c88ac24b8b8c0121 (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=e59e52b8539b041153e...
commit e59e52b8539b041153e4cdd80756806b06cf4892
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
windows: Convert the remaining NoMemory warnings which aren't about memory
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index f4c1ac3..716039a 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1120,9 +1120,10 @@ nsws_window_command(HWND hwnd,
case IDM_NAV_HOME:
{
nsurl *url;
+ ret = nsurl_create(nsoption_charp(homepage_url), &url);
- if (nsurl_create(nsoption_charp(homepage_url), &url) != NSERROR_OK) {
- win32_warning("NoMemory", 0);
+ if (ret != NSERROR_OK) {
+ win32_report_nserror(ret, 0);
} else {
browser_window_navigate(gw->bw,
url,
@@ -1952,13 +1953,15 @@ bool nsws_window_go(HWND hwnd, const char *urltxt)
{
struct gui_window *gw;
nsurl *url;
+ nserror ret;
gw = nsws_get_gui_window(hwnd);
if (gw == NULL)
return false;
+ ret = nsurl_create(urltxt, &url);
- if (nsurl_create(urltxt, &url) != NSERROR_OK) {
- win32_warning("NoMemory", 0);
+ if (ret != NSERROR_OK) {
+ win32_report_nserror(ret, 0);
} else {
browser_window_navigate(gw->bw,
url,
-----------------------------------------------------------------------
Summary of changes:
frontends/windows/window.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index f4c1ac3..716039a 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1120,9 +1120,10 @@ nsws_window_command(HWND hwnd,
case IDM_NAV_HOME:
{
nsurl *url;
+ ret = nsurl_create(nsoption_charp(homepage_url), &url);
- if (nsurl_create(nsoption_charp(homepage_url), &url) != NSERROR_OK) {
- win32_warning("NoMemory", 0);
+ if (ret != NSERROR_OK) {
+ win32_report_nserror(ret, 0);
} else {
browser_window_navigate(gw->bw,
url,
@@ -1952,13 +1953,15 @@ bool nsws_window_go(HWND hwnd, const char *urltxt)
{
struct gui_window *gw;
nsurl *url;
+ nserror ret;
gw = nsws_get_gui_window(hwnd);
if (gw == NULL)
return false;
+ ret = nsurl_create(urltxt, &url);
- if (nsurl_create(urltxt, &url) != NSERROR_OK) {
- win32_warning("NoMemory", 0);
+ if (ret != NSERROR_OK) {
+ win32_report_nserror(ret, 0);
} else {
browser_window_navigate(gw->bw,
url,
--
NetSurf Browser
2 years, 11 months
netsurf: branch master updated. release/3.9-506-g2fa06ed
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/2fa06ed503fa18239b8d7...
...commit http://git.netsurf-browser.org/netsurf.git/commit/2fa06ed503fa18239b8d7a3...
...tree http://git.netsurf-browser.org/netsurf.git/tree/2fa06ed503fa18239b8d7a32c...
The branch, master has been updated
via 2fa06ed503fa18239b8d7a32c88ac24b8b8c0121 (commit)
via 56a9a25192c31fde2bb3bbb7906f0220285227ab (commit)
via a970572fc9696b6615ee85165de71aa020a6358b (commit)
from 8ca778197c80725429d98548f429835f2656f2dd (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=2fa06ed503fa18239b8...
commit 2fa06ed503fa18239b8d7a32c88ac24b8b8c0121
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
windows: Use nserror reporting rather than always NoMemory
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 572e412..f4c1ac3 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1265,6 +1265,7 @@ nsws_window_command(HWND hwnd,
case IDC_MAIN_LAUNCH_URL:
{
nsurl *url;
+ nserror err;
if (GetFocus() != gw->urlbar)
break;
@@ -1274,8 +1275,10 @@ nsws_window_command(HWND hwnd,
SendMessage(gw->urlbar, WM_GETTEXT, (WPARAM)(len + 1), (LPARAM)addr);
NSLOG(netsurf, INFO, "launching %s\n", addr);
- if (nsurl_create(addr, &url) != NSERROR_OK) {
- win32_warning("NoMemory", 0);
+ err = nsurl_create(addr, &url);
+
+ if (err != NSERROR_OK) {
+ win32_report_nserror(err, 0);
} else {
browser_window_navigate(gw->bw,
url,
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=56a9a25192c31fde2bb...
commit 56a9a25192c31fde2bb3bbb7906f0220285227ab
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Windows: Add nserror reporting function
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/frontends/windows/gui.c b/frontends/windows/gui.c
index fdfafcf..9a2c13b 100644
--- a/frontends/windows/gui.c
+++ b/frontends/windows/gui.c
@@ -182,3 +182,17 @@ nserror win32_warning(const char *warning, const char *detail)
}
+/* exported function documented in windows/gui.h */
+nserror
+win32_report_nserror(nserror error, const char *detail)
+{
+ size_t len = 1 +
+ strlen(messages_get_errorcode(error)) +
+ ((detail != 0) ? strlen(detail) : 0);
+ char message[len];
+ snprintf(message, len, messages_get_errorcode(error), detail);
+ MessageBox(NULL, message, "Warning", MB_ICONWARNING);
+
+ return NSERROR_OK;
+}
+
diff --git a/frontends/windows/gui.h b/frontends/windows/gui.h
index 0633c93..957280a 100644
--- a/frontends/windows/gui.h
+++ b/frontends/windows/gui.h
@@ -68,6 +68,16 @@ void win32_set_quit(bool q);
nserror win32_warning(const char *warning, const char *detail);
/**
+ * Warn the user of an unexpected nserror.
+ *
+ * \param[in] error The nserror to report
+ * \param[in] detail Additional text to be displayed or NULL.
+ * \return NSERROR_OK on success or error code if there was a
+ * faliure displaying the message to the user.
+ */
+nserror win32_report_nserror(nserror error, const char *detail);
+
+/**
* add a modeless dialog to the special handling list
*/
nserror nsw32_add_dialog(HWND hwndDlg);
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=a970572fc9696b6615e...
commit a970572fc9696b6615ee85165de71aa020a6358b
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Add BadURL message
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/resources/FatMessages b/resources/FatMessages
index 5197ffb..5b8a996 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -468,6 +468,7 @@ it.all.DirectoryError:La directory '%s' è già esistente
nl.all.DirectoryError:map '%s' bestaat reeds
en.all.Timeout:This site took too long to respond
it.all.Timeout:Questo sito sta impiegando troppo a rispondere
+en.all.BadURL:The given URL was not able to be parsed
# error messages for RISC OS
#
-----------------------------------------------------------------------
Summary of changes:
frontends/windows/gui.c | 14 ++++++++++++++
frontends/windows/gui.h | 10 ++++++++++
frontends/windows/window.c | 7 +++++--
resources/FatMessages | 1 +
4 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/frontends/windows/gui.c b/frontends/windows/gui.c
index fdfafcf..9a2c13b 100644
--- a/frontends/windows/gui.c
+++ b/frontends/windows/gui.c
@@ -182,3 +182,17 @@ nserror win32_warning(const char *warning, const char *detail)
}
+/* exported function documented in windows/gui.h */
+nserror
+win32_report_nserror(nserror error, const char *detail)
+{
+ size_t len = 1 +
+ strlen(messages_get_errorcode(error)) +
+ ((detail != 0) ? strlen(detail) : 0);
+ char message[len];
+ snprintf(message, len, messages_get_errorcode(error), detail);
+ MessageBox(NULL, message, "Warning", MB_ICONWARNING);
+
+ return NSERROR_OK;
+}
+
diff --git a/frontends/windows/gui.h b/frontends/windows/gui.h
index 0633c93..957280a 100644
--- a/frontends/windows/gui.h
+++ b/frontends/windows/gui.h
@@ -68,6 +68,16 @@ void win32_set_quit(bool q);
nserror win32_warning(const char *warning, const char *detail);
/**
+ * Warn the user of an unexpected nserror.
+ *
+ * \param[in] error The nserror to report
+ * \param[in] detail Additional text to be displayed or NULL.
+ * \return NSERROR_OK on success or error code if there was a
+ * faliure displaying the message to the user.
+ */
+nserror win32_report_nserror(nserror error, const char *detail);
+
+/**
* add a modeless dialog to the special handling list
*/
nserror nsw32_add_dialog(HWND hwndDlg);
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 572e412..f4c1ac3 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1265,6 +1265,7 @@ nsws_window_command(HWND hwnd,
case IDC_MAIN_LAUNCH_URL:
{
nsurl *url;
+ nserror err;
if (GetFocus() != gw->urlbar)
break;
@@ -1274,8 +1275,10 @@ nsws_window_command(HWND hwnd,
SendMessage(gw->urlbar, WM_GETTEXT, (WPARAM)(len + 1), (LPARAM)addr);
NSLOG(netsurf, INFO, "launching %s\n", addr);
- if (nsurl_create(addr, &url) != NSERROR_OK) {
- win32_warning("NoMemory", 0);
+ err = nsurl_create(addr, &url);
+
+ if (err != NSERROR_OK) {
+ win32_report_nserror(err, 0);
} else {
browser_window_navigate(gw->bw,
url,
diff --git a/resources/FatMessages b/resources/FatMessages
index 5197ffb..5b8a996 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -468,6 +468,7 @@ it.all.DirectoryError:La directory '%s' è già esistente
nl.all.DirectoryError:map '%s' bestaat reeds
en.all.Timeout:This site took too long to respond
it.all.Timeout:Questo sito sta impiegando troppo a rispondere
+en.all.BadURL:The given URL was not able to be parsed
# error messages for RISC OS
#
--
NetSurf Browser
2 years, 11 months
netsurf-wiki: branch master updated. c1547b8aa8e421ac5e492e22ef131576bdd67f6d
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf-wiki.git/shortlog/c1547b8aa8e421ac...
...commit http://git.netsurf-browser.org/netsurf-wiki.git/commit/c1547b8aa8e421ac5e...
...tree http://git.netsurf-browser.org/netsurf-wiki.git/tree/c1547b8aa8e421ac5e49...
The branch, master has been updated
via c1547b8aa8e421ac5e492e22ef131576bdd67f6d (commit)
from 2aea0afca75ead74b1e90dae3705f3452a1d4632 (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-wiki.git/commit/?id=c1547b8aa8e421...
commit c1547b8aa8e421ac5e492e22ef131576bdd67f6d
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Vince's two bullets which are HUGE work
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/developer-weekend/feb-2020.mdwn b/developer-weekend/feb-2020.mdwn
index 2422732..333d206 100644
--- a/developer-weekend/feb-2020.mdwn
+++ b/developer-weekend/feb-2020.mdwn
@@ -177,7 +177,9 @@ Daniel
Vince
-----
-
+* Various code cleanups
+* Reworked our entire certificate handling framework to use DER rather than
+ our cert_info structures
Statement of work
-----------------------------------------------------------------------
Summary of changes:
developer-weekend/feb-2020.mdwn | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/developer-weekend/feb-2020.mdwn b/developer-weekend/feb-2020.mdwn
index 2422732..333d206 100644
--- a/developer-weekend/feb-2020.mdwn
+++ b/developer-weekend/feb-2020.mdwn
@@ -177,7 +177,9 @@ Daniel
Vince
-----
-
+* Various code cleanups
+* Reworked our entire certificate handling framework to use DER rather than
+ our cert_info structures
Statement of work
--
NetSurf Developer Wiki Backing Store
2 years, 11 months
netsurf-wiki: branch master updated. 2aea0afca75ead74b1e90dae3705f3452a1d4632
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf-wiki.git/shortlog/2aea0afca75ead74...
...commit http://git.netsurf-browser.org/netsurf-wiki.git/commit/2aea0afca75ead74b1...
...tree http://git.netsurf-browser.org/netsurf-wiki.git/tree/2aea0afca75ead74b1e9...
The branch, master has been updated
via 2aea0afca75ead74b1e90dae3705f3452a1d4632 (commit)
from fccf2d1b41a55e6fbe452676fab5bdc60f25a54b (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-wiki.git/commit/?id=2aea0afca75ead...
commit 2aea0afca75ead74b1e90dae3705f3452a1d4632
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Daniel did the surface listing
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/developer-weekend/feb-2020.mdwn b/developer-weekend/feb-2020.mdwn
index bc62834..2422732 100644
--- a/developer-weekend/feb-2020.mdwn
+++ b/developer-weekend/feb-2020.mdwn
@@ -45,7 +45,7 @@ Pathway to 3.10
(Assigned to Vince)
* At least some attention given to GTK focus issues (Daniel to complete this)
* Review styling for internal pages. (Assigned to Michael)
-* Listing compiled-in surfaces for nsfb (Assigned to Vincent)
+* Listing compiled-in surfaces for nsfb (Assigned to Daniel)
* [[!bug 2650]] Inappropriate error message (Assigned to Vincent)
* [[!bug 2722]] GTK3 UI vertical scrollbar wrong (Assigned to Vincent)
* [[!bug 2721]] Bizarre corners on download box in highdpi (Assigned to Michael)
@@ -170,6 +170,8 @@ Daniel
* Corrected ring handling in about, resource, file, and data fetchers
* Made fetch core send a `FETCH_ERROR` of `FetchFailedToFinish` if a fetch
is freed without actually passing through one of the finish states
+* Added surface enumeration to libnsfb
+ * Added support to use that to nsfb
Vince
-----------------------------------------------------------------------
Summary of changes:
developer-weekend/feb-2020.mdwn | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/developer-weekend/feb-2020.mdwn b/developer-weekend/feb-2020.mdwn
index bc62834..2422732 100644
--- a/developer-weekend/feb-2020.mdwn
+++ b/developer-weekend/feb-2020.mdwn
@@ -45,7 +45,7 @@ Pathway to 3.10
(Assigned to Vince)
* At least some attention given to GTK focus issues (Daniel to complete this)
* Review styling for internal pages. (Assigned to Michael)
-* Listing compiled-in surfaces for nsfb (Assigned to Vincent)
+* Listing compiled-in surfaces for nsfb (Assigned to Daniel)
* [[!bug 2650]] Inappropriate error message (Assigned to Vincent)
* [[!bug 2722]] GTK3 UI vertical scrollbar wrong (Assigned to Vincent)
* [[!bug 2721]] Bizarre corners on download box in highdpi (Assigned to Michael)
@@ -170,6 +170,8 @@ Daniel
* Corrected ring handling in about, resource, file, and data fetchers
* Made fetch core send a `FETCH_ERROR` of `FetchFailedToFinish` if a fetch
is freed without actually passing through one of the finish states
+* Added surface enumeration to libnsfb
+ * Added support to use that to nsfb
Vince
--
NetSurf Developer Wiki Backing Store
2 years, 11 months
netsurf: branch master updated. release/3.9-503-g8ca7781
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/8ca778197c80725429d98...
...commit http://git.netsurf-browser.org/netsurf.git/commit/8ca778197c80725429d9854...
...tree http://git.netsurf-browser.org/netsurf.git/tree/8ca778197c80725429d98548f...
The branch, master has been updated
via 8ca778197c80725429d98548f429835f2656f2dd (commit)
from b6d33785a089b99bd84ce7637c0a6f6529ad1fa5 (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=8ca778197c80725429d...
commit 8ca778197c80725429d98548f429835f2656f2dd
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
framebuffer: Use new enumerate feature of libnsfb
1. Select as default the most useful compiled in surface
2. If the selected surface is unavailable, report the valid
surface list to the user. Also do this if the user specifies
-f ? on the CLI.
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index e51705b..8f59fef 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -449,13 +449,29 @@ static int fb_browser_window_destroy(fbtk_widget_t *widget,
return 0;
}
+static void
+framebuffer_surface_iterator(void *ctx, const char *name, enum nsfb_type_e type)
+{
+ const char *arg0 = ctx;
+
+ fprintf(stderr, "%s: %s\n", arg0, name);
+}
+static enum nsfb_type_e fetype = NSFB_SURFACE_COUNT;
static const char *fename;
static int febpp;
static int fewidth;
static int feheight;
static const char *feurl;
+static void
+framebuffer_pick_default_fename(void *ctx, const char *name, enum nsfb_type_e type)
+{
+ if (type < fetype) {
+ fename = name;
+ }
+}
+
static bool
process_cmdline(int argc, char** argv)
{
@@ -467,7 +483,8 @@ process_cmdline(int argc, char** argv)
NSLOG(netsurf, INFO, "argc %d, argv %p", argc, argv);
- fename = "sdl";
+ nsfb_enumerate_surface_types(framebuffer_pick_default_fename, NULL);
+
febpp = 32;
fewidth = nsoption_int(window_width);
@@ -517,6 +534,16 @@ process_cmdline(int argc, char** argv)
feurl = argv[optind];
}
+ if (nsfb_type_from_name(fename) == NSFB_SURFACE_NONE) {
+ if (strcmp(fename, "?") != 0) {
+ fprintf(stderr,
+ "%s: Unknown surface `%s`\n", argv[0], fename);
+ }
+ fprintf(stderr, "%s: Valid surface names are:\n", argv[0]);
+ nsfb_enumerate_surface_types(framebuffer_surface_iterator, argv[0]);
+ return false;
+ }
+
return true;
}
-----------------------------------------------------------------------
Summary of changes:
frontends/framebuffer/gui.c | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index e51705b..8f59fef 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -449,13 +449,29 @@ static int fb_browser_window_destroy(fbtk_widget_t *widget,
return 0;
}
+static void
+framebuffer_surface_iterator(void *ctx, const char *name, enum nsfb_type_e type)
+{
+ const char *arg0 = ctx;
+
+ fprintf(stderr, "%s: %s\n", arg0, name);
+}
+static enum nsfb_type_e fetype = NSFB_SURFACE_COUNT;
static const char *fename;
static int febpp;
static int fewidth;
static int feheight;
static const char *feurl;
+static void
+framebuffer_pick_default_fename(void *ctx, const char *name, enum nsfb_type_e type)
+{
+ if (type < fetype) {
+ fename = name;
+ }
+}
+
static bool
process_cmdline(int argc, char** argv)
{
@@ -467,7 +483,8 @@ process_cmdline(int argc, char** argv)
NSLOG(netsurf, INFO, "argc %d, argv %p", argc, argv);
- fename = "sdl";
+ nsfb_enumerate_surface_types(framebuffer_pick_default_fename, NULL);
+
febpp = 32;
fewidth = nsoption_int(window_width);
@@ -517,6 +534,16 @@ process_cmdline(int argc, char** argv)
feurl = argv[optind];
}
+ if (nsfb_type_from_name(fename) == NSFB_SURFACE_NONE) {
+ if (strcmp(fename, "?") != 0) {
+ fprintf(stderr,
+ "%s: Unknown surface `%s`\n", argv[0], fename);
+ }
+ fprintf(stderr, "%s: Valid surface names are:\n", argv[0]);
+ nsfb_enumerate_surface_types(framebuffer_surface_iterator, argv[0]);
+ return false;
+ }
+
return true;
}
--
NetSurf Browser
2 years, 11 months
libnsfb: branch master updated. release/0.2.1-5-g9672c46
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libnsfb.git/shortlog/9672c46b1a3ecf2a0c324...
...commit http://git.netsurf-browser.org/libnsfb.git/commit/9672c46b1a3ecf2a0c32445...
...tree http://git.netsurf-browser.org/libnsfb.git/tree/9672c46b1a3ecf2a0c32445f1...
The branch, master has been updated
via 9672c46b1a3ecf2a0c32445f1c1d17f15fd20bb5 (commit)
via 1440a3a8cb8b44c4d762758c20b1fc31653ff187 (commit)
from 84fb99890ff127c763efc5014633b8e3a4c762b4 (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/libnsfb.git/commit/?id=9672c46b1a3ecf2a0c3...
commit 9672c46b1a3ecf2a0c32445f1c1d17f15fd20bb5
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
surface: Reorder surface types by usefulness
In order to allow client applications to decide which surface
to default to, order the types by usefulness to a typical user.
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/include/libnsfb.h b/include/libnsfb.h
index d52d821..674df65 100644
--- a/include/libnsfb.h
+++ b/include/libnsfb.h
@@ -35,13 +35,14 @@ typedef struct nsfb_bbox_s {
/** The type of framebuffer surface. */
enum nsfb_type_e {
NSFB_SURFACE_NONE = 0, /**< No surface */
- NSFB_SURFACE_RAM, /**< RAM surface */
NSFB_SURFACE_SDL, /**< SDL surface */
- NSFB_SURFACE_LINUX, /**< Linux framebuffer surface */
+ NSFB_SURFACE_X, /**< X windows surface */
+ NSFB_SURFACE_WL, /**< Wayland surface */
NSFB_SURFACE_VNC, /**< VNC surface */
+ NSFB_SURFACE_LINUX, /**< Linux framebuffer surface */
NSFB_SURFACE_ABLE, /**< ABLE framebuffer surface */
- NSFB_SURFACE_X, /**< X windows surface */
- NSFB_SURFACE_WL /**< Wayland surface */
+ NSFB_SURFACE_RAM, /**< RAM surface */
+ NSFB_SURFACE_COUNT, /**< The number of surface kinds */
};
enum nsfb_format_e {
commitdiff http://git.netsurf-browser.org/libnsfb.git/commit/?id=1440a3a8cb8b44c4d76...
commit 1440a3a8cb8b44c4d762758c20b1fc31653ff187
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
surface: Add basic surface enumerator
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/include/libnsfb.h b/include/libnsfb.h
index dfb720c..d52d821 100644
--- a/include/libnsfb.h
+++ b/include/libnsfb.h
@@ -58,6 +58,21 @@ enum nsfb_format_e {
NSFB_FMT_I1, /* black and white */
};
+/** Callback for surface enumeration
+ *
+ * @param The context you gave for the enumeration
+ * @param The name of a surface registered with libnsfb
+ * @param The type of that surface for use with ::nsfb_new
+ */
+typedef void (*surface_enumeration_cb)(void *, const char *, enum nsfb_type_e);
+
+/** Enumerate surface types registered with libnsfb
+ *
+ * @param cb The callback to call with each surface
+ * @param context The context to pass to the enumeration callback
+ */
+void nsfb_enumerate_surface_types(surface_enumeration_cb cb, void *context);
+
/** Select frontend type from a name.
*
* @param name The name to select a frontend.
diff --git a/src/surface/surface.c b/src/surface/surface.c
index f3127bd..426efa9 100644
--- a/src/surface/surface.c
+++ b/src/surface/surface.c
@@ -151,6 +151,17 @@ nsfb_type_from_name(const char *name)
return NSFB_SURFACE_NONE;
}
+/* exported interface defined in libnsfb.h */
+void
+nsfb_enumerate_surface_types(surface_enumeration_cb cb, void *context)
+{
+ int fend_loop;
+
+ for (fend_loop = 0; fend_loop < surface_count; fend_loop++) {
+ cb(context, surfaces[fend_loop].name, surfaces[fend_loop].type);
+ }
+}
+
/*
* Local variables:
* c-basic-offset: 4
-----------------------------------------------------------------------
Summary of changes:
include/libnsfb.h | 24 ++++++++++++++++++++----
src/surface/surface.c | 11 +++++++++++
2 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/include/libnsfb.h b/include/libnsfb.h
index dfb720c..674df65 100644
--- a/include/libnsfb.h
+++ b/include/libnsfb.h
@@ -35,13 +35,14 @@ typedef struct nsfb_bbox_s {
/** The type of framebuffer surface. */
enum nsfb_type_e {
NSFB_SURFACE_NONE = 0, /**< No surface */
- NSFB_SURFACE_RAM, /**< RAM surface */
NSFB_SURFACE_SDL, /**< SDL surface */
- NSFB_SURFACE_LINUX, /**< Linux framebuffer surface */
+ NSFB_SURFACE_X, /**< X windows surface */
+ NSFB_SURFACE_WL, /**< Wayland surface */
NSFB_SURFACE_VNC, /**< VNC surface */
+ NSFB_SURFACE_LINUX, /**< Linux framebuffer surface */
NSFB_SURFACE_ABLE, /**< ABLE framebuffer surface */
- NSFB_SURFACE_X, /**< X windows surface */
- NSFB_SURFACE_WL /**< Wayland surface */
+ NSFB_SURFACE_RAM, /**< RAM surface */
+ NSFB_SURFACE_COUNT, /**< The number of surface kinds */
};
enum nsfb_format_e {
@@ -58,6 +59,21 @@ enum nsfb_format_e {
NSFB_FMT_I1, /* black and white */
};
+/** Callback for surface enumeration
+ *
+ * @param The context you gave for the enumeration
+ * @param The name of a surface registered with libnsfb
+ * @param The type of that surface for use with ::nsfb_new
+ */
+typedef void (*surface_enumeration_cb)(void *, const char *, enum nsfb_type_e);
+
+/** Enumerate surface types registered with libnsfb
+ *
+ * @param cb The callback to call with each surface
+ * @param context The context to pass to the enumeration callback
+ */
+void nsfb_enumerate_surface_types(surface_enumeration_cb cb, void *context);
+
/** Select frontend type from a name.
*
* @param name The name to select a frontend.
diff --git a/src/surface/surface.c b/src/surface/surface.c
index f3127bd..426efa9 100644
--- a/src/surface/surface.c
+++ b/src/surface/surface.c
@@ -151,6 +151,17 @@ nsfb_type_from_name(const char *name)
return NSFB_SURFACE_NONE;
}
+/* exported interface defined in libnsfb.h */
+void
+nsfb_enumerate_surface_types(surface_enumeration_cb cb, void *context)
+{
+ int fend_loop;
+
+ for (fend_loop = 0; fend_loop < surface_count; fend_loop++) {
+ cb(context, surfaces[fend_loop].name, surfaces[fend_loop].type);
+ }
+}
+
/*
* Local variables:
* c-basic-offset: 4
--
NetSurf Framebuffer library
2 years, 11 months
netsurf-wiki: branch master updated. fccf2d1b41a55e6fbe452676fab5bdc60f25a54b
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf-wiki.git/shortlog/fccf2d1b41a55e6f...
...commit http://git.netsurf-browser.org/netsurf-wiki.git/commit/fccf2d1b41a55e6fbe...
...tree http://git.netsurf-browser.org/netsurf-wiki.git/tree/fccf2d1b41a55e6fbe45...
The branch, master has been updated
via fccf2d1b41a55e6fbe452676fab5bdc60f25a54b (commit)
from 13f4aa11553e12ff78c0acd4f447868927daef6d (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-wiki.git/commit/?id=fccf2d1b41a55e...
commit fccf2d1b41a55e6fbe452676fab5bdc60f25a54b
Author: Michael Drake <michael.drake(a)codethink.co.uk>
Commit: Michael Drake <michael.drake(a)codethink.co.uk>
Developer weekend: Cleanup.
diff --git a/developer-weekend/feb-2020.mdwn b/developer-weekend/feb-2020.mdwn
index de970bb..bc62834 100644
--- a/developer-weekend/feb-2020.mdwn
+++ b/developer-weekend/feb-2020.mdwn
@@ -92,10 +92,11 @@ Michael
-------
* Converted NetSurf's README to Markdown.
-* Removed unused minimum GIF delay setting from front ends (RISC OS, Amiga,
- GTK, Atari, Windows).
-* Removed unused minimum GIF delay option from Core settings.
-* Removed unused minimum GIF delay option from documentation.
+* Removed unused minimum GIF delay setting from:
+ - All the front ends that had settings code for the option:
+ (RISC OS, Amiga, GTK, Atari, Windows).
+ - Core options handling and tests.
+ - Settings documnetation.
* Various constifications of parameters though APIs:
- The `bw` in browser window URL access function.
- The core window in the core window callback table's getters.
-----------------------------------------------------------------------
Summary of changes:
developer-weekend/feb-2020.mdwn | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/developer-weekend/feb-2020.mdwn b/developer-weekend/feb-2020.mdwn
index de970bb..bc62834 100644
--- a/developer-weekend/feb-2020.mdwn
+++ b/developer-weekend/feb-2020.mdwn
@@ -92,10 +92,11 @@ Michael
-------
* Converted NetSurf's README to Markdown.
-* Removed unused minimum GIF delay setting from front ends (RISC OS, Amiga,
- GTK, Atari, Windows).
-* Removed unused minimum GIF delay option from Core settings.
-* Removed unused minimum GIF delay option from documentation.
+* Removed unused minimum GIF delay setting from:
+ - All the front ends that had settings code for the option:
+ (RISC OS, Amiga, GTK, Atari, Windows).
+ - Core options handling and tests.
+ - Settings documnetation.
* Various constifications of parameters though APIs:
- The `bw` in browser window URL access function.
- The core window in the core window callback table's getters.
--
NetSurf Developer Wiki Backing Store
2 years, 11 months