.PS
circle "1"
move right 1i
circle "2"
line <-> from 1st circle to 2nd circle "normal" above
move down from 1st circle
circle "3"
move down from 2nd circle
circle "4"
line <-> from 3rd circle to 4th circle chop "chopped" above
.PE
There should be four circles: two on top with a line connecting their centers, and two below with a line connecting the circles (the line should not be drawn within the circles). However, the two lower circles are instead connected at their centers because "chop" is not working.
In commit c6c12d9660b0... dated 04 Nov 2014, "Some gcc warnings removed," the line
chop_ap[chop++] = ap;
was deleted from file pic/linegen.c.
gcc -Wall does flag this line with the message that chop_ap is an unused variable. It is right about that. However, the variable chopis used, and if it is not incremented, it remains at 0 and the "chop" attribute won't work.
To replicate:
Then run:
pic testfile | troff | dpost | ps2pdf - > testfile.pdf
There should be four circles: two on top with a line connecting their centers, and two below with a line connecting the circles (the line should not be drawn within the circles). However, the two lower circles are instead connected at their centers because "chop" is not working.
In commit c6c12d9660b0... dated 04 Nov 2014, "Some gcc warnings removed," the line
was deleted from file
pic/linegen.c
.gcc -Wall
does flag this line with the message thatchop_ap
is an unused variable. It is right about that. However, the variablechop
is used, and if it is not incremented, it remains at 0 and the "chop" attribute won't work.Solution: Add
chop++
back in.