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

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* set_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/16 17:58:03 by tgrekov #+# #+# */
/* Updated: 2024/02/13 07:56:48 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file set_fd.c.

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

Go to the source code of this file.

Functions

static int process_set_fd (t_sequence seq, int *fd, int total)
 Processes the set file descriptor specifier by setting the file descriptor. (Phenomenal design)
 
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.
 

Function Documentation

◆ pre_set_fd()

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.

Parameters
[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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_set_fd()

static int process_set_fd ( t_sequence  seq,
int *  fd,
int  total 
)
static

Processes the set file descriptor specifier by setting the file descriptor. (Phenomenal design)

Parameters
[in]seq
[in,out]fd
[in]total(Unused)
Return values
intAlways 0

Definition at line 34 of file set_fd.c.

References s_sequence::data.

Here is the caller graph for this function: