Bug of 'r.line' fixed

After posted a help for 'r.line' this morning and found out
the bug has not been fixed, I decided to spend some times
to fix it. Now, the problem is solved and 'r.line' seems
working well.

From the plotting, I thought it was caused by an extra point
from previous line. By reading the vector file, I found out
the problem is a redundance that every line, except the first one,
contains of its preceeding lines. To fix this problem,

1. change directory to:
   $GISBASE/src.aplha/raster/r.line/cmd

2. edit the io.c file by:
  a) move to the function of write_ln (begin,end,n);
  b) add the following line after the variables declaration:
    
     Vect_reset_line (Points);

    make sure this command is in front of the first appearance
    of Vect_append_point (Points, x, y);

3. change direcotry to r.line:
  cd ..
  
4) run gmake4.0 to complie 'r.line' again.

As I suspected, this is a minor problem, although it took me
a couple of hours to trace the bug. BTW, a question to GRASS
programmers, is there a way to search for a prticular function
of GRASS? After finding the bug, I was trying to find the
reset function by looking through src/libes and many other
directories and could not find it. Finally, it came to my
mind that 'r.ploy' should include calls of such function and
I found out the function Vect_reset_line () there.

Jinn-Guay Lay
GIS & Computer Cart. Lab
Univ. of Hawaii at Manoa