tgrekov-fdf
HIVE fdf May 2024
Loading...
Searching...
No Matches
string.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* string.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/01 08:25:24 by tgrekov #+# #+# */
/* Updated: 2024/04/26 10:29:57 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file string.c.

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

Go to the source code of this file.

Functions

static int process_string (t_sequence seq, int *fd, int total)
 Process the string specifier by writing the string. (Rocket science)
 
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.
 

Function Documentation

◆ pre_string()

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.

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

Definition at line 50 of file string.c.

◆ process_string()

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

Process the string specifier by writing the string. (Rocket science)

Parameters
[in]seq
[in]fd
[in]total(Unused)
Return values
intOutput of write

Definition at line 34 of file string.c.

References s_sequence::data, s_sequence::pad_len, and s_sequence::total_len.

Here is the caller graph for this function: