summaryrefslogtreecommitdiff
path: root/content/content.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2006-02-25 18:51:51 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2006-02-25 18:51:51 +0000
commitda4a9313f1260531ec3dde07b32c122f120f695c (patch)
tree120beb0d163fc9456eca4076875d1eaf2bf4faa8 /content/content.c
parent44d192c76255fc9840e4c81f49abd05474309345 (diff)
downloadnetsurf-da4a9313f1260531ec3dde07b32c122f120f695c.tar.gz
netsurf-da4a9313f1260531ec3dde07b32c122f120f695c.tar.bz2
[project @ 2006-02-25 18:50:34 by rjw]
Support for BMP files svn path=/import/netsurf/; revision=2095
Diffstat (limited to 'content/content.c')
-rw-r--r--content/content.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c
index ff65f7bfd..f18f401cf 100644
--- a/content/content.c
+++ b/content/content.c
@@ -36,6 +36,9 @@
#ifdef WITH_GIF
#include "netsurf/image/gif.h"
#endif
+#ifdef WITH_BMP
+#include "netsurf/image/bmp.h"
+#endif
#ifdef WITH_SPRITE
#include "netsurf/riscos/sprite.h"
#endif
@@ -68,17 +71,32 @@ static const struct mime_entry mime_map[] = {
#ifdef WITH_ARTWORKS
{"application/artworks", CONTENT_ARTWORKS},
#endif
+#ifdef WITH_BMP
+ {"application/bmp", CONTENT_BMP},
+#endif
#ifdef WITH_DRAW
{"application/drawfile", CONTENT_DRAW},
+#endif
+#ifdef WITH_BMP
+ {"application/preview", CONTENT_BMP},
+ {"application/x-bmp", CONTENT_BMP},
+#endif
+#ifdef WITH_DRAW
{"application/x-drawfile", CONTENT_DRAW},
#endif
#ifdef WITH_THEME_INSTALL
{"application/x-netsurf-theme", CONTENT_THEME},
#endif
+#ifdef WITH_BMP
+ {"application/x-win-bitmap", CONTENT_BMP},
+#endif
{"application/xhtml+xml", CONTENT_HTML},
#ifdef WITH_ARTWORKS
{"image/artworks", CONTENT_ARTWORKS},
#endif
+#ifdef WITH_BMP
+ {"image/bmp", CONTENT_BMP},
+#endif
#ifdef WITH_DRAW
{"image/drawfile", CONTENT_DRAW},
#endif
@@ -94,12 +112,19 @@ static const struct mime_entry mime_map[] = {
#ifdef WITH_MNG
{"image/mng", CONTENT_MNG},
#endif
+#ifdef WITH_BMP
+ {"image/ms-bmp", CONTENT_BMP},
+#endif
#ifdef WITH_JPEG
{"image/pjpeg", CONTENT_JPEG},
#endif
#ifdef WITH_MNG
{"image/png", CONTENT_PNG},
#endif
+#ifdef WITH_BMP
+ {"image/x-bitmap", CONTENT_BMP},
+ {"image/x-bmp", CONTENT_BMP},
+#endif
#ifdef WITH_DRAW
{"image/x-drawfile", CONTENT_DRAW},
#endif
@@ -107,9 +132,17 @@ static const struct mime_entry mime_map[] = {
{"image/x-jng", CONTENT_JNG},
{"image/x-mng", CONTENT_MNG},
#endif
+#ifdef WITH_BMP
+ {"image/x-ms-bmp", CONTENT_BMP},
+#endif
#ifdef WITH_SPRITE
{"image/x-riscos-sprite", CONTENT_SPRITE},
#endif
+#ifdef WITH_BMP
+ {"image/x-win-bitmap", CONTENT_BMP},
+ {"image/x-windows-bmp", CONTENT_BMP},
+ {"image/x-xbitmap", CONTENT_BMP},
+#endif
{"text/css", CONTENT_CSS},
{"text/html", CONTENT_HTML},
{"text/plain", CONTENT_TEXTPLAIN},
@@ -130,6 +163,9 @@ const char *content_type_name[] = {
#ifdef WITH_GIF
"GIF",
#endif
+#ifdef WITH_BMP
+ "BMP",
+#endif
#ifdef WITH_MNG
"PNG",
"JNG",
@@ -206,6 +242,10 @@ static const struct handler_entry handler_map[] = {
{nsgif_create, 0, nsgif_convert, 0, nsgif_destroy, 0,
nsgif_redraw, nsgif_redraw_tiled, 0, 0, false},
#endif
+#ifdef WITH_BMP
+ {nsbmp_create, 0, nsbmp_convert, 0, nsbmp_destroy, 0,
+ nsbmp_redraw, nsbmp_redraw_tiled, 0, 0, false},
+#endif
#ifdef WITH_MNG
{nsmng_create, nsmng_process_data, nsmng_convert,
0, nsmng_destroy, 0, nsmng_redraw, nsmng_redraw_tiled,