Zmodem in Linux with FPC?
Quote:
> I'm having a problem with an old DOS program that i've ported to Linux.
> Basically, it just allows someone to call in, and it sends them a few files
> via
> Zmodem and disconnects.
> The program works using FPC's CRT unit and STDIO, except for the Zmodem part.
> I've changed all the Zmodem code to use ReadKey/Write,etc but it doesn't
> work.
> I have a feeling Linux's terminal settings are interfering with the data
> Zmodem
> is sending/receiving.
> Does anyone have any suggestions? Is there any way to set Linux in a
> temporary
> "raw" mode where it doesn't manipulate data sent to the terminal?
If you use the crt unit, the terminal is already set into rawmode. But
readkey/readln etc are rewired to crt routines and do some magic behind
the scenes (translating keycodes e.g.) so it looks as if you're still
working in cooked mode. You can change this by using
assign(input,'');
reset(input);
assign(output,'');
rewrite(output);
This will have some annoying side effects though if you still wish to
edit anything (backspace won't work for example).
Jonas