Mercurial > hg > cdb
view fmt.h @ 12:0e21568dec72
allocate a Cdb struct rather than using a single static one,
note that cdb_free does _not_ call alloc_free, just releases the map,
in fact alloc_free is not called anywhere!
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Mon, 03 Feb 2025 17:31:23 +0000 |
| parents | 2cb46628feec |
| children |
line wrap: on
line source
#ifndef FMT_H #define FMT_H #define FMT_ULONG 40 /* enough space to hold 2^128 - 1 in decimal, plus \0 */ #define FMT_LEN ((char *) 0) /* convenient abbreviation */ extern unsigned int fmt_uint(char *,unsigned int); extern unsigned int fmt_uint0(char *,unsigned int,unsigned int); extern unsigned int fmt_xint(char *,unsigned int); extern unsigned int fmt_nbbint(char *,unsigned int,unsigned int,unsigned int,unsigned int); extern unsigned int fmt_ushort(char *,unsigned short); extern unsigned int fmt_xshort(char *,unsigned short); extern unsigned int fmt_nbbshort(char *,unsigned int,unsigned int,unsigned int,unsigned short); extern unsigned int fmt_ulong(char *,unsigned long); extern unsigned int fmt_xlong(char *,unsigned long); extern unsigned int fmt_nbblong(char *,unsigned int,unsigned int,unsigned int,unsigned long); extern unsigned int fmt_plusminus(char *,int); extern unsigned int fmt_minus(char *,int); extern unsigned int fmt_0x(char *,int); extern unsigned int fmt_str(char *,char *); extern unsigned int fmt_strn(char *,char *,unsigned int); #endif
