printf_core.c File Reference

Printing functions. More...

#include <unistd.h>
#include <stdio.h>
#include <io/printf_core.h>
#include <ctype.h>
#include <str.h>

Go to the source code of this file.

Defines

#define __PRINTF_FLAG_BIGCHARS   0x00000080
 show big characters
#define __PRINTF_FLAG_LEFTALIGNED   0x00000010
 align to left
#define __PRINTF_FLAG_NEGATIVE   0x00000100
 number has - sign
#define __PRINTF_FLAG_PREFIX   0x00000001
 show prefixes 0x or 0
#define __PRINTF_FLAG_SHOWPLUS   0x00000020
 always show + sign
#define __PRINTF_FLAG_SIGNED   0x00000002
 signed / unsigned number
#define __PRINTF_FLAG_SPACESIGN   0x00000040
 print space instead of plus
#define __PRINTF_FLAG_ZEROPADDED   0x00000004
 print leading zeroes
#define PRINT_NUMBER_BUFFER_SIZE   (64 + 5)
 Buffer big enough for 64-bit number printed in base 2, sign, prefix and 0 to terminate string.

Enumerations

enum  qualifier_t
 Enumeration of possible arguments types.

Functions

static int print_char (const char ch, int width, uint32_t flags, printf_spec_t *ps)
 Print one formatted ASCII character.
static int print_number (uint64_t num, int width, int precision, int base, uint32_t flags, printf_spec_t *ps)
 Print a number in a given base.
static int print_str (char *str, int width, unsigned int precision, uint32_t flags, printf_spec_t *ps)
 Print string.
static int print_wchar (const wchar_t ch, int width, uint32_t flags, printf_spec_t *ps)
 Print one formatted wide character.
static int print_wstr (wchar_t *str, int width, unsigned int precision, uint32_t flags, printf_spec_t *ps)
 Print wide string.
int printf_core (const char *fmt, printf_spec_t *ps, va_list ap)
 Print formatted string.
static int printf_putchar (const char ch, printf_spec_t *ps)
 Print one ASCII character.
static int printf_putnchars (const char *buf, size_t size, printf_spec_t *ps)
 Print one or more characters without adding newline.
static int printf_putstr (const char *str, printf_spec_t *ps)
 Print string without adding a newline.
static int printf_putwchar (const wchar_t ch, printf_spec_t *ps)
 Print one wide character.
static int printf_wputnchars (const wchar_t *buf, size_t size, printf_spec_t *ps)
 Print one or more wide characters without adding newline.

Variables

static const char * digits_big = "0123456789ABCDEF"
static const char * digits_small = "0123456789abcdef"
static const char invalch = U_SPECIAL
static const char * nullstr = "(NULL)"


Detailed Description

Printing functions.

Definition in file printf_core.c.


Generated on Thu Jun 2 07:45:53 2011 for HelenOS/USB by  doxygen 1.4.7