tin  2.4.5
About: TIN is a threaded NNTP and spool based UseNet newsreader.
  Fossies Dox: tin-2.4.5.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

plp_snprintf.c File Reference
#include "tin.h"
#include "plp_snprintf.h"
Include dependency graph for plp_snprintf.c:

Go to the source code of this file.

Data Structures

union  value
 

Macros

#define cval(s)   (*((unsigned const char *)s))
 
#define num_errors   (-1) /* always use "errno=%d" */
 
#define num_errors   (-1) /* always use "errno=%d" */
 

Functions

static char * plp_Errormsg (int err)
 
static void plp_strcat (char *dest, const char *src)
 
static void dopr (char *buffer, const char *format, va_list args)
 
static void fmtstr (const char *value, int ljust, int len, int precision)
 
static void fmtnum (union value *value, int plp_base, int dosign, int ljust, int len, int zpad)
 
static void fmtdouble (int fmt, double value, int ljust, int len, int zpad, int precision)
 
static void dostr (const char *)
 
static void dopr_outch (int c)
 
int plp_vsnprintf (char *str, size_t count, const char *fmt, va_list args)
 
int plp_snprintf (va_alist)
 

Variables

static const char * _id
 
static char * output
 
static char * end
 
int visible_control = 1
 

Macro Definition Documentation

◆ cval

#define cval (   s)    (*((unsigned const char *)s))

Definition at line 192 of file plp_snprintf.c.

◆ num_errors [1/2]

#define num_errors   (-1) /* always use "errno=%d" */

static char *plp_errormsg( int err ) returns a printable form of the errormessage corresponding to the valie of err. This is the poor man's version of sperror(), not available on all systems Patrick Powell Tue Apr 11 08:05:05 PDT 1995

Definition at line 569 of file plp_snprintf.c.

◆ num_errors [2/2]

#define num_errors   (-1) /* always use "errno=%d" */

static char *plp_errormsg( int err ) returns a printable form of the errormessage corresponding to the valie of err. This is the poor man's version of sperror(), not available on all systems Patrick Powell Tue Apr 11 08:05:05 PDT 1995

Definition at line 569 of file plp_snprintf.c.

Function Documentation

◆ dopr()

static void dopr ( char *  buffer,
const char *  format,
va_list  args 
)
static

◆ dopr_outch()

static void dopr_outch ( int  c)
static

Definition at line 536 of file plp_snprintf.c.

References end, and output.

Referenced by dopr(), dostr(), fmtnum(), and fmtstr().

◆ dostr()

static void dostr ( const char *  str)
static

Definition at line 531 of file plp_snprintf.c.

References dopr_outch().

Referenced by dopr(), and fmtdouble().

◆ fmtdouble()

static void fmtdouble ( int  fmt,
double  value,
int  ljust,
int  len,
int  zpad,
int  precision 
)
static

Definition at line 500 of file plp_snprintf.c.

References dostr(), and plp_strcat().

Referenced by dopr().

◆ fmtnum()

static void fmtnum ( union value value,
int  plp_base,
int  dosign,
int  ljust,
int  len,
int  zpad 
)
static

Definition at line 428 of file plp_snprintf.c.

References dopr_outch(), and value::value.

Referenced by dopr().

◆ fmtstr()

static void fmtstr ( const char *  value,
int  ljust,
int  len,
int  precision 
)
static

Definition at line 388 of file plp_snprintf.c.

References cval, dopr_outch(), and visible_control.

Referenced by dopr(), and parse_format_string().

◆ plp_Errormsg()

static char * plp_Errormsg ( int  err)
static

Definition at line 574 of file plp_snprintf.c.

References num_errors, strerror(), and sys_errlist.

Referenced by dopr().

◆ plp_snprintf()

int plp_snprintf ( va_alist  )

Definition at line 224 of file plp_snprintf.c.

References plp_vsnprintf().

◆ plp_strcat()

static void plp_strcat ( char *  dest,
const char *  src 
)
static

Definition at line 491 of file plp_snprintf.c.

Referenced by fmtdouble().

◆ plp_vsnprintf()

int plp_vsnprintf ( char *  str,
size_t  count,
const char *  fmt,
va_list  args 
)

Definition at line 210 of file plp_snprintf.c.

References dopr(), and end.

Referenced by plp_snprintf().

Variable Documentation

◆ _id

const char* _id
static
Initial value:
= "plp_snprintf V1999.02.20 Copyright Patrick Powell 1988-1999 <papowell@astart.com> \
$Id: plp_snprintf.c,v 1.4 1999/02/20 17:44:16 papowell Exp papowell $\
LOCAL REVISIONS: tin 1.9.5-01"

LPRng IFHP Filter Copyright 1994-1999 Patrick Powell, San Diego, CA papow.nosp@m.ell@.nosp@m.astar.nosp@m.t.co.nosp@m.m

Definition at line 119 of file plp_snprintf.c.

◆ end

◆ output

char* output
static

Definition at line 204 of file plp_snprintf.c.

Referenced by dopr(), dopr_outch(), highlight_string(), main(), and word_highlight_string().

◆ visible_control

int visible_control = 1

Definition at line 207 of file plp_snprintf.c.

Referenced by dopr(), and fmtstr().