NeoMutt  2025-12-11-860-g80c9cc
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 struct StoreOps *store_ops, const char *path, struct Buffer *dest)
 Generate a filename for the header cache - Implements hcache_namer_t -.
 
static void nntp_hcache_namer (const struct StoreOps *store_ops, const char *path, struct Buffer *dest)
 Compose hcache file names - Implements hcache_namer_t -.
 
static void pop_hcache_namer (const struct StoreOps *store_ops, 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
store_opsBackend store
pathPath of message
destBuffer for filename
Precondition
store_ops is not NULL
path is not NULL
dest is not NULL

Function Documentation

◆ imap_hcache_namer()

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

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

Definition at line 295 of file util.c.

297{
298 buf_printf(dest, "%s.%s.hcache", path, store_ops->name);
299}
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition buffer.c:161
const char * name
Store name.
Definition lib.h:67
+ 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 struct StoreOps * store_ops,
const char * path,
struct Buffer * dest )
static

Compose hcache file names - Implements hcache_namer_t -.

Definition at line 689 of file newsrc.c.

691{
692 buf_printf(dest, "%s.%s.hcache", path, store_ops->name);
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 struct StoreOps * store_ops,
const char * path,
struct Buffer * dest )
static

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

Definition at line 304 of file pop.c.

306{
307 buf_printf(dest, "%s.%s." HC_FEXT, path, store_ops->name);
308}
#define HC_FEXT
Definition pop.c:70
+ Here is the call graph for this function:
+ Here is the caller graph for this function: