mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-19 19:34:18 +08:00
344 lines
12 KiB
Diff
344 lines
12 KiB
Diff
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
|
|
NSFB_XCB_PKG_NAMES := xcb xcb-icccm xcb-image xcb-keysyms xcb-atom
|
|
|
|
# determine which surface handlers can be compiled based upon avalable library
|
|
-$(eval $(call pkg_config_package_available,NSFB_VNC_AVAILABLE,libvncserver))
|
|
+#$(eval $(call pkg_config_package_available,NSFB_VNC_AVAILABLE,libvncserver))
|
|
$(eval $(call pkg_config_package_available,NSFB_SDL_AVAILABLE,sdl))
|
|
-$(eval $(call pkg_config_package_available,NSFB_XCB_AVAILABLE,$(NSFB_XCB_PKG_NAMES)))
|
|
-$(eval $(call pkg_config_package_available,NSFB_WLD_AVAILABLE,wayland-client))
|
|
+#$(eval $(call pkg_config_package_available,NSFB_XCB_AVAILABLE,$(NSFB_XCB_PKG_NAMES)))
|
|
+#$(eval $(call pkg_config_package_available,NSFB_WLD_AVAILABLE,wayland-client))
|
|
|
|
# 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
|
|
@@ -36,7 +36,7 @@
|
|
#define NSFB_BE_BYTE_ORDER
|
|
#endif
|
|
#else
|
|
- #include <endian.h>
|
|
+ #include <machine/endian.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
|
|
|
|
# freetype is optional but does not use pkg-config
|
|
ifeq ($(NETSURF_FB_FONTLIB),freetype)
|
|
- CFLAGS += -DFB_USE_FREETYPE $(shell freetype-config --cflags)
|
|
- LDFLAGS += $(shell freetype-config --libs)
|
|
+ CFLAGS += -DFB_USE_FREETYPE $(shell $(PKG_CONFIG) --cflags freetype2)
|
|
+ LDFLAGS += $(shell $(PKG_CONFIG) --libs freetype2)
|
|
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
|
|
@@ -0,0 +1,27 @@
|
|
+override NETSURF_HOMEPAGE := "https://www.redox-os.org/"
|
|
+override NETSURF_FB_FRONTEND := sdl
|
|
+
|
|
+override NETSURF_USE_JPEG := YES
|
|
+override NETSURF_USE_BMP := YES
|
|
+override NETSURF_USE_OPENSSL := YES
|
|
+override NETSURF_USE_CURL := YES
|
|
+override NETSURF_USE_PNG := YES
|
|
+
|
|
+override NETSURF_USE_NSSVG := NO
|
|
+override NETSURF_USE_RSVG := NO
|
|
+override NETSURF_USE_DUKTAPE := NO
|
|
+override NETSURF_USE_HARU_PDF := NO
|
|
+override NETSURF_USE_VIDEO := NO
|
|
+
|
|
+override NETSURF_FB_FONTLIB := freetype
|
|
+override NETSURF_FB_FONTPATH := /ui/fonts/
|
|
+override NETSURF_FB_FONT_SANS_SERIF := Sans/Fira/Regular.ttf
|
|
+override NETSURF_FB_FONT_SANS_SERIF_BOLD := Sans/Fira/Bold.ttf
|
|
+override NETSURF_FB_FONT_SANS_SERIF_ITALIC := Sans/Fira/Regular.ttf
|
|
+override NETSURF_FB_FONT_SANS_SERIF_ITALIC_BOLD := Sans/Fira/Bold.ttf
|
|
+override NETSURF_FB_FONT_SERIF := Sans/Fira/Regular.ttf
|
|
+override NETSURF_FB_FONT_SERIF_BOLD := Sans/Fira/Bold.ttf
|
|
+override NETSURF_FB_FONT_MONOSPACE := Mono/Fira/Regular.ttf
|
|
+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,
|
|
if (!item || !charset)
|
|
return NULL;
|
|
|
|
- snprintf(cset, sizeof cset, "%s//TRANSLIT", charset);
|
|
+ snprintf(cset, sizeof cset, "%s", charset);
|
|
|
|
err = utf8_to_enc(item, cset, 0, &ret);
|
|
if (err == NSERROR_BAD_ENCODING) {
|
|
@@ -1092,7 +1092,7 @@ char *form_encode_item(const char *item,
|
|
/* nope, try fallback charset (if any) */
|
|
if (fallback) {
|
|
snprintf(cset, sizeof cset,
|
|
- "%s//TRANSLIT", fallback);
|
|
+ "%s", fallback);
|
|
err = utf8_to_enc(item, cset, 0, &ret);
|
|
|
|
if (err == NSERROR_BAD_ENCODING) {
|
|
@@ -1105,7 +1105,7 @@ char *form_encode_item(const char *item,
|
|
|
|
if (err == NSERROR_BAD_ENCODING) {
|
|
/* that also failed, use 8859-1 */
|
|
- err = utf8_to_enc(item, "ISO-8859-1//TRANSLIT",
|
|
+ err = utf8_to_enc(item, "ISO-8859-1",
|
|
0, &ret);
|
|
if (err == NSERROR_BAD_ENCODING) {
|
|
/* and without transliteration */
|
|
diff -rupNw source-original/netsurf/utils/log.c source/netsurf/utils/log.c
|
|
--- source-original/netsurf/utils/log.c 2017-10-16 12:09:36.000000000 +0200
|
|
+++ source/netsurf/utils/log.c 2018-03-04 20:43:18.252957604 +0100
|
|
@@ -261,18 +261,18 @@ nserror nslog_init(nslog_ensure_t *ensur
|
|
/* sucessfull logging initialisation so log system info */
|
|
if (ret == NSERROR_OK) {
|
|
NSLOG(netsurf, INFO, "NetSurf version '%s'", netsurf_version);
|
|
- if (uname(&utsname) < 0) {
|
|
+ //if (uname(&utsname) < 0) {
|
|
NSLOG(netsurf, INFO,
|
|
"Failed to extract machine information");
|
|
- } else {
|
|
- NSLOG(netsurf, INFO,
|
|
- "NetSurf on <%s>, node <%s>, release <%s>, version <%s>, machine <%s>",
|
|
- utsname.sysname,
|
|
- utsname.nodename,
|
|
- utsname.release,
|
|
- utsname.version,
|
|
- utsname.machine);
|
|
- }
|
|
+ //} else {
|
|
+ // NSLOG(netsurf, INFO,
|
|
+ // "NetSurf on <%s>, node <%s>, release <%s>, version <%s>, machine <%s>",
|
|
+ // utsname.sysname,
|
|
+ // utsname.nodename,
|
|
+ // utsname.release,
|
|
+ // utsname.version,
|
|
+ // utsname.machine);
|
|
+ //}
|
|
}
|
|
|
|
return ret;
|
|
diff -rupNw source-original/netsurf/utils/useragent.c source/netsurf/utils/useragent.c
|
|
--- source-original/netsurf/utils/useragent.c 2017-10-16 12:09:36.000000000 +0200
|
|
+++ source/netsurf/utils/useragent.c 2018-03-04 20:43:18.252957604 +0100
|
|
@@ -44,9 +44,10 @@ user_agent_build_string(void)
|
|
char *ua_string;
|
|
int len;
|
|
|
|
- if (uname(&un) >= 0) {
|
|
- sysname = un.sysname;
|
|
- }
|
|
+ //if (uname(&un) >= 0) {
|
|
+ // sysname = un.sysname;
|
|
+ //}
|
|
+ sysname = "Redox";
|
|
|
|
len = snprintf(NULL, 0, NETSURF_UA_FORMAT_STRING,
|
|
netsurf_version_major,
|
|
diff -rupNw source-original/netsurf/utils/utsname.h source/netsurf/utils/utsname.h
|
|
--- source-original/netsurf/utils/utsname.h 2017-10-16 12:09:36.000000000 +0200
|
|
+++ source/netsurf/utils/utsname.h 2018-03-04 20:43:18.252957604 +0100
|
|
@@ -24,7 +24,7 @@
|
|
#ifndef _NETSURF_UTILS_UTSNAME_H_
|
|
#define _NETSURF_UTILS_UTSNAME_H_
|
|
|
|
-#ifdef HAVE_UTSNAME
|
|
+#if 0
|
|
#include <sys/utsname.h>
|
|
#else
|
|
/** system information filled in by uname derived from posix spec. */
|