-rw-r--r-- | noncore/apps/opie-reader/Navigation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/Navigation.cpp b/noncore/apps/opie-reader/Navigation.cpp index 7b392ba..4f11887 100644 --- a/noncore/apps/opie-reader/Navigation.cpp +++ b/noncore/apps/opie-reader/Navigation.cpp | |||
@@ -1,18 +1,20 @@ | |||
1 | #include "Navigation.h" | 1 | #include "Navigation.h" |
2 | 2 | ||
3 | #include <string.h> | ||
4 | |||
3 | void CNavigation::saveposn(size_t posn) | 5 | void CNavigation::saveposn(size_t posn) |
4 | { | 6 | { |
5 | // qDebug("Saved:%u [%u,%u,%u]", posn, historystart, historycurrent, historyend); | 7 | // qDebug("Saved:%u [%u,%u,%u]", posn, historystart, historycurrent, historyend); |
6 | historycurrent = historyend = (historycurrent+1)%NAVIGATION_HISTORY_SIZE; | 8 | historycurrent = historyend = (historycurrent+1)%NAVIGATION_HISTORY_SIZE; |
7 | history[historycurrent] = posn; | 9 | history[historycurrent] = posn; |
8 | if (historystart == historyend) historystart = (historystart+1)%NAVIGATION_HISTORY_SIZE; | 10 | if (historystart == historyend) historystart = (historystart+1)%NAVIGATION_HISTORY_SIZE; |
9 | // qDebug("Saved:%u [%u,%u,%u]", posn, historystart, historycurrent, historyend); | 11 | // qDebug("Saved:%u [%u,%u,%u]", posn, historystart, historycurrent, historyend); |
10 | } | 12 | } |
11 | 13 | ||
12 | bool CNavigation::forward(size_t& loc) | 14 | bool CNavigation::forward(size_t& loc) |
13 | { | 15 | { |
14 | if (historycurrent != historyend) | 16 | if (historycurrent != historyend) |
15 | { | 17 | { |
16 | historycurrent = (historycurrent + 1)%NAVIGATION_HISTORY_SIZE; | 18 | historycurrent = (historycurrent + 1)%NAVIGATION_HISTORY_SIZE; |
17 | loc = history[historycurrent]; | 19 | loc = history[historycurrent]; |
18 | //qDebug("Forward:%u [%u,%u,%u]", loc, historystart, historycurrent, historyend); | 20 | //qDebug("Forward:%u [%u,%u,%u]", loc, historystart, historycurrent, historyend); |