number.h

00001 #ifndef FMT__NUMBER__H__
00002 #define FMT__NUMBER__H__
00003 
00051 #define FMT_ULONG_LEN 40
00052 
00053 extern const char fmt_lcase_digits[36];
00054 extern const char fmt_ucase_digits[36];
00055 
00056 extern unsigned fmt_pad(char* buffer, unsigned width, char pad);
00057 extern unsigned fmt_sign_pad(char* buffer, int sign,
00058                              unsigned width, char pad);
00059 
00063 extern unsigned fmt_snumw(char* buffer, long num,
00064                           unsigned width, char pad,
00065                           unsigned base, const char* digits);
00066 extern unsigned fmt_sdec(char* buffer, long num);
00067 extern unsigned fmt_sdecw(char* buffer, long num,
00068                           unsigned width, char pad);
00069 
00075 extern unsigned fmt_sllnumw(char* buffer, long long num,
00076                             unsigned width, char pad,
00077                             unsigned base, const char* digits);
00078 extern unsigned fmt_slldec(char* buffer, long long num);
00079 extern unsigned fmt_slldecw(char* buffer, long long num,
00080                             unsigned width, char pad);
00081 
00087 extern unsigned fmt_unumw(char* buffer, unsigned long num,
00088                           unsigned width, char pad,
00089                           unsigned base, const char* digits);
00090 extern unsigned fmt_udec(char* buffer, unsigned long num);
00091 extern unsigned fmt_udecw(char* buffer, unsigned long num,
00092                           unsigned width, char pad);
00093 extern unsigned fmt_uhex(char* buffer, unsigned long num);
00094 extern unsigned fmt_uhexw(char* buffer, unsigned long num,
00095                           unsigned width, char pad);
00096 extern unsigned fmt_uHex(char* buffer, unsigned long num);
00097 extern unsigned fmt_uHexw(char* buffer, unsigned long num,
00098                           unsigned width, char pad);
00099 
00105 extern unsigned fmt_ullnumw(char* buffer, unsigned long long num,
00106                             unsigned width, char pad,
00107                             unsigned base, const char* digits);
00108 extern unsigned fmt_ulldec(char* buffer, unsigned long long num);
00109 extern unsigned fmt_ulldecw(char* buffer, unsigned long long num,
00110                             unsigned width, char pad);
00111 extern unsigned fmt_ullhex(char* buffer, unsigned long long num);
00112 extern unsigned fmt_ullhexw(char* buffer, unsigned long long num,
00113                             unsigned width, char pad);
00114 extern unsigned fmt_ullHex(char* buffer, unsigned long long num);
00115 extern unsigned fmt_ullHexw(char* buffer, unsigned long long num,
00116                             unsigned width, char pad);
00117 
00122 #endif

Generated on Thu Feb 19 11:11:50 2009 for bglibs by  doxygen 1.5.4