Skip to content

Commit 33e7613

Browse files
X/Y accuracy add
1 parent e81bdae commit 33e7613

2 files changed

Lines changed: 22 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"printableName": "Cache Web Terminal",
66
"description": "Web-based terminal emulator for Caché administering.",
77
"author": "ZitRo",
8-
"version": "4.0.0-beta.11",
8+
"version": "4.0.0-beta.12",
99
"gaID": "UA-83005064-2",
1010
"releaseNumber": 26,
1111
"scripts": {

src/cls/WebTerminal/Core.cls

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/// <!-- @echo package.title --> version <!-- @echo package.version --> core.
2-
/// Class which handles client requests and executes code.
2+
/// The core class which handles client requests and executes COS code.
3+
/// All writes used here are used for $X and $Y compatibility, but they actually do not
4+
/// write any code to the screen.
35
Class WebTerminal.Core Extends Common [ Not ProcedureBlock ]
46
{
57

@@ -13,18 +15,34 @@ Class WebTerminal.Core Extends Common [ Not ProcedureBlock ]
1315
Method redirects() [ Private, ProcedureBlock = 0 ]
1416
{
1517
wstr(str)
18+
do ##class(%Device).ReDirectIO($$$NO)
19+
write str
20+
do ##class(%Device).ReDirectIO($$$YES)
1621
quit ##class(WebTerminal.Common).SendChunk($ZPARENT, "o", str)
1722

1823
wchr(c)
24+
do ##class(%Device).ReDirectIO($$$NO)
25+
write $CHAR(c)
26+
do ##class(%Device).ReDirectIO($$$YES)
1927
quit ##class(WebTerminal.Common).SendChunk($ZPARENT, "o", $CHAR(c))
2028

2129
wnl
30+
do ##class(%Device).ReDirectIO($$$NO)
31+
write !
32+
do ##class(%Device).ReDirectIO($$$YES)
2233
quit ##class(WebTerminal.Common).SendChunk($ZPARENT, "o", $CHAR(13, 10))
2334

2435
wff
36+
do ##class(%Device).ReDirectIO($$$NO)
37+
set $X = 0
38+
set $Y = 0
39+
do ##class(%Device).ReDirectIO($$$YES)
2540
quit ##class(WebTerminal.Common).SendChunk($ZPARENT, "o", $CHAR(12))
2641

2742
wtab(s)
43+
do ##class(%Device).ReDirectIO($$$NO)
44+
set $x = s
45+
do ##class(%Device).ReDirectIO($$$YES)
2846
quit ##class(WebTerminal.Common).SendChunk($ZPARENT, "o", $CHAR(27) _ "[" _ (s + 1) _ "G")
2947

3048
rstr(length = 32656, timeout = 86400)
@@ -95,9 +113,10 @@ ClassMethod Loop(StartupRoutine As %String = "") As %Status
95113
set $ZERROR = ""
96114
try { xecute ..WaitCommand() } catch {}
97115
do ##class(%Device).ReDirectIO($$$NO)
116+
write !! // assume that prompt takes 2 lines
98117
do ..SendChunk($ZPARENT, "e", $LISTBUILD($NAMESPACE, $ZERROR))
99118
}
100119
return $$$OK
101120
}
102121

103-
}
122+
}

0 commit comments

Comments
 (0)