ICCV7 STDIO Terminal Control Compatibility Problems
TJHJ
Posts: 243
Ok So I suspect that this might be from my own fault but if anyone has any suggestions or ideas.
I am having a hard time making any terminal program universal. Personally I like to use the PST terminal over the built in ICCv7 terminal, but in order to have it display correctly in one it shows up all messed up in the other.
Example.
Ok in the PST this comes out correctly, in the ICCv7 terminal the CR command does not seem to create a new line. It just prints all the lines on top of each other.
This code seems to make ICCv7 Show correctly but makes PST show up strange.
Any suggestions or ideas?
Thanks
TJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I owe everyone here a bunch, So thanks again for answering my dumb questions.
Projects. RG500 ECU system. PropCopter. Prop CanSat. Prop Paste Gun.
Suzuki RG500 in a RGV 250 frame.
Bimota V-Due (Running on the fuel injection system)
Aprilia RS250
I am having a hard time making any terminal program universal. Personally I like to use the PST terminal over the built in ICCv7 terminal, but in order to have it display correctly in one it shows up all messed up in the other.
Example.
putchar(0); // Clear the screen printf("Some String %c", 13); // Some string followed by a CR printf("Some more string %c", 13); // More stuff followed by a CR
Ok in the PST this comes out correctly, in the ICCv7 terminal the CR command does not seem to create a new line. It just prints all the lines on top of each other.
putchar(0); // Clear the screen printf("Some String %c", '\n'); // Some string followed by a new line printf("Some more string %c", '\n'); // More stuff followed by a new line
This code seems to make ICCv7 Show correctly but makes PST show up strange.
here is what I get in PST Some String Some More string The next new line starts printing here.
Any suggestions or ideas?
Thanks
TJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I owe everyone here a bunch, So thanks again for answering my dumb questions.
Projects. RG500 ECU system. PropCopter. Prop CanSat. Prop Paste Gun.
Suzuki RG500 in a RGV 250 frame.
Bimota V-Due (Running on the fuel injection system)
Aprilia RS250
Comments
Try - printf("Some more string %c", '\n\r'); // More stuff followed by a new line plus carriage return
Ned
p.s. - To understand the logic behind the use of two control characters, you can visit a museum and watch an old Teletype in action. Moving the paper and moving the print head are two distinct tasks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"They may have computers, and other weapons of mass destruction." - Janet Reno
Post Edited (WNed) : 3/31/2009 4:13:10 PM GMT
You can set how the terminal should interpret LF or CR.
On Unix machines (and that includes Macs & Linux) it is just 1 character just like god intended
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
---
Jo
Control codes date back to the days of PDP-11's and model 33 Teletype's. I've owned both and feel justified in my objection to being thrown in with the unwashed masses. I may be unclean, but that's a story for a different time. The point is to make the distinction between ASCII characters and control codes. In fact, the original Kernighan and Ritchie C used the same control codes, and they weren't thinking about how well it would run under Windows, since Bill Gates was just dropping out of college at the time.
So come Sunday, you sit down and pray that god forgives you blaspheming about his control codes, and the sanctity of *nix.
Ned
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"They may have computers, and other weapons of mass destruction." - Janet Reno
Saved all that paper tape so you could use it to punch out "Merry Christmas" and "Happy Birthday" streamers, didn't you... come on, at least once...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"They may have computers, and other weapons of mass destruction." - Janet Reno
I remember having to "read" mag tape with a fluid of iron dust. No power. Just put the tape under the glass, wiggle it a little and presto, you could see the bit pattern.
I'm not sure I would call them "the good old days" though. But a 3 platter 12" disk could hold a whopping 10 Megabytes. Thats actually quite a lot of raw text.
by a hair's breath. Worked at TJ Watson for a while and the museum has some amazing mechanical contraptions to move paper tape
faster than any kind of paper should ever move. Jaw dropping.
But still think that in the age of crts and lcds, that is one useless character at the end of every line. But that's just when I want to
tweak people about even just plain text files can look utterly different across different OSes
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
---
Jo