File: sdec.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 (13 lines) | stat: -rw-r--r-- 365 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "fmt.h"

/** Format a signed integer as decimal with padding. */
unsigned fmt_sdecw(char* buffer, long num, unsigned width, char pad)
{
  return fmt_snumw(buffer, num, width, pad, 10, fmt_lcase_digits);
}

/** Format a signed integer as decimal. */
unsigned fmt_sdec(char* buffer, long num)
{
  return fmt_snumw(buffer, num, 0, 0, 10, fmt_lcase_digits);
}