#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) |
| #define EXPONENT_LENGTH 10 |
| #define FALSE 0 |
Definition at line 247 of file jabber/xsnprintf.c.
Referenced by BufferAlloc(), BufferRealloc(), ConfNextToken(), ConfReadBool(), ConfReadLine(), ConfReadServerFile(), ConnCreate(), ConnRead(), ConnReadHeader(), ConnWriteFromFile(), conv_10(), conv_fp(), createServer(), DateDecode(), DateFromGMT(), DateInit(), DateToLogString(), DateToString(), determineSortType(), extractServerCreateParms(), fileContainsText(), FileFindFirst(), FileFindNext(), findExtension(), handleXmlrpcReq(), HTTPWriteEndChunk(), init_libpurple(), initRequestInfo(), initSocketStuff(), ListAdd(), ListAddFromString(), ListFindString(), ListInit(), logClose(), makeThread(), mimeTypeAdd(), MIMETypeAdd2(), miniclient_start(), NextToken(), parseRequestLine(), PoolCreate(), processHeader(), processHeaderLine(), RangeDecode(), readMIMETypesFile(), RequestAuth(), RequestInit(), RequestRead(), RequestValidURI(), RequestValidURIPath(), runUserHandler(), ServerAddHandler(), ServerAddHandler2(), ServerCreate(), ServerCreateNoAccept(), ServerCreateSocket(), ServerCreateSocket2(), ServerDefaultHandlerFunc(), serverFunc(), ServerInit(), SessionLog(), signed_off(), socketAccept(), socketGetPeerName(), SocketUnixCreate(), socketWrite(), StringAlloc(), StringBlockConcat(), StringConcat(), TableAdd(), TableFindIndex(), and unescapeUri().
| #define FIX_PRECISION | ( | adjust, | |||
| precision, | |||||
| s, | |||||
| s_len | ) |
| #define FLOAT_DIGITS 6 |
| #define INS_CHAR | ( | c, | |||
| sp, | |||||
| bep, | |||||
| cc | ) |
| #define INT_NULL ((int *)0) |
Definition at line 250 of file jabber/xsnprintf.c.
| #define NDIG 80 |
| #define NUL '\0' |
| #define NUM | ( | c | ) | ( c - '0' ) |
Definition at line 300 of file jabber/xsnprintf.c.
| #define NUM_BUF_SIZE 512 |
| #define PAD | ( | width, | |||
| len, | |||||
| ch | ) |
Definition at line 340 of file jabber/xsnprintf.c.
| #define S_NULL "(null)" |
| #define S_NULL_LEN 6 |
| #define STR_TO_DEC | ( | str, | |||
| num | ) |
| #define TRUE 1 |
Definition at line 248 of file jabber/xsnprintf.c.
Referenced by BufferAlloc(), BufferRealloc(), client_enable_account(), client_find_account(), ConfNextToken(), ConfReadBool(), ConfReadLine(), ConfReadServerFile(), connDone(), connJob(), ConnKill(), ConnProcess(), ConnRead(), ConnReadHeader(), createAndBindSocket(), createServer(), DateFromGMT(), DateInit(), DateToLogString(), DateToString(), determineSortType(), fileContainsText(), FileFindNext(), findExtension(), handleXmlrpcReq(), HTTPWriteEndChunk(), initRequestInfo(), initSocketStuff(), io_invoke(), ListAdd(), ListAddFromString(), ListFindString(), ListInitAutoFree(), logOpen(), makeThread(), mimeTypeAdd(), MutexCreate(), MutexLock(), MutexTryLock(), MutexUnlock(), NextToken(), parseRequestLine(), pipe_handle_publish(), PoolCreate(), processHeader(), processHeaderLine(), RangeDecode(), readMIMETypesFile(), RequestAuth(), RequestValidURI(), ResponseChunked(), ResponseWriteStart(), ServerAddHandler2(), ServerCreate(), ServerCreateNoAccept(), ServerCreateSocket(), ServerDefaultHandlerFunc(), ServerDirectoryHandler(), ServerFileHandler(), serverFunc(), ServerUseSigchld(), SessionLog(), socketAccept(), socketGetPeerName(), SocketUnixCreateFd(), SocketUnixInit(), socketWrite(), StringAlloc(), StringBlockConcat(), StringConcat(), TableAdd(), TableAddReplace(), TableFindIndex(), ThreadForks(), ThreadKill(), ThreadRun(), ThreadStop(), unescapeUri(), and xmlrpc_server_abyss_default_handler().
| #define WIDE_INT long |
Definition at line 251 of file jabber/xsnprintf.c.
| typedef int bool_int |
Definition at line 255 of file jabber/xsnprintf.c.
Definition at line 279 of file jabber/xsnprintf.c.
| typedef unsigned WIDE_INT u_wide_int |
Definition at line 254 of file jabber/xsnprintf.c.
| typedef WIDE_INT wide_int |
Definition at line 253 of file jabber/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] |
Definition at line 185 of file jabber/xsnprintf.c.
References ap_ecvt().
Referenced by format_converter().
| int ap_snprintf | ( | char * | buf, | |
| size_t | len, | |||
| const char * | format, | |||
| ... | ||||
| ) |
Definition at line 916 of file jabber/xsnprintf.c.
| int ap_vsnprintf | ( | char * | buf, | |
| size_t | len, | |||
| const char * | format, | |||
| va_list | ap | |||
| ) |
Definition at line 928 of file jabber/xsnprintf.c.
| 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 356 of file jabber/xsnprintf.c.
References FALSE.
Referenced by conv_fp(), and format_converter().
| 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 409 of file jabber/xsnprintf.c.
References ap_ecvt(), ap_fcvt(), conv_10(), EXPONENT_LENGTH, FALSE, and s.
Referenced by format_converter().
| static char* conv_p2 | ( | register u_wide_int | num, | |
| register int | nbits, | |||
| char | format, | |||
| char * | buf_end, | |||
| register int * | len | |||
| ) | [static] |
Definition at line 500 of file jabber/xsnprintf.c.
References mask.
Referenced by format_converter().
| static int format_converter | ( | register buffy * | odp, | |
| const char * | fmt, | |||
| va_list | ap | |||
| ) | [static] |
Definition at line 523 of file jabber/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.
Referenced by strx_printv().
| static void strx_printv | ( | int * | ccp, | |
| char * | buf, | |||
| size_t | len, | |||
| const char * | format, | |||
| va_list | ap | |||
| ) | [static] |
Definition at line 891 of file jabber/xsnprintf.c.
References buf_area::buf_end, format_converter(), and buf_area::nextb.
Referenced by ap_snprintf(), and ap_vsnprintf().
1.5.6