From 09119a3e8fa5f206eb4254144a1c8e77bc6e587e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 4 May 2019 11:51:56 -0400 Subject: bftw: Add a caching stat() API to struct BFTW --- printf.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'printf.h') diff --git a/printf.h b/printf.h index 1c3957e..d62770e 100644 --- a/printf.h +++ b/printf.h @@ -1,6 +1,6 @@ /**************************************************************************** * bfs * - * Copyright (C) 2017-2018 Tavian Barnes * + * Copyright (C) 2017-2019 Tavian Barnes * * * * Permission to use, copy, modify, and/or distribute this software for any * * purpose with or without fee is hereby granted. * @@ -22,22 +22,14 @@ #define BFS_PRINTF_H #include "bftw.h" -#include "color.h" +#include "cmdline.h" #include #include -struct cmdline; -struct bfs_printf_directive; - /** * A printf command, the result of parsing a single format string. */ -struct bfs_printf { - /** The chain of printf directives. */ - struct bfs_printf_directive *directives; - /** Whether the struct bfs_stat must be filled in. */ - bool needs_stat; -}; +struct bfs_printf; /** * Parse a -printf format string. @@ -62,7 +54,7 @@ struct bfs_printf *parse_bfs_printf(const char *format, struct cmdline *cmdline) * must be non-NULL. * @return 0 on success, -1 on failure. */ -int bfs_printf(FILE *file, const struct bfs_printf *command, const struct BFTW *ftwbuf); +int bfs_printf(FILE *file, const struct bfs_printf *command, struct BFTW *ftwbuf); /** * Free a parsed format string. -- cgit v1.2.3