ppm driver woes

Michael Shapiro shapiro at zorro.cecer.army.mil
Mon Mar 30 07:54:43 EST 1992


The following bug has been located and a fix identified.

    |
    |
    |If you were to do the following:
    |
    | % p.select painter=ppm
    | % p.map (include a numbered grid for a raster file, scaled to 5inches)
    | % ppmtopgm ~/paint.ppm | pgmtops | lpr -P<PostScript printer>  
    |                          ^^^^^^^
    |                          This would probably be 'pnmtops -noturn' for 
    |                          most people, but the folks at my site aren't 
    |                          too good at software updates.
    |
    |does it cut off the bottom line of the grid?  I tried reporting this
    |as a bug once, but I don't know if the PIC was able to reproduce
    |what I was reporting.
    |
    |Darrell
    |
    |

The "bug" in the ppm output turns out to be a bug in p.map. To fix this
problem modify src/paint/p.map/cmd/map.c, changing lines 125 to 131
from:

 125    extra_lines = 0;
 126    if (prows == 0)
 127    {
 128        for (i=0; i < vector.count; i++)
 129            extra_lines += vector_info_lines(i);
 130        extra_lines += 2;
 131    }

to:
*125    extra_lines = 2;
 126    if (prows == 0)
 127    {
 128        for (i=0; i < vector.count; i++)
 129            extra_lines += vector_info_lines(i);
*130
 131    }



Michael



More information about the grass-user mailing list