]> git.notmuchmail.org Git - notmuch/blobdiff - test/hex-xcode.c
lib/database: delete stemmer on destroy
[notmuch] / test / hex-xcode.c
index bc2df713b2a3bec99ff49ad03f86e0c437ac7e23..2e70f737fa1c2346ab59d628cd3f8645bf90789e 100644 (file)
@@ -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)
@@ -26,13 +26,13 @@ xcode (void *ctx, enum direction dir, char *in, char **buf_p, size_t *size_p)
     if (dir == ENCODE)
        status = hex_encode (ctx, in, buf_p, size_p);
     else
-       if (inplace) {
-           status = hex_decode_inplace (in);
-           *buf_p = in;
-           *size_p = strlen(in);
-       } else {
-           status = hex_decode (ctx, in, buf_p, size_p);
-       }
+    if (inplace) {
+       status = hex_decode_inplace (in);
+       *buf_p = in;
+       *size_p = strlen (in);
+    } else {
+       status = hex_decode (ctx, in, buf_p, size_p);
+    }
 
     if (status == HEX_SUCCESS)
        fputs (*buf_p, stdout);
@@ -45,13 +45,13 @@ main (int argc, char **argv)
 {
 
     int dir = DECODE;
-    int omit_newline = FALSE;
+    bool omit_newline = false;
 
     notmuch_opt_desc_t options[] = {
        { .opt_keyword = &dir, .name = "direction", .keywords =
-         (notmuch_keyword_t []){ { "encode", ENCODE },
-                                 { "decode", DECODE },
-                                 { 0, 0 } } },
+             (notmuch_keyword_t []){ { "encode", ENCODE },
+                                     { "decode", DECODE },
+                                     { 0, 0 } } },
        { .opt_bool = &omit_newline, .name = "omit-newline" },
        { .opt_bool = &inplace, .name = "in-place" },
        { }
@@ -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)