creating x characters

I'm very new to c and I need help with this one.

I'm editing some legacy code, it talks to a VT100 terminal. We used to use a DEC terminal and it had it's own propritary VT100 commands, one of them being erase X number of characters, now we are using a VT100 emulator and this command does not work.

I came up with this but it didn't work.(compiled fine though)

char tstr[20];
memset(tstr,' ',num); write (num) spaces
write_serial(port_number,tstr);
memset(tstr,'',num); write (num) backspaces
write_serial(port_number,tstr);

can anyone think of an easy way to erase X number of characters and return to starting position?

Ron
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories