Open Date: 2012-03-15 08:18
Last Update: 2012-04-11 00:34
Receiving New Line = CR appears to not work correctly
Ticket History - 3/11 Histories [Show all old Histories]
2012-04-11 00:34 Updated by: maya
2012-03-15 08:18 Updated by: None
2012-03-15 09:08 Updated by: maya
2012-03-19 23:21 Updated by: None
Please read "New-line (receive)" section of Manual.
2012-03-27 12:20 Updated by: maya
Thank you very much for the clarification, I was not aware of this.
May I change this report to a "feature request"?
Like mentioned before, I have an application where both CR and CR+LF are used as end-of-lines. Would it be possible to add one of this two behaviors for receiving:
1. CR is interpreted as "new-line" (CR+LF), LF is ignored, or
2. "Auto-mode": Either CR+LF, LF+CR, LF or CR is accepted as "new-line" (CR+LF), e.g.: text CR LF CR LF text -> 2 new lines, text LF CR LF CR text -> 2 new lines, text CR CR text -> 2 new lines, text CR LF CR text -> 2 new lines
Maybe you can also hint me to where I can find this in the source-code so I can make the change myself.
2012-04-02 00:11 Updated by: maya
We will discuss about this request.
Here is svn repository to checkout source code. http://svn.sourceforge.jp/svnroot/ttssh2/trunk
2012-04-09 09:10 Updated by: None
What system uses "LF+CR" as new-line?
New-line is parsed in ParseControl()#vtterm.c. If you can send a patch for auto detect, we will apply in trunk.
2012-04-10 01:11 Updated by: tentner
Reply To maya
Sorry for the late reply, I just saw your reply now. Thanks for the info, I will try to implement it ASAP (however, right now I am very busy with something else, so it might take a few days...).
P.S.: LF+CR: I don't know, maybe some embedded system who's programmer mixed it up by mistake ;-)
2012-04-10 10:34 Updated by: None
I was impatient and did it right away...
Attached you can find the patch, I hope you can accept it. According to my tests, it works fine.
I also realized that "ts->CRReceive" is also used in the ParseFirst() function in tekesc.c, I was not sure what to do about this and did not do any changes there.
One more thing: I have not (yet) updated the docu and comment in the .ini-file. Do you want me to do that or will you do it?
How can we see the patch?
2012-04-12 09:47 Updated by: tentner
2012-04-12 09:48 Updated by: tentner
Sorry, for some reason it got not attached the first time... (Maybe forgot to hit the transmit-button?)
Add Comment/Update #27837 (Receiving New Line = CR appears to not work correctly)