![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Unix snprintf implementation. More...
#include <freeradius-devel/build.h>#include <freeradius-devel/missing.h>#include <varargs.h>#include <ctype.h>#include <stdlib.h>
Include dependency graph for snprintf.h:Go to the source code of this file.
Data Structures | |
| struct | DATA |
Macros | |
| #define | DEF_PREC(p) |
| #define | dtoa(n, p, f) numtoa(n, 10, p, f) |
| #define | FOUND 1 |
| #define | htoa(n) numtoa(n, 16, 0, (char **)0) |
| #define | isflag(c) |
| #define | itoa(n) numtoa(n, 10, 0, (char **)0) |
| #define | LEFT 0 |
| #define | LONG_DOUBLE long double |
| #define | LONG_LONG long long |
| #define | MAX_FIELD 15 |
| #define | MAX_FRACT 29 + 1 |
| #define | MAX_INT 99 + 1 /* 1 for the null */ |
| #define | NOT_FOUND -1 |
| #define | otoa(n) numtoa(n, 8, 0, (char **)0) |
| #define | PAD_LEFT(p) |
| #define | PAD_RIGHT(p) |
| #define | PRIVATE static |
| #define | PUBLIC |
| #define | PUT_CHAR(c, p) |
| #define | PUT_PLUS(d, p) |
| #define | PUT_SPACE(d, p) |
| #define | RIGHT 1 |
| #define | ROUND(d, p) |
| #define | STAR_ARGS(p) |
| #define | SWAP_INT(a, b) {int t; t = (a); (a) = (b); (b) = t;} |
Functions | |
| PRIVATE void | conv_flag () |
| PRIVATE void | exponent () |
| PRIVATE void | float64 () |
| PRIVATE void | floating () |
| PRIVATE void | hexa () |
| PRIVATE double | integral () |
| PRIVATE int | log_10 () |
| PRIVATE char * | numtoa () |
| PRIVATE void | octal () |
| PRIVATE double | pow_10 () |
| PRIVATE void | strings () |
Unix snprintf implementation.
Version 1.4
1.4:
* integrate in FreeRADIUS's libradius:
* Fetched from: http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailutils/lib/snprintf.c?rev=1.4
* Fetched from: http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailutils/lib/snprintf.h?rev=1.4
* Replace config.h with autoconf.h
* Protect with HAVE_SNPRINTF and HAVE_VSNPRINTF
1.3:
* add #include <config.h> ifdef HAVE_CONFIG_H
* cosmetic change, when exponent is 0 print xxxE+00
instead of xxxE-00
1.2:
* put the program under LGPL.
1.1:
* added changes from Miles Bader
* corrected a bug with %f
* added support for %#g
* added more comments :-)
1.0:
* supporting must ANSI syntaxic_sugars
0.0:
* support %s %c %d
THANKS(for the patches and ideas): Miles Bader Cyrille Rustom Jacek Slabocewiz Mike Parker(mouse)
Version 1.4
THANKS(for the patches and ideas): Miles Bader Cyrille Rustom Jacek Slabocewiz Mike Parker(mouse)
Definition in file snprintf.h.
| struct DATA |
Definition at line 112 of file snprintf.h.
| Data Fields | ||
|---|---|---|
| int | a_long | |
| int | a_longlong | |
| int | counter | |
| char * | holder | |
| int | justify | |
| int | length | |
| char | pad | |
| char * | pf | |
| int | precision | |
| int | space | |
| int | square | |
| int | star_p | |
| int | star_w | |
| int | width | |
| #define DEF_PREC | ( | p | ) |
Definition at line 183 of file snprintf.h.
| #define FOUND 1 |
Definition at line 167 of file snprintf.h.
| #define isflag | ( | c | ) |
Definition at line 171 of file snprintf.h.
| #define LEFT 0 |
Definition at line 165 of file snprintf.h.
| #define LONG_DOUBLE long double |
Definition at line 96 of file snprintf.h.
| #define LONG_LONG long long |
Definition at line 88 of file snprintf.h.
| #define MAX_FIELD 15 |
Definition at line 168 of file snprintf.h.
| #define MAX_FRACT 29 + 1 |
Definition at line 82 of file snprintf.h.
| #define MAX_INT 99 + 1 /* 1 for the null */ |
Definition at line 81 of file snprintf.h.
| #define NOT_FOUND -1 |
Definition at line 166 of file snprintf.h.
| #define PAD_LEFT | ( | p | ) |
Definition at line 209 of file snprintf.h.
| #define PAD_RIGHT | ( | p | ) |
Definition at line 203 of file snprintf.h.
| #define PRIVATE static |
Definition at line 52 of file snprintf.h.
| #define PUBLIC |
Definition at line 53 of file snprintf.h.
| #define PUT_CHAR | ( | c, | |
| p | |||
| ) |
Definition at line 188 of file snprintf.h.
| #define PUT_PLUS | ( | d, | |
| p | |||
| ) |
Definition at line 194 of file snprintf.h.
| #define PUT_SPACE | ( | d, | |
| p | |||
| ) |
Definition at line 198 of file snprintf.h.
| #define RIGHT 1 |
Definition at line 164 of file snprintf.h.
| #define ROUND | ( | d, | |
| p | |||
| ) |
Definition at line 177 of file snprintf.h.
| #define STAR_ARGS | ( | p | ) |
| #define SWAP_INT | ( | a, | |
| b | |||
| ) | {int t; t = (a); (a) = (b); (b) = t;} |
Definition at line 109 of file snprintf.h.
| PRIVATE void conv_flag | ( | ) |
Here is the caller graph for this function:| PRIVATE void exponent | ( | ) |
Here is the caller graph for this function:| PRIVATE void float64 | ( | ) |
Here is the caller graph for this function:| PRIVATE void floating | ( | ) |
Here is the caller graph for this function:| PRIVATE void hexa | ( | ) |
Here is the caller graph for this function:| PRIVATE double integral | ( | ) |
Here is the caller graph for this function:| PRIVATE int log_10 | ( | ) |
Here is the caller graph for this function:| PRIVATE char * numtoa | ( | ) |
| PRIVATE void octal | ( | ) |
Here is the caller graph for this function:| PRIVATE double pow_10 | ( | ) |
Here is the caller graph for this function:| PRIVATE void strings | ( | ) |
Here is the caller graph for this function:
1.9.8