NeoMutt  2022-04-29-178-g3b62e6
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 1613 of file maildir.c.

1614{
1615 if (mutt_path_abbr_folder(buf, folder))
1616 return 0;
1617
1618 if (mutt_path_pretty(buf, buflen, HomeDir, false))
1619 return 0;
1620
1621 return -1;
1622}
+ 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 1721 of file mbox.c.

1722{
1723 if (mutt_path_abbr_folder(buf, folder))
1724 return 0;
1725
1726 if (mutt_path_pretty(buf, buflen, HomeDir, false))
1727 return 0;
1728
1729 return -1;
1730}
+ 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 2725 of file nntp.c.

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

◆ 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 2451 of file notmuch.c.

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

◆ 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}