NeoMutt  2025-12-11-980-ge38c27
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
rfc3676.h File Reference

RFC3676 Format Flowed routines. More...

#include <stdbool.h>
+ Include dependency graph for rfc3676.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int rfc3676_handler (struct Body *b_email, struct State *state)
 Handler for format=flowed - Implements handler_t -.
 
bool mutt_rfc3676_is_format_flowed (struct Body *b)
 Is the Email "format-flowed"?
 
void mutt_rfc3676_space_stuff (struct Email *e)
 Perform RFC3676 space stuffing on an Email.
 
void mutt_rfc3676_space_unstuff (struct Email *e)
 Remove RFC3676 space stuffing.
 
void mutt_rfc3676_space_unstuff_attachment (struct Body *b, const char *filename)
 Unstuff attachments.
 
void mutt_rfc3676_space_stuff_attachment (struct Body *b, const char *filename)
 Stuff attachments.
 

Detailed Description

RFC3676 Format Flowed routines.

Authors
  • Andreas Krennmair
  • Peter J. Holzer
  • Rocco Rutte
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file rfc3676.h.

Function Documentation

◆ mutt_rfc3676_is_format_flowed()

bool mutt_rfc3676_is_format_flowed ( struct Body * b)

Is the Email "format-flowed"?

Parameters
bEmail Body to examine
Return values
trueEmail is "format-flowed"

Definition at line 400 of file rfc3676.c.

401{
402 if (b && (b->type == TYPE_TEXT) && mutt_istr_equal("plain", b->subtype))
403 {
404 const char *format = mutt_param_get(&b->parameter, "format");
405 if (mutt_istr_equal("flowed", format))
406 return true;
407 }
408
409 return false;
410}
@ TYPE_TEXT
Type: 'text/*'.
Definition mime.h:38
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
Definition string.c:678
char * mutt_param_get(const struct ParameterList *pl, const char *s)
Find a matching Parameter.
Definition parameter.c:85
struct ParameterList parameter
Parameters of the content-type.
Definition body.h:63
char * subtype
content-type subtype
Definition body.h:61
unsigned int type
content-type primary type, ContentType
Definition body.h:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_rfc3676_space_stuff()

void mutt_rfc3676_space_stuff ( struct Email * e)

Perform RFC3676 space stuffing on an Email.

Parameters
eEmail
Note
We don't check the option $text_flowed because we want to stuff based the actual content type. The option only decides whether to set format=flowed on new messages.

Definition at line 492 of file rfc3676.c.

493{
494 if (!e || !e->body || !e->body->filename)
495 return;
496
499}
static void rfc3676_space_stuff(const char *filename, bool unstuff)
Perform required RFC3676 space stuffing.
Definition rfc3676.c:425
bool mutt_rfc3676_is_format_flowed(struct Body *b)
Is the Email "format-flowed"?
Definition rfc3676.c:400
char * filename
When sending a message, this is the file to which this structure refers.
Definition body.h:59
struct Body * body
List of MIME parts.
Definition email.h:69
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_rfc3676_space_unstuff()

void mutt_rfc3676_space_unstuff ( struct Email * e)

Remove RFC3676 space stuffing.

Parameters
eEmail

Definition at line 505 of file rfc3676.c.

506{
507 if (!e || !e->body || !e->body->filename)
508 return;
509
512}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_rfc3676_space_unstuff_attachment()

void mutt_rfc3676_space_unstuff_attachment ( struct Body * b,
const char * filename )

Unstuff attachments.

Parameters
bEmail Body (OPTIONAL)
filenameAttachment file

This routine is used when saving/piping/viewing rfc3676 attachments.

If b is provided, the function will verify that the Email is format-flowed. The filename will be unstuffed, not b->filename or b->fp.

Definition at line 524 of file rfc3676.c.

525{
526 if (!filename)
527 return;
528
530 return;
531
532 rfc3676_space_stuff(filename, true);
533}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_rfc3676_space_stuff_attachment()

void mutt_rfc3676_space_stuff_attachment ( struct Body * b,
const char * filename )

Stuff attachments.

Parameters
bEmail Body (OPTIONAL)
filenameAttachment file

This routine is used when filtering rfc3676 attachments.

If b is provided, the function will verify that the Email is format-flowed. The filename will be unstuffed, not b->filename or b->fp.

Definition at line 545 of file rfc3676.c.

546{
547 if (!filename)
548 return;
549
551 return;
552
553 rfc3676_space_stuff(filename, false);
554}
+ Here is the call graph for this function:
+ Here is the caller graph for this function: