23#include "../sequence.h"
24#include "../../utils/utils.h"
25#include "../../utils/internal_types.h"
42 return ((
signed char) va_arg(args,
int));
44 return ((
short) va_arg(args,
int));
46 return (va_arg(args,
long));
48 return (va_arg(args,
long long));
50 return (va_arg(args, intmax_t));
52 return (va_arg(args,
size_t));
55 return (va_arg(args,
int));
int process_uint(t_sequence seq, int *fd, int total)
Processes the unsigned integer specifier by printing the number in base 10.
static t_ubiggest lltull(t_biggest n)
Safely converts a signed integer to an unsigned one.
void pre_int(va_list args, t_sequence *seq)
Preprocess the signed integer specifier by retrieving the argument in the appropriate size,...
static t_biggest signed_arg(va_list args, t_lenmod lenmod)
Retrieves the next signed variable argument in the appropriate size dependent on the length modifier.
long long t_biggest
Convenience typedef for largest signed type I need to handle.
#define T_BIGGEST_MAX
Largest value that fits in t_biggest.
unsigned long long t_ubiggest
Convenience typedef for largest unsigned type I need to handle.
long t_ptrdiff_t
If _PTRDIFF_T is defined, set to ptrdiff_t. Set to long otherwise.
int u_len_base(t_ubiggest n, int base)
Determine the length of unsigned number n in base base.
Holds information regarding the current format specifier sequence.
int(* process)(struct s_sequence, int *, int)
Function to use for processing this sequence's value.
t_ubiggest data
Retrieved variable argument.
t_subspec subspec
Holds subspecifier options for a format specifier.
int total_len
Total number of characters after padding.
char * sign
String containing the prefix for the value. Set during preprocessing for a format handler.
int precision
Minimum number of digits to be printed, or maximum characters for strings.
char * forced_sign
String to print before the value. Set before preprocessing for a format handler. Will be overriden,...
t_lenmod lenmod
Represents the length modifiers for a format specifier's variable argument.
char * pad_str
String used when padding values.
enum e_lenmod t_lenmod
Represents the length modifiers for a format specifier's variable argument.