#include <stdbool.h>
#include <stdarg.h>
Go to the source code of this file.
|
int | x_putc (char c, bool newline) |
| put c to stdout
|
|
int | x_puts (const char *str, bool newline) |
| put str to stdout (nothing if str = 0)
|
|
int | x_printf (const char *format,...) |
| put a formated string to stdout (nothing if format = 0)
|
|
char * | x_sprintf (const char *format,...) |
| like printf but not output the string to stdout, put it in a string
|
|
char * | x_vsprintf (const char *format, va_list ap) |
| same as x_sprintf but take a va_list
|
|
int | x_putsd (int fd, const char *str, bool newline) |
| Print to fd the str and put newline if bool true.
|
|
int | x_putcd (int fd, char c, bool newline) |
| Print to fd the c and put newline if bool true.
|
|
int | x_dprintf (int fd, const char *format,...) |
| Print to fd the str format and put newline if bool true.
|
|
◆ x_dprintf()
int x_dprintf |
( |
int |
fd, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
Print to fd the str format and put newline if bool true.
- Parameters
-
fd | file descriptor |
format | format as printf |
... | |
- Returns
- number of character put
◆ x_printf()
int x_printf |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
put a formated string to stdout (nothing if format
= 0)
in formated string: va arg: output %% : (nothing) : % d : int : (the number) i : int : (the number) x : int : (the number in hexa lower case) X : int : (the number in hexa upper case) s : char * : (the string) c : char : (the character) p : void * : (the ptr address in hexa lower case)
- Parameters
-
format | formated string |
... | (va arg) |
- Returns
◆ x_putc()
int x_putc |
( |
char |
c, |
|
|
bool |
newline |
|
) |
| |
put c
to stdout
- Parameters
-
c | character to put |
newline | if put a newline after c |
- Returns
- number of character put
◆ x_putcd()
int x_putcd |
( |
int |
fd, |
|
|
char |
c, |
|
|
bool |
newline |
|
) |
| |
Print to fd the c and put newline if bool true.
- Parameters
-
fd | file descriptor |
c | character |
newline | put newline ? |
- Returns
- number of character put
◆ x_puts()
int x_puts |
( |
const char * |
str, |
|
|
bool |
newline |
|
) |
| |
put str
to stdout (nothing if str
= 0)
- Parameters
-
str | string to put |
newline | if put a newline after str |
- Returns
- number of character put
◆ x_putsd()
int x_putsd |
( |
int |
fd, |
|
|
const char * |
str, |
|
|
bool |
newline |
|
) |
| |
Print to fd the str and put newline if bool true.
- Parameters
-
fd | file descriptor |
str | string |
newline | need to put newline ? |
- Returns
- number of character put
◆ x_sprintf()
char * x_sprintf |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
like printf but not output the string to stdout, put it in a string
same format as x_printf()
- Parameters
-
- Returns
- NULL if
format
= 0;; the string formated
◆ x_vsprintf()
char * x_vsprintf |
( |
const char * |
format, |
|
|
va_list |
ap |
|
) |
| |
same as x_sprintf but take a va_list
same format as x_printf()
- Parameters
-
- Returns
- NULL if
format
= 0;; the string formated