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
6417fa95
Commit
6417fa95
authored
23 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
corrected the use of the progress function
parent
61f6284a
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
docs/examples/curlgtk.c
+6
-1
6 additions, 1 deletion
docs/examples/curlgtk.c
with
6 additions
and
1 deletion
docs/examples/curlgtk.c
+
6
−
1
View file @
6417fa95
...
...
@@ -26,7 +26,11 @@ size_t my_read_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
return
fread
(
ptr
,
size
,
nmemb
,
stream
);
}
int
my_progress_func
(
GtkWidget
*
Bar
,
int
t
,
int
d
)
int
my_progress_func
(
GtkWidget
*
Bar
,
double
t
,
/* dltotal */
double
d
,
/* dlnow */
double
ultotal
,
double
ulnow
)
{
/* printf("%d / %d (%g %%)\n", d, t, d*100.0/t);*/
gdk_threads_enter
();
...
...
@@ -50,6 +54,7 @@ void *curl_thread(void *ptr)
curl_easy_setopt
(
curl
,
CURLOPT_URL
,
url
);
curl_easy_setopt
(
curl
,
CURLOPT_FILE
,
outfile
);
curl_easy_setopt
(
curl
,
CURLOPT_READFUNCTION
,
my_read_func
);
curl_easy_setopt
(
curl
,
CURLOPT_NOPROGRESS
,
FALSE
);
curl_easy_setopt
(
curl
,
CURLOPT_PROGRESSFUNCTION
,
my_progress_func
);
curl_easy_setopt
(
curl
,
CURLOPT_PROGRESSDATA
,
Bar
);
...
...
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