Classes | Macros | Enumerations | Functions | Variables
mprintf.c File Reference
#include "curl_setup.h"
#include <curl/mprintf.h>
#include "curl_memory.h"
#include "memdebug.h"
Include dependency graph for mprintf.c:

Go to the source code of this file.

Classes

struct  asprintf
 
struct  nsprintf
 
struct  va_stack_t
 

Macros

#define BUFFSIZE
 
#define MAX_PARAMETERS   128 /* lame static limit */
 
#define mp_intmax_t   long
 
#define mp_uintmax_t   unsigned long
 
#define OUTCHAR(x)
 

Enumerations

enum  {
  FLAGS_NEW = 0, FLAGS_SPACE = 1<<0, FLAGS_SHOWSIGN = 1<<1, FLAGS_LEFT = 1<<2,
  FLAGS_ALT = 1<<3, FLAGS_SHORT = 1<<4, FLAGS_LONG = 1<<5, FLAGS_LONGLONG = 1<<6,
  FLAGS_LONGDOUBLE = 1<<7, FLAGS_PAD_NIL = 1<<8, FLAGS_UNSIGNED = 1<<9, FLAGS_OCTAL = 1<<10,
  FLAGS_HEX = 1<<11, FLAGS_UPPER = 1<<12, FLAGS_WIDTH = 1<<13, FLAGS_WIDTHPARAM = 1<<14,
  FLAGS_PREC = 1<<15, FLAGS_PRECPARAM = 1<<16, FLAGS_CHAR = 1<<17, FLAGS_FLOATE = 1<<18,
  FLAGS_FLOATG = 1<<19
}
 
enum  FormatType {
  FORMAT_UNKNOWN = 0, FORMAT_STRING, FORMAT_PTR, FORMAT_INT,
  FORMAT_INTPTR, FORMAT_LONG, FORMAT_LONGLONG, FORMAT_DOUBLE,
  FORMAT_LONGDOUBLE, FORMAT_WIDTH
}
 

Functions

static int addbyter (int output, FILE *data)
 
static int alloc_addbyter (int output, FILE *data)
 
char * curl_maprintf (const char *format,...)
 
int curl_mfprintf (FILE *whereto, const char *format,...)
 
int curl_mprintf (const char *format,...)
 
int curl_msnprintf (char *buffer, size_t maxlength, const char *format,...)
 
int curl_msprintf (char *buffer, const char *format,...)
 
char * curl_mvaprintf (const char *format, va_list ap_save)
 
int curl_mvfprintf (FILE *whereto, const char *format, va_list ap_save)
 
int curl_mvprintf (const char *format, va_list ap_save)
 
int curl_mvsnprintf (char *buffer, size_t maxlength, const char *format, va_list ap_save)
 
int curl_mvsprintf (char *buffer, const char *format, va_list ap_save)
 
static long dprintf_DollarString (char *input, char **end)
 
static int dprintf_formatf (void *data, int(*stream)(int, FILE *), const char *format, va_list ap_save)
 
static bool dprintf_IsQualifierNoDollar (const char *fmt)
 
static int dprintf_Pass1 (const char *format, va_stack_t *vto, char **endpos, va_list arglist)
 
static int storebuffer (int output, FILE *data)
 

Variables

static const char lower_digits [] = "0123456789abcdefghijklmnopqrstuvwxyz"
 
static const char upper_digits [] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 

Macro Definition Documentation

◆ BUFFSIZE

#define BUFFSIZE
Value:
326 /* buffer for long-to-str and float-to-str calcs, should
fit negative DBL_MAX (317 letters) */

Definition at line 87 of file mprintf.c.

◆ MAX_PARAMETERS

#define MAX_PARAMETERS   128 /* lame static limit */

Definition at line 88 of file mprintf.c.

◆ mp_intmax_t

#define mp_intmax_t   long

Definition at line 83 of file mprintf.c.

◆ mp_uintmax_t

#define mp_uintmax_t   unsigned long

Definition at line 84 of file mprintf.c.

◆ OUTCHAR

#define OUTCHAR (   x)
Value:
do{ \
if(stream((unsigned char)(x), (FILE *)data) != -1) \
done++; \
else \
return done; /* return immediately on failure */ \

Definition at line 100 of file mprintf.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FLAGS_NEW 
FLAGS_SPACE 
FLAGS_SHOWSIGN 
FLAGS_LEFT 
FLAGS_ALT 
FLAGS_SHORT 
FLAGS_LONG 
FLAGS_LONGLONG 
FLAGS_LONGDOUBLE 
FLAGS_PAD_NIL 
FLAGS_UNSIGNED 
FLAGS_OCTAL 
FLAGS_HEX 
FLAGS_UPPER 
FLAGS_WIDTH 
FLAGS_WIDTHPARAM 
FLAGS_PREC 
FLAGS_PRECPARAM 
FLAGS_CHAR 
FLAGS_FLOATE 
FLAGS_FLOATG 

Definition at line 123 of file mprintf.c.

◆ FormatType

enum FormatType
Enumerator
FORMAT_UNKNOWN 
FORMAT_STRING 
FORMAT_PTR 
FORMAT_INT 
FORMAT_INTPTR 
FORMAT_LONG 
FORMAT_LONGLONG 
FORMAT_DOUBLE 
FORMAT_LONGDOUBLE 
FORMAT_WIDTH 

Definition at line 109 of file mprintf.c.

Function Documentation

◆ addbyter()

static int addbyter ( int  output,
FILE *  data 
)
static

Definition at line 980 of file mprintf.c.

◆ alloc_addbyter()

static int alloc_addbyter ( int  output,
FILE *  data 
)
static

Definition at line 1028 of file mprintf.c.

◆ curl_maprintf()

char* curl_maprintf ( const char *  format,
  ... 
)

Definition at line 1065 of file mprintf.c.

◆ curl_mfprintf()

int curl_mfprintf ( FILE *  whereto,
const char *  format,
  ... 
)

Definition at line 1146 of file mprintf.c.

◆ curl_mprintf()

int curl_mprintf ( const char *  format,
  ... 
)

Definition at line 1135 of file mprintf.c.

◆ curl_msnprintf()

int curl_msnprintf ( char *  buffer,
size_t  maxlength,
const char *  format,
  ... 
)

Definition at line 1017 of file mprintf.c.

◆ curl_msprintf()

int curl_msprintf ( char *  buffer,
const char *  format,
  ... 
)

Definition at line 1124 of file mprintf.c.

◆ curl_mvaprintf()

char* curl_mvaprintf ( const char *  format,
va_list  ap_save 
)

Definition at line 1091 of file mprintf.c.

◆ curl_mvfprintf()

int curl_mvfprintf ( FILE *  whereto,
const char *  format,
va_list  ap_save 
)

Definition at line 1169 of file mprintf.c.

◆ curl_mvprintf()

int curl_mvprintf ( const char *  format,
va_list  ap_save 
)

Definition at line 1164 of file mprintf.c.

◆ curl_mvsnprintf()

int curl_mvsnprintf ( char *  buffer,
size_t  maxlength,
const char *  format,
va_list  ap_save 
)

Definition at line 995 of file mprintf.c.

◆ curl_mvsprintf()

int curl_mvsprintf ( char *  buffer,
const char *  format,
va_list  ap_save 
)

Definition at line 1156 of file mprintf.c.

◆ dprintf_DollarString()

static long dprintf_DollarString ( char *  input,
char **  end 
)
static

Definition at line 177 of file mprintf.c.

◆ dprintf_formatf()

static int dprintf_formatf ( void *  data,
int(*)(int, FILE *)  stream,
const char *  format,
va_list  ap_save 
)
static

Definition at line 553 of file mprintf.c.

◆ dprintf_IsQualifierNoDollar()

static bool dprintf_IsQualifierNoDollar ( const char *  fmt)
static

Definition at line 192 of file mprintf.c.

◆ dprintf_Pass1()

static int dprintf_Pass1 ( const char *  format,
va_stack_t vto,
char **  endpos,
va_list  arglist 
)
static

Definition at line 226 of file mprintf.c.

◆ storebuffer()

static int storebuffer ( int  output,
FILE *  data 
)
static

Definition at line 1115 of file mprintf.c.

Variable Documentation

◆ lower_digits

const char lower_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"
static

Definition at line 95 of file mprintf.c.

◆ upper_digits

const char upper_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
static

Definition at line 98 of file mprintf.c.

data
Definition: debug.c:29
WHILE_FALSE
#define WHILE_FALSE
Definition: curl_setup_once.h:356


rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sun May 15 2022 02:25:02