Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
5cad8d35
Commit
5cad8d35
authored
May 25, 2007
by
deuce
Browse files
SyncTERM now handles *incoming* PETSCII correctly...
Next up, output translation.
parent
d3e8091c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
2 deletions
+57
-2
src/syncterm/bbslist.c
src/syncterm/bbslist.c
+19
-1
src/syncterm/bbslist.h
src/syncterm/bbslist.h
+3
-0
src/syncterm/syncterm.c
src/syncterm/syncterm.c
+18
-0
src/syncterm/term.c
src/syncterm/term.c
+6
-0
src/syncterm/uifcinit.c
src/syncterm/uifcinit.c
+7
-0
src/syncterm/window.c
src/syncterm/window.c
+4
-1
No files found.
src/syncterm/bbslist.c
View file @
5cad8d35
...
...
@@ -19,7 +19,7 @@
#include "window.h"
#include "term.h"
char
*
screen_modes
[]
=
{
"Current"
,
"80x25"
,
"80x28"
,
"80x43"
,
"80x50"
,
"80x60"
,
NULL
};
char
*
screen_modes
[]
=
{
"Current"
,
"80x25"
,
"80x28"
,
"80x43"
,
"80x50"
,
"80x60"
,
"C64"
,
"C128 (40col)"
,
"C128 (80col)"
,
NULL
};
char
*
log_levels
[]
=
{
"Emergency"
,
"Alert"
,
"Critical"
,
"Error"
,
"Warning"
,
"Notice"
,
"Info"
,
"Debug"
,
NULL
};
char
*
log_level_desc
[]
=
{
"None"
,
"Alerts"
,
"Critical Errors"
,
"Errors"
,
"Warnings"
,
"Notices"
,
"Normal"
,
"All (Debug)"
,
NULL
};
...
...
@@ -397,6 +397,15 @@ int edit_list(struct bbslist *item,char *listpath,int isdefault)
"Select the screen size for this connection
\n
"
;
uifc
.
list
(
WIN_SAV
,
0
,
0
,
0
,
&
(
item
->
screen_mode
),
NULL
,
"Screen Mode"
,
screen_modes
);
iniSetEnum
(
&
inifile
,
itemname
,
"ScreenMode"
,
screen_modes
,
item
->
screen_mode
,
&
ini_style
);
if
(
item
->
screen_mode
==
SCREEN_MODE_C64
)
{
strcpy
(
item
->
font
,
font_names
[
33
]);
iniSetString
(
&
inifile
,
itemname
,
"Font"
,
item
->
font
,
&
ini_style
);
}
if
(
item
->
screen_mode
==
SCREEN_MODE_C128_40
||
item
->
screen_mode
==
SCREEN_MODE_C128_80
)
{
strcpy
(
item
->
font
,
font_names
[
35
]);
iniSetString
(
&
inifile
,
itemname
,
"Font"
,
item
->
font
,
&
ini_style
);
}
changed
=
1
;
break
;
case
9
:
...
...
@@ -993,6 +1002,15 @@ struct bbslist *show_bbslist(int mode)
case
SCREEN_MODE_80X60
:
textmode
(
C80X60
);
break
;
case
SCREEN_MODE_C64
:
textmode
(
C64_40X25
);
break
;
case
SCREEN_MODE_C128_40
:
textmode
(
C128_40X25
);
break
;
case
SCREEN_MODE_C128_80
:
textmode
(
C128_80X25
);
break
;
}
init_uifc
(
TRUE
,
TRUE
);
}
...
...
src/syncterm/bbslist.h
View file @
5cad8d35
...
...
@@ -36,6 +36,9 @@ enum {
,
SCREEN_MODE_80X43
,
SCREEN_MODE_80X50
,
SCREEN_MODE_80X60
,
SCREEN_MODE_C64
,
SCREEN_MODE_C128_40
,
SCREEN_MODE_C128_80
,
SCREEN_MODE_TERMINATOR
};
...
...
src/syncterm/syncterm.c
View file @
5cad8d35
...
...
@@ -977,6 +977,15 @@ int main(int argc, char **argv)
case
SCREEN_MODE_80X60
:
textmode
(
C80X60
);
break
;
case
SCREEN_MODE_C64
:
textmode
(
C64_40X25
);
break
;
case
SCREEN_MODE_C128_40
:
textmode
(
C128_40X25
);
break
;
case
SCREEN_MODE_C128_80
:
textmode
(
C128_80X25
);
break
;
}
}
...
...
@@ -1066,6 +1075,15 @@ int main(int argc, char **argv)
case
SCREEN_MODE_80X60
:
textmode
(
C80X60
);
break
;
case
SCREEN_MODE_C64
:
textmode
(
C64_40X25
);
break
;
case
SCREEN_MODE_C128_40
:
textmode
(
C128_40X25
);
break
;
case
SCREEN_MODE_C128_80
:
textmode
(
C128_80X25
);
break
;
}
sprintf
(
str
,
"SyncTERM - %s"
,
bbs
->
name
);
settitle
(
str
);
...
...
src/syncterm/term.c
View file @
5cad8d35
...
...
@@ -1073,6 +1073,12 @@ BOOL doterm(struct bbslist *bbs)
memset
(
scrollback_buf
,
0
,
term
.
width
*
2
*
settings
.
backlines
);
cterm_init
(
term
.
height
,
term
.
width
,
term
.
x
-
1
,
term
.
y
-
1
,
settings
.
backlines
,
scrollback_buf
);
cterm
.
music_enable
=
bbs
->
music
;
switch
(
bbs
->
screen_mode
)
{
case
SCREEN_MODE_C64
:
case
SCREEN_MODE_C128_40
:
case
SCREEN_MODE_C128_80
:
cterm
.
emulation
=
CTERM_EMULATION_PETASCII
;
}
ch
[
1
]
=
0
;
zrqbuf
[
0
]
=
0
;
#ifdef GUTS_BUILTIN
...
...
src/syncterm/uifcinit.c
View file @
5cad8d35
...
...
@@ -11,6 +11,7 @@
uifcapi_t
uifc
;
/* User Interface (UIFC) Library API */
static
int
uifc_initialized
=
0
;
static
int
uifc_old_font
=
0
;
#define UIFC_INIT (1<<0)
#define WITH_SCRN (1<<1)
...
...
@@ -24,6 +25,10 @@ int init_uifc(BOOL scrn, BOOL bottom) {
gettextinfo
(
&
txtinfo
);
if
(
!
uifc_initialized
)
{
/* Get old font... */
uifc_old_font
=
getfont
();
if
(
uifc_old_font
>=
32
&&
uifc_old_font
<=
34
)
setfont
(
0
,
FALSE
);
/* Set scrn_len to 0 to prevent textmode() call */
uifc
.
scrn_len
=
0
;
if
((
i
=
uifcini32
(
&
uifc
))
!=
0
)
{
...
...
@@ -66,6 +71,8 @@ void uifcbail(void)
{
if
(
uifc_initialized
)
{
uifc
.
bail
();
if
(
uifc_old_font
!=
getfont
())
setfont
(
uifc_old_font
,
FALSE
);
}
uifc_initialized
=
0
;
}
...
...
src/syncterm/window.c
View file @
5cad8d35
...
...
@@ -13,7 +13,10 @@ int drawwin(void)
strcpy
(
str
,
"SyncTERM "
);
gettextinfo
(
&
txtinfo
);
term
.
width
=
80
;
if
(
txtinfo
.
screenwidth
<
80
)
term
.
width
=
40
;
else
term
.
width
=
80
;
term
.
height
=
txtinfo
.
screenheight
;
if
(
!
term
.
nostatus
)
term
.
height
--
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment