X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Fhex-xcode.c;h=33046e9a51785378d5f5003469941f1f428a2755;hp=65d49564a3e1369f546d8b55102c5affbdcb9c29;hb=cd8006886b1c80ff556a96f1e84e3d3914067a54;hpb=4216e830e9a372fa45f482dd710e7ecc2af212ca diff --git a/test/hex-xcode.c b/test/hex-xcode.c index 65d49564..33046e9a 100644 --- a/test/hex-xcode.c +++ b/test/hex-xcode.c @@ -16,7 +16,7 @@ enum direction { DECODE }; -static int inplace = FALSE; +static bool inplace = false; static int xcode (void *ctx, enum direction dir, char *in, char **buf_p, size_t *size_p) @@ -44,17 +44,17 @@ int main (int argc, char **argv) { - enum direction dir = DECODE; - int omit_newline = FALSE; + int dir = DECODE; + bool omit_newline = false; notmuch_opt_desc_t options[] = { - { NOTMUCH_OPT_KEYWORD, &dir, "direction", 'd', + { .opt_keyword = &dir, .name = "direction", .keywords = (notmuch_keyword_t []){ { "encode", ENCODE }, { "decode", DECODE }, { 0, 0 } } }, - { NOTMUCH_OPT_BOOLEAN, &omit_newline, "omit-newline", 'n', 0 }, - { NOTMUCH_OPT_BOOLEAN, &inplace, "in-place", 'i', 0 }, - { 0, 0, 0, 0, 0 } + { .opt_bool = &omit_newline, .name = "omit-newline" }, + { .opt_bool = &inplace, .name = "in-place" }, + { } }; int opt_index = parse_arguments (argc, argv, options, 1); @@ -71,7 +71,7 @@ main (int argc, char **argv) char *buffer = NULL; size_t buf_size = 0; - notmuch_bool_t read_stdin = TRUE; + bool read_stdin = true; for (; opt_index < argc; opt_index++) { @@ -82,7 +82,7 @@ main (int argc, char **argv) if (! omit_newline) putchar ('\n'); - read_stdin = FALSE; + read_stdin = false; } if (! read_stdin)