fmt.h
#ifndef FMT__NUMBER__H__
#define FMT__NUMBER__H__
#include <stdarg.h>
struct str;
#define FMT_ULONG_LEN 40
extern const char fmt_lcase_digits[36];
extern const char fmt_ucase_digits[36];
extern unsigned fmt_pad(char* buffer, unsigned width, char pad);
extern unsigned fmt_sign_pad(char* buffer, int sign,
unsigned width, char pad);
extern unsigned fmt_snumw(char* buffer, long num,
unsigned width, char pad,
unsigned base, const char* digits);
extern unsigned fmt_sdec(char* buffer, long num);
extern unsigned fmt_sdecw(char* buffer, long num,
unsigned width, char pad);
extern unsigned fmt_sllnumw(char* buffer, long long num,
unsigned width, char pad,
unsigned base, const char* digits);
extern unsigned fmt_slldec(char* buffer, long long num);
extern unsigned fmt_slldecw(char* buffer, long long num,
unsigned width, char pad);
extern unsigned fmt_unumw(char* buffer, unsigned long num,
unsigned width, char pad,
unsigned base, const char* digits);
extern unsigned fmt_udec(char* buffer, unsigned long num);
extern unsigned fmt_udecw(char* buffer, unsigned long num,
unsigned width, char pad);
extern unsigned fmt_uhex(char* buffer, unsigned long num);
extern unsigned fmt_uhexw(char* buffer, unsigned long num,
unsigned width, char pad);
extern unsigned fmt_uHex(char* buffer, unsigned long num);
extern unsigned fmt_uHexw(char* buffer, unsigned long num,
unsigned width, char pad);
extern unsigned fmt_ullnumw(char* buffer, unsigned long long num,
unsigned width, char pad,
unsigned base, const char* digits);
extern unsigned fmt_ulldec(char* buffer, unsigned long long num);
extern unsigned fmt_ulldecw(char* buffer, unsigned long long num,
unsigned width, char pad);
extern unsigned fmt_ullhex(char* buffer, unsigned long long num);
extern unsigned fmt_ullhexw(char* buffer, unsigned long long num,
unsigned width, char pad);
extern unsigned fmt_ullHex(char* buffer, unsigned long long num);
extern unsigned fmt_ullHexw(char* buffer, unsigned long long num,
unsigned width, char pad);
extern unsigned fmt_char(char* buffer, int ch, unsigned width, char pad);
extern unsigned fmt_mem(char* buffer, const char* s, unsigned length,
unsigned width, char pad);
extern unsigned fmt_chars(char* buffer, const char* s,
unsigned width, char pad);
extern unsigned fmt_str(char* buffer, const struct str* s,
unsigned width, char pad);
typedef unsigned (*fmt_function)(char* buffer,
const void* data,
unsigned width,
char pad);
extern unsigned fmt_multi(char* buffer, const char* format, ...);
extern unsigned fmt_multiv(char* buffer, const char* format, va_list ap);
#endif
fmt_udecw
unsigned fmt_udecw(char *buffer, unsigned long num, unsigned width, char pad)
Definition: udec.c:4
str::s
char * s
Definition: str.h:36
fmt_ulldecw
unsigned fmt_ulldecw(char *buffer, unsigned long long num, unsigned width, char pad)
Definition: ulldec.c:4
fmt_uHex
unsigned fmt_uHex(char *buffer, unsigned long num)
Definition: uhexu.c:11
fmt_function
unsigned(* fmt_function)(char *buffer, const void *data, unsigned width, char pad)
Definition: fmt.h:142
fmt_uhexw
unsigned fmt_uhexw(char *buffer, unsigned long num, unsigned width, char pad)
Definition: uhexl.c:5
fmt_udec
unsigned fmt_udec(char *buffer, unsigned long num)
Definition: udec.c:10
fmt_uhex
unsigned fmt_uhex(char *buffer, unsigned long num)
Definition: uhexl.c:11
fmt_multi
unsigned fmt_multi(char *buffer, const char *format,...)
Definition: multi.c:106
fmt_ullnumw
unsigned fmt_ullnumw(char *buffer, unsigned long long num, unsigned width, char pad, unsigned base, const char *digits)
Definition: ullnum.c:39
fmt_ucase_digits
const char fmt_ucase_digits[36]
Definition: ucase.c:4
fmt_sdec
unsigned fmt_sdec(char *buffer, long num)
Definition: sdec.c:10
fmt_slldec
unsigned fmt_slldec(char *buffer, long long num)
Definition: slldec.c:10
fmt_pad
unsigned fmt_pad(char *buffer, unsigned width, char pad)
Definition: pad.c:5
fmt_char
unsigned fmt_char(char *buffer, int ch, unsigned width, char pad)
Definition: char.c:21
fmt_sdecw
unsigned fmt_sdecw(char *buffer, long num, unsigned width, char pad)
Definition: sdec.c:4
fmt_snumw
unsigned fmt_snumw(char *buffer, long num, unsigned width, char pad, unsigned base, const char *digits)
Definition: snum.c:35
fmt_unumw
unsigned fmt_unumw(char *buffer, unsigned long num, unsigned width, char pad, unsigned base, const char *digits)
Definition: unum.c:38
fmt_multiv
unsigned fmt_multiv(char *buffer, const char *format, va_list ap)
Definition: multi.c:152
fmt_ullHexw
unsigned fmt_ullHexw(char *buffer, unsigned long long num, unsigned width, char pad)
Definition: ullhexu.c:5
str
Definition: str.h:30
fmt_sllnumw
unsigned fmt_sllnumw(char *buffer, long long num, unsigned width, char pad, unsigned base, const char *digits)
Definition: sllnum.c:36
fmt_lcase_digits
const char fmt_lcase_digits[36]
Definition: lcase.c:4
fmt_slldecw
unsigned fmt_slldecw(char *buffer, long long num, unsigned width, char pad)
Definition: slldec.c:4
fmt_uHexw
unsigned fmt_uHexw(char *buffer, unsigned long num, unsigned width, char pad)
Definition: uhexu.c:5
fmt_ullhex
unsigned fmt_ullhex(char *buffer, unsigned long long num)
Definition: ullhexl.c:11
fmt_ullHex
unsigned fmt_ullHex(char *buffer, unsigned long long num)
Definition: ullhexu.c:12
fmt_ulldec
unsigned fmt_ulldec(char *buffer, unsigned long long num)
Definition: ulldec.c:11
fmt_ullhexw
unsigned fmt_ullhexw(char *buffer, unsigned long long num, unsigned width, char pad)
Definition: ullhexl.c:4
fmt_sign_pad
unsigned fmt_sign_pad(char *buffer, int sign, unsigned width, char pad)
Definition: sign_pad.c:5