fehQlibs 30
Qlibs
Loading...
Searching...
No Matches
Macros | Functions
fmt.h File Reference

conversion function declarations More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FMT_ULONG   40 /* enough space to hold 2^128 - 1 in decimal, plus \0 */
 
#define FMT_LEN   ((char *) 0) /* convenient abbreviation */
 
#define fmt_dnum(s, X)
 

Functions

unsigned int fmt_str (char *, const char *)
 
unsigned int fmt_strn (char *, const char *, unsigned int)
 
unsigned int fmt_uint (char *, unsigned int)
 
unsigned int fmt_uint0 (char *, unsigned int, unsigned int)
 
unsigned int fmt_ulong (char *, unsigned long)
 
unsigned int fmt_xlong (char *, unsigned long)
 
int fromhex (unsigned char)
 
char tohex (char)
 

Detailed Description

conversion function declarations

Authors
djb, kp, feh qmail

Definition in file fmt.h.

Macro Definition Documentation

◆ fmt_dnum

#define fmt_dnum (   s,
  X 
)
Value:
_Generic((X),\
unsigned int: fmt_uint, \
unsigned long: fmt_ulong \
) (s,X)
unsigned int fmt_ulong(char *, unsigned long)
Definition: fmt.c:44
unsigned int fmt_uint(char *, unsigned int)
Definition: fmt.c:30
#define X(e, s)
Definition: errstr.c:10

Definition at line 14 of file fmt.h.

◆ FMT_LEN

#define FMT_LEN   ((char *) 0) /* convenient abbreviation */

Definition at line 12 of file fmt.h.

◆ FMT_ULONG

#define FMT_ULONG   40 /* enough space to hold 2^128 - 1 in decimal, plus \0 */

Definition at line 11 of file fmt.h.

Function Documentation

◆ fmt_str()

unsigned int fmt_str ( char *  s,
const char *  t 
)

Definition at line 10 of file fmt.c.

Here is the caller graph for this function:

◆ fmt_strn()

unsigned int fmt_strn ( char *  s,
const char *  t,
unsigned int  n 
)

Definition at line 20 of file fmt.c.

◆ fmt_uint()

unsigned int fmt_uint ( char *  s,
unsigned int  u 
)

Definition at line 30 of file fmt.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fmt_uint0()

unsigned int fmt_uint0 ( char *  s,
unsigned int  u,
unsigned int  n 
)

Definition at line 35 of file fmt.c.

Here is the call graph for this function:

◆ fmt_ulong()

unsigned int fmt_ulong ( char *  s,
unsigned long  u 
)

Definition at line 44 of file fmt.c.

Here is the caller graph for this function:

◆ fmt_xlong()

unsigned int fmt_xlong ( char *  s,
unsigned long  u 
)

Definition at line 57 of file fmt.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromhex()

int fromhex ( unsigned char  c)

Definition at line 79 of file fmt.c.

Here is the caller graph for this function:

◆ tohex()

char tohex ( char  num)

Definition at line 70 of file fmt.c.

Here is the caller graph for this function: