Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.1:Update
ht
ht-search-progress.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ht-search-progress.diff of Package ht
From: Jan Engelhardt <jengelh@medozas.de> Date: 2008? Knowing how far a search has progressed (and as such estimating on how long it can take) is tremendously useful. --- htsearch.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Index: ht-2.0.17/htsearch.cc =================================================================== --- ht-2.0.17.orig/htsearch.cc +++ ht-2.0.17/htsearch.cc @@ -531,10 +531,11 @@ bool search_bin_process(Object *context, } ctx->o -= ctx->patlen-1; - int p = (int)(((double)(ctx->o - ctx->ofs))*100/ctx->len); + double p = ((double)(ctx->o - ctx->ofs))*100/ctx->len; char status[64]; - ht_snprintf(status, sizeof status, "%d %%", p); + ht_snprintf(status, sizeof status, "%.1f %% (%llu MB)", + p, (unsigned long long)ctx->o >> 20); progress_indicator->settext(status); return true;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor