tgrekov-ft_printf
HIVE printf Feb 2024
Loading...
Searching...
No Matches
uint.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* uint.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/01 06:50:06 by tgrekov #+# #+# */
/* Updated: 2024/02/13 08:17:50 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file uint.c.

#include <stdarg.h>
#include <unistd.h>
#include "../sequence.h"
#include "../../utils/utils.h"
#include "../../utils/internal_types.h"
#include "utils/handler_utils.h"
Include dependency graph for uint.c:

Go to the source code of this file.

Functions

int process_uint (t_sequence seq, int *fd, int total)
 Processes the unsigned integer specifier by printing the number in base 10.
 
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.
 

Function Documentation

◆ pre_uint()

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.

Parameters
[in,out]args
[in,out]seq

Definition at line 54 of file uint.c.

◆ process_uint()

int process_uint ( t_sequence  seq,
int *  fd,
int  total 
)

Processes the unsigned integer specifier by printing the number in base 10.

Parameters
[in]seq
[in]fd
[in]total(Unused)
Return values
intReturn value of u_print_base

Definition at line 36 of file uint.c.

Here is the caller graph for this function: