Hi,
I'm runnig c-kermit 8.0.209 on linux box. I'm connectin to a embedded
system via serial line with following options set in my config:

set line /dev/ttyUSB0
set speed 115200
set carrier-watch off
set handshake none
set flow-control none
robust
set file type bin
set file name lit
set rec pack 1000
set send pack 1000
set window 5
log SESSION /tmp/kermlog-axissaxis

The problem is that remote device sends only lf at the end of the
string and output in kermit is always indented since cr if missing.

Is there a way to translate lf to lf/cr automaticly?

10-02-2007, 02:43 PM

unix

Re: convert lf -> lf/cr

On 2005-06-03, [email]hkdevel@gmail.com[/email] <hkdevel@gmail.com> wrote:
: I'm runnig c-kermit 8.0.209 on linux box. I'm connectin to a embedded
: system via serial line with following options set in my config:
:
: set line /dev/ttyUSB0
: set speed 115200
: set carrier-watch off
: set handshake none
: set flow-control none
: robust
: set file type bin
: set file name lit
: set rec pack 1000
: set send pack 1000
: set window 5
: log SESSION /tmp/kermlog-axissaxis
:
: The problem is that remote device sends only lf at the end of the
: string and output in kermit is always indented since cr if missing.
:
: Is there a way to translate lf to lf/cr automaticly?
:
I could have sworn there was but I can't find it in the commands or in
the code. There is a command:

set terminal cr-display { cr, crlf }

to handle bare incoming carriage returns, but none for bare incoming
linefeeds. Then looking through my notes, I realize I meant to add it quite
some time ago, when the same thing happened to me when I was typing directly
at a PostScript interpreter. So OK, I moved this item up towards the top of
the list.

In the meantime, if you're a C programmer, the modification to ckucns.c
should be pretty straightforward, it would be right here, about line 2246:

bearing in mind that then you will have a hacked version in which SET TERM
CR-DISPLAY really means SET TERM LF-DISPLAY. When the next release (or daily
edit) appears, it will have the new command and you can throw your version out
and use the new one.

- Frank

10-02-2007, 02:43 PM

unix

Re: convert lf -> lf/cr

[color=blue]
> Just stuff a CR before passing on the LF:
>
> if (c == LF && tt_crd) { /* SET TERM CR-DISPLA CRLF? */
> ckcputc(CR); /* Yes, output CR first */
> if (seslog && !sessft) logchar((char)CR);
> }
>
> bearing in mind that then you will have a hacked version in which SET TERM
> CR-DISPLAY really means SET TERM LF-DISPLAY. When the next release (or daily
> edit) appears, it will have the new command and you can throw your version out
> and use the new one.
>[/color]