~ubuntu-branches/ubuntu/natty/editline/natty

« back to all changes in this revision

Viewing changes to editline.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hocevar
  • Date: 2010-01-03 15:45:34 UTC
  • Revision ID: james.westby@ubuntu.com-20100103154534-qzbi3y3hvewmmdm6
Tags: 1.12-6
* Switch package format to 3.0 (quilt).
* 200_fix-truncation-at-64-char.diff: fix invalid 64-char truncation in
  batch mode, courtesy of Mark O'Donohue. Thanks to Damyan Ivanov for
  forwarding the patch from Ubuntu (Closes: #508640).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1024
1024
 
1025
1025
    for (size = MEM_INC, p = line = NEW(char, size), end = p + size; ; p++) {
1026
1026
        if (p == end) {
 
1027
            int lengthSoFar = p - line;
1027
1028
            size += MEM_INC;
1028
 
            p = line = realloc(line, size);
1029
 
            end = p + size;
 
1029
            line = realloc(line, size);
 
1030
            p = line + lengthSoFar;
 
1031
            end = line + size;
1030
1032
        }
1031
1033
        if (read(0, p, 1) <= 0) {
1032
1034
            /* Ignore "incomplete" lines at EOF, just like we do for a tty. */