forked from KolibriOS/kolibrios
Libraries build with MENUETLIBC. Netsurf can open www.netsurf-browser.org
git-svn-id: svn://kolibrios.org@4821 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e688a59eb2
commit
90d2d687bb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -18,8 +18,8 @@
|
|||||||
typedef struct dom_string dom_string;
|
typedef struct dom_string dom_string;
|
||||||
struct dom_string {
|
struct dom_string {
|
||||||
uint32_t refcnt;
|
uint32_t refcnt;
|
||||||
} _ALIGNED;
|
};
|
||||||
|
//dom_string _ALIGNED;
|
||||||
|
|
||||||
/* Claim a reference on a DOM string */
|
/* Claim a reference on a DOM string */
|
||||||
static inline dom_string *dom_string_ref(dom_string *str)
|
static inline dom_string *dom_string_ref(dom_string *str)
|
||||||
|
@ -1,61 +1,15 @@
|
|||||||
# Component settings
|
# This is the makefile in kolibrios/contrib/network/netsurf/libcss
|
||||||
COMPONENT := css
|
# Need to add recursive calling to all the subdirectories. For now, use the generated .a file for testing.
|
||||||
COMPONENT_VERSION := 0.1.2
|
|
||||||
# Default to a static library
|
|
||||||
COMPONENT_TYPE ?= lib-static
|
|
||||||
|
|
||||||
# Setup the tooling
|
OUTFILE := $(CURDIR)/libcss.a
|
||||||
PREFIX ?= /opt/netsurf
|
|
||||||
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
|
|
||||||
include $(NSSHARED)/makefiles/Makefile.tools
|
|
||||||
|
|
||||||
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
|
include $(MENUETDEV)/makefiles/Makefile_for_lib
|
||||||
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)
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
OUTFILE = libo.o
|
OUTFILE = libo.o
|
||||||
OBJS = stylesheet.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
OUTFILE = libo.o
|
OUTFILE = libo.o
|
||||||
OBJS = detect.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
OUTFILE = libo.o
|
OUTFILE = libo.o
|
||||||
OBJS = lex.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
OUTFILE = libo.o
|
OUTFILE = libo.o
|
||||||
OBJS = parse.o language.o important.o propstrings.o font_face.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -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
|
OBJS = autogenerated_background_attachment.o \
|
||||||
define build_gen_parser
|
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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
$$(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
|
|
||||||
|
@ -457,6 +457,7 @@ struct keyval ident_inherit = {
|
|||||||
.key = str_INHERIT,
|
.key = str_INHERIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
char *descriptor;
|
char *descriptor;
|
||||||
@ -612,3 +613,4 @@ output_header(outputf, descriptor, base.item[0], is_generic);
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
OUTFILE = libo.o
|
OUTFILE = libo.o
|
||||||
OBJS = computed.o dispatch.o hash.o select.o font_face.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
|
|
||||||
OUTFILE = libo.o
|
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 \
|
OBJS = helpers.o \
|
||||||
azimuth.o \
|
azimuth.o \
|
||||||
|
@ -120,7 +120,7 @@ struct css_rule {
|
|||||||
index : 16, /**< index in sheet */
|
index : 16, /**< index in sheet */
|
||||||
items : 8, /**< # items in rule */
|
items : 8, /**< # items in rule */
|
||||||
ptype : 1; /**< css_rule_parent_type */
|
ptype : 1; /**< css_rule_parent_type */
|
||||||
} extern _ALIGNED;
|
};// _ALIGNED;
|
||||||
|
|
||||||
typedef struct css_rule_selector {
|
typedef struct css_rule_selector {
|
||||||
css_rule base;
|
css_rule base;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
OUTFILE = libo.o
|
OUTFILE = libo.o
|
||||||
OBJS = errors.o utils.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -5,7 +5,8 @@ COMPONENT_VERSION := 0.0.1
|
|||||||
COMPONENT_TYPE ?= lib-static
|
COMPONENT_TYPE ?= lib-static
|
||||||
|
|
||||||
# Setup the tooling
|
# Setup the tooling
|
||||||
PREFIX ?= /opt/netsurf
|
#PREFIX ?= /opt/netsurf
|
||||||
|
PREFIX ?= /usr
|
||||||
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
|
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
|
||||||
include $(NSSHARED)/makefiles/Makefile.tools
|
include $(NSSHARED)/makefiles/Makefile.tools
|
||||||
|
|
||||||
@ -23,7 +24,10 @@ endif
|
|||||||
ifeq ($(TARGET),amiga)
|
ifeq ($(TARGET),amiga)
|
||||||
CFLAGS := -U__STRICT_ANSI__ $(CFLAGS)
|
CFLAGS := -U__STRICT_ANSI__ $(CFLAGS)
|
||||||
endif
|
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)
|
-I$(CURDIR)/src -I$(CURDIR)/binding $(WARNFLAGS) $(CFLAGS)
|
||||||
# Some gcc2 versions choke on -std=c99, and it doesn't know about it anyway
|
# Some gcc2 versions choke on -std=c99, and it doesn't know about it anyway
|
||||||
ifneq ($(GCCVER),2)
|
ifneq ($(GCCVER),2)
|
||||||
|
@ -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
|
||||||
|
@ -4,5 +4,5 @@ OBJS := parser.o
|
|||||||
|
|
||||||
OUTFILE = libo.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "/home/sourcerer/kos_src/newenginek/kolibri/include/hubbub/errors.h"
|
#include "hubbub/errors.h"
|
||||||
#include "/home/sourcerer/kos_src/newenginek/kolibri/include/hubbub/hubbub.h"
|
#include "hubbub/hubbub.h"
|
||||||
#include "/home/sourcerer/kos_src/newenginek/kolibri/include/hubbub/parser.h"
|
#include "hubbub/parser.h"
|
||||||
|
|
||||||
#include <dom/dom.h>
|
#include <dom/dom.h>
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
typedef struct dom_string dom_string;
|
typedef struct dom_string dom_string;
|
||||||
extern struct dom_string {
|
extern struct dom_string {
|
||||||
uint32_t refcnt;
|
uint32_t refcnt;
|
||||||
} _ALIGNED;
|
}; //_ALIGNED;
|
||||||
|
|
||||||
|
|
||||||
/* Claim a reference on a DOM string */
|
/* Claim a reference on a DOM string */
|
||||||
|
@ -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
|
||||||
|
@ -11,5 +11,5 @@ OBJS := \
|
|||||||
|
|
||||||
OUTFILE = libo.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -6,5 +6,5 @@ OBJS := event.o dispatch.o event_target.o document_event.o \
|
|||||||
|
|
||||||
OUTFILE = libo.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -25,6 +25,6 @@ UNINMPLEMENTED_SOURCES := \
|
|||||||
|
|
||||||
OUTFILE = libo.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@ OBJS := namespace.o hashtable.o character_valid.o validate.o
|
|||||||
|
|
||||||
OUTFILE = libo.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
|
||||||
|
@ -1,72 +1,12 @@
|
|||||||
# Component settings
|
# This is the makefile in kolibrios/contrib/network/netsurf/libhubbub
|
||||||
COMPONENT := hubbub
|
# Need to add recursive calling to all the subdirectories. For now, use the generated .a file for testing.
|
||||||
COMPONENT_VERSION := 0.1.2
|
|
||||||
# Default to a static library
|
|
||||||
COMPONENT_TYPE ?= lib-static
|
|
||||||
|
|
||||||
# Setup the tooling
|
OUTFILE := $(CURDIR)/libhubbub.a
|
||||||
PREFIX ?= /opt/netsurf
|
|
||||||
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
|
|
||||||
include $(NSSHARED)/makefiles/Makefile.tools
|
|
||||||
|
|
||||||
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
|
include $(MENUETDEV)/makefiles/Makefile_for_lib
|
||||||
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)
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
OUTFILE = libo.o
|
OUTFILE = libo.o
|
||||||
OBJS = parser.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
OUTFILE = libo.o
|
OUTFILE = libo.o
|
||||||
OBJS = detect.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
OUTFILE = libo.o
|
OUTFILE = libo.o
|
||||||
OBJS = entities.o tokeniser.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
|
||||||
|
@ -9,6 +9,6 @@ OBJS := treebuilder.o \
|
|||||||
generic_rcdata.o
|
generic_rcdata.o
|
||||||
OUTFILE = libo.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@ COMPONENT_VERSION := 0.0.3
|
|||||||
COMPONENT_TYPE ?= lib-static
|
COMPONENT_TYPE ?= lib-static
|
||||||
|
|
||||||
# Setup the tooling
|
# Setup the tooling
|
||||||
PREFIX ?= /opt/netsurf
|
#PREFIX ?= /opt/netsurf
|
||||||
|
PREFIX ?= /usr
|
||||||
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
|
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
|
||||||
include $(NSSHARED)/makefiles/Makefile.tools
|
include $(NSSHARED)/makefiles/Makefile.tools
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
# Sources
|
# This is the makefile in kolibrios/contrib/network/netsurf/libnsbmp/src
|
||||||
OBJS := libnsbmp.o
|
# 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
|
OBJS = $(wildcard *.o)
|
||||||
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
|
||||||
|
include $(MENUETDEV)/makefiles/Makefile_for_lib
|
||||||
|
@ -5,7 +5,8 @@ COMPONENT_VERSION := 0.0.2
|
|||||||
COMPONENT_TYPE ?= lib-static
|
COMPONENT_TYPE ?= lib-static
|
||||||
|
|
||||||
# Setup the tooling
|
# Setup the tooling
|
||||||
PREFIX ?= /opt/netsurf
|
#PREFIX ?= /opt/netsurf
|
||||||
|
PREFIX ?= /usr
|
||||||
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
|
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
|
||||||
include $(NSSHARED)/makefiles/Makefile.tools
|
include $(NSSHARED)/makefiles/Makefile.tools
|
||||||
|
|
||||||
|
@ -1,35 +1,8 @@
|
|||||||
# Component settings
|
# This is the makefile in kolibrios/contrib/network/netsurf/libnsgif/
|
||||||
COMPONENT := nsgif
|
# Need to add recursive calling to all the subdirectories. For now, use the generated .a file for testing.
|
||||||
COMPONENT_VERSION := 0.0.3
|
|
||||||
# Default to a static library
|
|
||||||
COMPONENT_TYPE ?= lib-static
|
|
||||||
|
|
||||||
# Setup the tooling
|
OUTFILE := $(CURDIR)/libnsgif.a
|
||||||
PREFIX ?= /opt/netsurf
|
|
||||||
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
|
|
||||||
include $(NSSHARED)/makefiles/Makefile.tools
|
|
||||||
|
|
||||||
# Toolchain flags
|
OBJS = $(wildcard src/*.o)
|
||||||
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
|
|
||||||
|
|
||||||
include $(NSBUILD)/Makefile.top
|
include $(MENUETDEV)/makefiles/Makefile_for_lib
|
||||||
|
|
||||||
# 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)
|
|
||||||
|
@ -5,7 +5,9 @@ COMPONENT_VERSION := 0.1.1
|
|||||||
COMPONENT_TYPE ?= lib-static
|
COMPONENT_TYPE ?= lib-static
|
||||||
|
|
||||||
# Setup the tooling
|
# Setup the tooling
|
||||||
PREFIX ?= /opt/netsurf
|
#PREFIX ?= /opt/netsurf
|
||||||
|
PREFIX ?= /usr/
|
||||||
|
|
||||||
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
|
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
|
||||||
include $(NSSHARED)/makefiles/Makefile.tools
|
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/pkgconfig:lib$(COMPONENT).pc.in
|
||||||
INSTALL_ITEMS := $(INSTALL_ITEMS) /lib:$(OUTPUT)
|
INSTALL_ITEMS := $(INSTALL_ITEMS) /lib:$(OUTPUT)
|
||||||
|
|
||||||
|
OUTFILE := $(CURDIR)/finallib.a
|
||||||
|
|
||||||
|
include $(MENUETDEV)/makefiles/Makefile_for_lib
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -669,7 +669,10 @@ void fetch_multipart_data_destroy(struct fetch_multipart_data *list)
|
|||||||
void
|
void
|
||||||
fetch_send_callback(const fetch_msg *msg, struct fetch *fetch)
|
fetch_send_callback(const fetch_msg *msg, struct fetch *fetch)
|
||||||
{
|
{
|
||||||
|
__menuet__debug_out("Inside fetch_send_callback\n");
|
||||||
|
|
||||||
fetch->callback(msg, fetch->p);
|
fetch->callback(msg, fetch->p);
|
||||||
|
__menuet__debug_out("After fetch->callback \n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -287,8 +287,11 @@ static inline bool fetch_curl_send_callback(const fetch_msg *msg,
|
|||||||
struct fetch_curl_context *ctx)
|
struct fetch_curl_context *ctx)
|
||||||
{
|
{
|
||||||
ctx->locked = true;
|
ctx->locked = true;
|
||||||
|
__menuet__debug_out("Inside curl_send_cb, Calling send_cb()\n");
|
||||||
|
|
||||||
fetch_send_callback(msg, ctx->fetchh);
|
fetch_send_callback(msg, ctx->fetchh);
|
||||||
ctx->locked = false;
|
ctx->locked = false;
|
||||||
|
__menuet__debug_out("Returning ctx->aborted.\n");
|
||||||
|
|
||||||
return ctx->aborted;
|
return ctx->aborted;
|
||||||
}
|
}
|
||||||
@ -299,18 +302,23 @@ static bool fetch_curl_send_header(struct fetch_curl_context *ctx,
|
|||||||
fetch_msg msg;
|
fetch_msg msg;
|
||||||
char header[64];
|
char header[64];
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
__menuet__debug_out("Inside fetch_curl_send_header\n");
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
|
||||||
vsnprintf(header, sizeof header, fmt, ap);
|
vsnprintf(header, sizeof header, fmt, ap);
|
||||||
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
__menuet__debug_out("Header is : ");
|
||||||
|
__menuet__debug_out(header);
|
||||||
|
|
||||||
msg.type = FETCH_HEADER;
|
msg.type = FETCH_HEADER;
|
||||||
msg.data.header_or_data.buf = (const uint8_t *) header;
|
msg.data.header_or_data.buf = (const uint8_t *) header;
|
||||||
msg.data.header_or_data.len = strlen(header);
|
msg.data.header_or_data.len = strlen(header);
|
||||||
|
__menuet__debug_out("\nCalling fetch_curl_send_callback\n");
|
||||||
|
|
||||||
fetch_curl_send_callback(&msg, ctx);
|
fetch_curl_send_callback(&msg, ctx);
|
||||||
|
|
||||||
|
__menuet__debug_out("Returning ctx->aborted\n");
|
||||||
return ctx->aborted;
|
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) {
|
static void fetch_curl_process(struct fetch_curl_context *ctx) {
|
||||||
char ps[96], str[128];
|
char ps[96], str[128];
|
||||||
sprintf(ps, "Yay! Path is %s", ctx->path);
|
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;
|
fetch_msg msg;
|
||||||
|
|
||||||
/* ERSATZ DOWNLOADER */
|
|
||||||
|
|
||||||
/*
|
|
||||||
char zapzap[]="<html><body><h1>HOOLE!</h1></body></html>";
|
|
||||||
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");
|
__menuet__debug_out("AHOY!\n");
|
||||||
struct http_msg *http_ahoy;
|
struct http_msg *http_ahoy;
|
||||||
|
|
||||||
unsigned int wererat = 0;
|
unsigned int wererat = 0;
|
||||||
char * pa=ctx->path;
|
char * pa=ctx->path;
|
||||||
asm volatile ("pusha");
|
// 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);
|
wererat = http_get(pa, NULL); // TODO: a pointer to additional headers (for cookies etc) can be placed here in the future.
|
||||||
asm volatile ("popa");
|
// asm volatile ("popa"); // ....
|
||||||
__menuet__debug_out("HTTP GOT!\n");
|
|
||||||
int result;
|
|
||||||
|
|
||||||
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);
|
__menuet__debug_out(str);
|
||||||
|
|
||||||
asm volatile ("pusha");
|
__menuet__debug_out("Going into the do while loop for http_process\n");
|
||||||
result = http_process(wererat);
|
|
||||||
asm volatile ("popa");
|
|
||||||
while (result == -1) {
|
|
||||||
asm volatile ("pusha");
|
|
||||||
result = http_process(wererat);
|
|
||||||
asm volatile ("popa");
|
|
||||||
}
|
|
||||||
|
|
||||||
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(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[]="<html><body><h1>HOOLE!</h1></body></html>";
|
|
||||||
//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 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.
|
/* Any callback can result in the fetch being aborted.
|
||||||
* Therefore, we _must_ check for this after _every_ call to
|
* Therefore, we _must_ check for this after _every_ call to
|
||||||
* fetch_file_send_callback().
|
* fetch_file_send_callback().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
__menuet__debug_out("Calling fetch_curl_send_header: 1\n");
|
||||||
if (fetch_curl_send_header(ctx, "Content-Type: %s",
|
if (fetch_curl_send_header(ctx, "Content-Type: %s",
|
||||||
fetch_filetype(ctx->path)))
|
fetch_filetype(ctx->path)))
|
||||||
goto fetch_file_process_aborted;
|
goto fetch_file_process_aborted;
|
||||||
|
|
||||||
|
|
||||||
/* main data loop */
|
/* main data loop */
|
||||||
|
__menuet__debug_out("inside main data loop\n");
|
||||||
msg.type = FETCH_DATA;
|
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);
|
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) {
|
if (ctx->aborted == false) {
|
||||||
|
__menuet__debug_out("ctx->aborted = false\n");
|
||||||
msg.type = FETCH_FINISHED;
|
msg.type = FETCH_FINISHED;
|
||||||
|
__menuet__debug_out("Calling fetch_curl_send_callback\n");
|
||||||
fetch_curl_send_callback(&msg, ctx);
|
fetch_curl_send_callback(&msg, ctx);
|
||||||
|
__menuet__debug_out("After Calling fetch_curl_send_callback\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch_file_process_aborted:
|
fetch_file_process_aborted:
|
||||||
|
__menuet__debug_out("Inside fetch file_process_aborted label\n");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do some work on current fetches.
|
* Do some work on current fetches.
|
||||||
*
|
*
|
||||||
|
@ -16,22 +16,27 @@ int kol_exit(){
|
|||||||
|
|
||||||
|
|
||||||
struct http_msg {
|
struct http_msg {
|
||||||
|
// internal used by library, dont mess with these.
|
||||||
unsigned int socket;
|
unsigned int socket;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
unsigned int write_ptr;
|
unsigned int write_ptr;
|
||||||
unsigned int buffer_length;
|
unsigned int buffer_length;
|
||||||
unsigned int chunk_ptr;
|
unsigned int chunk_ptr;
|
||||||
unsigned int timestamp;
|
unsigned int timestamp;
|
||||||
|
|
||||||
|
// available for use.
|
||||||
unsigned int status;
|
unsigned int status;
|
||||||
unsigned int header_length;
|
unsigned int header_length;
|
||||||
|
char *content_ptr;
|
||||||
unsigned int content_length;
|
unsigned int content_length;
|
||||||
unsigned int content_received;
|
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)();
|
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);
|
int (* __stdcall http_process) (unsigned int identifier);
|
||||||
void (* __stdcall http_free) (unsigned int identifier);
|
void (* __stdcall http_free) (unsigned int identifier);
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin/
|
|||||||
|
|
||||||
OBJS := curl.o data.o file.o about.o resource.o
|
OBJS := curl.o data.o file.o about.o resource.o
|
||||||
|
|
||||||
|
|
||||||
OUTFILE = TEST.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
@ -1623,6 +1623,7 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p)
|
|||||||
nserror error = NSERROR_OK;
|
nserror error = NSERROR_OK;
|
||||||
llcache_object *object = p;
|
llcache_object *object = p;
|
||||||
llcache_event event;
|
llcache_event event;
|
||||||
|
__menuet__debug_out("Inside llcache_fetch_callback\n");
|
||||||
|
|
||||||
#ifdef LLCACHE_TRACE
|
#ifdef LLCACHE_TRACE
|
||||||
LOG(("Fetch event %d for %p", msg->type, object));
|
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;
|
object->fetch.state = LLCACHE_FETCH_COMPLETE;
|
||||||
}
|
}
|
||||||
|
__menuet__debug_out("Returning from llcache_fetch_callback. (err != NS_OK)\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
__menuet__debug_out("Returning from llcache_fetch_callback.(err = NS_OK)\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,5 +18,7 @@ OBJS := content.o content_factory.o dirlist.o fetch.o hlcache.o \
|
|||||||
|
|
||||||
|
|
||||||
OUTFILE = cont.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
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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 \
|
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
|
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
|
OUTFILE = _netsurf
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include <dom/dom.h>
|
#include <dom/dom.h>
|
||||||
#include <dom/bindings/hubbub/parser.h>
|
#include <bindings/hubbub/parser.h>
|
||||||
|
|
||||||
#include "content/content_type.h"
|
#include "content/content_type.h"
|
||||||
#include "css/css.h"
|
#include "css/css.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user