#include "xode.h"#include <stdio.h>#include <ctype.h>#include <sys/types.h>#include <stdarg.h>#include <string.h>#include <stdlib.h>#include <math.h>

Go to the source code of this file.
Data Structures | |
| struct | buf_area |
Defines | |
| #define | EXPONENT_LENGTH 10 |
| #define | FALSE 0 |
| #define | FIX_PRECISION(adjust, precision, s, s_len) |
| #define | FLOAT_DIGITS 6 |
| #define | INS_CHAR(c, sp, bep, cc) |
| #define | INT_NULL ((int *)0) |
| #define | NDIG 80 |
| #define | NUL '\0' |
| #define | NUM(c) ( c - '0' ) |
| #define | NUM_BUF_SIZE 512 |
| #define | PAD(width, len, ch) |
| #define | PREFIX(str, length, ch) *--str = ch ; length++ ; has_prefix = YES |
| #define | S_NULL "(null)" |
| #define | S_NULL_LEN 6 |
| #define | STR_TO_DEC(str, num) |
| #define | TRUE 1 |
| #define | WIDE_INT long |
Typedefs | |
| typedef int | bool_int |
| typedef struct buf_area | buffy |
| typedef unsigned WIDE_INT | u_wide_int |
| typedef WIDE_INT | wide_int |
Enumerations | |
| enum | boolean_e { NO = 0, YES = 1, NO = 0, YES = 1 } |
Functions | |
| static char * | ap_cvt (double arg, int ndigits, int *decpt, int *sign, int eflag) |
| static char * | ap_ecvt (double arg, int ndigits, int *decpt, int *sign) |
| static char * | ap_fcvt (double arg, int ndigits, int *decpt, int *sign) |
| static char * | ap_gcvt (double number, int ndigit, char *buf) |
| int | ap_snprintf (char *buf, size_t len, const char *format,...) |
| int | ap_vsnprintf (char *buf, size_t len, const char *format, va_list ap) |
| static char * | conv_10 (register wide_int num, register bool_int is_unsigned, register bool_int *is_negative, char *buf_end, register int *len) |
| static char * | conv_fp (register char format, register double num, boolean_e add_dp, int precision, bool_int *is_negative, char *buf, int *len) |
| static char * | conv_p2 (register u_wide_int num, register int nbits, char format, char *buf_end, register int *len) |
| static int | format_converter (register buffy *odp, const char *fmt, va_list ap) |
| static void | strx_printv (int *ccp, char *buf, size_t len, const char *format, va_list ap) |
Definition in file xmpp/xsnprintf.c.
| #define EXPONENT_LENGTH 10 |
Definition at line 266 of file xmpp/xsnprintf.c.
| #define FALSE 0 |
Definition at line 252 of file xmpp/xsnprintf.c.
| #define FIX_PRECISION | ( | adjust, | |||
| precision, | |||||
| s, | |||||
| s_len | ) |
Definition at line 321 of file xmpp/xsnprintf.c.
| #define FLOAT_DIGITS 6 |
Definition at line 265 of file xmpp/xsnprintf.c.
| #define INS_CHAR | ( | c, | |||
| sp, | |||||
| bep, | |||||
| cc | ) |
Definition at line 296 of file xmpp/xsnprintf.c.
| #define INT_NULL ((int *)0) |
Definition at line 255 of file xmpp/xsnprintf.c.
| #define NDIG 80 |
Definition at line 96 of file xmpp/xsnprintf.c.
| #define NUL '\0' |
Definition at line 254 of file xmpp/xsnprintf.c.
| #define NUM | ( | c | ) | ( c - '0' ) |
Definition at line 305 of file xmpp/xsnprintf.c.
| #define NUM_BUF_SIZE 512 |
Definition at line 273 of file xmpp/xsnprintf.c.
| #define PAD | ( | width, | |||
| len, | |||||
| ch | ) |
Definition at line 333 of file xmpp/xsnprintf.c.
Definition at line 345 of file xmpp/xsnprintf.c.
| #define S_NULL "(null)" |
Definition at line 262 of file xmpp/xsnprintf.c.
| #define S_NULL_LEN 6 |
Definition at line 263 of file xmpp/xsnprintf.c.
| #define STR_TO_DEC | ( | str, | |||
| num | ) |
Definition at line 307 of file xmpp/xsnprintf.c.
| #define TRUE 1 |
Definition at line 253 of file xmpp/xsnprintf.c.
| #define WIDE_INT long |
Definition at line 256 of file xmpp/xsnprintf.c.
| typedef int bool_int |
Definition at line 260 of file xmpp/xsnprintf.c.
Definition at line 284 of file xmpp/xsnprintf.c.
| typedef unsigned WIDE_INT u_wide_int |
Definition at line 259 of file xmpp/xsnprintf.c.
| typedef WIDE_INT wide_int |
Definition at line 258 of file xmpp/xsnprintf.c.
| enum boolean_e |
| static char* ap_cvt | ( | double | arg, | |
| int | ndigits, | |||
| int * | decpt, | |||
| int * | sign, | |||
| int | eflag | |||
| ) | [static] |
| static char* ap_ecvt | ( | double | arg, | |
| int | ndigits, | |||
| int * | decpt, | |||
| int * | sign | |||
| ) | [static] |
| static char* ap_fcvt | ( | double | arg, | |
| int | ndigits, | |||
| int * | decpt, | |||
| int * | sign | |||
| ) | [static] |
| static char* ap_gcvt | ( | double | number, | |
| int | ndigit, | |||
| char * | buf | |||
| ) | [static] |
| int ap_snprintf | ( | char * | buf, | |
| size_t | len, | |||
| const char * | format, | |||
| ... | ||||
| ) |
| int ap_vsnprintf | ( | char * | buf, | |
| size_t | len, | |||
| const char * | format, | |||
| va_list | ap | |||
| ) |
| static char* conv_fp | ( | register char | format, | |
| register double | num, | |||
| boolean_e | add_dp, | |||
| int | precision, | |||
| bool_int * | is_negative, | |||
| char * | buf, | |||
| int * | len | |||
| ) | [static] |
Definition at line 414 of file xmpp/xsnprintf.c.
References ap_ecvt(), ap_fcvt(), conv_10(), EXPONENT_LENGTH, FALSE, and s.
| static char* conv_p2 | ( | register u_wide_int | num, | |
| register int | nbits, | |||
| char | format, | |||
| char * | buf_end, | |||
| register int * | len | |||
| ) | [static] |
| static int format_converter | ( | register buffy * | odp, | |
| const char * | fmt, | |||
| va_list | ap | |||
| ) | [static] |
Definition at line 528 of file xmpp/xsnprintf.c.
References ap_gcvt(), buf_area::buf_end, conv_10(), conv_fp(), conv_p2(), FIX_PRECISION, FLOAT_DIGITS, INS_CHAR, buf_area::nextb, NO, NUL, NULL, NUM_BUF_SIZE, PAD, s, s_len, S_NULL, S_NULL_LEN, STR_TO_DEC, and YES.
| static void strx_printv | ( | int * | ccp, | |
| char * | buf, | |||
| size_t | len, | |||
| const char * | format, | |||
| va_list | ap | |||
| ) | [static] |
Definition at line 896 of file xmpp/xsnprintf.c.
References buf_area::buf_end, format_converter(), and buf_area::nextb.
1.5.6