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
40ae6b9e
Commit
40ae6b9e
authored
10 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Add a "more" tpye interface to help output (Thanks Ragnarok!)
parent
ca5a09cb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/syncterm/GNUmakefile
+4
-1
4 additions, 1 deletion
src/syncterm/GNUmakefile
src/syncterm/syncterm.c
+64
-38
64 additions, 38 deletions
src/syncterm/syncterm.c
with
68 additions
and
39 deletions
src/syncterm/GNUmakefile
+
4
−
1
View file @
40ae6b9e
...
...
@@ -123,7 +123,8 @@ INSTALL_DATA ?= install -m 0444
ifeq
($(os),win32)
OBJS
+=
$(
MTOBJODIR
)$(
DIRSEP
)
comio_win32
$(
OFILE
)
\
$(
MTOBJODIR
)$(
DIRSEP
)
modem
$(
OFILE
)
\
$(
MTOBJODIR
)$(
DIRSEP
)
comio
$(
OFILE
)
$(
MTOBJODIR
)$(
DIRSEP
)
comio
$(
OFILE
)
\
$(
MTOBJODIR
)$(
DIRSEP
)
ciolib_res
$(
OFILE
)
else
ifneq
($(os),haiku)
OBJS
+=
$(
MTOBJODIR
)$(
DIRSEP
)
comio_nix
$(
OFILE
)
\
...
...
@@ -144,6 +145,8 @@ ifndef bcc
endif
endif
$(MTOBJODIR)$(DIRSEP)ciolib_res$(OFILE)
:
cd
${
MTOBJODIR
}
&&
$(
AR
)
-x
../
${
CIOLIB-MT
}
ciolib_res
$(
OFILE
)
$(SYNCTERM)
:
$(CRYPT_DEPS) $(EXEODIR) $(OBJS) $(BUILD_DEPENDS)
@
echo
Linking
$@
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/syncterm.c
+
64
−
38
View file @
40ae6b9e
...
...
@@ -54,6 +54,45 @@ char* syncterm_version = "SyncTERM 1.0b"
#endif
;
char
*
usage
=
"
\n
usage: syncterm [options] [URL]"
"
\n\n
options:
\n\n
"
"-e# = set escape delay to #msec
\n
"
"-iX = set interface mode to X (default=auto) where X is one of:
\n
"
" S[W|F] = SDL surface mode W for windowed and F for fullscreen
\n
"
" O[W|F] = SDL overlay mode (hardware scaled)
\n
"
#ifdef __unix__
" X = X11 mode
\n
"
" C = Curses mode
\n
"
" F = Curses mode with forced IBM charset
\n
"
#else
" W[F] = Win32 native mode, F for fullscreen
\n
"
#endif
" A = ANSI mode
\n
"
"-l# = set screen lines to # (default=auto-detect)
\n
"
"-t = use telnet mode if URL does not include the scheme
\n
"
"-r = use rlogin mode if URL does not include the scheme
\n
"
"-h = use SSH mode if URL does not include the scheme
\n
"
"-4 = Only resolve IPv4 addresses
\n
"
"-6 = Only resolve IPv6 addresses
\n
"
"-s = enable
\"
Safe Mode
\"
which prevents writing/browsing local files
\n
"
"-T = when the ONLY argument, dumps the terminfo entry to stdout and exits
\n
"
"
\n
"
"URL format is: [(rlogin|telnet|ssh|raw)://][user[:password]@]domainname[:port]
\n
"
"raw:// URLs MUST include a port.
\n
"
#ifdef __unix__
"shell:command URLs are also supported.
\n
"
#endif
"examples: rlogin://deuce:password@nix.synchro.net:5885
\n
"
" telnet://deuce@nix.synchro.net
\n
"
" nix.synchro.net
\n
"
" telnet://nix.synchro.net
\n
"
" raw://nix.synchro.net:23
\n
"
#ifdef __unix__
" shell:/usr/bin/sh
\n
"
#endif
;
char
*
inpath
=
NULL
;
int
default_font
=
0
;
struct
syncterm_settings
settings
;
...
...
@@ -1213,6 +1252,7 @@ int main(int argc, char **argv)
BOOL
override_conn
=
FALSE
;
int
addr_family
=
PF_UNSPEC
;
char
*
last_bbs
=
NULL
;
char
*
p
,
*
lp
;
const
char
syncterm_termcap
[]
=
"
\n
# terminfo database entry for SyncTERM
\n
"
"syncterm|SyncTERM 80x25,
\n
"
" am,bce,mir,msgr,
\n
"
...
...
@@ -1591,45 +1631,31 @@ int main(int argc, char **argv)
USAGE:
uifcbail
();
clrscr
();
cprintf
(
"
\n
usage: syncterm [options] [URL]"
"
\n\n
options:
\n\n
"
"-e# = set escape delay to #msec
\n
"
"-iX = set interface mode to X (default=auto) where X is one of:
\n
"
" S[W|F] = SDL surface mode W for windowed and F for fullscreen
\n
"
" O[W|F] = SDL overlay mode (hardware scaled)
\n
"
#ifdef __unix__
" X = X11 mode
\n
"
" C = Curses mode
\n
"
" F = Curses mode with forced IBM charset
\n
"
#else
" W[F] = Win32 native mode, F for fullscreen
\n
"
#endif
" A = ANSI mode
\n
"
"-l# = set screen lines to # (default=auto-detect)
\n
"
"-t = use telnet mode if URL does not include the scheme
\n
"
"-r = use rlogin mode if URL does not include the scheme
\n
"
"-h = use SSH mode if URL does not include the scheme
\n
"
"-4 = Only resolve IPv4 addresses
\n
"
"-6 = Only resolve IPv6 addresses
\n
"
"-s = enable
\"
Safe Mode
\"
which prevents writing/browsing local files
\n
"
"-T = when the ONLY argument, dumps the terminfo entry to stdout and exits
\n
"
"
\n
"
"URL format is: [(rlogin|telnet|ssh|raw)://][user[:password]@]domainname[:port]
\n
"
"raw:// URLs MUST include a port.
\n
"
#ifdef __unix__
"shell:command URLs are also supported.
\n
"
#endif
"examples: rlogin://deuce:password@nix.synchro.net:5885
\n
"
" telnet://deuce@nix.synchro.net
\n
"
" nix.synchro.net
\n
"
" telnet://nix.synchro.net
\n
"
" raw://nix.synchro.net:23
\n
"
#ifdef __unix__
" shell:/usr/bin/sh
\n
"
#endif
"
\n
Press any key to exit..."
);
gettextinfo
(
&
txtinfo
);
p
=
lp
=
usage
;
textattr
(
LIGHTGRAY
);
gettextinfo
(
&
txtinfo
);
i
=
0
;
for
(
lp
=
usage
;
*
lp
;
p
=
strchr
(
lp
,
'\n'
))
{
if
(
p
==
NULL
)
p
=
strchr
(
lp
,
0
)
-
1
;
cprintf
(
"%.*s"
,
p
-
lp
+
1
,
lp
);
lp
=
p
+
1
;
i
++
;
if
(
i
>=
txtinfo
.
screenheight
-
1
)
{
textattr
(
WHITE
);
cputs
(
"<Press A Key>"
);
getch
();
textattr
(
LIGHTGRAY
);
gotoxy
(
1
,
txtinfo
.
screenheight
);
delline
();
i
=
0
;
}
}
textattr
(
WHITE
);
cputs
(
"<Press A Key to Exit>"
);
getch
();
textattr
(
LIGHTGRAY
);
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