Friday, 20 October 2017

NetSurf for Atari

diff --git a/docs/env.sh b/docs/env.sh
index 8a82ad083..906eaf7a3 100644
--- a/docs/env.sh
+++ b/docs/env.sh
@@ -171,7 +171,7 @@ ns-apt-get-install()

# RPM packages for rpm based systems (tested on fedora 20)
NS_DEV_RPM="git gcc pkgconfig libexpat-devel openssl-devel libcurl-devel perl-Digest-MD5-File libjpeg-devel libpng-devel"
-NS_TOOL_RPM="flex bison"
+NS_TOOL_RPM="flex bison gperf"
if [ "x${NETSURF_GTK_MAJOR}" = "x3" ]; then
NS_GTK_RPM="gtk3-devel librsvg2-devel"
else
@@ -185,6 +185,13 @@ ns-yum-install()
}


+# zypper commandline to install necessary dev packages
+ns-zypper-install()
+{
+ sudo zypper install -y $(echo ${NS_DEV_RPM} ${NS_TOOL_RPM} ${NS_GTK_RPM})
+}
+
+
# DNF RPM packages for rpm based systems (tested on fedora 25)
NS_DEV_DNF_RPM="java-1.8.0-openjdk-headless gcc clang pkgconfig libcurl-devel libjpeg-devel expat-devel libpng-devel openssl-devel gperf perl-HTML-Parser"
NS_TOOL_DNF_RPM="git flex bison ccache screen"
@@ -244,7 +251,9 @@ fi
# looks for package managers and tries to use them if present
ns-package-install()
{
- if [ -x "/usr/bin/apt-get" ]; then
+ if [ -x "/usr/bin/zypper" ]; then
+ ns-zypper-install
+ elif [ -x "/usr/bin/apt-get" ]; then
ns-apt-get-install
elif [ -x "/usr/bin/dnf" ]; then
ns-dnf-install
From c50dfbf39ed95f10a2b982d5460e1b71b2293263 Mon Sep 17 00:00:00 2001
From: Thorsten Otto <admin@tho-otto.de>
Date: Fri, 20 Oct 2017 07:26:39 +0200
Subject: [PATCH 1/7] Fix lineendings in files

Some of the text file had mixed lineendings in the same file
---
frontends/atari/doc/bugs | 8 +-
frontends/atari/doc/faq.txt | 120 ++++++++++----------
frontends/atari/doc/readme.txt | 248 ++++++++++++++++++++---------------------
frontends/atari/doc/todo.txt | 28 ++---
4 files changed, 202 insertions(+), 202 deletions(-)

diff --git a/frontends/atari/doc/bugs b/frontends/atari/doc/bugs
index 74576f67d..c5b386614 100755
--- a/frontends/atari/doc/bugs
+++ b/frontends/atari/doc/bugs
@@ -1,4 +1,4 @@
-KNOWN BUGS
-
-- "View Source" only works when the configured editor is already launched.
-- Wrong redraw area when parts of the window move out of the screen area.
+KNOWN BUGS
+
+- "View Source" only works when the configured editor is already launched.
+- Wrong redraw area when parts of the window move out of the screen area.
diff --git a/frontends/atari/doc/faq.txt b/frontends/atari/doc/faq.txt
index 53dbe81f2..8ecb5eb55 100755
--- a/frontends/atari/doc/faq.txt
+++ b/frontends/atari/doc/faq.txt
@@ -1,64 +1,64 @@
-
-NETSURF ATARI FAQ
-
-Date: 12.04.2012
-
-01.) CAN NETSURF ALSO BE RUN WITHIN AN TOS ENVIRONMENT?
-02.) I DON'T HAVE AN 15 BIT GRAPHICS CARD, HOW TO RUN NETSURF ANYWAY?
-03.) WHEN I WANT TO RUN NETSURF IT SAYS: "SOCKET NOT CONNECTED".
-04.) I'M GETTING "INSUFFICENT MEMORY" MESSAGES WHEN RUNNING NETSURF.
+
+NETSURF ATARI FAQ
+
+Date: 12.04.2012
+
+01.) CAN NETSURF ALSO BE RUN WITHIN AN TOS ENVIRONMENT?
+02.) I DON'T HAVE AN 15 BIT GRAPHICS CARD, HOW TO RUN NETSURF ANYWAY?
+03.) WHEN I WANT TO RUN NETSURF IT SAYS: "SOCKET NOT CONNECTED".
+04.) I'M GETTING "INSUFFICENT MEMORY" MESSAGES WHEN RUNNING NETSURF.
05.) SSL DOES NOT WORK - WHAT'S WRONG?
-06.) I'M GETTING THE ERROR: "BASE STYLESHEET FAILED TO LOAD" - WHAT'S WRONG?
+06.) I'M GETTING THE ERROR: "BASE STYLESHEET FAILED TO LOAD" - WHAT'S WRONG?
05.) A PAGE CRASHES - WHAT CAN I DO?
-
-1.) Question:
- CAN NETSURF ALSO BE RUN WITHIN AN TOS ENVIRONMENT?
-
- Answer:
- Yes NS can run on classic TOS. More or less.
- It is intended to run within the FreeMint environment.
- However there is no support for networking
- right now. Networking support for FireTOS is maybe possible
- in the future.
- NS also has problems with Path conversions on all FileSystems
- running under TOS. Try setting full paths within the Choices file.
-
-
-2.) Question:
- I DON'T HAVE AN 15 BIT GRAPHICS CARD, HOW TO RUN NETSURF ANYWAY?
-
- Answer:
- You need to trigger the config a bit.
- enable the following Choices settings:
-
- atari_font_driver:vdi
- atari_transparency:0
- suppress_images:1
-
- This will run netsurf as a bloat textmode browser :)
-
-3.) Question:
- WHEN I WANT TO RUN NETSURF IT SAYS: "SOCKET NOT CONNECTED"
-
- Answer:
- Take a look at the system requirements! I statet NetSurf needs
- the latest FreeMiNT 1.17 RELEASE. There was a bug within previous
- Versions. Please update your kernel. OR install polipo proxy
- provided as RPM within sparemint distribution. This is an
- workaround, it should work out of the box. But if you want to
- use the polipo disk-cache you should edit the config file.
-
-4.) Question:
- I'M GETTING "INSUFFICENT MEMORY" MESSAGES WHEN RUNNING NETSURF.
-
- Answer:
- Try to increase the TPA_INITIALMEM Configuration value within MINT.CNF
-
-5.) Question:
- SSL DOES NOT WORK - WHAT TO DO?
-
- Answer:
- Try to move the shipped cabundle.crt file to the path where NetSurf
+
+1.) Question:
+ CAN NETSURF ALSO BE RUN WITHIN AN TOS ENVIRONMENT?
+
+ Answer:
+ Yes NS can run on classic TOS. More or less.
+ It is intended to run within the FreeMint environment.
+ However there is no support for networking
+ right now. Networking support for FireTOS is maybe possible
+ in the future.
+ NS also has problems with Path conversions on all FileSystems
+ running under TOS. Try setting full paths within the Choices file.
+
+
+2.) Question:
+ I DON'T HAVE AN 15 BIT GRAPHICS CARD, HOW TO RUN NETSURF ANYWAY?
+
+ Answer:
+ You need to trigger the config a bit.
+ enable the following Choices settings:
+
+ atari_font_driver:vdi
+ atari_transparency:0
+ suppress_images:1
+
+ This will run netsurf as a bloat textmode browser :)
+
+3.) Question:
+ WHEN I WANT TO RUN NETSURF IT SAYS: "SOCKET NOT CONNECTED"
+
+ Answer:
+ Take a look at the system requirements! I statet NetSurf needs
+ the latest FreeMiNT 1.17 RELEASE. There was a bug within previous
+ Versions. Please update your kernel. OR install polipo proxy
+ provided as RPM within sparemint distribution. This is an
+ workaround, it should work out of the box. But if you want to
+ use the polipo disk-cache you should edit the config file.
+
+4.) Question:
+ I'M GETTING "INSUFFICENT MEMORY" MESSAGES WHEN RUNNING NETSURF.
+
+ Answer:
+ Try to increase the TPA_INITIALMEM Configuration value within MINT.CNF
+
+5.) Question:
+ SSL DOES NOT WORK - WHAT TO DO?
+
+ Answer:
+ Try to move the shipped cabundle.crt file to the path where NetSurf
looks for the SSL certificates (Displayed within statusbar and also
verbose log).

