mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 21:46:17 +00:00
Uemis downloader: add constant for maximum number of ANS files
[Dirk Hohndel: refactored one huge commit into smaller pieces] Signed-off-by: Guido Lerch <guido.lerch@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8647f95953
commit
b7f5871e59
1 changed files with 3 additions and 1 deletions
|
@ -33,6 +33,8 @@
|
|||
// debugging setup
|
||||
//#define UEMIS_DEBUG 1 + 2
|
||||
|
||||
#define UEMIS_MAX_FILES 4000
|
||||
|
||||
#if UEMIS_DEBUG & 64 /* we are reading from a copy of the filesystem, not the device - no need to wait */
|
||||
#define UEMIS_TIMEOUT 50 /* 50ns */
|
||||
#define UEMIS_LONG_TIMEOUT 500 /* 500ns */
|
||||
|
@ -501,7 +503,7 @@ static bool uemis_get_answer(const char *path, char *request, int n_param_in,
|
|||
while (searching || assembling_mbuf) {
|
||||
if (import_thread_cancelled)
|
||||
return false;
|
||||
progress_bar_fraction = filenr / 4000.0;
|
||||
progress_bar_fraction = filenr / (double)UEMIS_MAX_FILES;
|
||||
snprintf(fl, 13, "ANS%d.TXT", filenr - 1);
|
||||
ans_path = build_filename(build_filename(path, "ANS"), fl);
|
||||
ans_file = subsurface_open(ans_path, O_RDONLY, 0666);
|
||||
|
|
Loading…
Add table
Reference in a new issue