aboutsummaryrefslogtreecommitdiff
path: root/header.h
diff options
context:
space:
mode:
Diffstat (limited to 'header.h')
-rw-r--r--header.h39
1 files changed, 28 insertions, 11 deletions
diff --git a/header.h b/header.h
index 8c125bb..c770d35 100644
--- a/header.h
+++ b/header.h
@@ -31,16 +31,24 @@ typedef int t_bool;
typedef struct
{
- int ap_index;
- t_bool left_adjusted;
- t_bool zero_padding;
- int precision;
- t_bool precision_wildcard;
- int min_field_width;
- t_bool min_field_width_wildcard;
- t_conversion conversion;
- int len;
-} t_pformat;
+ int hardcoded;
+ struct
+ {
+ t_bool exist;
+ int ap_index;
+ } wildcard;
+} t_maybe_wildcard;
+
+typedef struct
+{
+ int ap_index;
+ t_bool left_adjusted;
+ t_bool zero_padding;
+ t_maybe_wildcard precision;
+ t_maybe_wildcard min_width;
+ t_conversion conversion;
+ int len;
+} t_pformat;
typedef struct s_list
{
@@ -82,7 +90,7 @@ void handle_precision(t_pformat *pformat, char *str);
** utils.c
*/
-int ft_atoi(const char *str);
+int ft_atoi(const char *str);
char *ft_strndup(const char *s1, int n);
char *ft_strrchr(const char *s, int c);
int strrchr_index(const char *s, char c);
@@ -90,6 +98,15 @@ int ft_strlen(char *str);
t_bool ft_isdigit(char c);
/*
+** extract.c
+*/
+
+char *extract_ap_index(t_pformat *pformat, char *fmt);
+char *extract_min_width(t_pformat *pformat, char *fmt);
+char *extract_standalone_flags(t_pformat *pformat, char *fmt);
+char *extract_precision(t_pformat *pformat, char *fmt);
+
+/*
** list.c
*/