diff options
author | Dave Chapman <dave@dchapman.com> | 2007-05-29 19:00:36 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2007-05-29 19:00:36 +0000 |
commit | f0d4fc6c6b146197c0fc51753d838252766aeda2 (patch) | |
tree | 14a80b9a30d14b63c50f3350f9c2cececdc1baef /apps/gui/gwps-common.c | |
parent | be0cbc940641264fe536ea1b3c1153f627367f55 (diff) |
Commit my patch from FS#7179 - a standalone command-line checkwps tool. To build, just type "make checkwps" in tools and run it with "checkwps wpsname.wps".
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13517 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r-- | apps/gui/gwps-common.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index b25168f252..2cdb92d964 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -1969,29 +1969,3 @@ bool gui_wps_refresh(struct gui_wps *gwps, return true; } -int wps_subline_index(struct wps_data *data, int line, int subline) -{ - return data->lines[line].first_subline_idx + subline; -} - -int wps_first_token_index(struct wps_data *data, int line, int subline) -{ - int first_subline_idx = data->lines[line].first_subline_idx; - return data->sublines[first_subline_idx + subline].first_token_idx; -} - -int wps_last_token_index(struct wps_data *data, int line, int subline) -{ - int first_subline_idx = data->lines[line].first_subline_idx; - int idx = first_subline_idx + subline; - if (idx < data->num_sublines - 1) - { - /* This subline ends where the next begins */ - return data->sublines[idx+1].first_token_idx - 1; - } - else - { - /* The last subline goes to the end */ - return data->num_tokens - 1; - } -} |