Bug 5968 - (fhpd) list 42 -length 4 ; lists more than 4 lines
Summary: (fhpd) list 42 -length 4 ; lists more than 4 lines
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Stan Cox
URL:
Keywords:
Depends on:
Blocks: 2246
  Show dependency treegraph
 
Reported: 2008-03-19 03:32 UTC by Andrew Cagney
Modified: 2008-03-24 20:24 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2008-03-19 03:32:05 UTC
Notice how more than 4 lines are printed

(fhpd) list 42 -length 4
[0.0]
    42   void
    43   print(char *what) {
->  44     while (*what != '\0') {
    45       write(1, what, 1);
    46       what++;
    47     }
    48   }
    49   
    50   int
    51   main(int argc, char** argv) {
    52     // XXX: This forgets to check ARGC.
    53     print(argv[1]);
    54     print("\n");
    55     return 0;
    56   }
Comment 1 Stan Cox 2008-03-24 20:24:00 UTC
Improve list -length support.
    
* ListCommand.java (listOneTask): New.  Refactored from interpret.
(parseFunctionName): Likewise.
(interpret): Use listOneTask and parseFunctionName.
* TestListCommand.java (testListReverse): Test 'list -length' around PC.