diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-09-27 12:55:55 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-09-27 13:23:49 -0400 |
commit | 62bbbe1a4165f63b31c68b1595ecb0e67d7af3dc (patch) | |
tree | c770ff13f37023cae132108b29077a904e6d4dfb /printf.h | |
parent | 3c83bf4e1920be909f65945e56dc8b779c472a59 (diff) |
Rename struct cmdline to bfs_ctx
The API remains similar, with some added accessor functions for lazy
initialization of the pwcache and mtab.
Diffstat (limited to 'printf.h')
-rw-r--r-- | printf.h | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1,6 +1,6 @@ /**************************************************************************** * bfs * - * Copyright (C) 2017-2019 Tavian Barnes <tavianator@tavianator.com> * + * Copyright (C) 2017-2020 Tavian Barnes <tavianator@tavianator.com> * * * * Permission to use, copy, modify, and/or distribute this software for any * * purpose with or without fee is hereby granted. * @@ -22,7 +22,7 @@ #define BFS_PRINTF_H #include "bftw.h" -#include "cmdline.h" +#include "ctx.h" #include <stdbool.h> #include <stdio.h> @@ -36,11 +36,12 @@ struct bfs_printf; * * @param format * The format string to parse. - * @param cmdline - * The command line. - * @return The parsed printf command, or NULL on failure. + * @param ctx + * The bfs context. + * @return + * The parsed printf command, or NULL on failure. */ -struct bfs_printf *parse_bfs_printf(const char *format, struct cmdline *cmdline); +struct bfs_printf *parse_bfs_printf(const char *format, struct bfs_ctx *ctx); /** * Evaluate a parsed format string. @@ -52,7 +53,8 @@ struct bfs_printf *parse_bfs_printf(const char *format, struct cmdline *cmdline) * @param ftwbuf * The bftw() data for the current file. If needs_stat is true, statbuf * must be non-NULL. - * @return 0 on success, -1 on failure. + * @return + * 0 on success, -1 on failure. */ int bfs_printf(FILE *file, const struct bfs_printf *command, const struct BFTW *ftwbuf); |