diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-03-27 12:54:11 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-03-27 12:54:11 -0400 |
commit | 954a39edd99cc0a9d426fb48848fd5b1135fa65b (patch) | |
tree | 1fcb39b3294982fbb00c3e5f885c3d379048a2c4 /printf.h | |
parent | 4846e61080c575a67ebe9805a2332d8dd2b90555 (diff) | |
download | bfs-954a39edd99cc0a9d426fb48848fd5b1135fa65b.tar.xz |
parse: Highlight command line errors
Diffstat (limited to 'printf.h')
-rw-r--r-- | printf.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,6 +1,6 @@ /**************************************************************************** * bfs * - * Copyright (C) 2017-2020 Tavian Barnes <tavianator@tavianator.com> * + * Copyright (C) 2017-2022 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. * @@ -25,6 +25,7 @@ struct BFTW; struct bfs_ctx; +struct bfs_expr; /** * A printf command, the result of parsing a single format string. @@ -36,12 +37,14 @@ struct bfs_printf; * * @param ctx * The bfs context. + * @param expr + * The expression to fill in. * @param format * The format string to parse. * @return - * The parsed printf command, or NULL on failure. + * 0 on success, -1 on failure. */ -struct bfs_printf *bfs_printf_parse(const struct bfs_ctx *ctx, const char *format); +int bfs_printf_parse(const struct bfs_ctx *ctx, struct bfs_expr *expr, const char *format); /** * Evaluate a parsed format string. |