Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
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
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
b86e543a
Commit
b86e543a
authored
23 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
closes bug report #527032, --progress-bar works again and it adds a newline
after the transfer is done properly
parent
c2d4fd87
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/main.c
+16
-7
16 additions, 7 deletions
src/main.c
with
16 additions
and
7 deletions
src/main.c
+
16
−
7
View file @
b86e543a
...
...
@@ -1733,18 +1733,19 @@ int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
}
struct
ProgressData
{
size_t
total
;
size_t
prev
;
size_t
point
;
int
calls
;
double
total
;
double
prev
;
double
point
;
int
width
;
FILE
*
out
;
/* where to write everything to */
};
int
myprogress
(
void
*
clientp
,
size_t
dltotal
,
size_t
dlnow
,
size_t
ultotal
,
size_t
ulnow
)
double
dltotal
,
double
dlnow
,
double
ultotal
,
double
ulnow
)
{
/* The original progress-bar source code was written for curl by Lars Aas,
and this new edition inherites some of his concepts. */
...
...
@@ -1763,6 +1764,8 @@ int myprogress (void *clientp,
bar
->
point
=
dlnow
+
ulnow
;
/* we've come this far */
bar
->
calls
++
;
/* simply count invokes */
if
(
0
==
total
)
{
int
prevblock
=
bar
->
prev
/
1024
;
int
thisblock
=
bar
->
point
/
1024
;
...
...
@@ -2403,6 +2406,12 @@ operate(struct Configurable *config, int argc, char *argv[])
res
=
curl_easy_perform
(
curl
);
if
(
progressbar
.
calls
)
{
/* if the custom progress bar has been displayed, we output a
newline here */
fputs
(
"
\n
"
,
progressbar
.
out
);
}
if
(
config
->
writeout
)
{
ourWriteOut
(
curl
,
config
->
writeout
);
}
...
...
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