Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
e0712f44
Commit
e0712f44
authored
10 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Use console.write() which now supports NULs and unlimited length. Remove
old hacky telnet method and the write_raw() method.
parent
0a7baf1d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/loadfont.js
+7
-27
7 additions, 27 deletions
exec/loadfont.js
with
7 additions
and
27 deletions
exec/loadfont.js
+
7
−
27
View file @
e0712f44
...
...
@@ -188,40 +188,20 @@ function loadfont()
}
font
.
close
();
write_raw
(
"
\
x1b[=
"
+
(
firstslot
+
parseInt
(
i
))
+
"
;
"
+
fontsize
+
"
{
"
);
if
(
console
.
telnet_mode
&
TELNET_MODE_OFF
)
write_raw
(
fontdata
);
else
{
/* From here on, it's socket access only */
console
.
lock_input
(
true
);
while
(
console
.
output_buffer_level
)
mswait
(
1
);
var
oldblock
=
client
.
socket
.
nonblocking
;
client
.
socket
.
nonblocking
=
false
;
fontdata
=
fontdata
.
replace
(
/
\x
ff/g
,
"
\
xff
\
xff
"
);
while
(
fontdata
.
length
)
{
if
(
client
.
socket
.
poll
(
0
,
true
))
{
if
(
client
.
socket
.
send
(
fontdata
.
substr
(
0
,
1024
)))
fontdata
=
fontdata
.
substr
(
1024
);
}
}
client
.
socket
.
nonblocking
=
oldblock
;
console
.
lock_input
(
false
);
}
console
.
write
(
"
\
x1b[=
"
+
(
firstslot
+
parseInt
(
i
))
+
"
;
"
+
fontsize
+
"
{
"
);
console
.
write
(
fontdata
);
if
(
showprogress
)
write
_raw
(
"
.
"
);
console
.
write
(
"
.
"
);
}
if
(
showprogress
)
write
_raw
(
"
done.
\r\n
"
);
console
.
write
(
"
done.
\r\n
"
);
for
(
i
in
activate
)
{
if
(
activate
[
i
]
!==
undefined
)
{
write
_raw
(
"
\
x1b[
"
+
i
+
"
;
"
+
(
firstslot
+
activate
[
i
])
+
"
D
"
);
console
.
write
(
"
\
x1b[
"
+
i
+
"
;
"
+
(
firstslot
+
activate
[
i
])
+
"
D
"
);
if
(
i
&
2
)
/* Alternate font for Blink attribute */
write
_raw
(
"
\
x1b[?34h
\
x1b[?35h
"
);
console
.
write
(
"
\
x1b[?34h
\
x1b[?35h
"
);
if
(
i
&
1
)
/* Alternate font for High-intensity attribute */
write
_raw
(
"
\
x1b[?31h
"
);
console
.
write
(
"
\
x1b[?31h
"
);
}
}
console
.
ctrlkey_passthru
=
oldctrl
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment