Rev 15 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 15 | Rev 16 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | if (!cnt) |
30 | if (!cnt) |
31 | return EDIT_NULL; |
31 | return EDIT_NULL; |
32 | 32 | ||
33 | while (cnt && context->counter != context->limit) |
33 | while (cnt && context->counter != context->limit) |
34 | { |
34 | { |
35 | char c = GetCharSerial(ctl); |
35 | char c = GetCharSerial(ctl); --cnt; |
36 | if (!context->readLines || c >= ' ') |
36 | if (!context->readLines || c >= ' ') |
37 | { |
37 | { |
38 | context->buffer[context->counter++] =c; |
38 | context->buffer[context->counter++] =c; |
39 | if (context->counter != context->limit) |
39 | if (context->counter != context->limit) |
40 | context->buffer[context->counter] = 0; |
40 | context->buffer[context->counter] = 0; |
Line 60... | Line 60... | ||
60 | 60 | ||
61 | void resetInput(editBuffer * context) |
61 | void resetInput(editBuffer * context) |
62 | { |
62 | { |
63 | context->counter = 0; |
63 | context->counter = 0; |
64 | context->complete = 0; |
64 | context->complete = 0; |
- | 65 | context->buffer[0] = 0; |
|
65 | } |
66 | } |
66 | 67 | ||
67 | int charCount(editBuffer * context) |
68 | int charCount(editBuffer * context) |
68 | { |
69 | { |
69 | return context->counter; |
70 | return context->counter; |