doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Enumerations | Functions
mprintf.c File Reference
#include "setup.h"
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
#include <string.h>
#include <curl/mprintf.h>

Go to the source code of this file.

Classes

struct  va_stack_t
 
struct  nsprintf
 
struct  asprintf
 

Macros

#define SIZEOF_LONG_DOUBLE   0
 
#define BUFFSIZE   256 /* buffer for long-to-str and float-to-str calcs */
 
#define MAX_PARAMETERS   128 /* lame static limit */
 
#define TRUE   ((char)(1 == 1))
 
#define FALSE   ((char)(0 == 1))
 
#define BOOL   char
 
#define OUTCHAR(x)   done+=(stream(x, (FILE *)data)==-1?0:1)
 

Enumerations

enum  FormatType {
  FORMAT_UNKNOWN = 0, FORMAT_STRING, FORMAT_PTR, FORMAT_INT,
  FORMAT_INTPTR, FORMAT_LONG, FORMAT_LONGLONG, FORMAT_DOUBLE,
  FORMAT_LONGDOUBLE, FORMAT_WIDTH
}
 
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
}
 

Functions

int curl_msprintf (char *buffer, const char *format,...)
 
int curl_mvsnprintf (char *buffer, size_t maxlength, const char *format, va_list ap_save)
 
int curl_msnprintf (char *buffer, size_t maxlength, const char *format,...)
 
char * curl_maprintf (const char *format,...)
 
char * curl_mvaprintf (const char *format, va_list ap_save)
 
int fputc (int, FILE *)
 
int curl_mprintf (const char *format,...)
 
int curl_mfprintf (FILE *whereto, const char *format,...)
 
int curl_mvsprintf (char *buffer, const char *format, va_list ap_save)
 
int curl_mvprintf (const char *format, va_list ap_save)
 
int curl_mvfprintf (FILE *whereto, const char *format, va_list ap_save)
 

Macro Definition Documentation

#define BOOL   char

Definition at line 71 of file mprintf.c.

#define BUFFSIZE   256 /* buffer for long-to-str and float-to-str calcs */

Definition at line 58 of file mprintf.c.

#define FALSE   ((char)(0 == 1))

Definition at line 70 of file mprintf.c.

#define MAX_PARAMETERS   128 /* lame static limit */

Definition at line 59 of file mprintf.c.

#define OUTCHAR (   x)    done+=(stream(x, (FILE *)data)==-1?0:1)

Definition at line 81 of file mprintf.c.

#define SIZEOF_LONG_DOUBLE   0

Definition at line 44 of file mprintf.c.

#define TRUE   ((char)(1 == 1))

Definition at line 69 of file mprintf.c.

Enumeration Type Documentation

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 98 of file mprintf.c.

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 84 of file mprintf.c.

Function Documentation

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

Definition at line 1052 of file mprintf.c.

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

Definition at line 1135 of file mprintf.c.

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

Definition at line 1125 of file mprintf.c.

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

Definition at line 1011 of file mprintf.c.

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

Definition at line 1110 of file mprintf.c.

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

Definition at line 1078 of file mprintf.c.

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

Definition at line 1158 of file mprintf.c.

int curl_mvprintf ( const char *  format,
va_list  ap_save 
)

Definition at line 1153 of file mprintf.c.

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

Definition at line 989 of file mprintf.c.

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

Definition at line 1145 of file mprintf.c.

int fputc ( int  ,
FILE *   
)