From 954a39edd99cc0a9d426fb48848fd5b1135fa65b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 27 Mar 2022 12:54:11 -0400 Subject: parse: Highlight command line errors --- printf.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'printf.h') diff --git a/printf.h b/printf.h index eac97e6..a8c5f2a 100644 --- a/printf.h +++ b/printf.h @@ -1,6 +1,6 @@ /**************************************************************************** * bfs * - * Copyright (C) 2017-2020 Tavian Barnes * + * Copyright (C) 2017-2022 Tavian Barnes * * * * 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. -- cgit v1.2.3