diff --git a/contrib/network/netsurf/build-libs/libcss.a b/contrib/network/netsurf/build-libs/libcss.a index 3ae56146cb..bd8ceae37b 100644 Binary files a/contrib/network/netsurf/build-libs/libcss.a and b/contrib/network/netsurf/build-libs/libcss.a differ diff --git a/contrib/network/netsurf/build-libs/libdom.a b/contrib/network/netsurf/build-libs/libdom.a index cf336ad1fe..0b73ac2786 100644 Binary files a/contrib/network/netsurf/build-libs/libdom.a and b/contrib/network/netsurf/build-libs/libdom.a differ diff --git a/contrib/network/netsurf/build-libs/libhubbub.a b/contrib/network/netsurf/build-libs/libhubbub.a index 4e9f49d285..b6c4e18950 100644 Binary files a/contrib/network/netsurf/build-libs/libhubbub.a and b/contrib/network/netsurf/build-libs/libhubbub.a differ diff --git a/contrib/network/netsurf/build-libs/libnsbmp.a b/contrib/network/netsurf/build-libs/libnsbmp.a index d6f9e0a0db..b97bbe09ca 100644 Binary files a/contrib/network/netsurf/build-libs/libnsbmp.a and b/contrib/network/netsurf/build-libs/libnsbmp.a differ diff --git a/contrib/network/netsurf/build-libs/libnsfb.a b/contrib/network/netsurf/build-libs/libnsfb.a index 7cc312437f..8b277f0dd5 100644 Binary files a/contrib/network/netsurf/build-libs/libnsfb.a and b/contrib/network/netsurf/build-libs/libnsfb.a differ diff --git a/contrib/network/netsurf/build-libs/libnsgif.a b/contrib/network/netsurf/build-libs/libnsgif.a index c371e22122..c77fc17cc7 100644 Binary files a/contrib/network/netsurf/build-libs/libnsgif.a and b/contrib/network/netsurf/build-libs/libnsgif.a differ diff --git a/contrib/network/netsurf/build-libs/libparserutils.a b/contrib/network/netsurf/build-libs/libparserutils.a index 29cb2d403f..8b277f0dd5 100644 Binary files a/contrib/network/netsurf/build-libs/libparserutils.a and b/contrib/network/netsurf/build-libs/libparserutils.a differ diff --git a/contrib/network/netsurf/build-libs/libwapcaplet.a b/contrib/network/netsurf/build-libs/libwapcaplet.a index a5e9865851..f7fe1a34d9 100644 Binary files a/contrib/network/netsurf/build-libs/libwapcaplet.a and b/contrib/network/netsurf/build-libs/libwapcaplet.a differ diff --git a/contrib/network/netsurf/dependencies/lib/libcss.a b/contrib/network/netsurf/dependencies/lib/libcss.a index 3ae56146cb..8b277f0dd5 100644 Binary files a/contrib/network/netsurf/dependencies/lib/libcss.a and b/contrib/network/netsurf/dependencies/lib/libcss.a differ diff --git a/contrib/network/netsurf/dependencies/lib/libdom.a b/contrib/network/netsurf/dependencies/lib/libdom.a index db8fe22456..eb78634fbc 100644 Binary files a/contrib/network/netsurf/dependencies/lib/libdom.a and b/contrib/network/netsurf/dependencies/lib/libdom.a differ diff --git a/contrib/network/netsurf/dependencies/lib/libhubbub.a b/contrib/network/netsurf/dependencies/lib/libhubbub.a index 4e9f49d285..8b277f0dd5 100644 Binary files a/contrib/network/netsurf/dependencies/lib/libhubbub.a and b/contrib/network/netsurf/dependencies/lib/libhubbub.a differ diff --git a/contrib/network/netsurf/dependencies/lib/libnsbmp.a b/contrib/network/netsurf/dependencies/lib/libnsbmp.a index d6f9e0a0db..8b277f0dd5 100644 Binary files a/contrib/network/netsurf/dependencies/lib/libnsbmp.a and b/contrib/network/netsurf/dependencies/lib/libnsbmp.a differ diff --git a/contrib/network/netsurf/dependencies/lib/libnsfb.a b/contrib/network/netsurf/dependencies/lib/libnsfb.a index d1b4928d6c..8b277f0dd5 100644 Binary files a/contrib/network/netsurf/dependencies/lib/libnsfb.a and b/contrib/network/netsurf/dependencies/lib/libnsfb.a differ diff --git a/contrib/network/netsurf/dependencies/lib/libnsgif.a b/contrib/network/netsurf/dependencies/lib/libnsgif.a index c371e22122..8b277f0dd5 100644 Binary files a/contrib/network/netsurf/dependencies/lib/libnsgif.a and b/contrib/network/netsurf/dependencies/lib/libnsgif.a differ diff --git a/contrib/network/netsurf/dependencies/lib/libparserutils.a b/contrib/network/netsurf/dependencies/lib/libparserutils.a index 29cb2d403f..8b277f0dd5 100644 Binary files a/contrib/network/netsurf/dependencies/lib/libparserutils.a and b/contrib/network/netsurf/dependencies/lib/libparserutils.a differ diff --git a/contrib/network/netsurf/dependencies/lib/libwapcaplet.a b/contrib/network/netsurf/dependencies/lib/libwapcaplet.a index a5e9865851..8b277f0dd5 100644 Binary files a/contrib/network/netsurf/dependencies/lib/libwapcaplet.a and b/contrib/network/netsurf/dependencies/lib/libwapcaplet.a differ diff --git a/contrib/network/netsurf/include/dom/core/string.h b/contrib/network/netsurf/include/dom/core/string.h index f2a6122aee..a0e01f749f 100644 --- a/contrib/network/netsurf/include/dom/core/string.h +++ b/contrib/network/netsurf/include/dom/core/string.h @@ -18,8 +18,8 @@ typedef struct dom_string dom_string; struct dom_string { uint32_t refcnt; -} _ALIGNED; - +}; +//dom_string _ALIGNED; /* Claim a reference on a DOM string */ static inline dom_string *dom_string_ref(dom_string *str) diff --git a/contrib/network/netsurf/libcss/Makefile b/contrib/network/netsurf/libcss/Makefile index a77d199855..cf8c22be05 100644 --- a/contrib/network/netsurf/libcss/Makefile +++ b/contrib/network/netsurf/libcss/Makefile @@ -1,61 +1,15 @@ -# Component settings -COMPONENT := css -COMPONENT_VERSION := 0.1.2 -# Default to a static library -COMPONENT_TYPE ?= lib-static +# This is the makefile in kolibrios/contrib/network/netsurf/libcss +# Need to add recursive calling to all the subdirectories. For now, use the generated .a file for testing. -# Setup the tooling -PREFIX ?= /opt/netsurf -NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem -include $(NSSHARED)/makefiles/Makefile.tools +OUTFILE := $(CURDIR)/libcss.a -TESTRUNNER := $(PERL) $(NSTESTTOOLS)/testrunner.pl +OBJS = $(wildcard src/libo.o) +OBJS := $(OBJS) $(wildcard src/charset/libo.o) +OBJS := $(OBJS) $(wildcard src/lex/libo.o) +OBJS := $(OBJS) $(wildcard src/parse/properties/libo.o) +OBJS := $(OBJS) $(wildcard src/parse/libo.o) +OBJS := $(OBJS) $(wildcard src/select/properties/libo.o) +OBJS := $(OBJS) $(wildcard src/select/libo.o) +OBJS := $(OBJS) $(wildcard src/utils/libo.o) -# Toolchain flags -WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \ - -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ - -Wmissing-declarations -Wnested-externs -# BeOS/Haiku/AmigaOS4 standard library headers create warnings -ifneq ($(TARGET),beos) - ifneq ($(TARGET),amiga) - WARNFLAGS := $(WARNFLAGS) -Werror - endif -endif -CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \ - -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS) -ifneq ($(GCCVER),2) - CFLAGS := $(CFLAGS) -std=c99 -else - # __inline__ is a GCCism - CFLAGS := $(CFLAGS) -Dinline="__inline__" -endif - -# Parserutils & wapcaplet -ifneq ($(findstring clean,$(MAKECMDGOALS)),clean) - ifneq ($(PKGCONFIG),) - CFLAGS := $(CFLAGS) $(shell $(PKGCONFIG) libparserutils libwapcaplet --cflags) - LDFLAGS := $(LDFLAGS) $(shell $(PKGCONFIG) libparserutils libwapcaplet --libs) - else - CFLAGS := $(CFLAGS) -I$(PREFIX)/include - LDFLAGS := $(LDFLAGS) -lparserutils -lwapcaplet - endif -endif - -include $(NSBUILD)/Makefile.top - -# Extra installation rules -I := /include/libcss - -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/computed.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/errors.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/font_face.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/fpmath.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/functypes.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/hint.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/libcss.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/properties.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/select.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/stylesheet.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/types.h -INSTALL_ITEMS := $(INSTALL_ITEMS) /lib/pkgconfig:lib$(COMPONENT).pc.in -INSTALL_ITEMS := $(INSTALL_ITEMS) /lib:$(OUTPUT) +include $(MENUETDEV)/makefiles/Makefile_for_lib diff --git a/contrib/network/netsurf/libcss/src/Makefile b/contrib/network/netsurf/libcss/src/Makefile index ad09324af6..d3dfb9d061 100644 --- a/contrib/network/netsurf/libcss/src/Makefile +++ b/contrib/network/netsurf/libcss/src/Makefile @@ -1,5 +1,6 @@ OUTFILE = libo.o OBJS = stylesheet.o -CFLAGS += -I ../include/ -I ../../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../libwapcaplet/include/ -I ../../libparserutils/include/ -I ../include/ -I ../../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include + include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libcss/src/charset/Makefile b/contrib/network/netsurf/libcss/src/charset/Makefile index 85a4c0168e..f757b9a585 100644 --- a/contrib/network/netsurf/libcss/src/charset/Makefile +++ b/contrib/network/netsurf/libcss/src/charset/Makefile @@ -1,5 +1,5 @@ OUTFILE = libo.o OBJS = detect.o -CFLAGS += -I ../../include/ -I ../../../ -I ../ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../include/ -I ../../../ -I ../ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libparserutils/include/ -I ../../../libwapcaplet/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libcss/src/lex/Makefile b/contrib/network/netsurf/libcss/src/lex/Makefile index fdd82ca411..df7f1e088c 100644 --- a/contrib/network/netsurf/libcss/src/lex/Makefile +++ b/contrib/network/netsurf/libcss/src/lex/Makefile @@ -1,5 +1,5 @@ OUTFILE = libo.o OBJS = lex.o -CFLAGS += -I ../../include/ -I ../../../ -I ../ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../include/ -I ../../../ -I ../ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libparserutils/include/ -I ../../../libwapcaplet/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libcss/src/parse/Makefile b/contrib/network/netsurf/libcss/src/parse/Makefile index b822b5b874..ad6d7a72f8 100644 --- a/contrib/network/netsurf/libcss/src/parse/Makefile +++ b/contrib/network/netsurf/libcss/src/parse/Makefile @@ -1,5 +1,5 @@ OUTFILE = libo.o OBJS = parse.o language.o important.o propstrings.o font_face.o -CFLAGS += -I ../../include/ -I ../../../ -I ../ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../include/ -I ../../../ -I ../ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libwapcaplet/include/ -I ../../../libparserutils/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libcss/src/parse/properties/Makefile b/contrib/network/netsurf/libcss/src/parse/properties/Makefile index 2b843546c9..1dc9bbd89b 100644 --- a/contrib/network/netsurf/libcss/src/parse/properties/Makefile +++ b/contrib/network/netsurf/libcss/src/parse/properties/Makefile @@ -1,71 +1,144 @@ -# Sources +OUTFILE = libo.o -AUTOGEN_PARSERS := $(shell $(PERL) -pe'$$_="" unless /^([^\#][^:]+):/;$$_=$$1 . " "' $(DIR)properties.gen) +CFLAGS += -I ../../../include/ -I ../../../../ -I ../../ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../../libwapcaplet/include/ -I ../../../../libparserutils/include/ -# Dodgy use of define/eval to bypass DIR changing -define build_gen_parser +OBJS = autogenerated_background_attachment.o \ +autogenerated_background_color.o \ +autogenerated_background_image.o \ +autogenerated_background_repeat.o \ +autogenerated_border_bottom.o \ +autogenerated_border_bottom_color.o \ +autogenerated_border_bottom_style.o \ +autogenerated_border_bottom_width.o \ +autogenerated_border_collapse.o \ +autogenerated_border_left.o \ +autogenerated_border_left_color.o \ +autogenerated_border_left_style.o \ +autogenerated_border_left_width.o \ +autogenerated_border_right.o \ +autogenerated_border_right_color.o \ +autogenerated_border_right_style.o \ +autogenerated_border_right_width.o \ +autogenerated_border_side_color.o \ +autogenerated_border_side_style.o \ +autogenerated_border_side_width.o \ +autogenerated_border_top.o \ +autogenerated_border_top_color.o \ +autogenerated_border_top_style.o \ +autogenerated_border_top_width.o \ +autogenerated_bottom.o \ +autogenerated_break_after.o \ +autogenerated_break_before.o \ +autogenerated_break_inside.o \ +autogenerated_caption_side.o \ +autogenerated_clear.o \ +autogenerated_color.o \ +autogenerated_column_count.o \ +autogenerated_column_fill.o \ +autogenerated_column_gap.o \ +autogenerated_column_rule_color.o \ +autogenerated_column_rule_style.o \ +autogenerated_column_rule_width.o \ +autogenerated_column_span.o \ +autogenerated_column_width.o \ +autogenerated_counter_increment.o \ +autogenerated_counter_reset.o \ +autogenerated_cue_after.o \ +autogenerated_cue_before.o \ +autogenerated_direction.o \ +autogenerated_display.o \ +autogenerated_empty_cells.o \ +autogenerated_float.o \ +autogenerated_font_size.o \ +autogenerated_font_style.o \ +autogenerated_font_variant.o \ +autogenerated_height.o \ +autogenerated_left.o \ +autogenerated_letter_spacing.o \ +autogenerated_line_height.o \ +autogenerated_list_style_image.o \ +autogenerated_list_style_position.o \ +autogenerated_margin_bottom.o \ +autogenerated_margin_left.o \ +autogenerated_margin_right.o \ +autogenerated_margin_side.o \ +autogenerated_margin_top.o \ +autogenerated_max_height.o \ +autogenerated_max_width.o \ +autogenerated_min_height.o \ +autogenerated_min_width.o \ +autogenerated_orphans.o \ +autogenerated_outline_color.o \ +autogenerated_outline_style.o \ +autogenerated_outline_width.o \ +autogenerated_overflow.o \ +autogenerated_padding_bottom.o \ +autogenerated_padding_left.o \ +autogenerated_padding_right.o \ +autogenerated_padding_side.o \ +autogenerated_padding_top.o \ +autogenerated_page_break_after.o \ +autogenerated_page_break_before.o \ +autogenerated_page_break_inside.o \ +autogenerated_pause_after.o \ +autogenerated_pause_before.o \ +autogenerated_pitch.o \ +autogenerated_pitch_range.o \ +autogenerated_position.o \ +autogenerated_richness.o \ +autogenerated_right.o \ +autogenerated_side.o \ +autogenerated_speak.o \ +autogenerated_speak_header.o \ +autogenerated_speak_numeral.o \ +autogenerated_speak_punctuation.o \ +autogenerated_speech_rate.o \ +autogenerated_stress.o \ +autogenerated_table_layout.o \ +autogenerated_text_align.o \ +autogenerated_text_indent.o \ +autogenerated_text_transform.o \ +autogenerated_top.o \ +autogenerated_unicode_bidi.o \ +autogenerated_vertical_align.o \ +autogenerated_visibility.o \ +autogenerated_volume.o \ +autogenerated_white_space.o \ +autogenerated_widows.o \ +autogenerated_width.o \ +autogenerated_word_spacing.o \ +autogenerated_z_index.o \ +azimuth.o \ +background.o \ +background_position.o \ +border.o \ +border_color.o \ +border_spacing.o \ +border_style.o \ +border_width.o \ +clip.o \ +column_rule.o \ +columns.o \ +content.o \ +css_property_parser_gen.o \ +cue.o \ +cursor.o \ +elevation.o \ +font.o \ +font_family.o \ +font_weight.o \ +list_style.o \ +list_style_type.o \ +margin.o \ +opacity.o \ +outline.o \ +padding.o \ +pause.o \ +play_during.o \ +properties.o \ +quotes.o \ +text_decoration.o \ +utils.o \ +voice_family.o -$(BUILDDIR)/gen_parser: $(DIR)css_property_parser_gen.c - $$(VQ)$$(ECHO) $$(ECHOFLAGS) " PREPARE: $$@" - $$(Q)$$(HOST_CC) -o $$@ $$^ - -endef - -$(eval $(build_gen_parser)) - -define gen_prop_parser - -$(DIR)autogenerated_$1.c: $(DIR)properties.gen $(BUILDDIR)/gen_parser - $$(VQ)$$(ECHO) $$(ECHOFLAGS) "GENERATE: $$@" - $$(Q)$$(BUILDDIR)/gen_parser -o $$@ '$(shell $(GREP) "^$1:" $(DIR)properties.gen)' - -AUTOGEN_SOURCES := $$(AUTOGEN_SOURCES) autogenerated_$1.c - -endef - -AUTOGEN_SOURCES := - -$(eval $(foreach PROP,$(AUTOGEN_PARSERS),$(call gen_prop_parser,$(PROP)))) - - - -DIR_SOURCES := \ - azimuth.c \ - background.c \ - background_position.c \ - border.c \ - border_color.c \ - border_spacing.c \ - border_style.c \ - border_width.c \ - clip.c \ - columns.c \ - column_rule.c \ - content.c \ - cue.c \ - cursor.c \ - elevation.c \ - font.c \ - font_family.c \ - font_weight.c \ - list_style.c \ - list_style_type.c \ - margin.c \ - opacity.c \ - outline.c \ - padding.c \ - pause.c \ - play_during.c \ - properties.c \ - quotes.c \ - text_decoration.c \ - utils.c \ - voice_family.c - -DIR_SOURCES := $(DIR_SOURCES) $(AUTOGEN_SOURCES) - -PRE_TARGETS := $(foreach AP,$(AUTOGEN_PARSERS),src/parse/properties/autogenerated_$(AP).c) - -DISTCLEAN_ITEMS := $(foreach AP,$(AUTOGEN_PARSERS),src/parse/properties/autogenerated_$(AP).c) - -include $(NSBUILD)/Makefile.subdir +include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libcss/src/parse/properties/css_property_parser_gen.c b/contrib/network/netsurf/libcss/src/parse/properties/css_property_parser_gen.c index ceebca0cb6..aeeeedb3a3 100644 --- a/contrib/network/netsurf/libcss/src/parse/properties/css_property_parser_gen.c +++ b/contrib/network/netsurf/libcss/src/parse/properties/css_property_parser_gen.c @@ -457,6 +457,7 @@ struct keyval ident_inherit = { .key = str_INHERIT, }; +#if 0 int main(int argc, char **argv) { char *descriptor; @@ -612,3 +613,4 @@ output_header(outputf, descriptor, base.item[0], is_generic); return 0; } +#endif diff --git a/contrib/network/netsurf/libcss/src/select/Makefile b/contrib/network/netsurf/libcss/src/select/Makefile index 496205f785..d2e1791849 100644 --- a/contrib/network/netsurf/libcss/src/select/Makefile +++ b/contrib/network/netsurf/libcss/src/select/Makefile @@ -1,5 +1,5 @@ OUTFILE = libo.o OBJS = computed.o dispatch.o hash.o select.o font_face.o -CFLAGS += -I ../../include/ -I ../../../ -I ../ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../include/ -I ../../../ -I ../ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libwapcaplet/include/ -I ../../../libparserutils/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libcss/src/select/properties/Makefile b/contrib/network/netsurf/libcss/src/select/properties/Makefile index 3e3df407c0..f218965680 100644 --- a/contrib/network/netsurf/libcss/src/select/properties/Makefile +++ b/contrib/network/netsurf/libcss/src/select/properties/Makefile @@ -1,8 +1,7 @@ OUTFILE = libo.o -CFLAGS += -I ../../../include/ -I ../../../../ -I ../../ -I /home/sourcerer/kos_src/newenginek/kolibri/include - +CFLAGS += -I ../../../include/ -I ../../../../ -I ../../ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../../libwapcaplet/include/ -I ../../../../libparserutils/include/ OBJS = helpers.o \ azimuth.o \ diff --git a/contrib/network/netsurf/libcss/src/stylesheet.h b/contrib/network/netsurf/libcss/src/stylesheet.h index bd431283cc..cb1c3cdaea 100644 --- a/contrib/network/netsurf/libcss/src/stylesheet.h +++ b/contrib/network/netsurf/libcss/src/stylesheet.h @@ -120,7 +120,7 @@ struct css_rule { index : 16, /**< index in sheet */ items : 8, /**< # items in rule */ ptype : 1; /**< css_rule_parent_type */ -} extern _ALIGNED; +};// _ALIGNED; typedef struct css_rule_selector { css_rule base; diff --git a/contrib/network/netsurf/libcss/src/utils/Makefile b/contrib/network/netsurf/libcss/src/utils/Makefile index 5b90f54714..367d469fc7 100644 --- a/contrib/network/netsurf/libcss/src/utils/Makefile +++ b/contrib/network/netsurf/libcss/src/utils/Makefile @@ -1,5 +1,5 @@ OUTFILE = libo.o OBJS = errors.o utils.o -CFLAGS += -I ../../include/ -I ../../../ -I ../ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../include/ -I ../../../ -I ../ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libparserutils/include/ -I ../../../libwapcaplet/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libdom/Makefile b/contrib/network/netsurf/libdom/Makefile index b9e1d8b0d2..490850d77b 100644 --- a/contrib/network/netsurf/libdom/Makefile +++ b/contrib/network/netsurf/libdom/Makefile @@ -5,7 +5,8 @@ COMPONENT_VERSION := 0.0.1 COMPONENT_TYPE ?= lib-static # Setup the tooling -PREFIX ?= /opt/netsurf +#PREFIX ?= /opt/netsurf +PREFIX ?= /usr NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem include $(NSSHARED)/makefiles/Makefile.tools @@ -23,7 +24,10 @@ endif ifeq ($(TARGET),amiga) CFLAGS := -U__STRICT_ANSI__ $(CFLAGS) endif -CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \ + + + +CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ -I$(CURDIR)/../libwapcaplet/include/ \ -I$(CURDIR)/src -I$(CURDIR)/binding $(WARNFLAGS) $(CFLAGS) # Some gcc2 versions choke on -std=c99, and it doesn't know about it anyway ifneq ($(GCCVER),2) diff --git a/contrib/network/netsurf/libdom/bindings/Makefile b/contrib/network/netsurf/libdom/bindings/Makefile index f89808c207..f647b71128 100644 --- a/contrib/network/netsurf/libdom/bindings/Makefile +++ b/contrib/network/netsurf/libdom/bindings/Makefile @@ -1,3 +1,8 @@ -# Bindings +# This is the makefile in kolibrios/contrib/network/netsurf/libcss +# Need to add recursive calling to all the subdirectories. For now, use the generated .a file for testing. -include $(NSBUILD)/Makefile.subdir +OUTFILE := $(CURDIR)/libhubbub.a + +OBJS = $(wildcard hubbub/libo.o) + +include $(MENUETDEV)/makefiles/Makefile_for_lib diff --git a/contrib/network/netsurf/libdom/bindings/hubbub/Makefile b/contrib/network/netsurf/libdom/bindings/hubbub/Makefile index b3b8b412b5..26be3e15cb 100644 --- a/contrib/network/netsurf/libdom/bindings/hubbub/Makefile +++ b/contrib/network/netsurf/libdom/bindings/hubbub/Makefile @@ -4,5 +4,5 @@ OBJS := parser.o OUTFILE = libo.o -CFLAGS += -I ./ -I ../../include/ -I ../../src/ -I ../../../libhubbub/include/ -I ../../../libwapcaplet/include/ +CFLAGS += -I ./ -I ../../include/ -I ../../src/ -I ../../../libhubbub/include/ -I ../../../libwapcaplet/include/ -I ../../../libwapcaplet/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libdom/bindings/hubbub/parser.c b/contrib/network/netsurf/libdom/bindings/hubbub/parser.c index 9a27a24428..cfb2ee306f 100644 --- a/contrib/network/netsurf/libdom/bindings/hubbub/parser.c +++ b/contrib/network/netsurf/libdom/bindings/hubbub/parser.c @@ -10,9 +10,9 @@ #include #include -#include "/home/sourcerer/kos_src/newenginek/kolibri/include/hubbub/errors.h" -#include "/home/sourcerer/kos_src/newenginek/kolibri/include/hubbub/hubbub.h" -#include "/home/sourcerer/kos_src/newenginek/kolibri/include/hubbub/parser.h" +#include "hubbub/errors.h" +#include "hubbub/hubbub.h" +#include "hubbub/parser.h" #include diff --git a/contrib/network/netsurf/libdom/include/dom/core/string.h b/contrib/network/netsurf/libdom/include/dom/core/string.h index 0433545718..e64eab7a50 100644 --- a/contrib/network/netsurf/libdom/include/dom/core/string.h +++ b/contrib/network/netsurf/libdom/include/dom/core/string.h @@ -18,7 +18,7 @@ typedef struct dom_string dom_string; extern struct dom_string { uint32_t refcnt; -} _ALIGNED; +}; //_ALIGNED; /* Claim a reference on a DOM string */ diff --git a/contrib/network/netsurf/libdom/src/Makefile b/contrib/network/netsurf/libdom/src/Makefile index 41848b1097..81368000f3 100644 --- a/contrib/network/netsurf/libdom/src/Makefile +++ b/contrib/network/netsurf/libdom/src/Makefile @@ -1,3 +1,17 @@ -# Src +# This is the makefile in kolibrios/contrib/network/netsurf/libdom/src +# Need to add recursive calling to all the subdirectories. For now, use the generated .a file for testing. -include $(NSBUILD)/Makefile.subdir +OUTFILE := $(CURDIR)/libdom.a + +OBJS = $(wildcard core/libo.o) +OBJS := $(OBJS) $(wildcard events/libo.o) +OBJS := $(OBJS) $(wildcard html/libo.o) +OBJS := $(OBJS) $(wildcard utils/libo.o) +OBJS := $(OBJS) $(wildcard ../bindings/hubbub/libo.o) + +include $(MENUETDEV)/makefiles/Makefile_for_lib + +# Contents before above changes were added: +# Src +#NSBUILD ?= /usr/share/netsurf-buildsystem/makefiles +#include $(NSBUILD)/Makefile.subdir diff --git a/contrib/network/netsurf/libdom/src/core/Makefile b/contrib/network/netsurf/libdom/src/core/Makefile index 852f8aca38..ece38162b2 100644 --- a/contrib/network/netsurf/libdom/src/core/Makefile +++ b/contrib/network/netsurf/libdom/src/core/Makefile @@ -11,5 +11,5 @@ OBJS := \ OUTFILE = libo.o -CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libwapcaplet/include/ -I ../../../libparserutils/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libdom/src/events/Makefile b/contrib/network/netsurf/libdom/src/events/Makefile index 8d9231e23d..e61fdea40f 100644 --- a/contrib/network/netsurf/libdom/src/events/Makefile +++ b/contrib/network/netsurf/libdom/src/events/Makefile @@ -6,5 +6,5 @@ OBJS := event.o dispatch.o event_target.o document_event.o \ OUTFILE = libo.o -CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libwapcaplet/include/ -I ../../../libparserutils/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libdom/src/html/Makefile b/contrib/network/netsurf/libdom/src/html/Makefile index 74ef1f5026..e165d6d2dc 100644 --- a/contrib/network/netsurf/libdom/src/html/Makefile +++ b/contrib/network/netsurf/libdom/src/html/Makefile @@ -25,6 +25,6 @@ UNINMPLEMENTED_SOURCES := \ OUTFILE = libo.o -CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libwapcaplet/include/ -I ../../../libparserutils/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libdom/src/utils/Makefile b/contrib/network/netsurf/libdom/src/utils/Makefile index 9e2c11186e..4c1b5343ed 100644 --- a/contrib/network/netsurf/libdom/src/utils/Makefile +++ b/contrib/network/netsurf/libdom/src/utils/Makefile @@ -3,6 +3,6 @@ OBJS := namespace.o hashtable.o character_valid.o validate.o OUTFILE = libo.o -CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libwapcaplet/include/ -I ../../../libparserutils/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libhubbub/Makefile b/contrib/network/netsurf/libhubbub/Makefile index 396bd761b4..a48fded9b6 100644 --- a/contrib/network/netsurf/libhubbub/Makefile +++ b/contrib/network/netsurf/libhubbub/Makefile @@ -1,72 +1,12 @@ -# Component settings -COMPONENT := hubbub -COMPONENT_VERSION := 0.1.2 -# Default to a static library -COMPONENT_TYPE ?= lib-static +# This is the makefile in kolibrios/contrib/network/netsurf/libhubbub +# Need to add recursive calling to all the subdirectories. For now, use the generated .a file for testing. -# Setup the tooling -PREFIX ?= /opt/netsurf -NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem -include $(NSSHARED)/makefiles/Makefile.tools +OUTFILE := $(CURDIR)/libhubbub.a -TESTRUNNER := $(PERL) $(NSTESTTOOLS)/testrunner.pl +OBJS = $(wildcard src/*.o) +OBJS := $(OBJS) $(wildcard src/charset/*.o) +OBJS := $(OBJS) $(wildcard src/tokeniser/*.o) +OBJS := $(OBJS) $(wildcard src/treebuilder/*.o) +OBJS := $(OBJS) $(wildcard src/utils/*.o) -# Toolchain flags -WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \ - -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ - -Wmissing-declarations -Wnested-externs -pedantic -# BeOS/Haiku/AmigaOS have standard library errors that issue warnings. -ifneq ($(TARGET),beos) - ifneq ($(TARGET),amiga) - WARNFLAGS := $(WARNFLAGS) -Werror - endif -endif -CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \ - -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS) -ifneq ($(GCCVER),2) - CFLAGS := $(CFLAGS) -std=c99 -else - # __inline__ is a GCCism - CFLAGS := $(CFLAGS) -Dinline="__inline__" -endif - -# Parserutils -ifneq ($(findstring clean,$(MAKECMDGOALS)),clean) - ifneq ($(PKGCONFIG),) - CFLAGS := $(CFLAGS) $(shell $(PKGCONFIG) libparserutils --cflags) - LDFLAGS := $(LDFLAGS) $(shell $(PKGCONFIG) libparserutils --libs) - else - CFLAGS := $(CFLAGS) -I$(PREFIX)/include - LDFLAGS := $(LDFLAGS) -lparserutils - endif -endif - -include $(NSBUILD)/Makefile.top - -ifeq ($(WANT_TEST),yes) - # We require the presence of libjson -- http://oss.metaparadigm.com/json-c/ - ifneq ($(PKGCONFIG),) - TESTCFLAGS := $(TESTCFLAGS) \ - $(shell $(PKGCONFIG) $(PKGCONFIGFLAGS) --cflags json) - TESTLDFLAGS := $(TESTLDFLAGS) \ - $(shell $(PKGCONFIG) $(PKGCONFIGFLAGS) --libs json) - else - TESTCFLAGS := $(TESTCFLAGS) -I$(PREFIX)/include/json - TESTLDFLAGS := $(TESTLDFLAGS) -ljson - endif - - ifneq ($(GCCVER),2) - TESTCFLAGS := $(TESTCFLAGS) -Wno-unused-parameter - endif -endif - -# Extra installation rules -I := /include/hubbub -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/hubbub/errors.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/hubbub/functypes.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/hubbub/hubbub.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/hubbub/parser.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/hubbub/tree.h -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/hubbub/types.h -INSTALL_ITEMS := $(INSTALL_ITEMS) /lib/pkgconfig:lib$(COMPONENT).pc.in -INSTALL_ITEMS := $(INSTALL_ITEMS) /lib:$(OUTPUT) +include $(MENUETDEV)/makefiles/Makefile_for_lib diff --git a/contrib/network/netsurf/libhubbub/src/Makefile b/contrib/network/netsurf/libhubbub/src/Makefile index fa3acb231e..8c51f6db36 100644 --- a/contrib/network/netsurf/libhubbub/src/Makefile +++ b/contrib/network/netsurf/libhubbub/src/Makefile @@ -1,5 +1,5 @@ OUTFILE = libo.o OBJS = parser.o -CFLAGS += -I ../include/ -I ../../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../include/ -I ../../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../libparserutils/include/ -I ../../libwapcaplet/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libhubbub/src/charset/Makefile b/contrib/network/netsurf/libhubbub/src/charset/Makefile index 1d6b240914..12bbbac850 100644 --- a/contrib/network/netsurf/libhubbub/src/charset/Makefile +++ b/contrib/network/netsurf/libhubbub/src/charset/Makefile @@ -1,5 +1,5 @@ OUTFILE = libo.o OBJS = detect.o -CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libparserutils/include/ -I ../../../libwapcaplet/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libhubbub/src/tokeniser/Makefile b/contrib/network/netsurf/libhubbub/src/tokeniser/Makefile index 934084d222..fe090b314c 100644 --- a/contrib/network/netsurf/libhubbub/src/tokeniser/Makefile +++ b/contrib/network/netsurf/libhubbub/src/tokeniser/Makefile @@ -1,6 +1,6 @@ OUTFILE = libo.o OBJS = entities.o tokeniser.o -CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libparserutils/include/ -I ../../../libwapcaplet/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libhubbub/src/treebuilder/Makefile b/contrib/network/netsurf/libhubbub/src/treebuilder/Makefile index 55865bc3b4..e7de7443a2 100644 --- a/contrib/network/netsurf/libhubbub/src/treebuilder/Makefile +++ b/contrib/network/netsurf/libhubbub/src/treebuilder/Makefile @@ -9,6 +9,6 @@ OBJS := treebuilder.o \ generic_rcdata.o OUTFILE = libo.o -CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libparserutils/include/ -I ../../../libwapcaplet/include/ include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/libnsbmp/Makefile b/contrib/network/netsurf/libnsbmp/Makefile index ca87feaf14..ef46d26a00 100644 --- a/contrib/network/netsurf/libnsbmp/Makefile +++ b/contrib/network/netsurf/libnsbmp/Makefile @@ -5,7 +5,8 @@ COMPONENT_VERSION := 0.0.3 COMPONENT_TYPE ?= lib-static # Setup the tooling -PREFIX ?= /opt/netsurf +#PREFIX ?= /opt/netsurf +PREFIX ?= /usr NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem include $(NSSHARED)/makefiles/Makefile.tools diff --git a/contrib/network/netsurf/libnsbmp/src/Makefile b/contrib/network/netsurf/libnsbmp/src/Makefile index 37c7973646..90863a7cca 100644 --- a/contrib/network/netsurf/libnsbmp/src/Makefile +++ b/contrib/network/netsurf/libnsbmp/src/Makefile @@ -1,7 +1,8 @@ -# Sources -OBJS := libnsbmp.o +# This is the makefile in kolibrios/contrib/network/netsurf/libnsbmp/src +# Need to add recursive calling to all the subdirectories. For now, use the generated .a file for testing. -OUTFILE = libo.o +OUTFILE := $(CURDIR)/libnsbmp.a -CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include -include $(MENUETDEV)/makefiles/Makefile_for_o_lib +OBJS = $(wildcard *.o) + +include $(MENUETDEV)/makefiles/Makefile_for_lib diff --git a/contrib/network/netsurf/libnsfb/Makefile b/contrib/network/netsurf/libnsfb/Makefile index 8358de6260..ef89e09e58 100644 --- a/contrib/network/netsurf/libnsfb/Makefile +++ b/contrib/network/netsurf/libnsfb/Makefile @@ -5,7 +5,8 @@ COMPONENT_VERSION := 0.0.2 COMPONENT_TYPE ?= lib-static # Setup the tooling -PREFIX ?= /opt/netsurf +#PREFIX ?= /opt/netsurf +PREFIX ?= /usr NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem include $(NSSHARED)/makefiles/Makefile.tools diff --git a/contrib/network/netsurf/libnsgif/Makefile b/contrib/network/netsurf/libnsgif/Makefile index 7eeefeea3a..b0c009de7d 100644 --- a/contrib/network/netsurf/libnsgif/Makefile +++ b/contrib/network/netsurf/libnsgif/Makefile @@ -1,35 +1,8 @@ -# Component settings -COMPONENT := nsgif -COMPONENT_VERSION := 0.0.3 -# Default to a static library -COMPONENT_TYPE ?= lib-static +# This is the makefile in kolibrios/contrib/network/netsurf/libnsgif/ +# Need to add recursive calling to all the subdirectories. For now, use the generated .a file for testing. -# Setup the tooling -PREFIX ?= /opt/netsurf -NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem -include $(NSSHARED)/makefiles/Makefile.tools +OUTFILE := $(CURDIR)/libnsgif.a -# Toolchain flags -WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \ - -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ - -Wmissing-declarations -Wnested-externs -pedantic -# BeOS/Haiku standard library headers create warnings -ifneq ($(TARGET),beos) - WARNFLAGS := $(WARNFLAGS) -Werror -endif -CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \ - -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS) -ifneq ($(GCCVER),2) - CFLAGS := $(CFLAGS) -std=c99 -else - # __inline__ is a GCCism - CFLAGS := $(CFLAGS) -Dinline="__inline__" -endif +OBJS = $(wildcard src/*.o) -include $(NSBUILD)/Makefile.top - -# Extra installation rules -I := /include -INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libnsgif.h -INSTALL_ITEMS := $(INSTALL_ITEMS) /lib/pkgconfig:lib$(COMPONENT).pc.in -INSTALL_ITEMS := $(INSTALL_ITEMS) /lib:$(OUTPUT) +include $(MENUETDEV)/makefiles/Makefile_for_lib diff --git a/contrib/network/netsurf/libparserutils/Makefile b/contrib/network/netsurf/libparserutils/Makefile index a6b797682a..8237d2c2c3 100644 --- a/contrib/network/netsurf/libparserutils/Makefile +++ b/contrib/network/netsurf/libparserutils/Makefile @@ -5,7 +5,9 @@ COMPONENT_VERSION := 0.1.1 COMPONENT_TYPE ?= lib-static # Setup the tooling -PREFIX ?= /opt/netsurf +#PREFIX ?= /opt/netsurf +PREFIX ?= /usr/ + NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem include $(NSSHARED)/makefiles/Makefile.tools @@ -50,3 +52,7 @@ INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/buffer.h;$(Is)/stack.h;$(Is)/vector INSTALL_ITEMS := $(INSTALL_ITEMS) /lib/pkgconfig:lib$(COMPONENT).pc.in INSTALL_ITEMS := $(INSTALL_ITEMS) /lib:$(OUTPUT) + +OUTFILE := $(CURDIR)/finallib.a + +include $(MENUETDEV)/makefiles/Makefile_for_lib diff --git a/contrib/network/netsurf/libparserutils/src/Makefile b/contrib/network/netsurf/libparserutils/src/Makefile index f824677992..40d4fbeb3b 100644 --- a/contrib/network/netsurf/libparserutils/src/Makefile +++ b/contrib/network/netsurf/libparserutils/src/Makefile @@ -1,2 +1,14 @@ -include $(NSBUILD)/Makefile.subdir +#include $(NSBUILD)/Makefile.subdir +# This is the makefile in kolibrios/contrib/network/netsurf/libparserutils/src +# Need to add recursive calling to all the subdirectories. For now, use the generated .a file for testing. + +OUTFILE := $(CURDIR)/libparseutils.a +OBJS = $(wildcard charset/*.o) +OBJS := $(OBJS) $(wildcard charset/codecs/*.o) +OBJS := $(OBJS) $(wildcard charset/encodings/*.o) +OBJS := $(OBJS) $(wildcard input/*.o) +OBJS := $(OBJS) $(wildcard utils/*.o) + +include $(MENUETDEV)/makefiles/Makefile_for_lib + diff --git a/contrib/network/netsurf/netsurf/content/fetch.c b/contrib/network/netsurf/netsurf/content/fetch.c index bfe4458cf1..f41a9564e9 100644 --- a/contrib/network/netsurf/netsurf/content/fetch.c +++ b/contrib/network/netsurf/netsurf/content/fetch.c @@ -669,7 +669,10 @@ void fetch_multipart_data_destroy(struct fetch_multipart_data *list) void fetch_send_callback(const fetch_msg *msg, struct fetch *fetch) { + __menuet__debug_out("Inside fetch_send_callback\n"); + fetch->callback(msg, fetch->p); + __menuet__debug_out("After fetch->callback \n"); } diff --git a/contrib/network/netsurf/netsurf/content/fetchers/curl.c b/contrib/network/netsurf/netsurf/content/fetchers/curl.c index 701f6bb476..d9ff4398b8 100644 --- a/contrib/network/netsurf/netsurf/content/fetchers/curl.c +++ b/contrib/network/netsurf/netsurf/content/fetchers/curl.c @@ -287,8 +287,11 @@ static inline bool fetch_curl_send_callback(const fetch_msg *msg, struct fetch_curl_context *ctx) { ctx->locked = true; + __menuet__debug_out("Inside curl_send_cb, Calling send_cb()\n"); + fetch_send_callback(msg, ctx->fetchh); ctx->locked = false; + __menuet__debug_out("Returning ctx->aborted.\n"); return ctx->aborted; } @@ -299,18 +302,23 @@ static bool fetch_curl_send_header(struct fetch_curl_context *ctx, fetch_msg msg; char header[64]; va_list ap; - + __menuet__debug_out("Inside fetch_curl_send_header\n"); va_start(ap, fmt); vsnprintf(header, sizeof header, fmt, ap); va_end(ap); + __menuet__debug_out("Header is : "); + __menuet__debug_out(header); msg.type = FETCH_HEADER; msg.data.header_or_data.buf = (const uint8_t *) header; msg.data.header_or_data.len = strlen(header); + __menuet__debug_out("\nCalling fetch_curl_send_callback\n"); + fetch_curl_send_callback(&msg, ctx); + __menuet__debug_out("Returning ctx->aborted\n"); return ctx->aborted; } @@ -350,22 +358,6 @@ fetch_file_process_error_aborted: } -int is_pid(int k) -{ - int error; -asm volatile ("int $0x40":"=a"(error):"a"(18), "b"(21), "c"(k)); -return error; -} - - -int kill_pid(int k) -{ - int error; -asm volatile ("int $0x40":"=a"(error):"a"(18), "b"(18), "c"(k)); -return error; -} - - static void fetch_curl_process(struct fetch_curl_context *ctx) { char ps[96], str[128]; sprintf(ps, "Yay! Path is %s", ctx->path); @@ -373,103 +365,101 @@ static void fetch_curl_process(struct fetch_curl_context *ctx) { fetch_msg msg; - /* ERSATZ DOWNLOADER */ - - /* -char zapzap[]="

HOOLE!

"; -size_t file_size=strlen(zapzap); -char *buffer = (char*)malloc(file_size * sizeof(char)); -memcpy(buffer, zapzap, file_size * sizeof(char)); -*/ - - - - - __menuet__debug_out("AHOY!\n"); struct http_msg *http_ahoy; unsigned int wererat = 0; char * pa=ctx->path; - asm volatile ("pusha"); - wererat = http_get(pa); - asm volatile ("popa"); - __menuet__debug_out("HTTP GOT!\n"); - int result; + // asm volatile ("pusha"); // TODO: verify if this is still needed. It used to be an issue with the library but should be fixed now. + wererat = http_get(pa, NULL); // TODO: a pointer to additional headers (for cookies etc) can be placed here in the future. + // asm volatile ("popa"); // .... - http_ahoy=wererat; + if(wererat == 0) /* Error condition : http_get returned 0 */ + __menuet__debug_out("http_get() failed. [ Return Value 0 ]\n"); + else + __menuet__debug_out("http_get() Succeeded!. [ Return Value Non zero ]\n"); + + __menuet__debug_out("HTTP GOT!\n"); + int result = 1337; + char result_str[12]; + char wererat_str[13]; - sprintf (str, "Header %d bytes, content %d bytes, recieved %d bytes\n", http_ahoy->header_length, http_ahoy->content_length, http_ahoy->content_received); + http_ahoy = wererat; + + sprintf (str, "Header %u bytes, content %u bytes, received %u bytes\n", http_ahoy->header_length, http_ahoy->content_length, http_ahoy->content_received); __menuet__debug_out(str); - asm volatile ("pusha"); - result = http_process(wererat); - asm volatile ("popa"); - while (result == -1) { - asm volatile ("pusha"); - result = http_process(wererat); - asm volatile ("popa"); - } + __menuet__debug_out("Going into the do while loop for http_process\n"); - http_ahoy=wererat; + do { + // sprintf(result_str, "%d", result); + // __menuet__debug_out("Result is : "); + // __menuet__debug_out(result_str); + // __menuet__debug_out("\n"); - sprintf (str, "Header %d bytes, content %d bytes, recieved %d bytes\n", http_ahoy->header_length, http_ahoy->content_length, http_ahoy->content_received); + // asm volatile ("pusha"); // TODO: verify if this is still needed. It used to be an issue with the library but should be fixed now. + result = http_process(wererat); + // asm volatile ("popa"); // .... + } while ((result != 0)); + + __menuet__debug_out("After the do while loop for http_process.\n"); + + if(result == 0) + __menuet__debug_out("http_process() worked successfully!\n"); + else + __menuet__debug_out("http_process() failed!\n"); + +// http_ahoy = wererat; // really needed again?? + sprintf (str, "Header %u bytes, content %u bytes, received %u bytes\n", http_ahoy->header_length, http_ahoy->content_length, http_ahoy->content_received); __menuet__debug_out(str); - - - __menuet__debug_out("All content is here\n"); - - size_t file_size=http_ahoy->content_received; - char *buffer = (char*)malloc(file_size * sizeof(char)); - memcpy(buffer, &(http_ahoy->data)+http_ahoy->header_length, file_size); - - // http_free(wererat); - __menuet__debug_out("memcopied\n==\n"); - - //__menuet__debug_out(buffer); - //__menuet__debug_out("memcopied\n==\n"); - - -//char zapzap[]="

HOOLE!

"; -//file_size=strlen(zapzap); -//char *buffer = (char*)malloc(file_size * sizeof(char)); -//memcpy(buffer, zapzap, file_size * sizeof(char)); - - + /* fetch is going to be successful */ - fetch_set_http_code(ctx->fetchh, 200); + __menuet__debug_out("Calling fetch_set_http_code call\n"); + fetch_set_http_code(ctx->fetchh, http_ahoy->status); + __menuet__debug_out("Returned from fetch_set_http_code call\n"); /* Any callback can result in the fetch being aborted. * Therefore, we _must_ check for this after _every_ call to * fetch_file_send_callback(). */ - + __menuet__debug_out("Calling fetch_curl_send_header: 1\n"); if (fetch_curl_send_header(ctx, "Content-Type: %s", fetch_filetype(ctx->path))) goto fetch_file_process_aborted; /* main data loop */ - + __menuet__debug_out("inside main data loop\n"); msg.type = FETCH_DATA; - msg.data.header_or_data.buf = (const uint8_t *) buffer;//&(http_ahoy->data) ; //buffer; - msg.data.header_or_data.len = file_size; + + msg.data.header_or_data.buf = http_ahoy->content_ptr; // lets pray this works..x2 + + msg.data.header_or_data.len = http_ahoy->content_received; + __menuet__debug_out("Calling fetch_curl_send_callback\n"); fetch_curl_send_callback(&msg, ctx); + + __menuet__debug_out("Calling http_free with wererat = "); + sprintf(wererat_str, "%u", wererat); + __menuet__debug_out(wererat_str); + __menuet__debug_out("\n"); - + http_free(wererat); if (ctx->aborted == false) { + __menuet__debug_out("ctx->aborted = false\n"); msg.type = FETCH_FINISHED; + __menuet__debug_out("Calling fetch_curl_send_callback\n"); fetch_curl_send_callback(&msg, ctx); + __menuet__debug_out("After Calling fetch_curl_send_callback\n"); } fetch_file_process_aborted: + __menuet__debug_out("Inside fetch file_process_aborted label\n"); return; } - /** * Do some work on current fetches. * diff --git a/contrib/network/netsurf/netsurf/content/fetchers/http.c b/contrib/network/netsurf/netsurf/content/fetchers/http.c index 85446b6c8d..78652dfc81 100644 --- a/contrib/network/netsurf/netsurf/content/fetchers/http.c +++ b/contrib/network/netsurf/netsurf/content/fetchers/http.c @@ -16,22 +16,27 @@ int kol_exit(){ struct http_msg { +// internal used by library, dont mess with these. unsigned int socket; unsigned int flags; unsigned int write_ptr; unsigned int buffer_length; unsigned int chunk_ptr; unsigned int timestamp; + +// available for use. unsigned int status; unsigned int header_length; +char *content_ptr; unsigned int content_length; unsigned int content_received; -char data; //unknown size +char header; //unknown size (actually, it's size is defined in header_length) }; int (* __stdcall http_init)(); -unsigned int (* __stdcall http_get) (char * url); //yay, it's NOT uint, but hey, C is stubborn, and I'm dumb +// On the next line, we should tell the C compiler that this procedure actually returns a pointer. (to the http_msg struct) +unsigned int (* __stdcall http_get) (char * url, char * add_head); //yay, it's NOT uint, but hey, C is stubborn, and I'm dumb int (* __stdcall http_process) (unsigned int identifier); void (* __stdcall http_free) (unsigned int identifier); diff --git a/contrib/network/netsurf/netsurf/content/fetchers/make.fetch b/contrib/network/netsurf/netsurf/content/fetchers/make.fetch index 54b066d7dc..1f14473b56 100644 --- a/contrib/network/netsurf/netsurf/content/fetchers/make.fetch +++ b/contrib/network/netsurf/netsurf/content/fetchers/make.fetch @@ -15,7 +15,8 @@ NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin/ OBJS := curl.o data.o file.o about.o resource.o - OUTFILE = TEST.o -CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include -I ../../../libwapcaplet/include/ -I ../../../libcss/include/ + + include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/netsurf/content/llcache.c b/contrib/network/netsurf/netsurf/content/llcache.c index 8996acaddd..5bf80c4221 100644 --- a/contrib/network/netsurf/netsurf/content/llcache.c +++ b/contrib/network/netsurf/netsurf/content/llcache.c @@ -1623,6 +1623,7 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p) nserror error = NSERROR_OK; llcache_object *object = p; llcache_event event; + __menuet__debug_out("Inside llcache_fetch_callback\n"); #ifdef LLCACHE_TRACE LOG(("Fetch event %d for %p", msg->type, object)); @@ -1798,8 +1799,10 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p) object->fetch.state = LLCACHE_FETCH_COMPLETE; } + __menuet__debug_out("Returning from llcache_fetch_callback. (err != NS_OK)\n"); return; } + __menuet__debug_out("Returning from llcache_fetch_callback.(err = NS_OK)\n"); } /** diff --git a/contrib/network/netsurf/netsurf/content/make.content b/contrib/network/netsurf/netsurf/content/make.content index e5aa94ba9c..277ea6f5ba 100644 --- a/contrib/network/netsurf/netsurf/content/make.content +++ b/contrib/network/netsurf/netsurf/content/make.content @@ -18,5 +18,7 @@ OBJS := content.o content_factory.o dirlist.o fetch.o hlcache.o \ OUTFILE = cont.o -CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include +CFLAGS += -I ../include/ -I ../ -I../../ -I./ -I/home/sourcerer/kos_src/newenginek/kolibri/include -I ../../libwapcaplet/include/ -I ../../libcss/include/ -I ../../libdom/include/ -I ../../libdom/ -I ../../libhubbub/include/ + + include $(MENUETDEV)/makefiles/Makefile_for_o_lib diff --git a/contrib/network/netsurf/netsurf/objs/curl.o b/contrib/network/netsurf/netsurf/objs/curl.o index 5afc955145..1d37311651 100644 Binary files a/contrib/network/netsurf/netsurf/objs/curl.o and b/contrib/network/netsurf/netsurf/objs/curl.o differ diff --git a/contrib/network/netsurf/netsurf/objs/fetch.o b/contrib/network/netsurf/netsurf/objs/fetch.o index 48f01ef6b9..2aa120eb94 100644 Binary files a/contrib/network/netsurf/netsurf/objs/fetch.o and b/contrib/network/netsurf/netsurf/objs/fetch.o differ diff --git a/contrib/network/netsurf/netsurf/objs/llcache.o b/contrib/network/netsurf/netsurf/objs/llcache.o index 6315f77453..12d9d32055 100644 Binary files a/contrib/network/netsurf/netsurf/objs/llcache.o and b/contrib/network/netsurf/netsurf/objs/llcache.o differ diff --git a/contrib/network/netsurf/netsurf/objs/make.all b/contrib/network/netsurf/netsurf/objs/make.all index 9aa551a512..2a5eae4766 100644 --- a/contrib/network/netsurf/netsurf/objs/make.all +++ b/contrib/network/netsurf/netsurf/objs/make.all @@ -25,7 +25,7 @@ OBJS = about.o base64.o bitmap_fbtk.o bitmap.o bmp.o box_construct.o \ urldb.o url.o useragent.o user.o utf8.o utils.o utils_utils.o \ version.o window.o www-authenticate.o snprintf.o stubs.o divdi3.o -LIBS += -lm -lcurl -liconv -lnsbmp -lnsgif -lpng -ljpeg -lz -lnsfb -lSDL -lwapcaplet -lcss -ldom -lhubbub -lparserutils -lfreetype2 +LIBS += -lm -lcurl -liconv -lnsbmp -lnsgif -lpng -ljpeg -lz -lnsfb -lwapcaplet -lcss -ldom -lhubbub -lparserutils -lfreetype2 OUTFILE = _netsurf diff --git a/contrib/network/netsurf/netsurf/render/html.h b/contrib/network/netsurf/netsurf/render/html.h index e11fc76ac7..bb58f0c5b9 100644 --- a/contrib/network/netsurf/netsurf/render/html.h +++ b/contrib/network/netsurf/netsurf/render/html.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include "content/content_type.h" #include "css/css.h"