@@ -71,4 +71,4 @@ Date: 12.04.2012
Make your your system clock is set. (Rember empty NVRAM....)
If that doesn't help - make sure the netsurf package was unpacked
completly and that all files can be read.
-
+
diff --git a/frontends/atari/doc/readme.txt b/frontends/atari/doc/readme.txt
index 829b59ec8..8a0e002d0 100755
--- a/frontends/atari/doc/readme.txt
+++ b/frontends/atari/doc/readme.txt
@@ -1,125 +1,125 @@
-
-
- NETSURF
-
- -
-
- NATIVE ATARI ALPHA
-
- Version 2.9 (Release Version)
-
-Ported by: m0n0
-Release date: xx.xx.xx
-Contact: ole@monochrom.net
-WWW: http://netsurf-browser.org
-
-
-Table of Contents:
-------------------
-
-0x01 - What is it?
-0x02 - System Requirements
-0x03 - Features
-0x04 - Missing features
-0x05 - Things to test
-0x06 - Additional Notes
-0x07 - Known bugs
-0x08 - Technical information
-
-
-What is it? A web browser!
---------------------------
-
- NetSurf is a multi-platform web browser which is written with
- portability and speed in mind.
- This is the native Port for the FreeMiNT OS.
- More info at project website: www.netsurf-browser.org
-
-
-Minimum System Requirements:
-----------------------------
-
- - 32 MB RAM ( 48 MB recommended for demanding websites )
- - 32 MHz ( 60 Mhz recommended )
- - At least 15 Bit Graphics card.
- - FreeMiNT 1.17.0 release kernel (Please look at FAQ to read
- about TOS support) for full & correct network support.
-
-
-Main Features:
---------------
-
- - Very good HTML 4 & CSS 2.1 rendering
- - HTTPS
- - Freetype2 font rendering
-
-
-Missing Features:
------------------
-
- This section describes Features that NetSurf-Core offers but which are not
- handled by the GEM frontend currently.
-
- - Grapical website history dialog
-
-
-Installation Notes:
--------------------
-
- Unpack the compressed archive that you downloaded,
- change into the new directory and run ns.prg.
- If something isn't working - run ns.prg within an console and
- enable logging:
-
- ./ns.prg -v
-
- that makes it possible, that you can identify the problem.
-
-
-Additional Notes
-----------------
-
- If you would like to see the above mentioned features or
- can't run NetSurf because you only have a 16 or 256 Color system
- get in contact.
-
- Please also check the FAQ document.
-
- Want to have other software ported? Get in contact and make me rich >;-)
- If you want to help with netsurf, contact me for further info
- or visit the netsurf svn and add something usefull :)
-
- This is "just an early" alpha release. I wanted to get things moving on
- and I think it is good to show the Atari-Users what has been archived
- so far. This release lacks some features and some of the code written
- was just coded with an "I have to get this done quickly" attitude.
- This is especially true for the drawin routines... It doesn't offer
- offscreen bitmaps, which was one of my goals for a release. But
- I dropped that in favor of an not-so-delayed release.
-
-
-Known Bugs
-----------
-
- - "View Source" only works when the configured editor is already launched.
+
+
+ NETSURF
+
+ -
+
+ NATIVE ATARI ALPHA
+
+ Version 2.9 (Release Version)
+
+Ported by: m0n0
+Release date: xx.xx.xx
+Contact: ole@monochrom.net
+WWW: http://netsurf-browser.org
+
+
+Table of Contents:
+------------------
+
+0x01 - What is it?
+0x02 - System Requirements
+0x03 - Features
+0x04 - Missing features
+0x05 - Things to test
+0x06 - Additional Notes
+0x07 - Known bugs
+0x08 - Technical information
+
+
+What is it? A web browser!
+--------------------------
+
+ NetSurf is a multi-platform web browser which is written with
+ portability and speed in mind.
+ This is the native Port for the FreeMiNT OS.
+ More info at project website: www.netsurf-browser.org
+
+
+Minimum System Requirements:
+----------------------------
+
+ - 32 MB RAM ( 48 MB recommended for demanding websites )
+ - 32 MHz ( 60 Mhz recommended )
+ - At least 15 Bit Graphics card.
+ - FreeMiNT 1.17.0 release kernel (Please look at FAQ to read
+ about TOS support) for full & correct network support.
+
+
+Main Features:
+--------------
+
+ - Very good HTML 4 & CSS 2.1 rendering
+ - HTTPS
+ - Freetype2 font rendering
+
+
+Missing Features:
+-----------------
+
+ This section describes Features that NetSurf-Core offers but which are not
+ handled by the GEM frontend currently.
+
+ - Grapical website history dialog
+
+
+Installation Notes:
+-------------------
+
+ Unpack the compressed archive that you downloaded,
+ change into the new directory and run ns.prg.
+ If something isn't working - run ns.prg within an console and
+ enable logging:
+
+ ./ns.prg -v
+
+ that makes it possible, that you can identify the problem.
+
+
+Additional Notes
+----------------
+
+ If you would like to see the above mentioned features or
+ can't run NetSurf because you only have a 16 or 256 Color system
+ get in contact.
+
+ Please also check the FAQ document.
+
+ Want to have other software ported? Get in contact and make me rich >;-)
+ If you want to help with netsurf, contact me for further info
+ or visit the netsurf svn and add something usefull :)
+
+ This is "just an early" alpha release. I wanted to get things moving on
+ and I think it is good to show the Atari-Users what has been archived
+ so far. This release lacks some features and some of the code written
+ was just coded with an "I have to get this done quickly" attitude.
+ This is especially true for the drawin routines... It doesn't offer
+ offscreen bitmaps, which was one of my goals for a release. But
+ I dropped that in favor of an not-so-delayed release.
+
+
+Known Bugs
+----------
+
+ - "View Source" only works when the configured editor is already launched.
- Wrong redraw area when parts of the window move out of the screen area.
-
-Technical info & outlook
-------------------------
-
-
-Greetings & Thanks
-------------------
-
- - AtFact for providing help with resource files & images
- - The MiNT Mailing list, they all helped me a lot!
- - The NetSurf Mailing list guys, especially the Amiga guys.
- - The NetSurf developers that did a great job!
- - Everyone that tested this Browser!
- - Everyone that provides feedback!
- - The forum.atari-home.de members for giving me much help
- during setup of my atari!
-
-
-----
-M0N0 - 09.09.2011
+
+Technical info & outlook
+------------------------
+
+
+Greetings & Thanks
+------------------
+
+ - AtFact for providing help with resource files & images
+ - The MiNT Mailing list, they all helped me a lot!
+ - The NetSurf Mailing list guys, especially the Amiga guys.
+ - The NetSurf developers that did a great job!
+ - Everyone that tested this Browser!
+ - Everyone that provides feedback!
+ - The forum.atari-home.de members for giving me much help
+ during setup of my atari!
+
+
+----
+M0N0 - 09.09.2011
diff --git a/frontends/atari/doc/todo.txt b/frontends/atari/doc/todo.txt
index 49f8e6570..90de69c2a 100755
--- a/frontends/atari/doc/todo.txt
+++ b/frontends/atari/doc/todo.txt
@@ -1,18 +1,18 @@
-TODO's (no priority order) for NetSurf 3.1 - 4.0
-
- - Optimize drawing of bitmaps on Low-Memory machines
- - Restore the Palette when Windows get's the Focus
- -> only needed for <= 256 colors
- - Make drawing of tiled bitmaps optional ( they are slooow )
+TODO's (no priority order) for NetSurf 3.1 - 4.0
+
+ - Optimize drawing of bitmaps on Low-Memory machines
+ - Restore the Palette when Windows get's the Focus
+ -> only needed for <= 256 colors
+ - Make drawing of tiled bitmaps optional ( they are slooow )
-> already optimized, still needed?
- - Make context menu more stable (grab all available context data at popup display)
- - Implement SystemColor Choices dialog
+ - Make context menu more stable (grab all available context data at popup display)
+ - Implement SystemColor Choices dialog
- Add at least one offscreen plotter implementation
- Fix utf8 to atari character conversion (legacy VDI text plotter
must be able to handle the text argument characters correctly)
- - Add URL history when typing URL's into url textarea
- - Have browser_window specific cursor, window specifc cursor
- - When minimized (not iconyfied) NetSurf doesn't recognize that.
- - Implement Tabs (up to 4 tab favicons when iconyfied)
- - merge treeview and gui_window handling
-
+ - Add URL history when typing URL's into url textarea
+ - Have browser_window specific cursor, window specifc cursor
+ - When minimized (not iconyfied) NetSurf doesn't recognize that.
+ - Implement Tabs (up to 4 tab favicons when iconyfied)
+ - merge treeview and gui_window handling
+
--
2.14.2

>From 5f07b0a1f5afd0d6223a4dd7bb9b9d5a29615614 Mon Sep 17 00:00:00 2001
From: Thorsten Otto <admin@tho-otto.de>
Date: Fri, 20 Oct 2017 07:28:40 +0200
Subject: [PATCH 3/7] Fix a bogus memset

---
frontends/atari/plot/fontplot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/frontends/atari/plot/fontplot.c b/frontends/atari/plot/fontplot.c
index 2e02b50b4..40d665598 100644
--- a/frontends/atari/plot/fontplot.c
+++ b/frontends/atari/plot/fontplot.c
@@ -90,7 +90,7 @@ FONT_PLOTTER new_font_plotter(int vdihandle, char * name, unsigned long flags,
}

/* Initialize the font plotter with the requested settings: */
- memset( fplotter, 0, sizeof(FONT_PLOTTER));
+ memset( fplotter, 0, sizeof(*fplotter));
fplotter->vdi_handle = vdihandle;
fplotter->name = name;
fplotter->flags = 0;
--
2.14.2

>From 508a07c6aa4446d30a3a1ed05d8700f43f99a87b Mon Sep 17 00:00:00 2001
From: Thorsten Otto <admin@tho-otto.de>
Date: Fri, 20 Oct 2017 07:56:20 +0200
Subject: [PATCH 4/7] Fix a type-punned pointer dereference

---
frontends/atari/plot/plot.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/frontends/atari/plot/plot.c b/frontends/atari/plot/plot.c
index 14c670352..47b77c7a8 100644
--- a/frontends/atari/plot/plot.c
+++ b/frontends/atari/plot/plot.c
@@ -434,6 +434,8 @@ static void read_vdi_sysinfo(short vdih, struct s_vdi_sysinfo * info)
/** \todo this long is being cast to a pointer */
unsigned long cookie_EdDI=0;
short out[300];
+ unsigned long *pulong;
+ void **pptr;
memset( info, 0, sizeof(struct s_vdi_sysinfo) );

info->vdi_handle = vdih;
@@ -492,15 +494,17 @@ static void read_vdi_sysinfo(short vdih, struct s_vdi_sysinfo * info)
info->screensize = ( info->scr_w * info->pixelsize ) * info->scr_h;

if( info->EdDiVersion >= EDDI_10 ) {
- memset( &out, 0, sizeof(short)*300 );
- vq_scrninfo(vdih, (short*)&out);
+ memset( &out, 0, sizeof(out) );
+ vq_scrninfo(vdih, out);
info->vdiformat = out[0];
info->clut = out[1];
info->scr_bpp = out[2];
- info->hicolors = *((unsigned long*) &out[3]);
+ pulong = (unsigned long*) &out[3];
+ info->hicolors = *pulong;
if( info->EdDiVersion >= EDDI_11 ) {
info->pitch = out[5];
- info->screen = (void *) *((unsigned long *) &out[6]);
+ pptr = (void **)&out[6];
+ info->screen = *pptr;
}

switch( info->clut ) {
--
2.14.2

diff --git a/src/parse/parse.c b/src/parse/parse.c
index 68492d4..48bc97c 100644
--- a/src/parse/parse.c
+++ b/src/parse/parse.c
@@ -2098,8 +2098,8 @@ css_error parseMalformedDeclaration(css_parser *parser)
;

state->substate = Go;
- /* Fall through */
}
+ /* Fall through */
case Go:
while (1) {
char want;
@@ -2296,8 +2296,8 @@ css_error parseMalformedAtRule(css_parser *parser)
;

state->substate = Go;
- /* Fall through */
}
+ /* Fall through */
case Go:
while (1) {
char want;
diff --git a/src/select/arena_hash.h b/src/select/arena_hash.h
index 58abcd4..e88bf30 100644
--- a/src/select/arena_hash.h
+++ b/src/select/arena_hash.h
@@ -49,8 +49,8 @@ static inline uint32_t css__arena_hash(const uint8_t *data, size_t len)

/* Hash any left over bytes */
switch (len) {
- case 3: h ^= data[2] << 16;
- case 2: h ^= data[1] << 8;
+ case 3: h ^= data[2] << 16; /* Fall through */
+ case 2: h ^= data[1] << 8; /* Fall through */
case 1: h ^= data[0];
h *= m;
}
>From d9b73499c3b973f7e2e1f3ab6d1dc375a6c8d401 Mon Sep 17 00:00:00 2001
From: Thorsten Otto <admin@tho-otto.de>
Date: Fri, 20 Oct 2017 16:49:10 +0200
Subject: [PATCH 6/7] Atari: use linker flags instead of unreliable wildcard
matches

---
frontends/atari/Makefile | 24 +++++-------------------
1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/frontends/atari/Makefile b/frontends/atari/Makefile
index a2f27e2f2..487346619 100644
--- a/frontends/atari/Makefile
+++ b/frontends/atari/Makefile
@@ -2,16 +2,6 @@
# Atari target setup
# ----------------------------------------------------------------------------

-# !!!IMPORTANT!!!
-# On regular m68k-atari-mint installation, these must be set
-# manually via env. variables, because the m68k-atari-mint
-# toolchain is located in /usr/bin and the wildcard matching
-# fails then. So this wildcard matches only works for
-# the netsurf environment!
-STRIP := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*strip)
-STACK := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*stack)
-FT2CF := $(GCCSDK_INSTALL_ENV)/bin/freetype-config
-
ifeq ($(ATARIARCH),68000)
PRGSUFFIX := 000.app
PKGNAME := ns000.zip
@@ -33,7 +23,7 @@ endif

# non-pkgconfig components

-FREETYPE_FONT_CFLAGS := $(shell $(FT2CF) --cflags) -DWITH_FREETYPE_FONT_DRIVER
+FREETYPE_FONT_CFLAGS := $(shell $(PKG_CONFIG) --cflags freetype2) -DWITH_FREETYPE_FONT_DRIVER
SPIDERMONKEY_CFLAGS := -DXP_UNIX -DJS_HAS_FILE_OBJECT=0 -DJSOPTION_JIT=0 -DPOSIX_SOURCE -D_BSD_SOURCE

$(eval $(call feature_enabled,ATARI_FREETYPE_FONT,$(FREETYPE_FONT_CFLAGS),-lfreetype,(Freetype)))
@@ -55,7 +45,10 @@ LDFLAGS += -lcflib -lcurl
LDFLAGS += -lssl -lcrypto
LDFLAGS += -lz -lHermes -lgem -lm
LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib
-
+LDFLAGS += -Wl,-stack,256k
+# there is no working GDB port for MiNT atm,
+# so there is just no need to keep symbols
+LDFLAGS += -s

# sources purely for the Atari FreeMiNT build
S_FRONTEND := \
@@ -139,13 +132,6 @@ package-atari: $(ATARI_FONT_TMP_DIR)$(ATARI_FONT_NAME) $(PKGNAME)
$(VQ)echo Creating $(PKGNAME)

$(PKGNAME): $(EXETARGET)
-ifneq ($(strip $(STRIP)),)
- $(Q)echo Stripping symbols from $(EXETARGET) with $(STRIP)
- $(Q)$(STRIP) $(EXETARGET)
-endif
-ifneq ($(strip $(STACK)),)
- $(Q)$(STACK) -S 256k $(EXETARGET)
-endif
$(Q)rm -rf $(ATARI_TARGET_DIR)
$(Q)rm -rf $(PKGNAME)
$(Q)$(MKDIR) $(ATARI_TARGET_DIR)
--
2.14.2

diff --git a/src/lzw.c b/src/lzw.c
index 743f4d3..d65f77e 100644
--- a/src/lzw.c
+++ b/src/lzw.c
@@ -167,8 +167,8 @@ static inline lzw_result lzw__next_code(
/* Fast path: code fully inside this sub-block */
const uint8_t *data = ctx->sb_data + (ctx->sb_bit >> 3);
switch (byte_advance) {
- case 2: code |= data[2] << 16;
- case 1: code |= data[1] << 8;
+ case 2: code |= data[2] << 16; /* Fall through */
+ case 1: code |= data[1] << 8; /* Fall through */
case 0: code |= data[0] << 0;
}
ctx->sb_bit += code_size;
>From 5657c2e60c1ddb39dad7550422f5f2c108f97491 Mon Sep 17 00:00:00 2001
From: Thorsten Otto <admin@tho-otto.de>
Date: Fri, 20 Oct 2017 21:50:28 +0200
Subject: [PATCH 7/7] Atari: Use --libs from pkg-config instead of hardcoded
-lfreetype

---
frontends/atari/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/frontends/atari/Makefile b/frontends/atari/Makefile
index 487346619..0a99c1681 100644
--- a/frontends/atari/Makefile
+++ b/frontends/atari/Makefile
@@ -24,9 +24,10 @@ endif
# non-pkgconfig components

FREETYPE_FONT_CFLAGS := $(shell $(PKG_CONFIG) --cflags freetype2) -DWITH_FREETYPE_FONT_DRIVER
+FREETYPE_FONT_LIBS := $(shell $(PKG_CONFIG) --libs freetype2)
SPIDERMONKEY_CFLAGS := -DXP_UNIX -DJS_HAS_FILE_OBJECT=0 -DJSOPTION_JIT=0 -DPOSIX_SOURCE -D_BSD_SOURCE

-$(eval $(call feature_enabled,ATARI_FREETYPE_FONT,$(FREETYPE_FONT_CFLAGS),-lfreetype,(Freetype)))
+$(eval $(call feature_enabled,ATARI_FREETYPE_FONT,$(FREETYPE_FONT_CFLAGS),$(FREETYPE_FONT_LIBS),(Freetype)))
$(eval $(call feature_enabled,ATARI_NETSURF_FONT,-DWITH_INTERNAL_FONT_DRIVER,,(Internal Font)))
$(eval $(call feature_enabled,ATARI_VDI_FONT,-DWITH_VDI_FONT_DRIVER,,(VDI Font)))
$(eval $(call feature_enabled,ATARI_8BPP_SUPPORT,-DWITH_8BPP_SUPPORT,,(Indexed screen format support)))
--
2.14.2

expr: syntax error
expr: syntax error
content/fetchers/file.c: In function 'fetch_file_process_dir':
content/fetchers/file.c:659:38: warning: passing argument 4 of 'scandir' from incompatible pointer type [-Wincompatible-pointer-types]
n = scandir(ctx->path, &listing, 0, dir_sort_alpha);
^~~~~~~~~~~~~~
In file included from /opt/netsurf/m68k-atari-mint/env/include/dirent.h:1:0,
from ./utils/dirent.h:36,
from content/fetchers/file.c:49:
/opt/netsurf/m68k-atari-mint/env/include/sys/dirent.h:122:12: note: expected 'int (*)(const void *, const void *)' but argument is of type 'int (*)(const struct dirent **, const struct dirent **)'
extern int scandir (__const char *__restrict __dir,
^~~~~~~
In file included from ./utils/log.h:78:0,
from content/fs_backing_store.c:50:
content/fs_backing_store.c: In function 'store_write_block':
content/fs_backing_store.c:1690:9: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'ssize_t {aka int}' [-Wformat=]
"Write failed %"PRIssizet" of %d bytes from %p at 0x%jx block %d errno %d",
^
/home/sebilla/dev-netsurf/workspace/inst-m68k-atari-mint/include/nslog/nslog.h:185:28: note: in definition of macro 'NSLOG'
nslog__log(&_nslog_ctx, logmsg, ##args); \
^~~~~~
In file included from content/fs_backing_store.c:46:0:
include/netsurf/inttypes.h:52:21: note: format string is defined here
#define PRIssizet "zd"
In file included from ./utils/log.h:78:0,
from content/fs_backing_store.c:50:
content/fs_backing_store.c:1701:8: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'ssize_t {aka int}' [-Wformat=]
"Wrote %"PRIssizet" bytes from %p at 0x%jx block %d", wr,
^
/home/sebilla/dev-netsurf/workspace/inst-m68k-atari-mint/include/nslog/nslog.h:185:28: note: in definition of macro 'NSLOG'
nslog__log(&_nslog_ctx, logmsg, ##args); \
^~~~~~
In file included from content/fs_backing_store.c:46:0:
include/netsurf/inttypes.h:52:21: note: format string is defined here
#define PRIssizet "zd"
In file included from ./utils/log.h:78:0,
from content/fs_backing_store.c:50:
content/fs_backing_store.c: In function 'store_write_file':
content/fs_backing_store.c:1737:9: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'ssize_t {aka int}' [-Wformat=]
"Write failed %"PRIssizet" of %d bytes from %p errno %d",
^
/home/sebilla/dev-netsurf/workspace/inst-m68k-atari-mint/include/nslog/nslog.h:185:28: note: in definition of macro 'NSLOG'
nslog__log(&_nslog_ctx, logmsg, ##args); \
^~~~~~
In file included from content/fs_backing_store.c:46:0:
include/netsurf/inttypes.h:52:21: note: format string is defined here
#define PRIssizet "zd"
In file included from ./utils/log.h:78:0,
from content/fs_backing_store.c:50:
content/fs_backing_store.c:1747:23: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'ssize_t {aka int}' [-Wformat=]
NSLOG(netsurf, INFO, "Wrote %"PRIssizet" bytes from %p", wr,
^
/home/sebilla/dev-netsurf/workspace/inst-m68k-atari-mint/include/nslog/nslog.h:185:28: note: in definition of macro 'NSLOG'
nslog__log(&_nslog_ctx, logmsg, ##args); \
^~~~~~
In file included from content/fs_backing_store.c:46:0:
include/netsurf/inttypes.h:52:21: note: format string is defined here
#define PRIssizet "zd"
In file included from ./utils/log.h:78:0,
from content/fs_backing_store.c:50:
content/fs_backing_store.c: In function 'store_read_block':
content/fs_backing_store.c:1860:9: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'ssize_t {aka int}' [-Wformat=]
"Failed reading %"PRIssizet" of %d bytes into %p from 0x%jx block %d errno %d",
^
/home/sebilla/dev-netsurf/workspace/inst-m68k-atari-mint/include/nslog/nslog.h:185:28: note: in definition of macro 'NSLOG'
nslog__log(&_nslog_ctx, logmsg, ##args); \
^~~~~~
In file included from content/fs_backing_store.c:46:0:
include/netsurf/inttypes.h:52:21: note: format string is defined here
#define PRIssizet "zd"
In file included from ./utils/log.h:78:0,
from content/fs_backing_store.c:50:
content/fs_backing_store.c:1871:8: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'ssize_t {aka int}' [-Wformat=]
"Read %"PRIssizet" bytes into %p from 0x%jx block %d", rd,
^
/home/sebilla/dev-netsurf/workspace/inst-m68k-atari-mint/include/nslog/nslog.h:185:28: note: in definition of macro 'NSLOG'
nslog__log(&_nslog_ctx, logmsg, ##args); \
^~~~~~
In file included from content/fs_backing_store.c:46:0:
include/netsurf/inttypes.h:52:21: note: format string is defined here
#define PRIssizet "zd"
In file included from ./utils/log.h:78:0,
from content/fs_backing_store.c:50:
content/fs_backing_store.c: In function 'store_read_file':
content/fs_backing_store.c:1909:10: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'ssize_t {aka int}' [-Wformat=]
"read error returned %"PRIssizet" errno %d",
^
/home/sebilla/dev-netsurf/workspace/inst-m68k-atari-mint/include/nslog/nslog.h:185:28: note: in definition of macro 'NSLOG'
nslog__log(&_nslog_ctx, logmsg, ##args); \
^~~~~~
In file included from content/fs_backing_store.c:46:0:
include/netsurf/inttypes.h:52:21: note: format string is defined here
#define PRIssizet "zd"
content/handlers/javascript/duktape/duktape.c: In function 'duk_bi_function_prototype_apply':
content/handlers/javascript/duktape/duktape.c:31144:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
duk_insert(ctx, 0);
^~~~~~~~~~~~~~~~~~
content/handlers/javascript/duktape/duktape.c:31146:2: note: here
case 1: /* Reflect.apply(); Function.prototype.apply() after 'this' fixup. */
^~~~
content/handlers/javascript/duktape/duktape.c: In function 'duk_bi_date_prototype_tostring_shared':
content/handlers/javascript/duktape/duktape.c:28633:46: warning: '%02d' directive output may be truncated writing 2 bytes into a region of size between 0 and 4 [-Wformat-truncation=]
DUK_SNPRINTF(tzstr, sizeof(tzstr), "+%02d:%02d", (int) (tmp / 60), (int) (tmp % 60));
^~~~
content/handlers/javascript/duktape/duktape.c:28633:39: note: directive argument in the range [0, 59]
DUK_SNPRINTF(tzstr, sizeof(tzstr), "+%02d:%02d", (int) (tmp / 60), (int) (tmp % 60));
^~~~~~~~~~~~
In file included from content/handlers/javascript/duktape/duktape.h:171:0,
from content/handlers/javascript/duktape/duktape.c:166:
content/handlers/javascript/duktape/duk_config.h:2140:26: note: 'snprintf' output between 7 and 11 bytes into a destination of size 8
#define DUK_SNPRINTF snprintf
content/handlers/javascript/duktape/duktape.c:28633:4: note: in expansion of macro 'DUK_SNPRINTF'
DUK_SNPRINTF(tzstr, sizeof(tzstr), "+%02d:%02d", (int) (tmp / 60), (int) (tmp % 60));
^~~~~~~~~~~~
content/llcache.c: In function 'llcache_fetch_callback':
content/llcache.c:2696:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (object->fetch.retries_remaining > 1) {
^
content/llcache.c:2704:2: note: here
case FETCH_ERROR:
^~~~
desktop/textarea.c: In function 'textarea_keypress':
desktop/textarea.c:2864:12: warning: '~' on a boolean expression [-Wbool-operation]
redraw &= ~textarea_set_caret_internal(ta, caret);
^
desktop/textarea.c:2864:12: note: did you mean to use logical not?
redraw &= ~textarea_set_caret_internal(ta, caret);
^
!
desktop/treeview.c: In function 'treeview_clear_selection':
desktop/treeview.c:3069:10: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
err = treeview_delete_node_internal(sw->tree, n, true,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TREE_OPTION_NONE);
~~~~~~~~~~~~~~~~~
desktop/treeview.c:3124:7: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
sw->tree->move.root = n;
~~^~~~~~
desktop/treeview.c:3150:22: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
for (i = 0; i < sw->tree->n_fields; i++) {
~~^~~~~~
desktop/treeview.c: In function 'treeview_has_selection':
desktop/treeview.c:3069:10: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
err = treeview_delete_node_internal(sw->tree, n, true,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TREE_OPTION_NONE);
~~~~~~~~~~~~~~~~~
desktop/treeview.c:3124:7: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
sw->tree->move.root = n;
~~^~~~~~
desktop/treeview.c:3150:22: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
for (i = 0; i < sw->tree->n_fields; i++) {
~~^~~~~~
desktop/treeview.c: In function 'treeview_get_selection':
desktop/treeview.c:3069:10: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
err = treeview_delete_node_internal(sw->tree, n, true,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TREE_OPTION_NONE);
~~~~~~~~~~~~~~~~~
desktop/treeview.c:3124:7: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
sw->tree->move.root = n;
~~^~~~~~
desktop/treeview.c:3150:22: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
for (i = 0; i < sw->tree->n_fields; i++) {
~~^~~~~~
desktop/treeview.c: In function 'treeview_get_relation':
desktop/treeview.c:3069:10: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
err = treeview_delete_node_internal(sw->tree, n, true,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TREE_OPTION_NONE);
~~~~~~~~~~~~~~~~~
desktop/treeview.c:3124:7: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
sw->tree->move.root = n;
~~^~~~~~
desktop/treeview.c:3150:22: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
for (i = 0; i < sw->tree->n_fields; i++) {
~~^~~~~~
desktop/treeview.c: In function 'treeview_edit_selection':
desktop/treeview.c:3069:10: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
err = treeview_delete_node_internal(sw->tree, n, true,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TREE_OPTION_NONE);
~~~~~~~~~~~~~~~~~
desktop/treeview.c:3124:7: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
sw->tree->move.root = n;
~~^~~~~~
desktop/treeview.c:3150:22: warning: 'sw.tree' may be used uninitialized in this function [-Wmaybe-uninitialized]
for (i = 0; i < sw->tree->n_fields; i++) {
~~^~~~~~
frontends/atari/ctxmenu.c: In function 'context_popup':
frontends/atari/ctxmenu.c:214:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (ctx->ccdata.object != NULL) {
^
frontends/atari/ctxmenu.c:228:3: note: here
case POP_CTX_SAVE_LINK_AS:
^~~~
In file included from frontends/atari/gemtk/guiwin.c:24:0:
frontends/atari/gemtk/guiwin.c: In function 'preproc_mu_button':
frontends/atari/gemtk/guiwin.c:369:54: warning: pointer targets in passing argument 4 of 'mt_form_wbutton' differ in signedness [-Wpointer-sign]
ev_out->emo_mclicks, &nextobj,
^
In file included from /opt/netsurf/m68k-atari-mint/env/include/gemx.h:22:0,
from frontends/atari/gemtk/guiwin.c:24:
/opt/netsurf/m68k-atari-mint/env/include/mt_gemx.h:88:7: note: expected 'short int *' but argument is of type 'uint16_t * {aka short unsigned int *}'
short mt_form_wbutton (OBJECT *fo_btree, short fo_bobject, short fo_bclicks, short *fo_bnxtobj, short whandle, short * global);
^~~~~~~~~~~~~~~
In file included from frontends/atari/gemtk/guiwin.c:24:0:
frontends/atari/gemtk/guiwin.c:432:54: warning: pointer targets in passing argument 4 of 'mt_form_wbutton' differ in signedness [-Wpointer-sign]
ev_out->emo_mclicks, &nextobj,
^
In file included from /opt/netsurf/m68k-atari-mint/env/include/gemx.h:22:0,
from frontends/atari/gemtk/guiwin.c:24:
/opt/netsurf/m68k-atari-mint/env/include/mt_gemx.h:88:7: note: expected 'short int *' but argument is of type 'uint16_t * {aka short unsigned int *}'
short mt_form_wbutton (OBJECT *fo_btree, short fo_bobject, short fo_bclicks, short *fo_bnxtobj, short whandle, short * global);
^~~~~~~~~~~~~~~
frontends/atari/plot/font_freetype.c: In function 'pixel_pos':
frontends/atari/plot/font_freetype.c:487:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (glyph == NULL)
^~
frontends/atari/plot/font_freetype.c:489:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
*actual_x += glyph->advance.x >> 16;
^
frontends/atari/plot/font_internal.c: In function 'text':
frontends/atari/plot/font_internal.c:197:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (buffer == NULL)
^~
frontends/atari/plot/font_internal.c:201:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
y-=((fb_font->height * 75)/100);
^
frontends/atari/plot/font_internal.c:254:6: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
d = ((uint8_t*)tmp.fd_addr) + chr;
^
In file included from ./utils/log.h:78:0,
from frontends/atari/schedule.c:26:
frontends/atari/schedule.c: In function 'atari_schedule':
frontends/atari/schedule.c:118:25: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long unsigned int' [-Wformat=]
NSLOG(schedule, DEBUG, "adding callback %p for %p(%p) at %d ms", nscb,
^
callback, p, nscb->timeout);
~~~~~~~
/home/sebilla/dev-netsurf/workspace/inst-m68k-atari-mint/include/nslog/nslog.h:185:28: note: in definition of macro 'NSLOG'
nslog__log(&_nslog_ctx, logmsg, ##args); \
^~~~~~
render/html_interaction.c: In function 'html_mouse_action':
render/html_interaction.c:700:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (mouse & BROWSER_MOUSE_CLICK_1) {
^
render/html_interaction.c:718:3: note: here
case GADGET_SUBMIT:
^~~~
render/table.c: In function 'table_border_is_more_eyecatching':
render/table.c:744:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_DOUBLE: impact++;
~~~~~~^~
render/table.c:745:2: note: here
case CSS_BORDER_STYLE_SOLID: impact++;
^~~~
render/table.c:745:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_SOLID: impact++;
~~~~~~^~
render/table.c:746:2: note: here
case CSS_BORDER_STYLE_DASHED: impact++;
^~~~
render/table.c:746:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_DASHED: impact++;
~~~~~~^~
render/table.c:747:2: note: here
case CSS_BORDER_STYLE_DOTTED: impact++;
^~~~
render/table.c:747:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_DOTTED: impact++;
~~~~~~^~
render/table.c:748:2: note: here
case CSS_BORDER_STYLE_RIDGE: impact++;
^~~~
render/table.c:748:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_RIDGE: impact++;
~~~~~~^~
render/table.c:749:2: note: here
case CSS_BORDER_STYLE_OUTSET: impact++;
^~~~
render/table.c:749:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_OUTSET: impact++;
~~~~~~^~
render/table.c:750:2: note: here
case CSS_BORDER_STYLE_GROOVE: impact++;
^~~~
render/table.c:750:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_GROOVE: impact++;
~~~~~~^~
render/table.c:751:2: note: here
case CSS_BORDER_STYLE_INSET: impact++;
^~~~
render/table.c:757:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_DOUBLE: impact--;
~~~~~~^~
render/table.c:758:2: note: here
case CSS_BORDER_STYLE_SOLID: impact--;
^~~~
render/table.c:758:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_SOLID: impact--;
~~~~~~^~
render/table.c:759:2: note: here
case CSS_BORDER_STYLE_DASHED: impact--;
^~~~
render/table.c:759:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_DASHED: impact--;
~~~~~~^~
render/table.c:760:2: note: here
case CSS_BORDER_STYLE_DOTTED: impact--;
^~~~
render/table.c:760:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_DOTTED: impact--;
~~~~~~^~
render/table.c:761:2: note: here
case CSS_BORDER_STYLE_RIDGE: impact--;
^~~~
render/table.c:761:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_RIDGE: impact--;
~~~~~~^~
render/table.c:762:2: note: here
case CSS_BORDER_STYLE_OUTSET: impact--;
^~~~
render/table.c:762:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_OUTSET: impact--;
~~~~~~^~
render/table.c:763:2: note: here
case CSS_BORDER_STYLE_GROOVE: impact--;
^~~~
render/table.c:763:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
case CSS_BORDER_STYLE_GROOVE: impact--;
~~~~~~^~
render/table.c:764:2: note: here
case CSS_BORDER_STYLE_INSET: impact--;
^~~~
render/table.c:778:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
case BOX_TABLE_CELL: impact++;
~~~~~~^~
render/table.c:779:2: note: here
case BOX_TABLE_ROW: impact++;
^~~~
render/table.c:779:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
case BOX_TABLE_ROW: impact++;
~~~~~~^~
render/table.c:780:2: note: here
case BOX_TABLE_ROW_GROUP: impact++;
^~~~
render/table.c:780:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
case BOX_TABLE_ROW_GROUP: impact++;
~~~~~~^~
render/table.c:782:2: note: here
case BOX_TABLE: impact++;
^~~~
render/table.c:788:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
case BOX_TABLE_CELL: impact--;
~~~~~~^~
render/table.c:789:2: note: here
case BOX_TABLE_ROW: impact--;
^~~~
render/table.c:789:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
case BOX_TABLE_ROW: impact--;
~~~~~~^~
render/table.c:790:2: note: here
case BOX_TABLE_ROW_GROUP: impact--;
^~~~
render/table.c:790:35: warning: this statement may fall through [-Wimplicit-fallthrough=]
case BOX_TABLE_ROW_GROUP: impact--;
~~~~~~^~
render/table.c:792:2: note: here
case BOX_TABLE: impact--;
^~~~
utils/filename.c: In function 'filename_delete_recursive':
utils/filename.c:391:34: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
snprintf(child, sizeof(child), "%s/%s", folder, entry->d_name);
^~~~~~~
utils/filename.c:391:3: note: 'snprintf' output 2 or more bytes (assuming 257) into a destination of size 256
snprintf(child, sizeof(child), "%s/%s", folder, entry->d_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
utils/filename.c: In function 'filename_flush_directory':
utils/filename.c:282:34: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
snprintf(child, sizeof(child), "%s/%s", folder, entry->d_name);
^~~~~~~
utils/filename.c:282:3: note: 'snprintf' output 2 or more bytes (assuming 257) into a destination of size 256
snprintf(child, sizeof(child), "%s/%s", folder, entry->d_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
utils/filename.c: In function 'filename_flush_directory.constprop':
utils/filename.c:282:38: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 234 [-Wformat-truncation=]
snprintf(child, sizeof(child), "%s/%s", folder, entry->d_name);
^~
utils/filename.c:282:3: note: 'snprintf' output between 23 and 278 bytes into a destination of size 256
snprintf(child, sizeof(child), "%s/%s", folder, entry->d_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
utils/filename.c:282:34: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
snprintf(child, sizeof(child), "%s/%s", folder, entry->d_name);
^~~~~~~
utils/filename.c:282:3: note: 'snprintf' output 2 or more bytes (assuming 257) into a destination of size 256
snprintf(child, sizeof(child), "%s/%s", folder, entry->d_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
utils/filename.c: In function 'filename_request':
utils/filename.c:99:30: warning: '%.2i' directive writing between 2 and 10 bytes into a region of size between 3 and 12 [-Wformat-overflow=]
sprintf(filename_buffer, "%s%.2i", dir->prefix, i);
^~~~
utils/filename.c:99:27: note: directive argument in the range [0, 2147483647]
sprintf(filename_buffer, "%s%.2i", dir->prefix, i);
^~~~~~~~
utils/filename.c:99:2: note: 'sprintf' output between 3 and 20 bytes into a destination of size 12
sprintf(filename_buffer, "%s%.2i", dir->prefix, i);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hi,

 

just wanted to let you know that, despite your fearings, the atari version still can be compiled using your toolchain. I just managed to produce a working version which can be found here , and a screenshot here. There have been only a few pitfalls with it. My first attempt was to use the cross-compiler that i already had installed (in /usr), setting the environment accordingly. That got me trapped by statements like CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc) which expanded to more than one gcc installed there. So i installed your pre-build jenkins toolchain, and that left only a few minor problems.

 

The first was that in a few places (both Makefiles and shell scripts if i remember correctly) /bin/which was used to locate programs. There is no such thing on my system, it is installed in /usr/bin where it belongs, so i had to create a link for this.

 

Then i had to patch env.sh to use zypper instead of apt-get (patch attached below). The reason why i checked for zypper in the first place is that on the system i use (SuSE tumbleweed) there is also a brain-damaged apt-get script that trys to be a wrapper for zypper but fails most of the time.

 

Then there was a problem with nsgenbind using a cross-compiler toolchain. Didn't look how that is handled in other environments, but for the atari version it is looked up on the path, but wasn't build for the host before. So i had to clean everything, build for the host, then moved the executable to some other place on the path, before starting over again.

 

After that, i finally was able to compile the Atari version. Took me bit to get accustomed to the build system (its a bit strange to use $HOST when you actually mean $TARGET when running env.sh ;), and at the same time use $HOST in the Makefiles when you mean the build system), but, thanks to your excellent documentation, took only a few hours to put everything together.

 

After that, i changed a few places that the compiler mentioned. You will find the patches attached below. There were also bunch of other warnings in non-atari related code, i have attached the text output from it if you want to take a look at it.

 

I have now also used a different toolchain (putting it in the places your SDK expects), which is using gcc 7.2, and some updated libraries. The result can be found here It was compiled using the cross-compiler that you find on that page.

 

Happy hacking, and keep up the good work, hope you don't decide to drop the Atari version, it's the only browser on this platform that is still maintained ;)

 

Thorsten

 

No comments:

Post a Comment