mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-18 03:29:50 +02:00
humanize_number: New function
This commit is contained in:

committed by
Guillem Jover

parent
326d210f17
commit
30176335f9
22
include/libutil.h
Normal file
22
include/libutil.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef _LIBUTIL_H_
|
||||
#define _LIBUTIL_H_
|
||||
|
||||
#include <features.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
__BEGIN_DECLS
|
||||
int humanize_number(char *buf, size_t len, int64_t bytes,
|
||||
const char *suffix, int scale, int flags);
|
||||
__END_DECLS
|
||||
|
||||
/* humanize_number(3) */
|
||||
#define HN_DECIMAL 0x01
|
||||
#define HN_NOSPACE 0x02
|
||||
#define HN_B 0x04
|
||||
#define HN_DIVISOR_1000 0x08
|
||||
|
||||
#define HN_GETSCALE 0x10
|
||||
#define HN_AUTOSCALE 0x20
|
||||
|
||||
#endif /* !_LIBUTIL_H_ */
|
Reference in New Issue
Block a user