Remove text export build config option. Tidy up save_text code.

svn path=/trunk/netsurf/; revision=4095
This commit is contained in:
Michael Drake 2008-04-13 21:58:43 +00:00
parent 5c8406bf8b
commit 48431f9674
3 changed files with 2 additions and 8 deletions

View File

@ -33,8 +33,6 @@
#include "utils/utf8.h" #include "utils/utf8.h"
#include "utils/utils.h" #include "utils/utils.h"
#ifdef WITH_TEXT_EXPORT
static void extract_text(struct box *box, bool *first, static void extract_text(struct box *box, bool *first,
save_text_whitespace *before, struct save_text_state *save); save_text_whitespace *before, struct save_text_state *save);
static bool save_text_add_to_buffer(const char *text, size_t length, static bool save_text_add_to_buffer(const char *text, size_t length,
@ -59,7 +57,7 @@ void save_as_text(struct content *c, char *path)
utf8_convert_ret ret; utf8_convert_ret ret;
char *result; char *result;
if (c && c->type != CONTENT_HTML) { if (!c || c->type != CONTENT_HTML) {
return; return;
} }
@ -292,5 +290,3 @@ bool save_text_add_to_buffer(const char *text, size_t length, struct box *box,
return true; return true;
} }
#endif

View File

@ -24,8 +24,7 @@
#ifndef _NETSURF_DESKTOP_SAVE_TEXT_H_ #ifndef _NETSURF_DESKTOP_SAVE_TEXT_H_
#define _NETSURF_DESKTOP_SAVE_TEXT_H_ #define _NETSURF_DESKTOP_SAVE_TEXT_H_
#include "render/box.h" struct box;
struct content; struct content;
/* text currently being saved */ /* text currently being saved */

View File

@ -92,7 +92,6 @@ char *strndup(const char *s, size_t n);
/* Export modules */ /* Export modules */
#define WITH_SAVE_COMPLETE #define WITH_SAVE_COMPLETE
#define WITH_DRAW_EXPORT #define WITH_DRAW_EXPORT
#define WITH_TEXT_EXPORT
#endif #endif
#endif #endif