Serial Tranfer Problem

I’m trying to send a character from HyperTerminal to the STDIO window
using this code;

#define DINBUFSIZE 15
#define DOUTBUFSIZE 15
main()
{
int chr;
char s[1];
chr = 0;
serDopen(19200);
while (chr != 27)
{
serDrdFlush();
if ((chr = serDgetc()) != -1 && chr != 27)
{
printf(s);
}
}
printf(“Done”);
serDclose();
}

When I enter say “a” in HT I get a small box plus the “a” (two characters one none printing) in the STDIO window. Same for other characters I put in HT (New to DynC I am afraid)

The extra char is likely the linefeed or newline char.

Tim S.