NeoMutt  2021-10-29-43-g6b8931
Teaching an old dog new tricks
DOXYGEN
Header Cache Naming API

Prototype for function to compose hcache file names. More...

Functions

static void imap_hcache_namer (const char *path, struct Buffer *dest)
 Generate a filename for the header cache - Implements hcache_namer_t -. More...
 
static void nntp_hcache_namer (const char *path, struct Buffer *dest)
 Compose hcache file names - Implements hcache_namer_t -. More...
 
static void pop_hcache_namer (const char *path, struct Buffer *dest)
 Create a header cache filename for a POP mailbox - Implements hcache_namer_t -. More...
 

Detailed Description

Prototype for function to compose hcache file names.

Parameters
pathPath of message
destBuffer for filename

Function Documentation

◆ imap_hcache_namer()

static void imap_hcache_namer ( const char *  path,
struct Buffer dest 
)
static

Generate a filename for the header cache - Implements hcache_namer_t -.

Definition at line 287 of file util.c.

288 {
289  mutt_buffer_printf(dest, "%s.hcache", path);
290 }
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition: buffer.c:160
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nntp_hcache_namer()

static void nntp_hcache_namer ( const char *  path,
struct Buffer dest 
)
static

Compose hcache file names - Implements hcache_namer_t -.

Definition at line 692 of file newsrc.c.

693 {
694  mutt_buffer_printf(dest, "%s.hcache", path);
695 
696  /* Strip out any directories in the path */
697  char *first = strchr(mutt_buffer_string(dest), '/');
698  char *last = strrchr(mutt_buffer_string(dest), '/');
699  if (first && last && (last > first))
700  {
701  memmove(first, last, strlen(last) + 1);
702  }
703 }
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:77
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_hcache_namer()

static void pop_hcache_namer ( const char *  path,
struct Buffer dest 
)
static

Create a header cache filename for a POP mailbox - Implements hcache_namer_t -.

Definition at line 286 of file pop.c.

287 {
288  mutt_buffer_printf(dest, "%s." HC_FEXT, path);
289 }
#define HC_FEXT
Definition: pop.c:72
+ Here is the call graph for this function:
+ Here is the caller graph for this function: