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
f2d63612
Commit
f2d63612
authored
3 months ago
by
Craig Hendricks
Browse files
Options
Downloads
Plain Diff
Merge branch sbbs:master into massive-mrc-update-20250303
parents
c4c6bdb1
69adca05
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
exec/load/syncterm_cache.js
+3
-1
3 additions, 1 deletion
exec/load/syncterm_cache.js
exec/textedit.js
+47
-4
47 additions, 4 deletions
exec/textedit.js
src/sbbs3/con_out.cpp
+1
-2
1 addition, 2 deletions
src/sbbs3/con_out.cpp
src/sbbs3/textgen.c
+1
-1
1 addition, 1 deletion
src/sbbs3/textgen.c
with
52 additions
and
8 deletions
exec/load/syncterm_cache.js
+
3
−
1
View file @
f2d63612
require
(
"
sbbsdefs.js
"
,
"
K_NUL
"
);
function
SyncTERMCache
()
{
this
.
supported
=
this
.
supports_syncterm_cache
();
};
...
...
@@ -14,7 +16,7 @@ SyncTERMCache.prototype.read_apc = function (timeout)
if
(
timeout
===
undefined
)
timeout
=
1000
;
while
((
ch
=
console
.
inkey
(
timeout
))
!==
''
)
{
while
((
ch
=
console
.
inkey
(
K_NUL
,
timeout
))
!==
null
)
{
switch
(
state
)
{
case
0
:
if
(
ch
==
'
\
x1b
'
)
{
...
...
This diff is collapsed.
Click to expand it.
exec/textedit.js
+
47
−
4
View file @
f2d63612
...
...
@@ -11,6 +11,7 @@ var msglens = [];
var
displaywith
=
0
;
var
inprow
=
(
console
.
screen_columns
<
80
)
?
18
:
17
;
var
ch
;
var
modified
=
{};
// TODO: This should be in a separate (JSON) file...
var
details
=
{
...
...
@@ -139,8 +140,6 @@ console.cleartoeos = function(attr)
function
format_entry
(
str
)
{
// bbs.command_str = '@';
// .replace(/@/g, "@U+40:@@")
return
str
.
replace
(
/
[\x
00-
\x
1F
\x
80-
\x
9F
\\]
/g
,
function
(
match
)
{
switch
(
match
)
{
case
'
\n
'
:
...
...
@@ -345,8 +344,7 @@ function get_tvals() {
for
(
i
in
tvals
)
{
tnames
[
tvals
[
i
]]
=
i
;
}
// TODO: Why is this one higher than the last?
last_entry
=
tvals
.
TOTAL_TEXT
-
1
;
last_entry
=
tvals
.
TOTAL_TEXT
;
}
function
newmsg
(
updpos
)
...
...
@@ -408,12 +406,43 @@ function get_msgnum()
console
.
attributes
=
7
;
}
function
track_mod
()
{
if
(
modified
[
msg
]
===
undefined
)
{
modified
[
msg
]
=
{
original
:
bbs
.
text
(
msg
),
modified
:
true
};
}
}
function
check_undone
()
{
if
(
modified
[
msg
]
!==
undefined
&&
msgstr
===
modified
[
msg
].
original
)
{
delete
modified
[
msg
];
}
}
function
load_saved
()
{
var
sfile
=
new
File
(
"
textedit.ini
"
);
if
(
!
sfile
.
open
(
'
r
'
))
return
;
var
keys
=
sfile
.
iniGetKeys
();
var
key
;
var
str
;
for
(
key
in
keys
)
{
str
=
sfile
.
iniGetValue
(
null
,
keys
[
key
]);
bbs
.
replace_text
(
keys
[
key
],
str
);
}
sfile
.
close
();
}
get_tvals
();
newmsg
();
load_saved
();
var
done
=
false
;
var
skip_redraw
=
false
;
var
forcectrl
=
false
;
var
tmp
;
var
sfile
;
while
(
!
done
)
{
if
(
!
skip_redraw
)
redraw
(
msgstr
,
msg
);
...
...
@@ -465,15 +494,27 @@ while (!done) {
break
;
case
ctrl
(
'
Z
'
):
bbs
.
revert_text
(
msg
);
if
(
modified
[
msg
]
!==
undefined
)
delete
modified
[
msg
];
newmsg
();
break
;
case
ctrl
(
'
Q
'
):
done
=
true
;
break
;
case
ctrl
(
'
S
'
):
sfile
=
new
File
(
"
textedit.ini
"
);
if
(
!
sfile
.
open
(
sfile
.
exists
?
'
r+
'
:
'
w+
'
))
break
;
for
(
tmp
in
modified
)
sfile
.
iniSetValue
(
null
,
tnames
[
tmp
],
bbs
.
text
(
tmp
));
sfile
.
close
();
break
;
case
'
\
b
'
:
if
(
pos
)
{
track_mod
();
msgstr
=
msgstr
.
slice
(
0
,
pos
-
1
)
+
msgstr
.
slice
(
pos
);
bbs
.
replace_text
(
msg
,
msgstr
);
check_undone
();
pos
--
;
newmsg
(
false
);
}
...
...
@@ -544,8 +585,10 @@ while (!done) {
default
:
if
(
ch
<
'
'
&&
!
forcectrl
)
break
;
track_mod
();
msgstr
=
msgstr
.
slice
(
0
,
pos
)
+
ch
+
msgstr
.
slice
(
pos
);
bbs
.
replace_text
(
msg
,
msgstr
);
check_undone
();
pos
++
;
newmsg
(
false
);
break
;
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/con_out.cpp
+
1
−
2
View file @
f2d63612
...
...
@@ -100,8 +100,7 @@ int sbbs_t::bputs(const char *str, int mode)
if
(
!
(
mode
&
P_NOATCODES
)
&&
str
[
l
]
==
'@'
)
{
if
(
str
==
mnestr
/* Mnemonic string or */
||
(
mode
&
P_ATCODES
)
/* trusted parameters to formatted string */
||
(
str
>=
text
[
0
]
/* Straight out of TEXT.DAT */
&&
str
<=
text
[
TOTAL_TEXT
-
1
]))
{
)
{
i
=
show_atcode
(
str
+
l
);
/* return 0 if not valid @ code */
l
+=
i
;
/* i is length of code string */
if
(
i
)
/* if valid string, go to top */
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/textgen.c
+
1
−
1
View file @
f2d63612
...
...
@@ -269,7 +269,7 @@ int main(int argc, char **argv)
fputs
(
"#endif
\n
"
,
text_h
);
fclose
(
text_h
);
fputs
(
"
\n
"
,
text_js
);
fprintf
(
text_js
,
"var TOTAL_TEXT=%d;
\n
"
,
i
);
fprintf
(
text_js
,
"var TOTAL_TEXT=%d;
\n
"
,
i
-
1
);
fprintf
(
text_js
,
"
\n
this;
\n
"
);
fclose
(
text_js
);
fputs
(
"};
\n
"
,
text_defaults_c
);
...
...
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