secnote

The secnote tool.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/secnote

commit e568fb16456fa752574b31df0270e816081328a9
parent e29b3e3a80176aa4bb013df61b28d946ebc9b62a
Author: Joris Vink <joris@coders.se>
Date:   Wed, 15 Jun 2022 15:51:53 +0200

Add a version and -V flag.

Diffstat:
secnote.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/secnote.c b/secnote.c @@ -36,6 +36,8 @@ #include <bsd/bsd.h> #endif +#define VERSION "0.1" + #define FILE_TYPE_C 1 #define FILE_TYPE_PYTHON 2 @@ -181,7 +183,7 @@ main(int argc, char *argv[]) TAILQ_INIT(&ctx.topics); TAILQ_INIT(&vfy.topics); - while ((ch = getopt(argc, argv, "dfhlp:q:v:")) != -1) { + while ((ch = getopt(argc, argv, "dfhlp:q:v:V")) != -1) { switch (ch) { case 'd': ctx.db = 1; @@ -206,6 +208,9 @@ main(int argc, char *argv[]) case 'v': verify = optarg; break; + case 'V': + fatal("secnote %s", VERSION); + /* NOTREACHED */ case 'h': default: usage();