mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-07-01 09:08:42 +08:00
netsurf: Cleanup patch
This commit is contained in:
parent
43bfb21a5a
commit
d5e8455c48
@ -1,7 +1,7 @@
|
||||
diff -rupNw source-original/libnsfb/Makefile source/libnsfb/Makefile
|
||||
--- source-original/libnsfb/Makefile 2017-10-16 12:09:35.000000000 +0200
|
||||
+++ source/libnsfb/Makefile 2018-03-04 20:43:18.172956846 +0100
|
||||
@@ -43,10 +43,10 @@ endif
|
||||
diff -ruwN source/libnsfb/Makefile source-new/libnsfb/Makefile
|
||||
--- source/libnsfb/Makefile 2017-10-16 04:09:35.000000000 -0600
|
||||
+++ source-new/libnsfb/Makefile 2018-12-29 08:29:56.855249826 -0700
|
||||
@@ -43,10 +43,10 @@
|
||||
NSFB_XCB_PKG_NAMES := xcb xcb-icccm xcb-image xcb-keysyms xcb-atom
|
||||
|
||||
# determine which surface handlers can be compiled based upon avalable library
|
||||
@ -15,9 +15,9 @@ diff -rupNw source-original/libnsfb/Makefile source/libnsfb/Makefile
|
||||
|
||||
# surfaces not detectable via pkg-config
|
||||
NSFB_ABLE_AVAILABLE := no
|
||||
diff -rupNw source-original/libnsfb/src/plot.h source/libnsfb/src/plot.h
|
||||
--- source-original/libnsfb/src/plot.h 2017-10-16 12:09:35.000000000 +0200
|
||||
+++ source/libnsfb/src/plot.h 2018-03-04 20:43:18.188956997 +0100
|
||||
diff -ruwN source/libnsfb/src/plot.h source-new/libnsfb/src/plot.h
|
||||
--- source/libnsfb/src/plot.h 2017-10-16 04:09:35.000000000 -0600
|
||||
+++ source-new/libnsfb/src/plot.h 2018-12-29 08:29:56.855249826 -0700
|
||||
@@ -36,7 +36,7 @@
|
||||
#define NSFB_BE_BYTE_ORDER
|
||||
#endif
|
||||
@ -27,188 +27,10 @@ diff -rupNw source-original/libnsfb/src/plot.h source/libnsfb/src/plot.h
|
||||
#if defined(__BYTE_ORDER__)
|
||||
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
#define NSFB_BE_BYTE_ORDER
|
||||
diff -rupNw source-original/libnsfb/src/surface/sdl.c source/libnsfb/src/surface/sdl.c
|
||||
--- source-original/libnsfb/src/surface/sdl.c 2017-10-16 12:09:35.000000000 +0200
|
||||
+++ source/libnsfb/src/surface/sdl.c 2018-03-04 20:43:18.188956997 +0100
|
||||
@@ -458,7 +458,7 @@ static int sdl_initialise(nsfb_t *nsfb)
|
||||
return -1;
|
||||
|
||||
/* initialise SDL library */
|
||||
- if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_VIDEO) < 0 ) {
|
||||
+ if (SDL_Init(/*SDL_INIT_TIMER | */SDL_INIT_VIDEO) < 0 ) {
|
||||
fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
|
||||
return -1;
|
||||
}
|
||||
@@ -545,23 +545,23 @@ static bool sdl_input(nsfb_t *nsfb, nsfb
|
||||
|
||||
nsfb = nsfb; /* unused */
|
||||
|
||||
- if (timeout == 0) {
|
||||
+ //if (timeout == 0) {
|
||||
got_event = SDL_PollEvent(&sdlevent);
|
||||
- } else {
|
||||
- if (timeout > 0) {
|
||||
- /* setup wake timer to ensure the wait event below exits no later
|
||||
- * than when the timeout has occoured.
|
||||
- */
|
||||
- SDL_TimerID tid;
|
||||
- tid = SDL_AddTimer(timeout, wakeeventtimer, NULL);
|
||||
- got_event = SDL_WaitEvent(&sdlevent);
|
||||
- if ((got_event == 0) || (sdlevent.type != SDL_USEREVENT)) {
|
||||
- SDL_RemoveTimer(tid);
|
||||
- }
|
||||
- } else {
|
||||
- got_event = SDL_WaitEvent(&sdlevent);
|
||||
- }
|
||||
- }
|
||||
+ //} else {
|
||||
+ // if (timeout > 0) {
|
||||
+ // /* setup wake timer to ensure the wait event below exits no later
|
||||
+ // * than when the timeout has occoured.
|
||||
+ // */
|
||||
+ // SDL_TimerID tid;
|
||||
+ // tid = SDL_AddTimer(timeout, wakeeventtimer, NULL);
|
||||
+ // got_event = SDL_WaitEvent(&sdlevent);
|
||||
+ // if ((got_event == 0) || (sdlevent.type != SDL_USEREVENT)) {
|
||||
+ // SDL_RemoveTimer(tid);
|
||||
+ // }
|
||||
+ // } else {
|
||||
+ // got_event = SDL_WaitEvent(&sdlevent);
|
||||
+ // }
|
||||
+ //}
|
||||
|
||||
/* Do nothing if there was no event */
|
||||
if (got_event == 0) {
|
||||
diff -rupNw source-original/libparserutils/src/input/filter.c source/libparserutils/src/input/filter.c
|
||||
--- source-original/libparserutils/src/input/filter.c 2017-10-16 12:09:36.000000000 +0200
|
||||
+++ source/libparserutils/src/input/filter.c 2018-03-04 20:43:18.188956997 +0100
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
-#ifndef WITHOUT_ICONV_FILTER
|
||||
+#if 0
|
||||
#include <iconv.h>
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/** Input filter */
|
||||
struct parserutils_filter {
|
||||
-#ifndef WITHOUT_ICONV_FILTER
|
||||
+#if 0
|
||||
iconv_t cd; /**< Iconv conversion descriptor */
|
||||
uint16_t int_enc; /**< The internal encoding */
|
||||
#else
|
||||
@@ -68,7 +68,7 @@ parserutils_error parserutils__filter_cr
|
||||
if (f == NULL)
|
||||
return PARSERUTILS_NOMEM;
|
||||
|
||||
-#ifndef WITHOUT_ICONV_FILTER
|
||||
+#if 0
|
||||
f->cd = (iconv_t) -1;
|
||||
f->int_enc = parserutils_charset_mibenum_from_name(
|
||||
int_enc, strlen(int_enc));
|
||||
@@ -88,7 +88,7 @@ parserutils_error parserutils__filter_cr
|
||||
return error;
|
||||
}
|
||||
|
||||
-#ifdef WITHOUT_ICONV_FILTER
|
||||
+#if 1
|
||||
error = parserutils_charset_codec_create(int_enc, &f->write_codec);
|
||||
if (error != PARSERUTILS_OK) {
|
||||
if (f->read_codec != NULL) {
|
||||
@@ -116,7 +116,7 @@ parserutils_error parserutils__filter_de
|
||||
if (input == NULL)
|
||||
return PARSERUTILS_BADPARM;
|
||||
|
||||
-#ifndef WITHOUT_ICONV_FILTER
|
||||
+#if 0
|
||||
if (input->cd != (iconv_t) -1) {
|
||||
iconv_close(input->cd);
|
||||
input->cd = (iconv_t) -1;
|
||||
@@ -184,7 +184,7 @@ parserutils_error parserutils__filter_pr
|
||||
output == NULL || *output == NULL || outlen == NULL)
|
||||
return PARSERUTILS_BADPARM;
|
||||
|
||||
-#ifndef WITHOUT_ICONV_FILTER
|
||||
+#if 0
|
||||
if (iconv(input->cd, (void *) data, len,
|
||||
(char **) output, outlen) == (size_t) -1) {
|
||||
switch (errno) {
|
||||
@@ -305,7 +305,7 @@ parserutils_error parserutils__filter_re
|
||||
if (input == NULL)
|
||||
return PARSERUTILS_BADPARM;
|
||||
|
||||
-#ifndef WITHOUT_ICONV_FILTER
|
||||
+#if 0
|
||||
iconv(input->cd, NULL, 0, NULL, 0);
|
||||
#else
|
||||
/* Clear pivot buffer leftovers */
|
||||
@@ -340,7 +340,7 @@ parserutils_error filter_set_defaults(pa
|
||||
if (input == NULL)
|
||||
return PARSERUTILS_BADPARM;
|
||||
|
||||
-#ifdef WITHOUT_ICONV_FILTER
|
||||
+#if 1
|
||||
input->read_codec = NULL;
|
||||
input->write_codec = NULL;
|
||||
#endif
|
||||
@@ -377,7 +377,7 @@ parserutils_error filter_set_encoding(pa
|
||||
if (input->settings.encoding == mibenum)
|
||||
return PARSERUTILS_OK;
|
||||
|
||||
-#ifndef WITHOUT_ICONV_FILTER
|
||||
+#if 0
|
||||
if (input->cd != (iconv_t) -1) {
|
||||
iconv_close(input->cd);
|
||||
input->cd = (iconv_t) -1;
|
||||
diff -rupNw source-original/netsurf/content/fetchers/file.c source/netsurf/content/fetchers/file.c
|
||||
--- source-original/netsurf/content/fetchers/file.c 2017-10-16 12:09:36.000000000 +0200
|
||||
+++ source/netsurf/content/fetchers/file.c 2018-03-04 20:43:18.216957262 +0100
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
-#ifdef HAVE_MMAP
|
||||
+#if 0
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
#include <libwapcaplet/libwapcaplet.h>
|
||||
@@ -262,7 +262,7 @@ fetch_file_process_error_aborted:
|
||||
static void fetch_file_process_plain(struct fetch_file_context *ctx,
|
||||
struct stat *fdstat)
|
||||
{
|
||||
-#ifdef HAVE_MMAP
|
||||
+#if 0
|
||||
fetch_msg msg;
|
||||
char *buf = NULL;
|
||||
size_t buf_size;
|
||||
diff -rupNw source-original/netsurf/content/urldb.c source/netsurf/content/urldb.c
|
||||
--- source-original/netsurf/content/urldb.c 2017-10-16 12:09:36.000000000 +0200
|
||||
+++ source/netsurf/content/urldb.c 2018-03-04 20:43:18.216957262 +0100
|
||||
@@ -630,7 +630,7 @@ static bool urldb__host_is_ip_address(co
|
||||
size_t host_len = strlen(host);
|
||||
const char *sane_host;
|
||||
const char *slash;
|
||||
-#ifndef NO_IPV6
|
||||
+#if 0
|
||||
struct in6_addr ipv6;
|
||||
char ipv6_addr[64];
|
||||
unsigned int ipv6_addr_len;
|
||||
@@ -688,7 +688,7 @@ static bool urldb__host_is_ip_address(co
|
||||
goto out_false;
|
||||
}
|
||||
|
||||
-#ifndef NO_IPV6
|
||||
+#if 0
|
||||
if ((host_len < 6) ||
|
||||
(sane_host[0] != '[') ||
|
||||
(sane_host[host_len - 1] != ']')) {
|
||||
diff -rupNw source-original/netsurf/frontends/framebuffer/Makefile source/netsurf/frontends/framebuffer/Makefile
|
||||
--- source-original/netsurf/frontends/framebuffer/Makefile 2017-10-16 12:09:36.000000000 +0200
|
||||
+++ source/netsurf/frontends/framebuffer/Makefile 2018-03-04 20:43:18.232957414 +0100
|
||||
@@ -35,8 +35,8 @@ LDFLAGS += -Wl,--no-whole-archive
|
||||
diff -ruwN source/netsurf/frontends/framebuffer/Makefile source-new/netsurf/frontends/framebuffer/Makefile
|
||||
--- source/netsurf/frontends/framebuffer/Makefile 2017-10-16 04:09:36.000000000 -0600
|
||||
+++ source-new/netsurf/frontends/framebuffer/Makefile 2018-12-29 08:29:56.855249826 -0700
|
||||
@@ -35,8 +35,8 @@
|
||||
|
||||
# freetype is optional but does not use pkg-config
|
||||
ifeq ($(NETSURF_FB_FONTLIB),freetype)
|
||||
@ -219,9 +41,9 @@ diff -rupNw source-original/netsurf/frontends/framebuffer/Makefile source/netsur
|
||||
endif
|
||||
|
||||
|
||||
diff -rupNw source-original/netsurf/Makefile.config source/netsurf/Makefile.config
|
||||
--- source-original/netsurf/Makefile.config 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ source/netsurf/Makefile.config 2018-03-04 20:43:18.244957528 +0100
|
||||
diff -ruwN source/netsurf/Makefile.config source-new/netsurf/Makefile.config
|
||||
--- source/netsurf/Makefile.config 1969-12-31 17:00:00.000000000 -0700
|
||||
+++ source-new/netsurf/Makefile.config 2018-12-29 08:29:56.855249826 -0700
|
||||
@@ -0,0 +1,28 @@
|
||||
+override NETSURF_HOMEPAGE := "https://www.redox-os.org/"
|
||||
+override NETSURF_FB_FRONTEND := sdl
|
||||
@ -251,10 +73,10 @@ diff -rupNw source-original/netsurf/Makefile.config source/netsurf/Makefile.conf
|
||||
+override NETSURF_FB_FONT_MONOSPACE_BOLD := Mono/Fira/Bold.ttf
|
||||
+override NETSURF_FB_FONT_CURSIVE := Sans/Fira/Regular.ttf
|
||||
+override NETSURF_FB_FONT_FANTASY := Sans/Fira/Regular.ttf
|
||||
diff -rupNw source-original/netsurf/render/form.c source/netsurf/render/form.c
|
||||
--- source-original/netsurf/render/form.c 2017-10-16 12:09:36.000000000 +0200
|
||||
+++ source/netsurf/render/form.c 2018-03-09 00:03:07.456378705 +0100
|
||||
@@ -1080,7 +1080,7 @@ char *form_encode_item(const char *item,
|
||||
diff -ruwN source/netsurf/render/form.c source-new/netsurf/render/form.c
|
||||
--- source/netsurf/render/form.c 2017-10-16 04:09:36.000000000 -0600
|
||||
+++ source-new/netsurf/render/form.c 2018-12-29 08:29:56.855249826 -0700
|
||||
@@ -1080,7 +1080,7 @@
|
||||
if (!item || !charset)
|
||||
return NULL;
|
||||
|
||||
@ -263,7 +85,7 @@ diff -rupNw source-original/netsurf/render/form.c source/netsurf/render/form.c
|
||||
|
||||
err = utf8_to_enc(item, cset, 0, &ret);
|
||||
if (err == NSERROR_BAD_ENCODING) {
|
||||
@@ -1092,7 +1092,7 @@ char *form_encode_item(const char *item,
|
||||
@@ -1092,7 +1092,7 @@
|
||||
/* nope, try fallback charset (if any) */
|
||||
if (fallback) {
|
||||
snprintf(cset, sizeof cset,
|
||||
@ -272,7 +94,7 @@ diff -rupNw source-original/netsurf/render/form.c source/netsurf/render/form.c
|
||||
err = utf8_to_enc(item, cset, 0, &ret);
|
||||
|
||||
if (err == NSERROR_BAD_ENCODING) {
|
||||
@@ -1105,7 +1105,7 @@ char *form_encode_item(const char *item,
|
||||
@@ -1105,7 +1105,7 @@
|
||||
|
||||
if (err == NSERROR_BAD_ENCODING) {
|
||||
/* that also failed, use 8859-1 */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user