printf_l(3)

printf_l3

Formatted output conversion

Usage

#include <stdio.h>

#include <xlocale.h>

int

printf_l(locale_t loc, const char * restrict format, ...);

int

asprintf_l(char **ret, locale_t loc, const char * format, ...);

int

fprintf_l(FILE * restrict stream, locale_t loc, const char * restrict format, ...);

int

snprintf_l(char * restrict str, size_t size, locale_t loc, const char * restrict format, ...);

int

sprintf_l(char * restrict str, locale_t loc, const char * restrict format, ...);

int

vasprintf_l(char **ret, locale_t loc, const char *format, va_list ap);

int

vfprintf_l(FILE * restrict stream, locale_t loc, const char * restrict format, va_list ap);

int

vprintf_l(locale_t loc, const char * restrict format, va_list ap);

int

vsnprintf_l(char * restrict str, size_t size, locale_t loc, const char * restrict format, va_list ap);

int

vsprintf_l(char * restrict str, locale_t loc, const char * restrict format, va_list ap);

Library

Standard C Library (libc, -lc)

Overview

The above functions are used to convert formatted output in the locale loc. They behave in the same way as the versions without the _l suffix, but use the specified locale rather than the global or per-thread locale. See the specific manual pages for more information.

Releases

33 releases since FreeBSD 9.1-RELEASE; the text changed 19 times.

  1. 9.1
  2. 9.2
  3. 9.3
  4. 10.0
  5. 10.1
  6. 10.2
  7. 10.3
  8. 10.4
  9. 11.0
  10. 11.1
  11. 11.2
  12. 11.3
  13. 11.4
  14. 12.0
  15. 12.1
  16. 12.2
  17. 12.3
  18. 12.4
  19. 13.0–13.2
  20. 13.3–16.0

Standards

These functions do not conform to any specific standard so they should be considered as non-portable local extensions.

History

These functions first appeared in Darwin and were first implemented in FreeBSD 9.1.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.