GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
GIS Library - Print functions for aligning wide characters. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Go to the source code of this file.
Macros | |
#define | CONVS "diouxXeEfFgGaAcsCSpnm%" |
#define | SPEC_BUF_SIZE 16 |
Functions | |
int | G_vaprintf (const char *format, va_list ap) |
vprintf() version of G_aprintf(). See G_aprintf() for more details. More... | |
int | G_vfaprintf (FILE *stream, const char *format, va_list ap) |
vfprintf() version of G_aprintf(). See G_aprintf() for more details. More... | |
int | G_vsaprintf (char *str, const char *format, va_list ap) |
vsprintf() version of G_aprintf(). See G_aprintf() for more details. More... | |
int | G_vsnaprintf (char *str, size_t size, const char *format, va_list ap) |
vsnprintf() version of G_aprintf(). See G_aprintf() for more details. More... | |
int | G_aprintf (const char *format,...) |
Adjust the width of string specifiers to the display space instead of the number of bytes for wide characters and print them formatted using the adjusted display width. More... | |
int | G_faprintf (FILE *stream, const char *format,...) |
fprintf() version of G_aprintf(). See G_aprintf() for more details. More... | |
int | G_saprintf (char *str, const char *format,...) |
sprintf() version of G_aprintf(). See G_aprintf() for more details. More... | |
int | G_snaprintf (char *str, size_t size, const char *format,...) |
snprintf() version of G_aprintf(). See G_aprintf() for more details. More... | |
GIS Library - Print functions for aligning wide characters.
Extracted from the aligned printf C library (libaprintf under GPL v3+) by Huidae Cho.
(C) 2020 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file aprintf.c.
int G_aprintf | ( | const char * | format, |
... | |||
) |
Adjust the width of string specifiers to the display space instead of the number of bytes for wide characters and print them formatted using the adjusted display width.
compare
ABCD|
and
ABCD|
[in] | format | string format |
[in] | ... | arguments for the format string |
int G_faprintf | ( | FILE * | stream, |
const char * | format, | ||
... | |||
) |
fprintf() version of G_aprintf(). See G_aprintf() for more details.
[in] | stream | file pointer |
[in] | format | string format |
[in] | ... | arguments for the format string |
int G_saprintf | ( | char * | str, |
const char * | format, | ||
... | |||
) |
sprintf() version of G_aprintf(). See G_aprintf() for more details.
[in] | str | string buffer |
[in] | format | string format |
[in] | ... | arguments for the format string |
int G_snaprintf | ( | char * | str, |
size_t | size, | ||
const char * | format, | ||
... | |||
) |
snprintf() version of G_aprintf(). See G_aprintf() for more details.
[in] | str | string buffer |
[in] | size | string buffer size |
[in] | format | string format |
[in] | ... | arguments for the format string |
int G_vaprintf | ( | const char * | format, |
va_list | ap | ||
) |
vprintf() version of G_aprintf(). See G_aprintf() for more details.
[in] | format | string format |
[in] | ap | variable argument list for the format string |
int G_vfaprintf | ( | FILE * | stream, |
const char * | format, | ||
va_list | ap | ||
) |
vfprintf() version of G_aprintf(). See G_aprintf() for more details.
[in] | stream | file pointer |
[in] | format | string format |
[in] | ap | variable argument list for the format string |
int G_vsaprintf | ( | char * | str, |
const char * | format, | ||
va_list | ap | ||
) |
vsprintf() version of G_aprintf(). See G_aprintf() for more details.
[in] | str | string buffer |
[in] | format | string format |
[in] | ap | variable argument list for the format string |
int G_vsnaprintf | ( | char * | str, |
size_t | size, | ||
const char * | format, | ||
va_list | ap | ||
) |
vsnprintf() version of G_aprintf(). See G_aprintf() for more details.
[in] | str | string buffer |
[in] | size | string buffer size |
[in] | format | string format |
[in] | ap | variable argument list for the format string |