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
72be20e9
Commit
72be20e9
authored
17 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Use progressive HTML loading.
parent
906df0cd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/syncterm/term.c
+7
-31
7 additions, 31 deletions
src/syncterm/term.c
with
7 additions
and
31 deletions
src/syncterm/term.c
+
7
−
31
View file @
72be20e9
...
...
@@ -42,6 +42,7 @@ enum html_mode {
HTML_MODE_HIDDEN
,
HTML_MODE_ICONIZED
,
HTML_MODE_RAISED
,
HTML_MODE_READING
};
static
enum
html_mode
html_mode
=
HTML_MODE_HIDDEN
;
enum
{
...
...
@@ -1082,11 +1083,8 @@ BOOL doterm(struct bbslist *bbs)
BYTE
htmlresponse
[]
=
"
\2\2
!HTML!"
;
BYTE
htmlstart
[]
=
"
\2\2
<HTML>"
;
BYTE
htmldet
[
sizeof
(
htmldetect
)];
BYTE
*
htmlbuf
=
NULL
;
int
html_startx
;
int
html_starty
;
int
htmlbufsize
=
0
;
int
htmlbuflen
=
0
;
#endif
int
inch
;
long
double
nextchar
=
0
;
...
...
@@ -1202,34 +1200,14 @@ BOOL doterm(struct bbslist *bbs)
}
#endif
#ifdef WITH_WXWIDGETS
if
(
html
buf
)
{
if
(
html
_mode
==
HTML_MODE_READING
)
{
if
(
inch
==
2
)
{
int
width
,
height
,
xpos
,
ypos
;
get_window_info
(
&
width
,
&
height
,
&
xpos
,
&
ypos
);
show_html
(
bbs
->
addr
,
width
,
height
,
xpos
,
ypos
,
html_send
,
htmlbuf
);
html_mode
=
HTML_MODE_RAISED
;
html_startx
=
wherex
();
html_starty
=
wherey
();
free
(
htmlbuf
);
htmlbuf
=
NULL
;
}
else
{
if
(
htmlbuflen
+
2
>=
htmlbufsize
)
{
BYTE
*
newbuf
;
newbuf
=
(
BYTE
*
)
realloc
(
htmlbuf
,
htmlbufsize
+
1024
);
if
(
newbuf
)
{
htmlbuf
=
newbuf
;
htmlbufsize
+=
1024
;
}
else
{
free
(
htmlbuf
);
htmlbuf
=
NULL
;
continue
;
}
}
htmlbuf
[
htmlbuflen
++
]
=
inch
;
htmlbuf
[
htmlbuflen
]
=
0
;
add_html_char
(
inch
);
}
continue
;
}
...
...
@@ -1258,12 +1236,10 @@ BOOL doterm(struct bbslist *bbs)
conn_send
(
htmlresponse
,
sizeof
(
htmlresponse
)
-
1
,
0
);
}
else
{
htmlbuf
=
(
BYTE
*
)
malloc
(
1024
);
htmlbufsize
=
1024
;
if
(
htmlbuf
)
{
strcpy
(
htmlbuf
,
htmldet
+
2
);
htmlbuflen
=
strlen
(
htmlbuf
);
}
int
width
,
height
,
xpos
,
ypos
;
get_window_info
(
&
width
,
&
height
,
&
xpos
,
&
ypos
);
show_html
(
bbs
->
addr
,
width
,
height
,
xpos
,
ypos
,
html_send
,
""
);
html_mode
=
HTML_MODE_READING
;
}
htmldet
[
0
]
=
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