NeoMutt  2020-11-20
Teaching an old dog new tricks
DOXYGEN
format_flags.h File Reference

Flags to control mutt_expando_format() More...

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

Go to the source code of this file.

Macros

#define MUTT_FORMAT_NO_FLAGS   0
 No flags are set. More...
 
#define MUTT_FORMAT_FORCESUBJ   (1 << 0)
 Print the subject even if unchanged. More...
 
#define MUTT_FORMAT_TREE   (1 << 1)
 Draw the thread tree. More...
 
#define MUTT_FORMAT_OPTIONAL   (1 << 2)
 Allow optional field processing. More...
 
#define MUTT_FORMAT_STAT_FILE   (1 << 3)
 Used by attach_format_str. More...
 
#define MUTT_FORMAT_ARROWCURSOR   (1 << 4)
 Reserve space for arrow_cursor. More...
 
#define MUTT_FORMAT_INDEX   (1 << 5)
 This is a main index entry. More...
 
#define MUTT_FORMAT_NOFILTER   (1 << 6)
 Do not allow filtering on this pass. More...
 
#define MUTT_FORMAT_PLAIN   (1 << 7)
 Do not prepend DISP_TO, DISP_CC ... More...
 

Typedefs

typedef uint8_t MuttFormatFlags
 Flags for mutt_expando_format(), e.g. MUTT_FORMAT_FORCESUBJ. More...
 
typedef const char *(* format_t) (char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, intptr_t data, MuttFormatFlags flags)
 Prototype for a mutt_expando_format() callback function. More...
 

Detailed Description

Flags to control mutt_expando_format()

Authors
  • 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 format_flags.h.

Macro Definition Documentation

◆ MUTT_FORMAT_NO_FLAGS

#define MUTT_FORMAT_NO_FLAGS   0

No flags are set.

Definition at line 30 of file format_flags.h.

◆ MUTT_FORMAT_FORCESUBJ

#define MUTT_FORMAT_FORCESUBJ   (1 << 0)

Print the subject even if unchanged.

Definition at line 31 of file format_flags.h.

◆ MUTT_FORMAT_TREE

#define MUTT_FORMAT_TREE   (1 << 1)

Draw the thread tree.

Definition at line 32 of file format_flags.h.

◆ MUTT_FORMAT_OPTIONAL

#define MUTT_FORMAT_OPTIONAL   (1 << 2)

Allow optional field processing.

Definition at line 33 of file format_flags.h.

◆ MUTT_FORMAT_STAT_FILE

#define MUTT_FORMAT_STAT_FILE   (1 << 3)

Used by attach_format_str.

Definition at line 34 of file format_flags.h.

◆ MUTT_FORMAT_ARROWCURSOR

#define MUTT_FORMAT_ARROWCURSOR   (1 << 4)

Reserve space for arrow_cursor.

Definition at line 35 of file format_flags.h.

◆ MUTT_FORMAT_INDEX

#define MUTT_FORMAT_INDEX   (1 << 5)

This is a main index entry.

Definition at line 36 of file format_flags.h.

◆ MUTT_FORMAT_NOFILTER

#define MUTT_FORMAT_NOFILTER   (1 << 6)

Do not allow filtering on this pass.

Definition at line 37 of file format_flags.h.

◆ MUTT_FORMAT_PLAIN

#define MUTT_FORMAT_PLAIN   (1 << 7)

Do not prepend DISP_TO, DISP_CC ...

Definition at line 38 of file format_flags.h.

Typedef Documentation

◆ MuttFormatFlags

typedef uint8_t MuttFormatFlags

Flags for mutt_expando_format(), e.g. MUTT_FORMAT_FORCESUBJ.

Definition at line 29 of file format_flags.h.

◆ format_t

typedef const char*(* format_t) (char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, intptr_t data, MuttFormatFlags flags)

Prototype for a mutt_expando_format() callback function.

Parameters
[out]bufBuffer in which to save string
[in]buflenBuffer length
[in]colStarting column
[in]colsNumber of screen columns
[in]opprintf-like operator, e.g. 't'
[in]srcprintf-like format string
[in]precField precision, e.g. "-3.4"
[in]if_strIf condition is met, display this string
[in]else_strOtherwise, display this string
[in]dataPointer to the mailbox Context
[in]flagsFlags, see MuttFormatFlags
Return values
ptrsrc (unchanged)

Each callback function implements some expandos, e.g.

Expando Description
%t Title

Definition at line 61 of file format_flags.h.