Jabber WindowGram Client (JWGC)

Introduction Screenshots Installation Downloads
Documentation Browse Source Resources Project Site

Stable Version
-none-

Latest Version
beta5



Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

snprintf.c File Reference

#include <libxode.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 NDIG   80
#define FALSE   0
#define TRUE   1
#define NUL   '\0'
#define INT_NULL   ((int *)0)
#define WIDE_INT   long
#define S_NULL   "(null)"
#define S_NULL_LEN   6
#define FLOAT_DIGITS   6
#define EXPONENT_LENGTH   10
#define NUM_BUF_SIZE   512
#define INS_CHAR(c, sp, bep, cc)
#define NUM(c)   ( c - '0' )
#define STR_TO_DEC(str, num)
#define FIX_PRECISION(adjust, precision, s, s_len)
#define PAD(width, len, ch)
#define PREFIX(str, length, ch)   *--str = ch ; length++ ; has_prefix = YES

Typedefs

typedef WIDE_INT wide_int
typedef unsigned WIDE_INT u_wide_int
typedef int bool_int
typedef buf_area buffy

Enumerations

enum  boolean_e { NO = 0, YES = 1 }

Functions

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)


Define Documentation

#define EXPONENT_LENGTH   10
 

Definition at line 259 of file snprintf.c.

#define FALSE   0
 

Definition at line 245 of file snprintf.c.

#define FIX_PRECISION adjust,
precision,
s,
s_len   ) 
 

Value:

if ( adjust )                   \
    while ( s_len < precision )         \
    {                       \
        *--s = '0' ;                \
        s_len++ ;                   \
    }

Definition at line 314 of file snprintf.c.

#define FLOAT_DIGITS   6
 

Definition at line 258 of file snprintf.c.

#define INS_CHAR c,
sp,
bep,
cc   ) 
 

Value:

{               \
        if ( sp < bep )     \
        {           \
            *sp++ = c ;     \
            cc++ ;      \
        }           \
        }

Definition at line 289 of file snprintf.c.

#define INT_NULL   ((int *)0)
 

Definition at line 248 of file snprintf.c.

#define NDIG   80
 

Definition at line 89 of file snprintf.c.

#define NUL   '\0'
 

Definition at line 247 of file snprintf.c.

#define NUM  )     ( c - '0' )
 

Definition at line 298 of file snprintf.c.

#define NUM_BUF_SIZE   512
 

Definition at line 266 of file snprintf.c.

#define PAD width,
len,
ch   ) 
 

Value:

do      \
    {                   \
        INS_CHAR( ch, sp, bep, cc ) ;   \
        width-- ;               \
    }                   \
    while ( width > len )

Definition at line 326 of file snprintf.c.

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

Definition at line 338 of file snprintf.c.

#define S_NULL   "(null)"
 

Definition at line 255 of file snprintf.c.

#define S_NULL_LEN   6
 

Definition at line 256 of file snprintf.c.

#define STR_TO_DEC str,
num   ) 
 

Value:

num = NUM( *str++ ) ;       \
    while ( isdigit((int)*str ) )       \
    {                   \
    num *= 10 ;         \
    num += NUM( *str++ ) ;      \
    }

Definition at line 300 of file snprintf.c.

#define TRUE   1
 

Definition at line 246 of file snprintf.c.

#define WIDE_INT   long
 

Definition at line 249 of file snprintf.c.


Typedef Documentation

typedef int bool_int
 

Definition at line 253 of file snprintf.c.

typedef struct buf_area buffy
 

Definition at line 277 of file snprintf.c.

typedef unsigned WIDE_INT u_wide_int
 

Definition at line 252 of file snprintf.c.

typedef WIDE_INT wide_int
 

Definition at line 251 of file snprintf.c.


Enumeration Type Documentation

enum boolean_e
 

Enumeration values:
NO 
YES 

Definition at line 241 of file snprintf.c.

00241              {
00242     NO = 0, YES = 1
00243 } boolean_e;


Function Documentation

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

Definition at line 912 of file snprintf.c.

00913 {
00914     int cc;
00915     va_list ap;
00916 
00917     va_start(ap, format);
00918     strx_printv(&cc, buf, (len - 1), format, ap);
00919     va_end(ap);
00920     return (cc);
00921 }

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

Definition at line 924 of file snprintf.c.

00925 {
00926     int cc;
00927 
00928     strx_printv(&cc, buf, (len - 1), format, ap);
00929     return (cc);
00930 }



Last updated at Tue Dec 18 21:07:42 PST 2007. This site and project hosted by...SourceForge.net Logo

Source Perspective by Fisheye