bglibs: number.h Source File

- Main Page
- Modules
- Data Structures
- Files
- Directories
- Related Pages
- Examples

# number.h

    00001 /* $Id: number.h 616 2005-08-19 20:11:01Z bruce $ */
    00002 #ifndef FMT__NUMBER__H__
    00003 #define FMT__NUMBER__H__
    00004
    00052 #define FMT_ULONG_LEN 40
    00053
    00054 extern const char fmt_lcase_digits[36];
    00055 extern const char fmt_ucase_digits[36];
    00056
    00057 extern unsigned fmt_pad(char* buffer, unsigned width, char pad);
    00058 extern unsigned fmt_sign_pad(char* buffer, int sign,
    00059                              unsigned width, char pad);
    00060
    00064 extern unsigned fmt_snumw(char* buffer, long num,
    00065                           unsigned width, char pad,
    00066                           unsigned base, const char* digits);
    00067 extern unsigned fmt_sdec(char* buffer, long num);
    00068 extern unsigned fmt_sdecw(char* buffer, long num,
    00069                           unsigned width, char pad);
    00070
    00076 extern unsigned fmt_sllnumw(char* buffer, long long num,
    00077                             unsigned width, char pad,
    00078                             unsigned base, const char* digits);
    00079 extern unsigned fmt_slldec(char* buffer, long long num);
    00080 extern unsigned fmt_slldecw(char* buffer, long long num,
    00081                             unsigned width, char pad);
    00082
    00088 extern unsigned fmt_unumw(char* buffer, unsigned long num,
    00089                           unsigned width, char pad,
    00090                           unsigned base, const char* digits);
    00091 extern unsigned fmt_udec(char* buffer, unsigned long num);
    00092 extern unsigned fmt_udecw(char* buffer, unsigned long num,
    00093                           unsigned width, char pad);
    00094 extern unsigned fmt_uhex(char* buffer, unsigned long num);
    00095 extern unsigned fmt_uhexw(char* buffer, unsigned long num,
    00096                           unsigned width, char pad);
    00097 extern unsigned fmt_uHex(char* buffer, unsigned long num);
    00098 extern unsigned fmt_uHexw(char* buffer, unsigned long num,
    00099                           unsigned width, char pad);
    00100
    00106 extern unsigned fmt_ullnumw(char* buffer, unsigned long long num,
    00107                             unsigned width, char pad,
    00108                             unsigned base, const char* digits);
    00109 extern unsigned fmt_ulldec(char* buffer, unsigned long long num);
    00110 extern unsigned fmt_ulldecw(char* buffer, unsigned long long num,
    00111                             unsigned width, char pad);
    00112 extern unsigned fmt_ullhex(char* buffer, unsigned long long num);
    00113 extern unsigned fmt_ullhexw(char* buffer, unsigned long long num,
    00114                             unsigned width, char pad);
    00115 extern unsigned fmt_ullHex(char* buffer, unsigned long long num);
    00116 extern unsigned fmt_ullHexw(char* buffer, unsigned long long num,
    00117                             unsigned width, char pad);
    00118
    00123 #endif