NeoMutt  2024-10-02-37-gfa9146
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 292 of file util.c.

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

691{
692 buf_printf(dest, "%s.hcache", path);
693
694 /* Strip out any directories in the path */
695 char *first = strchr(buf_string(dest), '/');
696 char *last = strrchr(buf_string(dest), '/');
697 if (first && last && (last > first))
698 {
699 memmove(first, last, strlen(last) + 1);
700 }
701}
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: