tgrekov-pipex
HIVE pipex May 2024
Loading...
Searching...
No Matches
store.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* store.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/16 18:18:34 by tgrekov #+# #+# */
/* Updated: 2024/02/13 08:47:35 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file store.c.

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

Go to the source code of this file.

Functions

static int process_store (t_sequence seq, int *fd, int total)
 Processes the store specifier by setting the value at the retrieved address to the number of characters written so far in the appropriate size dependent on the length modifier.
 
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.
 

Function Documentation

◆ pre_store()

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.

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

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

◆ process_store()

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

Processes the store specifier by setting the value at the retrieved address to the number of characters written so far in the appropriate size dependent on the length modifier.

Parameters
[in]seq
[in]fd(Unused)
[in]total
Return values
int-1 if the retrieved address is null, otherwise 0

Definition at line 36 of file store.c.

References s_sequence::data, s_subspec::lenmod, and s_sequence::subspec.

Here is the caller graph for this function: