tgrekov-ft_printf
HIVE printf Feb 2024
Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* utils.h :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2023/12/16 17:32:00 by tgrekov #+# #+# */
9/* Updated: 2024/02/13 06:29:06 by tgrekov ### ########.fr */
10/* */
11/* ************************************************************************** */
12
20#ifndef UTILS_H
21# define UTILS_H
22
23# include "internal_types.h"
24
25int u_len_base(t_ubiggest n, int base);
26int u_put_base(t_ubiggest n, char *base, int fd);
27int repeat_str_n(const char *str, int n, int fd);
28int wrap_err(int n, int *total);
29
30#endif
unsigned long long t_ubiggest
Convenience typedef for largest unsigned type I need to handle.
int repeat_str_n(const char *str, int n, int fd)
Write exactly n characters from str on descriptor fd. Repeats string if ft_strlen(str) is greater tha...
int wrap_err(int n, int *total)
Wrapper for handling functions that return a positive integer on success and -1 on failure....
Definition wrap_err.c:29
int u_put_base(t_ubiggest n, char *base, int fd)
Write unsigned number n on descriptor fd in base base.
Definition u_put_base.c:49
int u_len_base(t_ubiggest n, int base)
Determine the length of unsigned number n in base base.
Definition u_len_base.c:29