NeoMutt  2022-04-29-247-gc6aae8
Teaching an old dog new tricks
DOXYGEN
path_pretty()

Abbreviate a Mailbox path. More...

+ Collaboration diagram for path_pretty():

Functions

static int comp_path_pretty (char *buf, size_t buflen, const char *folder)
 Abbreviate a Mailbox path - Implements MxOps::path_pretty() -. More...
 
static int imap_path_pretty (char *buf, size_t buflen, const char *folder)
 Abbreviate a Mailbox path - Implements MxOps::path_pretty() -. More...
 
int maildir_path_pretty (char *buf, size_t buflen, const char *folder)
 Abbreviate a Mailbox path - Implements MxOps::path_pretty() -. More...
 
int mh_path_pretty (char *buf, size_t buflen, const char *folder)
 Abbreviate a Mailbox path - Implements MxOps::path_pretty() -. More...
 
static int mbox_path_pretty (char *buf, size_t buflen, const char *folder)
 Abbreviate a Mailbox path - Implements MxOps::path_pretty() -. More...
 
static int nntp_path_pretty (char *buf, size_t buflen, const char *folder)
 Abbreviate a Mailbox path - Implements MxOps::path_pretty() -. More...
 
static int nm_path_pretty (char *buf, size_t buflen, const char *folder)
 Abbreviate a Mailbox path - Implements MxOps::path_pretty() -. More...
 
static int pop_path_pretty (char *buf, size_t buflen, const char *folder)
 Abbreviate a Mailbox path - Implements MxOps::path_pretty() -. More...
 

Detailed Description

Abbreviate a Mailbox path.

Parameters
bufPath to modify
buflenLength of buffer
folderBase path for '=' substitution
Return values
0Success
-1Failure

Contract

Function Documentation

◆ comp_path_pretty()

static int comp_path_pretty ( char *  buf,
size_t  buflen,
const char *  folder 
)
static

Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.

Definition at line 903 of file compress.c.

904{
905 if (mutt_path_abbr_folder(buf, folder))
906 return 0;
907
908 if (mutt_path_pretty(buf, buflen, HomeDir, false))
909 return 0;
910
911 return -1;
912}
char * HomeDir
User's home directory.
Definition: mutt_globals.h:49
bool mutt_path_abbr_folder(char *buf, const char *folder)
Create a folder abbreviation.
Definition: path.c:490
bool mutt_path_pretty(char *buf, size_t buflen, const char *homedir, bool is_dir)
Tidy a filesystem path.
Definition: path.c:186
+ Here is the call graph for this function:

◆ imap_path_pretty()

static int imap_path_pretty ( char *  buf,
size_t  buflen,
const char *  folder 
)
static

Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.

Definition at line 2449 of file imap.c.

2450{
2451 if (!folder)
2452 return -1;
2453
2454 imap_pretty_mailbox(buf, buflen, folder);
2455 return 0;
2456}
void imap_pretty_mailbox(char *path, size_t pathlen, const char *folder)
Prettify an IMAP mailbox name.
Definition: util.c:589
+ Here is the call graph for this function:

◆ maildir_path_pretty()

int maildir_path_pretty ( char *  buf,
size_t  buflen,
const char *  folder 
)

Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.

Definition at line 1612 of file maildir.c.

1613{
1614 if (mutt_path_abbr_folder(buf, folder))
1615 return 0;
1616
1617 if (mutt_path_pretty(buf, buflen, HomeDir, false))
1618 return 0;
1619
1620 return -1;
1621}
+ Here is the call graph for this function:

◆ mh_path_pretty()

int mh_path_pretty ( char *  buf,
size_t  buflen,
const char *  folder 
)

Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.

Definition at line 1200 of file mh.c.

1201{
1202 if (mutt_path_abbr_folder(buf, folder))
1203 return 0;
1204
1205 if (mutt_path_pretty(buf, buflen, HomeDir, false))
1206 return 0;
1207
1208 return -1;
1209}
+ Here is the call graph for this function:

◆ mbox_path_pretty()

static int mbox_path_pretty ( char *  buf,
size_t  buflen,
const char *  folder 
)
static

Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.

Definition at line 1716 of file mbox.c.

1717{
1718 if (mutt_path_abbr_folder(buf, folder))
1719 return 0;
1720
1721 if (mutt_path_pretty(buf, buflen, HomeDir, false))
1722 return 0;
1723
1724 return -1;
1725}
+ Here is the call graph for this function:

◆ nntp_path_pretty()

static int nntp_path_pretty ( char *  buf,
size_t  buflen,
const char *  folder 
)
static

Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.

Definition at line 2723 of file nntp.c.

2724{
2725 /* Succeed, but don't do anything, for now */
2726 return 0;
2727}

◆ nm_path_pretty()

static int nm_path_pretty ( char *  buf,
size_t  buflen,
const char *  folder 
)
static

Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.

Definition at line 2452 of file notmuch.c.

2453{
2454 /* Succeed, but don't do anything, for now */
2455 return 0;
2456}

◆ pop_path_pretty()

static int pop_path_pretty ( char *  buf,
size_t  buflen,
const char *  folder 
)
static

Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.

Definition at line 1179 of file pop.c.

1180{
1181 /* Succeed, but don't do anything, for now */
1182 return 0;
1183}