mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
download: replace progress_bar_text by std::string
No fixed buffers. Sadly, the thing is still a global variable. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
91968ac579
commit
7452aa22c2
8 changed files with 87 additions and 84 deletions
|
@ -200,15 +200,13 @@ static struct dive *get_dive_by_uemis_diveid(device_data_t *devdata, uint32_t ob
|
|||
/* send text to the importer progress bar */
|
||||
static void uemis_info(const char *fmt, ...)
|
||||
{
|
||||
static char buffer[256];
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(buffer, sizeof(buffer), fmt, ap);
|
||||
progress_bar_text = vformat_string_std(fmt, ap);
|
||||
va_end(ap);
|
||||
progress_bar_text = buffer;
|
||||
if (verbose)
|
||||
report_info("Uemis downloader: %s", buffer);
|
||||
report_info("Uemis downloader: %s", progress_bar_text.c_str());
|
||||
}
|
||||
|
||||
static long bytes_available(int file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue