summaryrefslogtreecommitdiff
path: root/src/input/input_dvb.c
diff options
context:
space:
mode:
authorMatthias Hopf <mat@mshopf.de>2008-08-08 15:39:37 +0200
committerMatthias Hopf <mat@mshopf.de>2008-08-08 15:39:37 +0200
commit93f518565b5f53c795aeddf544f3582d44ff9fe6 (patch)
treef79884a40a9f80068b15d1c9cc8cb7660a1bf3fb /src/input/input_dvb.c
parent6f79d815918aa83d706b6dc6722c2006f27e8084 (diff)
parent8c24b5cd856fa47f605eba68ec0a49bd4d47d7da (diff)
downloadxine-lib-93f518565b5f53c795aeddf544f3582d44ff9fe6.tar.gz
xine-lib-93f518565b5f53c795aeddf544f3582d44ff9fe6.tar.bz2
Merge.
Diffstat (limited to 'src/input/input_dvb.c')
-rw-r--r--src/input/input_dvb.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c
index bc279b78b..19b479a06 100644
--- a/src/input/input_dvb.c
+++ b/src/input/input_dvb.c
@@ -1664,21 +1664,22 @@ static void load_epg_data(dvb_input_plugin_t *this)
}
/* Prints text to an area, tries to cut the lines in between words. */
-static void render_text_area(osd_renderer_t* renderer, osd_object_t* osd, char* text,
+static void render_text_area(osd_renderer_t* renderer, osd_object_t* osd, const char* text,
int x, int y, int row_space,
int max_x, int max_y, int* height, int color_base) {
/* The position of the text to be printed. */
- char* cursor = text;
+ const char* cursor = text;
+ const char *const text_end = text + strlen(text);
/* The line to be printed next. */
char text_line[512];
int text_width, text_height;
size_t old_line_length, line_cursor;
- char* bound, *old_bound;
+ const char* bound, *old_bound;
*height = 0;
- while (cursor < text + strlen(text)) {
+ while (cursor < text_end) {
bound = cursor;
line_cursor = 0;
text_line[0] = '\0';
@@ -1735,7 +1736,7 @@ static void render_text_area(osd_renderer_t* renderer, osd_object_t* osd, char*
}
/* OK, it did fit, let's try to fit some more. */
- } while (bound < text + strlen(text));
+ } while (bound < text_end);
if (y + text_height + row_space > max_y) {
break;