author | groucho <groucho> | 2003-05-07 09:01:39 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-05-07 09:01:39 (UTC) |
commit | 118d03d815a7615b9c53363218a7ac45b3f4c514 (patch) (unidiff) | |
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 | |||
@@ -682,3 +682,61 @@ void repalm::getch(tchar& ch, CStyle& sty) | |||
682 | } | 682 | } |
683 | } | 683 | } |
684 | #endif | 684 | #endif |
685 | |||
686 | //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 }; | ||
687 | //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 }; | ||
688 | |||
689 | void DePluck::getch(tchar& ch, CStyle& sty) | ||
690 | { | ||
691 | if (m_buffed > 0) | ||
692 | { | ||
693 | sty = m_laststyle; | ||
694 | ch = nextpart[m_current++]; | ||
695 | if (m_current == m_buffed) | ||
696 | { | ||
697 | m_current = m_buffed = 0; | ||
698 | } | ||
699 | } | ||
700 | else | ||
701 | { | ||
702 | if (m_buffer != 0) | ||
703 | { | ||
704 | ch = m_buffer; | ||
705 | m_buffer = 0; | ||
706 | return; | ||
707 | } | ||
708 | unsigned long lnk; | ||
709 | do | ||
710 | { | ||
711 | if (nextpart[m_buffed] == 0) break; | ||
712 | parent->getch(ch, sty); | ||
713 | m_laststyle = sty; | ||
714 | if (sty.getLink()) lnk = sty.getData(); | ||
715 | } while (ch == nextpart[m_buffed] && sty.getLink() && ++m_buffed); | ||
716 | m_current = 0; | ||
717 | if (nextpart[m_buffed] == 0) | ||
718 | { | ||
719 | m_buffed = 0; | ||
720 | QString dmy; | ||
721 | parent->hyperlink(lnk, dmy); | ||
722 | do | ||
723 | { | ||
724 | parent->getch(ch, sty); | ||
725 | } | ||
726 | while (ch != 10); | ||
727 | parent->getch(ch, sty); | ||
728 | } | ||
729 | else if (m_buffed > 0) | ||
730 | { | ||
731 | m_buffer = ch; | ||
732 | ch = nextpart[0]; | ||
733 | if (m_buffed == 1) | ||
734 | { | ||
735 | m_buffed = 0; | ||
736 | } | ||
737 | else m_current = 1; | ||
738 | } | ||
739 | } | ||
740 | |||
741 | return; | ||
742 | } | ||