From 1f2946a7109310ddc8fa21ff28ce0add14c09a02 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 27 Jul 2020 22:56:17 +0100 Subject: remove unecessary exported function from plain text content handler --- content/handlers/text/textplain.c | 21 +++++++++++---------- content/handlers/text/textplain.h | 12 ------------ 2 files changed, 11 insertions(+), 22 deletions(-) (limited to 'content/handlers/text') diff --git a/content/handlers/text/textplain.c b/content/handlers/text/textplain.c index 21876ec58..60051f5c9 100644 --- a/content/handlers/text/textplain.c +++ b/content/handlers/text/textplain.c @@ -1605,13 +1605,23 @@ textplain_textselection_copy(struct content *c, return NSERROR_OK; } + +/** + * Retrieve the index of the end of the text + * + * \param[in] c Content to retrieve size of + * \return Size, in bytes, of data + */ static nserror textplain_textselection_get_end(struct content *c, unsigned *end_idx) { - *end_idx = textplain_size(c); + textplain_content *text = (textplain_content *)c; + + *end_idx = text->utf8_data_size; return NSERROR_OK; } + /** * plain text content handler table */ @@ -1671,12 +1681,3 @@ nserror textplain_init(void) -/* exported interface documented in html/textplain.h */ -size_t textplain_size(struct content *c) -{ - textplain_content *text = (textplain_content *) c; - - assert(c != NULL); - - return text->utf8_data_size; -} diff --git a/content/handlers/text/textplain.h b/content/handlers/text/textplain.h index b94ee33d3..6cc2716bc 100644 --- a/content/handlers/text/textplain.h +++ b/content/handlers/text/textplain.h @@ -26,9 +26,6 @@ #ifndef NETSURF_HTML_TEXTPLAIN_H #define NETSURF_HTML_TEXTPLAIN_H -struct content; -struct rect; - /** * Initialise the text content handler * @@ -37,13 +34,4 @@ struct rect; nserror textplain_init(void); -/** - * Retrieve the size (in bytes) of text data - * - * \param[in] c Content to retrieve size of - * \return Size, in bytes, of data - */ -size_t textplain_size(struct content *c); - - #endif -- cgit v1.2.3