]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
get_processed_text_line: use stdbool
authorBaptiste Daroussin <bapt@FreeBSD.org>
Sun, 12 Feb 2023 21:31:09 +0000 (22:31 +0100)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Sun, 12 Feb 2023 21:31:09 +0000 (22:31 +0100)
include/prepstdreply.h
src/prepstdreply.c
src/send_digest.c

index f570677119322d2e1dedd82524c190a55086725c..4d15c8b077d1fd664d17427c3bce9f8878903fa4 100644 (file)
@@ -61,7 +61,7 @@ void register_unformatted(text *txt, const char *token, const char *subst);
 void register_originalmail(text *txt, const char *mailname);
 void register_formatted(text *txt, const char *token,
                rewind_function rew, get_function get, void * state);
-char *get_processed_text_line(text *txt, int headers, struct ml *ml);
+char *get_processed_text_line(text *txt, bool headers, struct ml *ml);
 bool prepstdreply_to(text *txt, struct ml *ml,
                const char *from, const char *to, const char *replyto, int tofd, const char *messageid);
 char *prepstdreply(text *txt, struct ml *ml,
index 25d8e0ca04b6c5bd703ec1ec8bdf9a127723f20a..316a9c8d3e8610c81aeff9fbb10839109cc5000c 100644 (file)
@@ -997,7 +997,7 @@ static int handle_directive(text *txt, char **line_p, char **pos_p,
 }
 
 
-char *get_processed_text_line(text *txt, int headers, struct ml *ml)
+char *get_processed_text_line(text *txt, bool headers, struct ml *ml)
 {
        char *line;
        const char *item;
@@ -1537,7 +1537,7 @@ prepstdreply_to(text *txt, struct ml *ml, const char *from, const char *to,
        }
 
        for(;;) {
-               line = get_processed_text_line(txt, 1, ml);
+               line = get_processed_text_line(txt, true, ml);
                if (!line) {
                        log_error(LOG_ARGS, "No body in listtext");
                        break;
@@ -1615,7 +1615,7 @@ prepstdreply_to(text *txt, struct ml *ml, const char *from, const char *to,
        }
 
        if (line == NULL) {
-               line = get_processed_text_line(txt, 0, ml);
+               line = get_processed_text_line(txt, false, ml);
        }
        while(line) {
                        if(dprintf(tofd, "%s\n", line) < 0) {
@@ -1624,7 +1624,7 @@ prepstdreply_to(text *txt, struct ml *ml, const char *from, const char *to,
                                goto freeandreturn;
                        }
                free(line);
-               line = get_processed_text_line(txt, 0, ml);
+               line = get_processed_text_line(txt, false, ml);
        }
 
        fsync(tofd);
index 8291bcc2493085daaf0ae14efd562b56859b9c1b..0f6f2595c842a892c8385349e6dcab2cd964d021 100644 (file)
@@ -301,7 +301,7 @@ int send_digest(struct ml *ml, int firstindex, int lastindex,
        register_formatted(txt, "digestthreads", rewind_thread_list,
                        get_thread_list_line, tls);
 
-       line = get_processed_text_line(txt, 1, ml);
+       line = get_processed_text_line(txt, true, ml);
 
        if (line == NULL) {
                log_error(LOG_ARGS, "No content in digest listtext");
@@ -328,7 +328,7 @@ int send_digest(struct ml *ml, int firstindex, int lastindex,
                free(line);
 
                /* Skip the empty line after the subject */
-               line = get_processed_text_line(txt, 1, ml);
+               line = get_processed_text_line(txt, true, ml);
                if (line == NULL || *line != '\0') {
                        log_error(LOG_ARGS, "Too many headers "
                                        "in digest listtext");
@@ -413,7 +413,7 @@ errdighdrs:
                }
 
                for (;;) {
-                       line = get_processed_text_line(txt, 0, ml);
+                       line = get_processed_text_line(txt, false, ml);
                        if (line == NULL) break;
                        if(dprintf(fd, "%s\n", line) < 0) {
                                free(line);