From 9ce01d2024e12881e29f4efd28845f12e56e7b67 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 24 Apr 2016 20:38:30 +0100 Subject: fixup errors in font layout table conversion --- beos/bitmap.cpp | 1 - beos/font.cpp | 9 ++++----- beos/font.h | 9 +++++++-- beos/plotters.cpp | 1 - beos/scaffolding.cpp | 1 - 5 files changed, 11 insertions(+), 10 deletions(-) (limited to 'beos') diff --git a/beos/bitmap.cpp b/beos/bitmap.cpp index 53bf59459..26b7a3957 100644 --- a/beos/bitmap.cpp +++ b/beos/bitmap.cpp @@ -42,7 +42,6 @@ extern "C" { #include "content/urldb.h" #include "desktop/plotters.h" #include "desktop/browser.h" -#include "desktop/font.h" #include "image/bitmap.h" } diff --git a/beos/font.cpp b/beos/font.cpp index cb4d3e6c9..87c2346d5 100644 --- a/beos/font.cpp +++ b/beos/font.cpp @@ -36,7 +36,6 @@ extern "C" { #include "utils/log.h" #include "utils/nsoption.h" #include "utils/nsurl.h" - #include "desktop/gui_layout.h" } @@ -287,7 +286,7 @@ static nserror beos_font_split(const plot_font_style_t *fstyle, if (x < current && last_space != 0) { *actual_x = (int)last_x; *char_offset = last_space; - return true; + return NSERROR_OK;; } esc += escapements[i]; current = font.Size() * esc; @@ -367,9 +366,9 @@ bool nsfont_paint(const plot_font_style_t *fstyle, static struct gui_layout_table layout_table = { - .width = beos_font_width, - .position = beos_font_position, - .split = beos_font_split, + /*.width = */beos_font_width, + /*.position = */beos_font_position, + /*.split = */beos_font_split }; struct gui_layout_table *beos_layout_table = &layout_table; diff --git a/beos/font.h b/beos/font.h index ce31929a9..75f0c3ac6 100644 --- a/beos/font.h +++ b/beos/font.h @@ -17,9 +17,12 @@ */ /** \file - * Font handling (GTK interface). + * Beos font layout handling interface. */ +#ifndef NS_BEOS_FONT_H +#define NS_BEOS_FONT_H + #include #include "desktop/plotters.h" @@ -30,4 +33,6 @@ bool nsfont_paint(const plot_font_style_t *fstyle, void nsbeos_style_to_font(BFont &font, const struct plot_font_style *fstyle); -struct gui_layout_table *beos_layout_table; +extern struct gui_layout_table *beos_layout_table; + +#endif diff --git a/beos/plotters.cpp b/beos/plotters.cpp index f63d7343e..b7d1a2bce 100644 --- a/beos/plotters.cpp +++ b/beos/plotters.cpp @@ -32,7 +32,6 @@ #include extern "C" { #include "desktop/plotters.h" -#include "desktop/font.h" #include "utils/log.h" #include "utils/utils.h" #include "utils/nsoption.h" diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp index 61e5f1392..d189e9ac0 100644 --- a/beos/scaffolding.cpp +++ b/beos/scaffolding.cpp @@ -62,7 +62,6 @@ extern "C" { #include "desktop/plotters.h" #include "utils/nsoption.h" #include "desktop/textinput.h" -#include "desktop/font.h" #include "render/form.h" #include "utils/messages.h" #include "utils/utils.h" -- cgit v1.2.3