NeoMutt  2021-10-22-8-g9cb437
Teaching an old dog new tricks
DOXYGEN
hdrline.h File Reference

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

#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.

Functions

void mutt_make_string (char *buf, size_t buflen, int cols, const char *s, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress)
 Create formatted strings using mailbox expandos. 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.

Function Documentation

◆ mutt_make_string()

void mutt_make_string ( char *  buf,
size_t  buflen,
int  cols,
const char *  s,
struct Mailbox m,
int  inpgr,
struct Email e,
MuttFormatFlags  flags,
const char *  progress 
)

Create formatted strings using mailbox expandos.

Parameters
bufBuffer for the result
buflenBuffer length
colsNumber of screen columns (OPTIONAL)
sprintf-line format string
mMailbox
inpgrMessage shown in the pager
eEmail
flagsFlags, see MuttFormatFlags
progressPager progress string

Definition at line 1410 of file hdrline.c.

1413 {
1414  struct HdrFormatInfo hfi = { 0 };
1415 
1416  hfi.email = e;
1417  hfi.mailbox = m;
1418  hfi.msg_in_pager = inpgr;
1419  hfi.pager_progress = progress;
1420 
1421  mutt_expando_format(buf, buflen, 0, cols, s, index_format_str, (intptr_t) &hfi, flags);
1422 }
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:780
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:441
Data passed to index_format_str()
Definition: hdrline.c:68
struct Email * email
Current Email.
Definition: hdrline.c:71
int msg_in_pager
Index of Email displayed in the Pager.
Definition: hdrline.c:70
struct Mailbox * mailbox
Current Mailbox.
Definition: hdrline.c:69
const char * pager_progress
String representing Pager postiion through Email.
Definition: hdrline.c:72
+ Here is the call graph for this function:
+ Here is the caller graph for this function: