summaryrefslogtreecommitdiff
path: root/content/handlers/text
diff options
context:
space:
mode:
Diffstat (limited to 'content/handlers/text')
-rw-r--r--content/handlers/text/textplain.c21
-rw-r--r--content/handlers/text/textplain.h12
2 files changed, 11 insertions, 22 deletions
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