File: utils.h

package info (click to toggle)
exfatprogs 1.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,184 kB
  • sloc: ansic: 7,887; sh: 4,505; makefile: 60
file content (27 lines) | stat: -rw-r--r-- 604 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 *  Copyright (C) 2026 Hyunchul Lee <hyc.lee@gmail.com>
 *
 *  Portions of the progress bar code derived from ntfsprogs-plus and modified for exfatprogs.
 */

#ifndef _EXFAT_UTILS_H
#define _EXFAT_UTILS_H

#include <stdint.h>

struct progress_bar {
	uint32_t start;
	uint32_t stop;
	uint32_t current;
	uint32_t resolution;
#ifdef PROG_CALC_FLOAT
	float unit;
#else
	uint64_t total;
#endif
};

void progress_init(struct progress_bar *p, uint32_t start, uint32_t stop, uint32_t res);
void progress_update(struct progress_bar *p, uint32_t current);
#endif