143 |
arshell_goto_line(unsigned int line) |
arshell_goto_line(unsigned int line) |
144 |
{ |
{ |
145 |
/* Declare a counter for the number of lines counted. */ |
/* Declare a counter for the number of lines counted. */ |
146 |
int line_counter=1; |
unsigned int line_counter=1; |
147 |
/* Declare a text position counter. */ |
/* Declare a text position counter. */ |
148 |
XmTextPosition position=0; |
XmTextPosition position=0; |
149 |
char *text=XmTextGetString(arshell.gui.widgets.work); |
char *text=XmTextGetString(arshell.gui.widgets.work); |
150 |
unsigned int text_length=strlen(text); |
unsigned int text_length=strlen(text); |
151 |
while((position<text_length) & (line_counter<line)) |
while(((unsigned int)position < text_length) & (line_counter<line)) |
152 |
{ |
{ |
153 |
if(text[position]=='\n') |
if(text[position]=='\n') |
154 |
line_counter++; |
line_counter++; |