summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-28 11:44:52 (UTC)
committer simon <simon>2002-12-28 11:44:52 (UTC)
commit7a6a55d19048de7920eb885e80a26e1bef0f66e4 (patch) (unidiff)
tree0cd25082cfc0737ceaa1fbfee38e4897eb319959
parent857560112f6df95a84040b43462731f63824b3d7 (diff)
downloadopie-7a6a55d19048de7920eb885e80a26e1bef0f66e4.zip
opie-7a6a55d19048de7920eb885e80a26e1bef0f66e4.tar.gz
opie-7a6a55d19048de7920eb885e80a26e1bef0f66e4.tar.bz2
- include string.h for memcpy
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/Navigation.cpp2
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,26 +1,28 @@
1#include "Navigation.h" 1#include "Navigation.h"
2 2
3#include <string.h>
4
3void CNavigation::saveposn(size_t posn) 5void 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
12bool CNavigation::forward(size_t& loc) 14bool 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);
19 return true; 21 return true;
20 } 22 }
21 else 23 else
22 { 24 {
23 return false; 25 return false;
24 } 26 }
25} 27}
26 28