- Include utils/config.h before each WITH_* test entiry enabling/disabling the object file.

- Add same test in corresponding header file (if there is one)
- riscos/uri.c: include riscos/uri.h and have function definitions matching the declarations.
- Disable PDF debug logging.

svn path=/trunk/netsurf/; revision=4769
This commit is contained in:
John Tytgat 2008-07-26 23:42:24 +00:00
parent 4ea96eac11
commit 203b3289b8
37 changed files with 144 additions and 62 deletions

View File

@ -20,11 +20,11 @@
#define NETSURF_DESKTOP_401LOGIN_H
#include "utils/config.h"
#ifdef WITH_AUTH
#include "content/content.h"
#include "desktop/browser.h"
#ifdef WITH_AUTH
void gui_401login_open(struct browser_window *bw, struct content *c,
const char *realm);

View File

@ -20,7 +20,9 @@
* Output-in-pages implementation
*/
#include "utils/config.h"
#ifdef WITH_PDF_EXPORT
#include "desktop/print.h"
#include "desktop/printer.h"

View File

@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/config.h"
#ifdef WITH_BMP
#include <assert.h>
#include <string.h>
#include <stdbool.h>
@ -30,8 +33,6 @@
#include "utils/messages.h"
#include "utils/utils.h"
#ifdef WITH_BMP
bool nsbmp_create(struct content *c, const char *params[]) {
union content_msg_data msg_data;

View File

@ -19,6 +19,9 @@
#ifndef _NETSURF_IMAGE_BMP_H_
#define _NETSURF_IMAGE_BMP_H_
#include "utils/config.h"
#ifdef WITH_BMP
#include <stdbool.h>
#include "image/bmpread.h"
@ -41,4 +44,6 @@ bool nsbmp_redraw_tiled(struct content *c, int x, int y,
float scale, unsigned long background_colour,
bool repeat_x, bool repeat_y);
#endif /* WITH_BMP */
#endif

View File

@ -17,11 +17,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/config.h"
#ifdef WITH_GIF
#include <assert.h>
#include <string.h>
#include <stdbool.h>
#include <stdlib.h>
#include "utils/config.h"
#include "content/content.h"
#include "desktop/browser.h"
#include "desktop/options.h"
@ -44,8 +46,6 @@
[rjw] - Sun 4th April 2004
*/
#ifdef WITH_GIF
static void nsgif_invalidate(struct bitmap *bitmap, void *private_word);
static void nsgif_animate(void *p);
static void nsgif_get_frame(struct content *c);

View File

@ -19,6 +19,9 @@
#ifndef _NETSURF_IMAGE_GIF_H_
#define _NETSURF_IMAGE_GIF_H_
#include "utils/config.h"
#ifdef WITH_GIF
#include <stdbool.h>
#include "image/gifread.h"
@ -42,4 +45,6 @@ bool nsgif_redraw_tiled(struct content *c, int x, int y,
float scale, unsigned long background_colour,
bool repeat_x, bool repeat_y);
#endif /* WITH_GIF */
#endif

View File

@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/config.h"
#ifdef WITH_BMP
#include <assert.h>
#include <string.h>
#include <stdbool.h>
@ -30,8 +33,6 @@
#include "utils/messages.h"
#include "utils/utils.h"
#ifdef WITH_BMP
bool nsico_create(struct content *c, const char *params[]) {
union content_msg_data msg_data;

View File

@ -19,6 +19,9 @@
#ifndef _NETSURF_IMAGE_ICO_H_
#define _NETSURF_IMAGE_ICO_H_
#include "utils/config.h"
#ifdef WITH_BMP
#include <stdbool.h>
#include "image/bmpread.h"
@ -41,4 +44,6 @@ bool nsico_redraw_tiled(struct content *c, int x, int y,
float scale, unsigned long background_colour,
bool repeat_x, bool repeat_y);
#endif /* WITH_BMP */
#endif

View File

@ -23,13 +23,14 @@
* This implementation uses the IJG JPEG library.
*/
#include "utils/config.h"
#ifdef WITH_JPEG
#include <assert.h>
#include <setjmp.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "utils/config.h"
#ifdef WITH_JPEG
#define JPEG_INTERNAL_OPTIONS
#include "jpeglib.h"
#include "content/content.h"

View File

@ -23,6 +23,9 @@
#ifndef _NETSURF_IMAGE_JPEG_H_
#define _NETSURF_IMAGE_JPEG_H_
#include "utils/config.h"
#ifdef WITH_JPEG
#include <stdbool.h>
struct bitmap;
@ -44,4 +47,6 @@ bool nsjpeg_redraw_tiled(struct content *c, int x, int y,
float scale, unsigned long background_colour,
bool repeat_x, bool repeat_y);
#endif /* WITH_JPEG */
#endif

View File

@ -23,6 +23,9 @@
#ifndef _NETSURF_IMAGE_MNG_H_
#define _NETSURF_IMAGE_MNG_H_
#include "utils/config.h"
#ifdef WITH_MNG
#include <stdbool.h>
#include <libmng.h>
@ -51,4 +54,7 @@ bool nsmng_redraw_tiled(struct content *c, int x, int y,
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
float scale, unsigned long background_colour,
bool repeat_x, bool repeat_y);
#endif /* WITH_MNG */
#endif

View File

@ -21,10 +21,13 @@
*
*/
#include "utils/config.h"
#ifdef WITH_NSSPRITE
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <librosprite.h>
#include "utils/config.h"
#include "desktop/plotters.h"
#include "content/content.h"
@ -32,10 +35,6 @@
#include "utils/messages.h"
#include "utils/utils.h"
#ifdef WITH_NSSPRITE
#include <librosprite.h>
#define ERRCHK(x) do { \
rosprite_error err = x; \
if (err == ROSPRITE_EOF) { \

View File

@ -23,6 +23,9 @@
#ifndef _NETSURF_NS_SPRITE_H_
#define _NETSURF_NS_SPRITE_H_
#include "utils/config.h"
#ifdef WITH_NSSPRITE
#include <stdbool.h>
struct content;
@ -38,4 +41,6 @@ bool nssprite_redraw(struct content *c, int x, int y,
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
float scale, colour background_colour);
#endif /* WITH_NSSPRITE */
#endif

View File

@ -23,10 +23,12 @@
#ifndef _NETSURF_IMAGE_RSVG_H_
#define _NETSURF_IMAGE_RSVG_H_
#include "utils/config.h"
#ifdef WITH_RSVG
#include <stdbool.h>
#include <librsvg/rsvg.h>
#include <cairo.h>
#include "image/bitmap.h"
struct content;
@ -51,4 +53,7 @@ bool rsvg_redraw_tiled(struct content *c, int x, int y,
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
float scale, unsigned long background_colour,
bool repeat_x, bool repeat_y);
#endif /* WITH_RSVG */
#endif

View File

@ -20,10 +20,11 @@
* Content for image/svg (implementation).
*/
#include <assert.h>
#include "utils/config.h"
#ifdef WITH_NS_SVG
#include <svgtiny.h>
#include <assert.h>
#include "svgtiny.h"
#include "content/content.h"
#include "css/css.h"
#include "desktop/plotters.h"

View File

@ -26,15 +26,14 @@
#include "utils/config.h"
#ifdef WITH_PDF_EXPORT
#define FONT_HARU_DEBUG
/* #define FONT_HARU_DEBUG */
#include <assert.h>
#include <float.h>
#include <math.h>
#include <string.h>
#include "hpdf.h"
#include "css/css.h"
#include "hpdf.h"
#include "render/font.h"
#include "pdf/font_haru.h"
#include "utils/log.h"

View File

@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/config.h"
#ifdef WITH_AUTH
#include <assert.h>
#include <stdbool.h>
#include <string.h>
@ -33,8 +36,6 @@
#include "utils/url.h"
#include "utils/utils.h"
#ifdef WITH_AUTH
#define ICON_401LOGIN_LOGIN 0
#define ICON_401LOGIN_CANCEL 1
#define ICON_401LOGIN_HOST 2

View File

@ -22,6 +22,9 @@
* Uses the ArtworksRenderer module
*/
#include "utils/config.h"
#ifdef WITH_ARTWORKS
#include <assert.h>
#include <limits.h>
#include <stdlib.h>
@ -37,8 +40,6 @@
#include "utils/messages.h"
#include "utils/log.h"
#ifdef WITH_ARTWORKS
#define AWRender_FileInitAddress 0x46080
#define AWRender_RenderAddress 0x46081
#define AWRender_DocBounds 0x46082

View File

@ -22,6 +22,9 @@
* The DrawFile module is used to plot the DrawFile.
*/
#include "utils/config.h"
#ifdef WITH_DRAW
#include <string.h>
#include <stdlib.h>
#include "oslib/drawfile.h"
@ -34,8 +37,6 @@
#include "utils/messages.h"
#include "utils/log.h"
#ifdef WITH_DRAW
/**
* Convert a CONTENT_DRAW for display.
*

View File

@ -23,6 +23,9 @@
#ifndef _NETSURF_RISCOS_DRAW_H_
#define _NETSURF_RISCOS_DRAW_H_
#include "utils/config.h"
#ifdef WITH_DRAW
#include <stdbool.h>
struct content;
@ -38,4 +41,6 @@ bool draw_redraw(struct content *c, int x, int y,
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
float scale, colour background_colour);
#endif /* WITH_DRAW */
#endif

View File

@ -199,9 +199,11 @@ extern os_t sched_time;
void ro_gui_debugwin_open(void);
/* in search.c */
#ifdef WITH_SEARCH
void ro_gui_search_init(void);
void ro_gui_search_prepare(struct gui_window *g);
bool ro_gui_search_prepare_menu(void);
#endif
/* in print.c */
void ro_gui_print_init(void);

View File

@ -37,6 +37,9 @@
* Helpers are not supported (system variable detection is #if 0ed out)
*/
#include "utils/config.h"
#ifdef WITH_PLUGIN
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
@ -67,8 +70,6 @@
#include "utils/utils.h"
#ifdef WITH_PLUGIN
typedef enum {
PLUGIN_PARAMETER_DATA = 1,
PLUGIN_PARAMETER_URL = 2,

View File

@ -19,6 +19,9 @@
#ifndef _NETSURF_RISCOS_PLUGIN_H_
#define _NETSURF_RISCOS_PLUGIN_H_
#include "utils/config.h"
#ifdef WITH_PLUGIN
#include <stdbool.h>
#include "oslib/plugin.h"
#include "oslib/wimp.h"
@ -73,6 +76,6 @@ void plugin_stream_new(wimp_message *message);
void plugin_stream_written(wimp_message *message);
void plugin_url_access(wimp_message *message);
#endif /* WITH_PLUGIN */
#endif

View File

@ -17,6 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/config.h"
#ifdef WITH_PRINT
#include <assert.h>
#include <string.h>
#include "oslib/font.h"
@ -68,12 +71,10 @@
* \todo make use of print stylesheets
*/
struct gui_window *print_current_window = 0;
struct gui_window *print_current_window = NULL;
bool print_text_black = false;
bool print_active = false;
#ifdef WITH_PRINT
/* 1 millipoint == 1/400 OS unit == 1/800 browser units */
static int print_prev_message = 0;

View File

@ -19,6 +19,9 @@
#ifndef _NETSURF_RISCOS_PRINT_H_
#define _NETSURF_RISCOS_PRINT_H_
#include "utils/config.h"
#ifdef WITH_PRINT
#include <stdbool.h>
#include "oslib/wimp.h"
@ -33,4 +36,6 @@ bool print_ack(wimp_message *m);
void print_dataload_bounce(wimp_message *m);
void print_cleanup(void);
#endif /* WITH_PRINT */
#endif

View File

@ -21,6 +21,9 @@
* Save HTML document with dependencies (implementation).
*/
#include "utils/config.h"
#ifdef WITH_SAVE_COMPLETE
#define _GNU_SOURCE /* for strndup */
#include <assert.h>
#include <ctype.h>
@ -42,8 +45,6 @@
#include "utils/url.h"
#include "utils/utils.h"
#ifdef WITH_SAVE_COMPLETE
regex_t save_complete_import_re;
/** An entry in save_complete_list. */

View File

@ -23,10 +23,15 @@
#ifndef _NETSURF_RISCOS_SAVE_COMPLETE_H_
#define _NETSURF_RISCOS_SAVE_COMPLETE_H_
#include "utils/config.h"
#ifdef WITH_SAVE_COMPLETE
#include <stdbool.h>
struct content;
void save_complete_init(void);
bool save_complete(struct content *c, const char *path);
#endif /* WITH_SAVE_COMPLETE */
#endif

View File

@ -20,6 +20,9 @@
* Export a content as a PDF file (implementation).
*/
#include "utils/config.h"
#ifdef WITH_PDF_EXPORT
#include <stdbool.h>
#include "oslib/osfile.h"
#include "content/content.h"
@ -29,8 +32,6 @@
#include "utils/log.h"
#include "utils/config.h"
#ifdef WITH_PDF_EXPORT
/**
* Export a content as a PDF file.
*

View File

@ -20,10 +20,12 @@
#define _NETSURF_RISCOS_SAVE_PDF_H_
#include "utils/config.h"
#include "content/content.h"
#ifdef WITH_PDF_EXPORT
struct content;
bool save_as_pdf(struct content *c, const char *path);
#endif
#endif /* WITH_PDF_EXPORT */
#endif

View File

@ -21,6 +21,9 @@
* Free text search (implementation)
*/
#include "utils/config.h"
#ifdef WITH_SEARCH
#include <ctype.h>
#include <string.h>
#include "oslib/hourglass.h"
@ -40,8 +43,6 @@
#include "utils/messages.h"
#include "utils/utils.h"
#ifdef WITH_SEARCH
#ifndef NOF_ELEMENTS
#define NOF_ELEMENTS(array) (sizeof(array)/sizeof(*(array)))
#endif
@ -59,13 +60,13 @@ struct list_entry {
struct list_entry *next;
};
struct gui_window *search_current_window = 0;
struct gui_window *search_current_window = NULL;
static char *search_string = 0;
static char *search_string = NULL;
static struct list_entry search_head = { 0, 0, NULL, NULL, NULL, NULL, NULL };
static struct list_entry *search_found = &search_head;
static struct list_entry *search_current = 0;
static struct content *search_content = 0;
static struct list_entry *search_current = NULL;
static struct content *search_content = NULL;
static bool search_prev_case_sens = false;
#define RECENT_SEARCHES 8

View File

@ -35,6 +35,7 @@
#include "riscos/gui.h"
#include "riscos/image.h"
#include "riscos/sprite.h"
#include "utils/config.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"

View File

@ -25,7 +25,9 @@
#include <stdbool.h>
#include "oslib/osspriteop.h"
#include "utils/config.h"
#ifdef WITH_SPRITE
struct content;
struct content_sprite_data {
@ -38,6 +40,7 @@ bool sprite_redraw(struct content *c, int x, int y,
int width, int height,
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
float scale, colour background_colour);
#endif
byte sprite_bpp(const osspriteop_header *s);

View File

@ -21,7 +21,6 @@
*/
#include "utils/config.h"
#ifdef WITH_SSL
#include <assert.h>

View File

@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/config.h"
#ifdef WITH_URI
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@ -28,19 +31,14 @@
#include "riscos/theme.h"
#include "desktop/gui.h"
#include "riscos/gui.h"
#include "riscos/uri.h"
#include "riscos/url_protocol.h"
#include "utils/log.h"
#include "utils/utils.h"
#ifdef WITH_URI
void ro_uri_message_received(uri_full_message_process*);
bool ro_uri_launch(char *uri);
void ro_uri_bounce(uri_full_message_return_result*);
void ro_uri_message_received(uri_full_message_process* uri_message)
void ro_uri_message_received(wimp_message *msg)
{
uri_full_message_process *uri_message = (uri_full_message_process *)msg;
uri_h uri_handle;
char* uri_requested;
int uri_length;
@ -57,7 +55,6 @@ void ro_uri_message_received(uri_full_message_process* uri_message)
xuri_request_uri(0, 0, 0, uri_handle, &uri_length);
uri_requested = calloc((unsigned int)uri_length, sizeof(char));
if (uri_requested == NULL)
return;
@ -85,15 +82,16 @@ bool ro_uri_launch(char *uri)
return true;
}
void ro_uri_bounce(uri_full_message_return_result *message)
void ro_uri_bounce(wimp_message *msg)
{
uri_full_message_process *message = (uri_full_message_process *)msg;
char uri_buf[512];
os_error *e;
if ((message->flags & 1) == 0) return;
if ((message->flags & 1) == 0)
return;
e = xuri_request_uri(0, uri_buf, sizeof uri_buf, message->handle, 0);
if (e) {
LOG(("xuri_request_uri: %d: %s", e->errnum, e->errmess));
return;

View File

@ -19,10 +19,15 @@
#ifndef _NETSURF_RISCOS_URI_H_
#define _NETSURF_RISCOS_URI_H_
#include "utils/config.h"
#ifdef WITH_URI
#include "oslib/wimp.h"
void ro_uri_message_received(wimp_message *message);
bool ro_uri_launch(char *uri);
void ro_uri_bounce(wimp_message *message);
#endif /* WITH_URI */
#endif

View File

@ -24,6 +24,9 @@
* See http://www.vigay.com/inet/inet_url.html
*/
#include "utils/config.h"
#ifdef WITH_URL
#define _GNU_SOURCE /* for strndup */
#include <ctype.h>
#include <stdio.h>
@ -40,8 +43,6 @@
#include "utils/log.h"
#include "utils/utils.h"
#ifdef WITH_URL
/**
* Handle a Message_InetSuiteOpenURL.
*/

View File

@ -23,6 +23,9 @@
#ifndef _NETSURF_RISCOS_URL_H_
#define _NETSURF_RISCOS_URL_H_
#include "utils/config.h"
#ifdef WITH_URL
#include "oslib/wimp.h"
void ro_url_message_received(wimp_message *message);
@ -30,4 +33,6 @@ void ro_url_broadcast(const char *url);
void ro_url_load(const char *url);
void ro_url_bounce(wimp_message *message);
#endif /* WITH_URL */
#endif