File: uhexl.c

package info (click to toggle)
bglibs 2.04%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,368 kB
  • sloc: ansic: 15,820; perl: 674; sh: 64; makefile: 26
file content (14 lines) | stat: -rw-r--r-- 427 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "fmt.h"

/** Format an unsigned integer as (lower-case) hexadecimal with
    padding. */
unsigned fmt_uhexw(char* buffer, unsigned long num, unsigned width, char pad)
{
  return fmt_unumw(buffer, num, width, pad, 16, fmt_lcase_digits);
}

/** Format an unsigned integer as (lower-case) hexadecimal. */
unsigned fmt_uhex(char* buffer, unsigned long num)
{
  return fmt_unumw(buffer, num, 0, 0, 16, fmt_lcase_digits);
}