summaryrefslogtreecommitdiffstats
path: root/selbox.c
diff options
context:
space:
mode:
authordscho <dscho>2002-05-02 14:33:09 +0000
committerdscho <dscho>2002-05-02 14:33:09 +0000
commitd7117b698cfd33f182000b69b16ea4f00cb7659c (patch)
tree56605931f8bd85fd6fabef2369d9550cce5e3b15 /selbox.c
parentff9fbd971bdebf8eca22446139803a2647dbcf5a (diff)
downloadlibtdevnc-d7117b69.tar.gz
libtdevnc-d7117b69.zip
index was shadowed
Diffstat (limited to 'selbox.c')
-rw-r--r--selbox.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/selbox.c b/selbox.c
index 63ff89e..c40f913 100644
--- a/selbox.c
+++ b/selbox.c
@@ -66,17 +66,17 @@ static void selPaintLine(rfbSelectData* m,int line,Bool invert)
invert?m->backColour:m->colour);
}
-static void selSelect(rfbSelectData* m,int index)
+static void selSelect(rfbSelectData* m,int _index)
{
int delta;
- if(index==m->selected || index<0 || index>=m->listSize)
+ if(_index==m->selected || _index<0 || _index>=m->listSize)
return;
if(m->selected>=0)
selPaintLine(m,m->selected-m->displayStart,FALSE);
- if(index<m->displayStart || index>=m->displayStart+m->pageH) {
+ if(_index<m->displayStart || _index>=m->displayStart+m->pageH) {
/* targetLine is the screen line in which the selected line will
be displayed.
targetLine = m->pageH/2 doesn't look so nice */
@@ -84,11 +84,11 @@ static void selSelect(rfbSelectData* m,int index)
int lineStart,lineEnd;
/* scroll */
- if(index<targetLine)
- targetLine = index;
- else if(index+m->pageH-targetLine>=m->listSize)
- targetLine = index+m->pageH-m->listSize;
- delta = index-(m->displayStart+targetLine);
+ if(_index<targetLine)
+ targetLine = _index;
+ else if(_index+m->pageH-targetLine>=m->listSize)
+ targetLine = _index+m->pageH-m->listSize;
+ delta = _index-(m->displayStart+targetLine);
if(delta>-m->pageH && delta<m->pageH) {
if(delta>0) {
@@ -109,15 +109,15 @@ static void selSelect(rfbSelectData* m,int index)
}
m->displayStart += delta;
for(delta=lineStart;delta<lineEnd;delta++)
- if(delta!=index)
+ if(delta!=_index)
selPaintLine(m,delta,FALSE);
}
- m->selected = index;
+ m->selected = _index;
selPaintLine(m,m->selected-m->displayStart,TRUE);
if(m->selChangedHook)
- m->selChangedHook(index);
+ m->selChangedHook(_index);
/* todo: scrollbars */
}