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

/** Format a pad character. */
unsigned fmt_pad(char* buffer, unsigned width, char pad)
{
  if (buffer != 0)
    memset(buffer, pad, width);
  return width;
}