NeoMutt  2024-04-16-36-g75b6fb
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 289 of file util.c.

290{
291 buf_printf(dest, "%s.hcache", path);
292}
int buf_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 691 of file newsrc.c.

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

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