mirror of
https://github.com/rricharz/Tek4010.git
synced 2026-04-18 08:57:30 +00:00
version 1.5.5, proper ignoring of ANSI CSI escape sequencies
This commit is contained in:
22
gdemo.sh
Executable file
22
gdemo.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# gdemo, run with tek4010 to display grayscale images
|
||||
# rricharz 2019
|
||||
|
||||
wait2s() {
|
||||
# let tek4010 wait 2 seconds (not this script, which just shuffles stuff into the buffer!)
|
||||
for i in {1..30}
|
||||
do
|
||||
printf '\007'
|
||||
done
|
||||
}
|
||||
|
||||
for filename in pltfiles//PointPlot/*.plt
|
||||
do
|
||||
# erase screen
|
||||
printf '\033\014'
|
||||
cat "$filename"
|
||||
wait2s
|
||||
done
|
||||
|
||||
|
||||
|
||||
27
idemo.sh
Executable file
27
idemo.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# idemo, run with tek4010 to display ICEMD vector data
|
||||
# rricharz 2019
|
||||
|
||||
wait2s() {
|
||||
# let tek4010 wait 2 seconds (not this script, which just shuffles stuff into the buffer!)
|
||||
for i in {1..30}
|
||||
do
|
||||
printf '\007'
|
||||
done
|
||||
}
|
||||
|
||||
while true
|
||||
do
|
||||
|
||||
for filename in pltfiles/ICEMD_pltfiles/*.plt
|
||||
do
|
||||
# erase screen
|
||||
printf '\033\014'
|
||||
printf '<033:'
|
||||
echo tek4010 is displaying "$filename"
|
||||
cat "$filename"
|
||||
wait2s
|
||||
done
|
||||
|
||||
done
|
||||
|
||||
18
tek4010.c
18
tek4010.c
@@ -262,7 +262,8 @@ void tek4010_escapeCodeHandler(cairo_t *cr, cairo_t *cr2, int ch)
|
||||
case ':': tube_changeCharacterSize(cr, cr2, 121, 58, efactor * 0.65); mode = 0; break;
|
||||
case ';': tube_changeCharacterSize(cr, cr2, 133, 64, efactor * 0.55); mode = 0; break;
|
||||
|
||||
case '[': // a second escape code follows, do not reset mode
|
||||
case '[': printf("Ignoring ANSI escape sequence: [");
|
||||
mode=31;
|
||||
break;
|
||||
|
||||
// normal mode
|
||||
@@ -297,7 +298,7 @@ void tek4010_escapeCodeHandler(cairo_t *cr, cairo_t *cr2, int ch)
|
||||
case 'w': ltype = SOLID; writeThroughMode = 1; mode = 101; showCursor = 0; break;
|
||||
|
||||
default:
|
||||
if (DEBUG) printf("ESC %d not supported, ignored\n",ch);
|
||||
printf("Ignoring escape code: 0x%02x\n",ch);
|
||||
mode = 0;
|
||||
break;
|
||||
}
|
||||
@@ -329,6 +330,11 @@ int tek4010_checkReturnToAlpha(int ch)
|
||||
else return 0;
|
||||
}
|
||||
|
||||
int digit(char ch)
|
||||
{
|
||||
return ((ch>='0') && (ch<='9'));
|
||||
}
|
||||
|
||||
void tek4010_draw(cairo_t *cr, cairo_t *cr2, int first)
|
||||
// draw onto the main window using cairo
|
||||
// cr is used for persistent drawing, cr2 for temporary drawing
|
||||
@@ -608,7 +614,13 @@ void tek4010_draw(cairo_t *cr, cairo_t *cr2, int first)
|
||||
break;
|
||||
case 30: // escape code handler
|
||||
tek4010_escapeCodeHandler(cr, cr2, ch);
|
||||
break;
|
||||
break;
|
||||
case 31: // ANSI CSI sequence
|
||||
printf("%c",ch);
|
||||
if ((ch<0x20) || (ch>0x3F)) {
|
||||
mode=0;
|
||||
printf("\n");
|
||||
}
|
||||
case 40: // incremental plot mode
|
||||
tek4010_checkReturnToAlpha(ch); // check for exit
|
||||
if (DEBUG) printf("Incremental plot mode, ch = %d, penDown = %d\n",ch, penDown);
|
||||
|
||||
2
tube.c
2
tube.c
@@ -284,7 +284,7 @@ void tube_init(int argc, char* argv[])
|
||||
char *argv2[20];
|
||||
size_t bufsize = 127;
|
||||
int firstArg = 1;
|
||||
printf("tek4010 version 1.5.3\n");
|
||||
printf("tek4010 version 1.5.5\n");
|
||||
windowName = "Tektronix 4010/4014 emulator";
|
||||
if ((argc<2) || (argc>19)) {
|
||||
printf("Error:number of arguments\n");
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
Version 1.5.5 of November 25, 2019
|
||||
==================================
|
||||
- Properly ignore ANSI CSI escape sequencies,
|
||||
(including "private" sequencies)
|
||||
|
||||
Version 1.5.4 of November 17, 2019
|
||||
==================================
|
||||
- More realistic pen size on high resolution displays
|
||||
|
||||
Reference in New Issue
Block a user