---
name: "bitmap_scnlistprintf"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/bitmap_scnlistprintf"
---

# bitmap\_scnlistprintf(9)

convert bitmap to list format ASCII string

## NAME

bitmap\_scnlistprintf - convert bitmap to list format ASCII string

## SYNOPSIS

**int bitmap\_scnlistprintf(char \*** *buf***, unsigned int** *buflen***, const unsigned long \*** *maskp***, int** *nmaskbits***);**

## ARGUMENTS

*buf*

byte buffer into which string is placed

*buflen*

reserved size of *buf*, in bytes

*maskp*

pointer to bitmap to convert

*nmaskbits*

size of bitmap, in bits

## DESCRIPTION

Output format is a comma-separated list of decimal numbers and ranges. Consecutively set bits are shown as two hyphen-separated decimal numbers, the smallest and largest bit numbers set in the range. Output format is compatible with the format accepted as input by **bitmap\_parselist**.

The return value is the number of characters which were written to \*buf excluding the trailing '\\0', as per ISO C99's scnprintf.

## COPYRIGHT
