NeoMutt  2023-05-17-33-gce4425
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
See also
index_format_str()

Definition at line 1489 of file hdrline.c.

1492{
1493 struct HdrFormatInfo hfi = { 0 };
1494
1495 hfi.email = e;
1496 hfi.mailbox = m;
1497 hfi.msg_in_pager = inpgr;
1498 hfi.pager_progress = progress;
1499
1500 mutt_expando_format(buf, buflen, 0, cols, s, index_format_str, (intptr_t) &hfi, flags);
1501}
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:742
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:451
Data passed to index_format_str()
Definition: hdrline.c:67
struct Email * email
Current Email.
Definition: hdrline.c:70
int msg_in_pager
Index of Email displayed in the Pager.
Definition: hdrline.c:69
struct Mailbox * mailbox
Current Mailbox.
Definition: hdrline.c:68
const char * pager_progress
String representing Pager position through Email.
Definition: hdrline.c:71
+ Here is the call graph for this function:
+ Here is the caller graph for this function: