~ubuntu-branches/debian/jessie/freecdb/jessie

« back to all changes in this revision

Viewing changes to fmt_uint0.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerrit Pape
  • Date: 2006-01-13 21:11:53 UTC
  • Revision ID: james.westby@ubuntu.com-20060113211153-o3j55ifg2pd6wkdu
Tags: 0.75
* take over upstream (closes: #272127).
* complete re-package:
  * derived from cdb-0.75.
  * cdbmake, cdbget, cdbdump, cdbstats: re-write programs, man pages.
  * add program selftests.
  * package no longer provides a library, but command line programs only
    (closes: #345868).
  * debian/control: new long description (closes: #124639).
* new upload includes mandatory field 'format' (closes: #307116).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Public domain. */
 
2
 
 
3
#include "fmt.h"
 
4
 
 
5
unsigned int fmt_uint0(char *s,unsigned int u,unsigned int n)
 
6
{
 
7
  unsigned int len;
 
8
  len = fmt_uint(FMT_LEN,u);
 
9
  while (len < n) { if (s) *s++ = '0'; ++len; }
 
10
  if (s) fmt_uint(s,u);
 
11
  return len;
 
12
}