From 47dd570d84c0e880f9c7d5f7a5acee48e79b2d3b Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Tue, 28 Jul 2009 01:39:15 +0000 Subject: [PATCH] Fixed linkat bug --- netmapr.c | 6 +++--- netmapr.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/netmapr.c b/netmapr.c index a897287..d60d28a 100644 --- a/netmapr.c +++ b/netmapr.c @@ -527,7 +527,7 @@ int main (int argc, char **argv) { if (o == -1) { o = objat(event.button.x, event.button.y); if (o == -1) { - o = linkat(event.button.x, event.button.y); + o = getlinkat(event.button.x, event.button.y); if (o != -1) { clickedtype = T_LINK; } @@ -1284,7 +1284,7 @@ int main (int argc, char **argv) { changestate(S_NONE); } else if (state == S_NONE) { /* are we on a link? if so, add a point to it */ - o = linkat(event.button.x + screenx, event.button.y + screeny); + o = getlinkat(event.button.x + screenx, event.button.y + screeny); if (o != -1) { addlinkpoint(o, event.button.x+screenx, event.button.y+screeny); /* select the link */ @@ -6028,7 +6028,7 @@ int linelen(int x1,int y1,int x2,int y2) { return numpixels; } -int linkat(int x, int y) { +int getlinkat(int x, int y) { int i; for (i = 0; i < map[curmap].numlinks; i++) { /* is (x,y) on the line? */ diff --git a/netmapr.h b/netmapr.h index 407ed8b..c26323e 100644 --- a/netmapr.h +++ b/netmapr.h @@ -255,7 +255,7 @@ void drawyn(char *prompt); int getyn(int x, int y); void goback(void); int linelen(int x1,int y1,int x2,int y2); -int linkat(int x, int y); +int getlinkat(int x, int y); int loadmap(void); void lowerselected(int amt); int objat(int x, int y);