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

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pointer.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/01 08:38:51 by tgrekov #+# #+# */
/* Updated: 2024/02/13 07:35:14 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file pointer.c.

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

Go to the source code of this file.

Functions

int process_uhex (t_sequence seq, int *fd, int total)
 Process the unsigned octal specifier by printing the number in uppercase or lowercase base 16 depending on whether s_sequence::specifier is x or X.
 
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.
 

Function Documentation

◆ pre_ptr()

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.

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

Definition at line 38 of file pointer.c.

◆ process_uhex()

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

Process the unsigned octal specifier by printing the number in uppercase or lowercase base 16 depending on whether s_sequence::specifier is x or X.

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

Definition at line 37 of file uhex.c.

References s_sequence::specifier, and u_print_base().

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