NeoMutt
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
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 -.
 
static void nntp_hcache_namer (const char *path, struct Buffer *dest)
 Compose hcache file names - Implements hcache_namer_t -.
 
static void pop_hcache_namer (const char *path, struct Buffer *dest)
 Create a header cache filename for a POP mailbox - Implements hcache_namer_t -.
 

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 286 of file util.c.

287{
288 buf_printf(dest, "%s.hcache", path);
289}
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition: buffer.c:173
+ 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 695 of file newsrc.c.

696{
697 buf_printf(dest, "%s.hcache", path);
698
699 /* Strip out any directories in the path */
700 char *first = strchr(buf_string(dest), '/');
701 char *last = strrchr(buf_string(dest), '/');
702 if (first && last && (last > first))
703 {
704 memmove(first, last, strlen(last) + 1);
705 }
706}
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:93
+ 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 287 of file pop.c.

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