Date: Fri, 6 Sep 2024 18:35:16 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 6e6da538988a - main - wc: Add version information to libxo output Message-ID: <202409061835.486IZG5i010975@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6e6da538988a5edb5cc7437f8a8647a350800724 commit 6e6da538988a5edb5cc7437f8a8647a350800724 Author: Bram <bram@cbbg.nl> AuthorDate: 2024-07-26 19:36:18 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-09-06 18:34:31 +0000 wc: Add version information to libxo output Add version information to libxo output so that libxo content consumers can track changes. Reviewed by: imp, markj Pull Request: https://github.com/freebsd/freebsd-src/pull/1350 --- usr.bin/wc/wc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/wc/wc.c b/usr.bin/wc/wc.c index 4e8a2d8a8b59..7b83412f3c42 100644 --- a/usr.bin/wc/wc.c +++ b/usr.bin/wc/wc.c @@ -51,6 +51,8 @@ #include <libcasper.h> #include <casper/cap_fileargs.h> +#define WC_XO_VERSION "1" + static const char *stdin_filename = "stdin"; static fileargs_t *fa; @@ -132,6 +134,8 @@ main(int argc, char *argv[]) doline = doword = dochar = true; stderr_handle = xo_create_to_file(stderr, XO_STYLE_TEXT, 0); + + xo_set_version(WC_XO_VERSION); xo_open_container("wc"); xo_open_list("file");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409061835.486IZG5i010975>