author | groucho <groucho> | 2003-05-07 09:01:39 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-05-07 09:01:39 (UTC) |
commit | 118d03d815a7615b9c53363218a7ac45b3f4c514 (patch) (side-by-side diff) | |
tree | 356953e2413cddcec0f35bd47bb6439767da7051 /noncore/apps/opie-reader/CFilter.cpp | |
parent | 00894537decf01c5a5cdc565b2740b5e67a2e90f (diff) | |
download | opie-118d03d815a7615b9c53363218a7ac45b3f4c514.zip opie-118d03d815a7615b9c53363218a7ac45b3f4c514.tar.gz opie-118d03d815a7615b9c53363218a7ac45b3f4c514.tar.bz2 |
Incorporated TimWs current source tree and make it compile
Diffstat (limited to 'noncore/apps/opie-reader/CFilter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/CFilter.cpp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/CFilter.cpp b/noncore/apps/opie-reader/CFilter.cpp index d5e3116..73a0872 100644 --- a/noncore/apps/opie-reader/CFilter.cpp +++ b/noncore/apps/opie-reader/CFilter.cpp @@ -661,24 +661,82 @@ void repalm::getch(tchar& ch, CStyle& sty) break; case 0x18: ch = 0x2026; break; case 0x19: ch = 0x2007; break; case 0x8d: ch = 0x2662; break; case 0x8e: ch = 0x2663; break; case 0x8f: ch = 0x2661; break; case 0x90: ch = 0x2660; break; default: break; } } #endif + +//static tchar nextpart[] = { 'C','l','i','c','k',' ','h','e','r','e',' ','f','o','r',' ','t','h','e',' ','n','e','x','t',' ','p','a','r','t',0 }; +//static tchar prevpart[] = { 'C','l','i','c','k',' ','h','e','r','e',' ','f','o','r',' ','t','h','e',' ','p','r','e','v','i','o','u','s',' ','p','a','r','t',0 }; + +void DePluck::getch(tchar& ch, CStyle& sty) +{ + if (m_buffed > 0) + { + sty = m_laststyle; + ch = nextpart[m_current++]; + if (m_current == m_buffed) + { + m_current = m_buffed = 0; + } + } + else + { + if (m_buffer != 0) + { + ch = m_buffer; + m_buffer = 0; + return; + } + unsigned long lnk; + do + { + if (nextpart[m_buffed] == 0) break; + parent->getch(ch, sty); + m_laststyle = sty; + if (sty.getLink()) lnk = sty.getData(); + } while (ch == nextpart[m_buffed] && sty.getLink() && ++m_buffed); + m_current = 0; + if (nextpart[m_buffed] == 0) + { + m_buffed = 0; + QString dmy; + parent->hyperlink(lnk, dmy); + do + { + parent->getch(ch, sty); + } + while (ch != 10); + parent->getch(ch, sty); + } + else if (m_buffed > 0) + { + m_buffer = ch; + ch = nextpart[0]; + if (m_buffed == 1) + { + m_buffed = 0; + } + else m_current = 1; + } + } + + return; +} |