Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
743 B

  1. .TH fmt_human 3
  2. .SH NAME
  3. fmt_human \- write a human readable ASCII representation of a long integer
  5. .B #include <fmt.h>
  6. size_t \fBfmt_human\fP(char *\fIdest\fR,unsigned long long \fIsource\fR);
  8. fmt_human writes a human readable ASCII representation of \fIsource\fR
  9. to \fIdest\fR and returns the number of bytes written. The result
  10. resembles the file size output of "ls -H"; 1000 becomes "1.0k", 1000000
  11. becomes "1.0M" and so on for "G" and "T".
  12. fmt_human does not append \\0.
  13. If \fIdest\fR equals FMT_LEN (i.e. is zero), fmt_human returns the number
  14. of bytes it would have written.
  15. The output of fmt_human can not exceed 11 (assuming unsigned long long
  16. has 64 bits).
  17. .SH "SEE ALSO"
  18. fmt_humank(3), scan_human(3)