[project @ 2004-03-27 00:53:19 by bursa]

Add imagemap and jpeg to the debug build.

svn path=/import/netsurf/; revision=675
This commit is contained in:
James Bursa 2004-03-27 00:54:03 +00:00
parent 48c8934431
commit b0fdba3f59
6 changed files with 84 additions and 15 deletions

View File

@ -21,10 +21,10 @@
#include "netsurf/css/css.h"
#include "netsurf/render/html.h"
#include "netsurf/render/textplain.h"
#ifdef riscos
#ifdef WITH_JPEG
#include "netsurf/riscos/jpeg.h"
#endif
#ifdef riscos
#ifdef WITH_PNG
#include "netsurf/riscos/png.h"
#endif
@ -62,10 +62,12 @@ static const struct mime_entry mime_map[] = {
#ifdef WITH_GIF
{"image/gif", CONTENT_GIF},
#endif
#endif
#ifdef WITH_JPEG
{"image/jpeg", CONTENT_JPEG},
{"image/pjpeg", CONTENT_JPEG},
#endif
#ifdef riscos
#ifdef WITH_PNG
{"image/png", CONTENT_PNG},
#endif
@ -114,11 +116,11 @@ static const struct handler_entry handler_map[] = {
0, 0, 0, 0, 0, 0, 0},
{css_create, 0, css_convert, css_revive,
0, css_destroy, 0, 0, 0, 0},
#ifdef riscos
#ifdef WITH_JPEG
{nsjpeg_create, 0, nsjpeg_convert, 0,
0, nsjpeg_destroy, nsjpeg_redraw, 0, 0, 0},
#endif
#ifdef riscos
#ifdef WITH_PNG
{nspng_create, nspng_process_data, nspng_convert, 0,
0, nspng_destroy, nspng_redraw, 0, 0, 0},

View File

@ -34,13 +34,13 @@
#include "netsurf/render/box.h"
#include "netsurf/render/font.h"
#include "netsurf/render/html.h"
#ifdef WITH_JPEG
#include "netsurf/riscos/jpeg.h"
#endif
#ifdef riscos
#ifdef WITH_GIF
#include "netsurf/riscos/gif.h"
#endif
#ifdef WITH_JPEG
#include "netsurf/riscos/jpeg.h"
#endif
#ifdef WITH_PLUGIN
#include "netsurf/riscos/plugin.h"
#endif
@ -103,10 +103,10 @@ struct content {
union {
struct content_html_data html;
struct content_css_data css;
#ifdef riscos
#ifdef WITH_JPEG
struct content_jpeg_data jpeg;
#endif
#ifdef riscos
#ifdef WITH_PNG
struct content_png_data png;
#endif

View File

@ -22,10 +22,10 @@ typedef enum {
CONTENT_HTML,
CONTENT_TEXTPLAIN,
CONTENT_CSS,
#ifdef riscos
#ifdef WITH_JPEG
CONTENT_JPEG,
#endif
#ifdef riscos
#ifdef WITH_PNG
CONTENT_PNG,
#endif

View File

@ -21,6 +21,10 @@ const char *fetch_filetype(const char *unix_path)
l = strlen(unix_path);
if (2 < l && strcasecmp(unix_path + l - 3, "css") == 0)
return "text/css";
if (2 < l && strcasecmp(unix_path + l - 3, "jpg") == 0)
return "image/jpeg";
if (3 < l && strcasecmp(unix_path + l - 4, "jpeg") == 0)
return "image/jpeg";
return "text/html";
}

View File

@ -5,6 +5,7 @@
* Copyright 2004 James Bursa <bursa@users.sourceforge.net>
*/
#include <assert.h>
#include <stdbool.h>
#include <string.h>
#include "netsurf/utils/config.h"
@ -14,6 +15,8 @@
#include "netsurf/content/fetchcache.h"
#include "netsurf/desktop/options.h"
#include "netsurf/utils/log.h"
#include "netsurf/utils/messages.h"
#include "netsurf/utils/url.h"
#include "netsurf/utils/utils.h"
int done, destroyed;
@ -42,7 +45,9 @@ int main(int argc, char *argv[])
fetch_init();
cache_init();
fetchcache_init();
url_init();
options_read("options");
messages_load("messages");
while (1) {
puts("=== URL:");
@ -68,9 +73,11 @@ int main(int argc, char *argv[])
puts("=== FAILURE, dumping cache");
}
cache_dump();
if (!destroyed)
if (!destroyed) {
/* content_reformat(c, 1, 1000); */
content_remove_user(c, callback, 0, 0);
}
}
options_write("options");
cache_quit();
@ -81,7 +88,7 @@ int main(int argc, char *argv[])
void gui_multitask(void)
{
LOG(("-"));
/* putchar('-'); */
}
#ifndef riscos
@ -166,3 +173,57 @@ void plugin_reshape_instance(struct content *c, struct browser_window *bw,
char *NETSURF_DIR = "<NetSurf$Dir>";
#endif
int colourtrans_return_colour_number_for_mode(int colour, int mode,
int *dest_palette)
{
assert(!dest_palette);
return colour;
}
int *xjpeginfo_dimensions(void)
{
return 1;
}
void xcolourtrans_generate_table_for_sprite(void)
{
assert(0);
}
os_error *xosspriteop_put_sprite_scaled (osspriteop_flags flags,
osspriteop_area const *area,
osspriteop_id id,
int x,
int y,
osspriteop_action action,
os_factors const *factors,
osspriteop_trans_tab const *trans_tab)
{
assert(0);
}
os_error *xos_byte(byte op, int r1, int r2, int *r1_out, int *r2_out)
{
assert(op == 0x87);
*r2_out = 28;
return 0;
}
void xjpeg_plot_scaled(void)
{
assert(0);
}
void _swix(void)
{
assert(0);
}
bool option_filter_sprites = false;
bool option_dither_sprites = false;
void die(const char *error)
{
printf("die: %s\n", error);
exit(1);
}

View File

@ -9,14 +9,15 @@ CC_DEBUG = gcc
OBJECTS_COMMON = cache.o content.o fetch.o fetchcache.o \
css.o css_enum.o parser.o ruleset.o scanner.o \
box.o form.o html.o layout.o textplain.o \
messages.o utils.o translit.o pool.o url.o
messages.o utils.o translit.o pool.o url.o imagemap.o \
jpeg.o
OBJECTS = $(OBJECTS_COMMON) \
browser.o loginlist.o netsurf.o options.o \
htmlinstance.o htmlredraw.o imagemap.o \
htmlinstance.o htmlredraw.o \
401login.o constdata.o dialog.o download.o frames.o gui.o \
menus.o mouseactions.o \
textselection.o theme.o window.o \
draw.o gif.o jpeg.o plugin.o png.o sprite.o \
draw.o gif.o plugin.o png.o sprite.o \
about.o filetype.o font.o uri.o url_protocol.o history.o \
version.o thumbnail.o \
save.o save_complete.o save_draw.o save_text.o schedule.o
@ -27,7 +28,7 @@ OBJECTS_DEBUGRO = $(OBJECTS_COMMON) \
netsurfd.o \
constdata.o \
theme.o \
draw.o gif.o jpeg.o png.o sprite.o \
draw.o gif.o png.o sprite.o \
about.o filetype.o \
version.o \
options.o font.o
@ -38,11 +39,12 @@ WARNFLAGS = -W -Wall -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-qual \
-Wnested-externs -Winline -Wno-unused-parameter -Wuninitialized
CFLAGS = -std=c9x -D_BSD_SOURCE -Driscos -DBOOL_DEFINED -O $(WARNFLAGS) -I.. \
-mpoke-function-name
CFLAGS_DEBUG = -std=c9x -D_BSD_SOURCE $(WARNFLAGS) -I.. -I/usr/include/libxml2 -g
CFLAGS_DEBUG = -std=c9x -D_BSD_SOURCE $(WARNFLAGS) -I.. -I/usr/include/libxml2 -g \
-I/riscos/include
LDFLAGS = -L/riscos/lib -lxml2 -lz -lcurl -lssl -lcrypto -lares -lanim -lpng \
-loslib -ljpeg
LDFLAGS_SMALL = -L/riscos/lib -lxml2 -lz -lucurl -lares -lanim -lpng -loslib -ljpeg
LDFLAGS_DEBUG = -L/usr/lib -lxml2 -lz -lm -lcurl -lssl -lcrypto -ldl
LDFLAGS_DEBUG = -L/usr/lib -lxml2 -lz -lm -lcurl -lssl -lcrypto -ldl -ljpeg
OBJDIR = $(shell $(CC) -dumpmachine)
SOURCES=$(OBJECTS:.o=.c)