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
c28650dd
Commit
c28650dd
authored
19 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Put CTerm_Version into bbs.mods
parent
f4a6f610
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
exec/loadfont.js
+7
-7
7 additions, 7 deletions
exec/loadfont.js
exec/pickfont.js
+7
-7
7 additions, 7 deletions
exec/pickfont.js
with
14 additions
and
14 deletions
exec/loadfont.js
+
7
−
7
View file @
c28650dd
...
...
@@ -8,8 +8,8 @@
*/
load
(
"
sbbsdefs.js
"
);
if
(
thi
s
.
CTerm_Version
==
undefined
)
js
.
global
.
CTerm_Version
=
null
;
if
(
bbs
.
mod
s
.
CTerm_Version
==
undefined
)
bbs
.
mods
.
CTerm_Version
=
null
;
loadfont
();
function
loadfont
()
...
...
@@ -71,7 +71,7 @@ function loadfont()
// Check if it's CTerm and supports font loading...
var
ver
=
new
Array
(
0
,
0
);
if
(
CTerm_Version
==
undefined
||
CTerm_Version
==
null
)
{
if
(
bbs
.
mods
.
CTerm_Version
==
undefined
||
bbs
.
mods
.
CTerm_Version
==
null
)
{
// Disable parsed input... we need to do ESC processing ourselves here.
var
oldctrl
=
console
.
ctrlkey_passthru
;
console
.
ctrlkey_passthru
=-
1
;
...
...
@@ -92,14 +92,14 @@ function loadfont()
// alert("Response: "+printable);
if
(
response
.
substr
(
0
,
21
)
!=
"
\
x1b[=67;84;101;114;109;
"
)
{
// Not CTerm
CTerm_Version
=
0
;
bbs
.
mods
.
CTerm_Version
=
0
;
console
.
ctrlkey_passthru
=
oldctrl
;
if
(
showprogress
)
writeln
(
"
Not detected.
"
);
return
(
0
);
}
if
(
response
.
substr
(
-
1
)
!=
"
c
"
)
{
// Not a DA
CTerm_Version
=
0
;
bbs
.
mods
.
CTerm_Version
=
0
;
console
.
ctrlkey_passthru
=
oldctrl
;
if
(
showprogress
)
writeln
(
"
Not detected.
"
);
...
...
@@ -107,12 +107,12 @@ function loadfont()
}
var
version
=
response
.
substr
(
21
);
version
=
version
.
replace
(
/c/
,
""
);
CTerm_Version
=
version
;
bbs
.
mods
.
CTerm_Version
=
version
;
ver
=
version
.
split
(
/;/
);
console
.
ctrlkey_passthru
=
oldctrl
;
}
else
{
ver
=
CTerm_Version
.
split
(
/;/
);
ver
=
bbs
.
mods
.
CTerm_Version
.
split
(
/;/
);
if
(
parseInt
(
ver
[
0
])
<
1
||
(
parseInt
(
ver
[
0
])
==
1
&&
parseInt
(
ver
[
1
])
<
61
))
{
// Too old for dynamic fonts
if
(
showprogress
)
...
...
This diff is collapsed.
Click to expand it.
exec/pickfont.js
+
7
−
7
View file @
c28650dd
...
...
@@ -2,8 +2,8 @@
// Pass the desired fotn slot on the command line
// If nothing passed, changes to font 0 (CP437)
if
(
thi
s
.
CTerm_Version
==
undefined
)
js
.
global
.
CTerm_Version
=
null
;
if
(
bbs
.
mod
s
.
CTerm_Version
==
undefined
)
bbs
.
mods
.
CTerm_Version
=
null
;
pickfont
();
function
pickfont
()
...
...
@@ -22,7 +22,7 @@ function pickfont()
// Check if it's CTerm and supports font loading...
var
ver
=
new
Array
(
0
,
0
);
if
(
CTerm_Version
==
undefined
||
CTerm_Version
==
null
)
{
if
(
bbs
.
mods
.
CTerm_Version
==
undefined
||
bbs
.
mods
.
CTerm_Version
==
null
)
{
if
(
detect
)
{
// Disable parsed input... we need to do ESC processing ourselves here.
var
oldctrl
=
console
.
ctrlkey_passthru
;
...
...
@@ -44,24 +44,24 @@ function pickfont()
// alert("Response: "+printable);
if
(
response
.
substr
(
0
,
21
)
!=
"
\
x1b[=67;84;101;114;109;
"
)
{
// Not CTerm
CTerm_Version
=
0
;
bbs
.
mods
.
CTerm_Version
=
0
;
console
.
ctrlkey_passthru
=
oldctrl
;
return
(
0
);
}
if
(
response
.
substr
(
-
1
)
!=
"
c
"
)
{
// Not a DA
CTerm_Version
=
0
;
bbs
.
mods
.
CTerm_Version
=
0
;
console
.
ctrlkey_passthru
=
oldctrl
;
return
(
0
);
}
var
version
=
response
.
substr
(
21
);
version
=
version
.
replace
(
/c/
,
""
);
CTerm_Version
=
version
;
bbs
.
mods
.
CTerm_Version
=
version
;
ver
=
version
.
split
(
/;/
);
console
.
ctrlkey_passthru
=
oldctrl
;
}
}
else
{
ver
=
CTerm_Version
.
split
(
/;/
);
ver
=
bbs
.
mods
.
CTerm_Version
.
split
(
/;/
);
if
(
parseInt
(
ver
[
0
])
<
1
||
(
parseInt
(
ver
[
0
])
==
1
&&
parseInt
(
ver
[
1
])
<
61
))
{
// Too old for dynamic fonts
return
(
0
);
...
...
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