Red Hat Bugzilla – Bug 244182
empty lines are shown
Last modified: 2007-11-30 17:12:07 EST
Description of problem:
The terminal adds empty lines during listing a configuration from a Cisco
switch. After switching the view to HEX and the back to ASCII, lines are
displayed correctly. For details see the attachments.
Version-Release number of selected component (if applicable):
use gtkterm as a console for Cisco switch/router
no additional empty lines displayed
- maybe a problem of the vte library
- EOL characters from Cisco are CR+LF
Created attachment 156988 [details]
listing with additional empty lines
Created attachment 156989 [details]
it should look like this
Is this with the configuration -> CR LF auto feature on / checkbox checked?
Can you do a file -> Save Raw file of a session reproducing this?
"CR LF auto" feature doesn't have effect on the displayed text, but makes a
change in the saved "Raw file".
results from captured files:
minicom => EOL = LF
gtkterm + CRLF auto = off => EOL = CR+LF
gtkterm + CRLF auto = on => EOL = doubled CR+LF (but not every time)
I would tell that EOL handling is a bit broken :-) Candidates are put_text()
from widgets.c and put_chars() from buffer.c. I will try to compile a version
with some debugging enabled during the weekend and do more tests.
Thanks, I'm awaiting your results
Created attachment 157139 [details]
The handling is really broken. The attached patch creates 3 files - raw output
from serial line, preprocessed output stored in a buffer and displayed output.
With "CR+LF auto" = off the raw and buffer files are the same, but the
displayed result has doubled CR+LF.
With "CR+LF auto" = on, the doubled CR+LF are already in the buffer.
Created attachment 157140 [details]
I believe I've found the culprit for this happening even with autocrlf off and
I'll also fix autocrlf behaviour. This is just a headsup as I don't want us to
be wasting time by working on the samething independently.
I'll report back when I have something to test for you.
Created attachment 157187 [details]
PATCH fixing the crlf issues
This patch should fix the issues you've been seeing, independend of the auto
crlf setting, and when auto crlf is needed it should even do the right thing.
Can you please test this both with and without auto crlf, I currently don't
have the hardware to test this.
+ /* BUFFER_RECEPTION*2 for worst case scenario, all \n or \r chars */
+ char out_buffer[BUFFER_RECEPTION*2];
+ int i, out_size;
+ int i, out_size = 0; !!!
CRLF auto = off => OK
CRLF auto = on => OK with initialized out_size variable in buffer.c (in
put_chars()) to zero, you have probably missed the compiler warning
Great work, Hans. Thank you.
(In reply to comment #10)
> Great work, Hans. Thank you.
Your welcome, and thank you too!
I'll build a version with the patch included for FC-6, F-7 and devel. The F-7
version will first become available in updates-testing, at which time the
updates system will post a comment here saying so. I would be much obliged if
you could test the version from updates-testing when it becomes available, so
that I can move it to the regular updates repository.
gtkterm-0.99.5-4.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report.
just done some testing and it looks good
gtkterm-0.99.5-4.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.