diff options
author | fluxgen <fluxgen> | 2001-12-17 00:36:42 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2001-12-17 00:36:42 (GMT) |
commit | 05cec54a399f8b5fde81f04bfc30f60fa4e8afe3 (patch) | |
tree | 1bf0c6cb0b4b9dfb48738b6005f4f46c210ad3a3 /src | |
parent | 1982b853b5e14f4fc67c1cede269b8f1441249ed (diff) | |
download | fluxbox-05cec54a399f8b5fde81f04bfc30f60fa4e8afe3.zip fluxbox-05cec54a399f8b5fde81f04bfc30f60fa4e8afe3.tar.bz2 |
Added getLast function
Diffstat (limited to 'src')
-rw-r--r-- | src/Tab.cc | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -769,10 +769,26 @@ void Tab::motionNotifyEvent(XMotionEvent *me) { | |||
769 | // of currentchain. | 769 | // of currentchain. |
770 | //----------------------------------- | 770 | //----------------------------------- |
771 | Tab *Tab::getFirst(Tab *current) { | 771 | Tab *Tab::getFirst(Tab *current) { |
772 | if (current==0) | 772 | if (!current) |
773 | return 0; | 773 | return 0; |
774 | for (; current->m_prev != 0; current = current->m_prev); | 774 | |
775 | return current; | 775 | Tab *i=current; |
776 | |||
777 | for (; i->m_prev != 0; i = i->m_prev); | ||
778 | return i; | ||
779 | } | ||
780 | |||
781 | //-------------- getFirst() --------- | ||
782 | // Returns the first Tab in the chain | ||
783 | // of currentchain. | ||
784 | //----------------------------------- | ||
785 | Tab *Tab::getLast(Tab *current) { | ||
786 | if (!current) | ||
787 | return 0; | ||
788 | Tab *i=current; | ||
789 | |||
790 | for (; i->m_next != 0; i = i->m_next); | ||
791 | return i; | ||
776 | } | 792 | } |
777 | 793 | ||
778 | //-------------- insert ------------ | 794 | //-------------- insert ------------ |