diff options
| author | Jani Nikula <jani@nikula.org> | 2017-10-07 11:44:04 +0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-10-09 22:24:02 -0300 |
| commit | 0f314c0c99befea599a68bea51d759b4133efef6 (patch) | |
| tree | 6d7fa97122e87bf6dcdb221267ac052f48331f59 /gmime-filter-reply.c | |
| parent | 54aef071590cb23f61da943daa29080cf7446696 (diff) | |
cli: convert notmuch_bool_t to stdbool
C99 stdbool turned 18 this year. There really is no reason to use our
own, except in the library interface for backward
compatibility. Convert the cli and test binaries to stdbool.
Diffstat (limited to 'gmime-filter-reply.c')
| -rw-r--r-- | gmime-filter-reply.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/gmime-filter-reply.c b/gmime-filter-reply.c index 847426bf..a1ba4b45 100644 --- a/gmime-filter-reply.c +++ b/gmime-filter-reply.c @@ -16,6 +16,8 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <stdbool.h> + #include "gmime-filter-reply.h" /** @@ -87,8 +89,8 @@ static void g_mime_filter_reply_init (GMimeFilterReply *filter, GMimeFilterReplyClass *klass) { (void) klass; - filter->saw_nl = TRUE; - filter->saw_angle = FALSE; + filter->saw_nl = true; + filter->saw_angle = false; } static void @@ -117,43 +119,43 @@ filter_filter (GMimeFilter *filter, char *inbuf, size_t inlen, size_t prespace, (void) prespace; if (reply->encode) { - g_mime_filter_set_size (filter, 3 * inlen, FALSE); + g_mime_filter_set_size (filter, 3 * inlen, false); outptr = filter->outbuf; while (inptr < inend) { if (reply->saw_nl) { *outptr++ = '>'; *outptr++ = ' '; - reply->saw_nl = FALSE; + reply->saw_nl = false; } if (*inptr == '\n') - reply->saw_nl = TRUE; + reply->saw_nl = true; else - reply->saw_nl = FALSE; + reply->saw_nl = false; if (*inptr != '\r') *outptr++ = *inptr; inptr++; } } else { - g_mime_filter_set_size (filter, inlen + 1, FALSE); + g_mime_filter_set_size (filter, inlen + 1, false); outptr = filter->outbuf; while (inptr < inend) { if (reply->saw_nl) { if (*inptr == '>') - reply->saw_angle = TRUE; + reply->saw_angle = true; else *outptr++ = *inptr; - reply->saw_nl = FALSE; + reply->saw_nl = false; } else if (reply->saw_angle) { if (*inptr == ' ') ; else *outptr++ = *inptr; - reply->saw_angle = FALSE; + reply->saw_angle = false; } else if (*inptr != '\r') { if (*inptr == '\n') - reply->saw_nl = TRUE; + reply->saw_nl = true; *outptr++ = *inptr; } @@ -179,19 +181,19 @@ filter_reset (GMimeFilter *filter) { GMimeFilterReply *reply = (GMimeFilterReply *) filter; - reply->saw_nl = TRUE; - reply->saw_angle = FALSE; + reply->saw_nl = true; + reply->saw_angle = false; } /** * g_mime_filter_reply_new: - * @encode: %TRUE if the filter should encode or %FALSE otherwise + * @encode: %true if the filter should encode or %false otherwise * @dots: encode/decode dots (as for SMTP) * * Creates a new #GMimeFilterReply filter. * - * If @encode is %TRUE, then all lines will be prefixed by "> ", + * If @encode is %true, then all lines will be prefixed by "> ", * otherwise any lines starting with "> " will have that removed * * Returns: a new #GMimeFilterReply filter. |
