NeoMutt  2020-06-26-250-g349c94
Teaching an old dog new tricks
DOXYGEN
hdrline.h File Reference

String processing routines to generate the mail index. More...

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

Go to the source code of this file.

Data Structures

struct  HdrFormatInfo
 Data passed to index_format_str() More...
 

Macros

#define mutt_make_string(BUF, BUFLEN, COLS, S, CTX, M, E)   mutt_make_string_flags(BUF, BUFLEN, COLS, S, CTX, M, E, MUTT_FORMAT_NO_FLAGS)
 

Functions

void mutt_make_string_flags (char *buf, size_t buflen, int cols, const char *s, struct Context *ctx, struct Mailbox *m, struct Email *e, MuttFormatFlags flags)
 Create formatted strings using mailbox expandos. More...
 
void mutt_make_string_info (char *buf, size_t buflen, int cols, const char *s, struct HdrFormatInfo *hfi, MuttFormatFlags flags)
 Create pager status bar string. More...
 

Variables

struct MbTableC_CryptChars
 Config: User-configurable crypto flags: signed, encrypted etc. More...
 
struct MbTableC_FlagChars
 Config: User-configurable index flags: tagged, new, etc. More...
 
struct MbTableC_FromChars
 Config: User-configurable index flags: to address, cc address, etc. More...
 
struct MbTableC_ToChars
 Config: Indicator characters for the 'To' field in the index. More...
 

Detailed Description

String processing routines to generate the mail index.

Authors
  • Richard Russon
  • Pietro Cerutti

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 hdrline.h.

Macro Definition Documentation

◆ mutt_make_string

#define mutt_make_string (   BUF,
  BUFLEN,
  COLS,
  S,
  CTX,
  M,
 
)    mutt_make_string_flags(BUF, BUFLEN, COLS, S, CTX, M, E, MUTT_FORMAT_NO_FLAGS)

Definition at line 59 of file hdrline.h.

Function Documentation

◆ mutt_make_string_flags()

void mutt_make_string_flags ( char *  buf,
size_t  buflen,
int  cols,
const char *  s,
struct Context ctx,
struct Mailbox m,
struct Email e,
MuttFormatFlags  flags 
)

Create formatted strings using mailbox expandos.

Parameters
bufBuffer for the result
buflenBuffer length
colsNumber of screen columns (OPTIONAL)
sprintf-line format string
ctxMailbox Context
mMailbox
eEmail
flagsFlags, see MuttFormatFlags

Definition at line 1407 of file hdrline.c.

1410 {
1411  struct HdrFormatInfo hfi;
1412 
1413  hfi.email = e;
1414  hfi.ctx = ctx;
1415  hfi.mailbox = m;
1416  hfi.pager_progress = 0;
1417 
1418  mutt_expando_format(buf, buflen, 0, cols, s, index_format_str, (intptr_t) &hfi, flags);
1419 }
struct Context * ctx
Definition: hdrline.h:47
struct Mailbox * mailbox
Definition: context.h:50
Data passed to index_format_str()
Definition: hdrline.h:45
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t callback, intptr_t data, MuttFormatFlags flags)
Expand expandos (x) in a string.
Definition: muttlib.c:772
struct Email * email
Definition: hdrline.h:49
static const char * index_format_str(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)
Format a string for the index list - Implements format_t.
Definition: hdrline.c:456
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_make_string_info()

void mutt_make_string_info ( char *  buf,
size_t  buflen,
int  cols,
const char *  s,
struct HdrFormatInfo hfi,
MuttFormatFlags  flags 
)

Create pager status bar string.

Parameters
bufBuffer for the result
buflenBuffer length
colsNumber of screen columns
sprintf-line format string
hfiMailbox data to pass to the formatter
flagsFlags, see MuttFormatFlags

Definition at line 1430 of file hdrline.c.

1432 {
1433  mutt_expando_format(buf, buflen, 0, cols, s, index_format_str, (intptr_t) hfi, flags);
1434 }
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t callback, intptr_t data, MuttFormatFlags flags)
Expand expandos (x) in a string.
Definition: muttlib.c:772
static const char * index_format_str(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)
Format a string for the index list - Implements format_t.
Definition: hdrline.c:456
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ C_CryptChars

struct MbTable* C_CryptChars

Config: User-configurable crypto flags: signed, encrypted etc.

Definition at line 61 of file hdrline.c.

◆ C_FlagChars

struct MbTable* C_FlagChars

Config: User-configurable index flags: tagged, new, etc.

Definition at line 62 of file hdrline.c.

◆ C_FromChars

struct MbTable* C_FromChars

Config: User-configurable index flags: to address, cc address, etc.

Definition at line 63 of file hdrline.c.

◆ C_ToChars

struct MbTable* C_ToChars

Config: Indicator characters for the 'To' field in the index.

Definition at line 64 of file hdrline.c.