tgrekov-ft_printf
HIVE printf Feb 2024
|
Definition in file handlers.h.
Go to the source code of this file.
Functions | |
void | pre_char (va_list args, t_sequence *seq) |
Preprocess the character specifier by retrieving the character, setting s_sequence::total_len to 1 and s_sequence::process to process_char. | |
void | pre_int (va_list args, t_sequence *seq) |
Preprocess the signed integer specifier by retrieving the argument in the appropriate size, setting s_sequence::sign to - if the number was negative, converting it from signed to unsigned, setting the s_sequence::total_len with u_len_base(nbr, 10) and the s_subspec::precision, ensuring that s_subspec::pad_str is set to spaces if the s_subspec::precision is set, setting s_sequence::sign to s_subspec::forced_sign if it was not already set to - , and setting the s_sequence::process to process_uint. | |
void | pre_percent (va_list args, t_sequence *seq) |
Preprocess the percent specifier by setting s_sequence::data to % , s_sequence::total_len to 1 , and s_sequence::process to process_char. | |
void | pre_ptr (va_list args, t_sequence *seq) |
Preprocess the pointer specifier by retrieving the address, setting the s_sequence::total_len with u_len_base(ptr, 16), setting the prefix to 0x , and setting the s_sequence::process to process_uhex. | |
void | pre_set_fd (va_list args, t_sequence *seq) |
Preprocess the set file descriptor specifier by retrieving the argument, ensuring that s_subspec::min_width is 0 , and setting s_sequence::process to process_set_fd. | |
void | pre_store (va_list args, t_sequence *seq) |
Preprocess the store specifier by retrieving the address argument in the appropriate size dependent on the length modifier, ensuring that s_subspec::min_width is 0 , and setting s_sequence::process to process_store. | |
void | pre_string (va_list args, t_sequence *seq) |
Preprocess the string specifier by retrieving the address, setting s_sequence::data to the address, or to "(null)" if it is null, setting s_sequence::total_len to the length of the string or the s_subspec::precision, if it is specified and less than the length, and setting s_sequence::process to process_string. | |
void | pre_uhex (va_list args, t_sequence *seq) |
Preprocess the unsigned hexadecimal specifier by retrieving the argument in the appropriate size, setting the s_sequence::total_len with u_len_base(nbr, 16) and the s_subspec::precision, ensuring that s_subspec::pad_str is set to spaces if the s_subspec::precision is set, setting s_sequence::sign to 0x or 0X if s_subspec::force_decimal is set and the retrieved value is non-zero, and setting the s_sequence::process to process_uhex. | |
void | pre_uint (va_list args, t_sequence *seq) |
Preprocess the unsigned integer specifier by retrieving the argument in the appropriate size, setting the s_sequence::total_len with u_len_base(nbr, 10) and the s_subspec::precision, ensuring that s_subspec::pad_str is set to spaces if the s_subspec::precision is set, and setting the s_sequence::process to process_uint. | |
void | pre_uoct (va_list args, t_sequence *seq) |
Preprocess the unsigned octal specifier by retrieving the argument in the appropriate size, setting the s_sequence::total_len with u_len_base(nbr, 8) and the s_subspec::precision, ensuring that s_subspec::pad_str is set to spaces if the s_subspec::precision is set, setting s_sequence::sign to 0 if s_subspec::force_decimal is set and the retrieved value is non-zero, and setting the s_sequence::process to process_uoct. | |
void pre_char | ( | va_list | args, |
t_sequence * | seq | ||
) |
Preprocess the character specifier by retrieving the character, setting s_sequence::total_len to 1 and s_sequence::process to process_char.
[in,out] | args | |
[in,out] | seq |
void pre_int | ( | va_list | args, |
t_sequence * | seq | ||
) |
Preprocess the signed integer specifier by retrieving the argument in the appropriate size, setting s_sequence::sign to -
if the number was negative, converting it from signed to unsigned, setting the s_sequence::total_len with u_len_base(nbr, 10) and the s_subspec::precision, ensuring that s_subspec::pad_str is set to spaces if the s_subspec::precision is set, setting s_sequence::sign to s_subspec::forced_sign if it was not already set to -
, and setting the s_sequence::process to process_uint.
[in,out] | args | |
[in,out] | seq |
Definition at line 88 of file int.c.
References s_sequence::data, s_subspec::forced_sign, s_subspec::lenmod, lltull(), s_subspec::pad_str, s_subspec::precision, s_sequence::process, process_uint(), s_sequence::sign, signed_arg(), s_sequence::subspec, s_sequence::total_len, and u_len_base().
void pre_percent | ( | va_list | args, |
t_sequence * | seq | ||
) |
Preprocess the percent specifier by setting s_sequence::data to %
, s_sequence::total_len to 1
, and s_sequence::process to process_char.
[in] | args | (Unused) |
[in,out] | seq |
Definition at line 35 of file percent.c.
References s_sequence::data, s_sequence::process, process_char(), and s_sequence::total_len.
void pre_ptr | ( | va_list | args, |
t_sequence * | seq | ||
) |
Preprocess the pointer specifier by retrieving the address, setting the s_sequence::total_len with u_len_base(ptr, 16), setting the prefix to 0x
, and setting the s_sequence::process to process_uhex.
[in,out] | args | |
[in,out] | seq |
Definition at line 38 of file pointer.c.
References s_sequence::data, s_sequence::process, process_uhex(), s_sequence::sign, s_sequence::total_len, and u_len_base().
void pre_set_fd | ( | va_list | args, |
t_sequence * | seq | ||
) |
Preprocess the set file descriptor specifier by retrieving the argument, ensuring that s_subspec::min_width is 0
, and setting s_sequence::process to process_set_fd.
[in,out] | args | |
[in,out] | seq |
Definition at line 49 of file set_fd.c.
References s_sequence::data, s_subspec::min_width, s_sequence::process, process_set_fd(), and s_sequence::subspec.
void pre_store | ( | va_list | args, |
t_sequence * | seq | ||
) |
Preprocess the store specifier by retrieving the address argument in the appropriate size dependent on the length modifier, ensuring that s_subspec::min_width is 0
, and setting s_sequence::process to process_store.
args | |
seq |
Definition at line 69 of file store.c.
References s_sequence::data, s_subspec::lenmod, s_subspec::min_width, s_sequence::process, process_store(), and s_sequence::subspec.
void pre_string | ( | va_list | args, |
t_sequence * | seq | ||
) |
Preprocess the string specifier by retrieving the address, setting s_sequence::data to the address, or to "(null)"
if it is null, setting s_sequence::total_len to the length of the string or the s_subspec::precision, if it is specified and less than the length, and setting s_sequence::process to process_string.
[in,out] | args | |
[in,out] | seq |
Definition at line 50 of file string.c.
References s_sequence::data, ft_strlen(), s_subspec::precision, s_sequence::process, process_string(), s_sequence::subspec, and s_sequence::total_len.
void pre_uhex | ( | va_list | args, |
t_sequence * | seq | ||
) |
Preprocess the unsigned hexadecimal specifier by retrieving the argument in the appropriate size, setting the s_sequence::total_len with u_len_base(nbr, 16) and the s_subspec::precision, ensuring that s_subspec::pad_str is set to spaces if the s_subspec::precision is set, setting s_sequence::sign to 0x
or 0X
if s_subspec::force_decimal is set and the retrieved value is non-zero, and setting the s_sequence::process to process_uhex.
[in,out] | args | |
[in,out] | seq |
Definition at line 58 of file uhex.c.
References s_sequence::data, s_subspec::force_decimal, s_subspec::lenmod, s_subspec::pad_str, s_subspec::precision, s_sequence::process, process_uhex(), s_sequence::sign, s_sequence::specifier, s_sequence::subspec, s_sequence::total_len, u_len_base(), and unsigned_arg().
void pre_uint | ( | va_list | args, |
t_sequence * | seq | ||
) |
Preprocess the unsigned integer specifier by retrieving the argument in the appropriate size, setting the s_sequence::total_len with u_len_base(nbr, 10) and the s_subspec::precision, ensuring that s_subspec::pad_str is set to spaces if the s_subspec::precision is set, and setting the s_sequence::process to process_uint.
[in,out] | args | |
[in,out] | seq |
Definition at line 54 of file uint.c.
References s_sequence::data, s_subspec::lenmod, s_subspec::pad_str, s_subspec::precision, s_sequence::process, process_uint(), s_sequence::subspec, s_sequence::total_len, u_len_base(), and unsigned_arg().
void pre_uoct | ( | va_list | args, |
t_sequence * | seq | ||
) |
Preprocess the unsigned octal specifier by retrieving the argument in the appropriate size, setting the s_sequence::total_len with u_len_base(nbr, 8) and the s_subspec::precision, ensuring that s_subspec::pad_str is set to spaces if the s_subspec::precision is set, setting s_sequence::sign to 0
if s_subspec::force_decimal is set and the retrieved value is non-zero, and setting the s_sequence::process to process_uoct.
[in,out] | args | |
[in,out] | seq |
Definition at line 55 of file uoct.c.
References s_sequence::data, s_subspec::force_decimal, s_subspec::lenmod, s_subspec::pad_str, s_subspec::precision, s_sequence::process, process_uoct(), s_sequence::sign, s_sequence::subspec, s_sequence::total_len, u_len_base(), and unsigned_arg().