xmpp/xsnprintf.c File Reference

#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>

Include dependency graph for xmpp/xsnprintf.c:

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)


Detailed Description

Definition in file xmpp/xsnprintf.c.


Define Documentation

#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 - '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.

#define PREFIX ( str,
length,
ch   )     *--str = ch ; length++ ; has_prefix = YES

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 Documentation

typedef int bool_int

Definition at line 260 of file xmpp/xsnprintf.c.

typedef struct buf_area buffy

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.


Enumeration Type Documentation

enum boolean_e

Enumerator:
NO 
YES 
NO 
YES 

Definition at line 248 of file xmpp/xsnprintf.c.


Function Documentation

static char* ap_cvt ( double  arg,
int  ndigits,
int *  decpt,
int *  sign,
int  eflag 
) [static]

Definition at line 99 of file xmpp/xsnprintf.c.

References buf, and NDIG.

static char* ap_ecvt ( double  arg,
int  ndigits,
int *  decpt,
int *  sign 
) [static]

Definition at line 173 of file xmpp/xsnprintf.c.

References ap_cvt().

static char* ap_fcvt ( double  arg,
int  ndigits,
int *  decpt,
int *  sign 
) [static]

Definition at line 179 of file xmpp/xsnprintf.c.

References ap_cvt().

static char* ap_gcvt ( double  number,
int  ndigit,
char *  buf 
) [static]

Definition at line 190 of file xmpp/xsnprintf.c.

References ap_ecvt().

int ap_snprintf ( char *  buf,
size_t  len,
const char *  format,
  ... 
)

Definition at line 921 of file xmpp/xsnprintf.c.

References strx_printv().

int ap_vsnprintf ( char *  buf,
size_t  len,
const char *  format,
va_list  ap 
)

Definition at line 933 of file xmpp/xsnprintf.c.

References strx_printv().

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]

Definition at line 361 of file xmpp/xsnprintf.c.

References FALSE.

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]

Definition at line 505 of file xmpp/xsnprintf.c.

References mask.

static int format_converter ( register buffy odp,
const char *  fmt,
va_list  ap 
) [static]

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.


Generated on Fri May 25 00:00:46 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6