NeoMutt  2023-03-22
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...
 
static int maildir_path_pretty (char *buf, size_t buflen, const char *folder)
 Abbreviate a Mailbox path - Implements MxOps::path_pretty() -. More...
 
static 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
Precondition
buf is not NULL

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 905 of file compress.c.

906{
907 if (mutt_path_abbr_folder(buf, folder))
908 return 0;
909
910 if (mutt_path_pretty(buf, buflen, HomeDir, false))
911 return 0;
912
913 return -1;
914}
char * HomeDir
User's home directory.
Definition: globals.c:38
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 2450 of file imap.c.

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

◆ maildir_path_pretty()

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

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

Definition at line 1614 of file maildir.c.

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

◆ mh_path_pretty()

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

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

Definition at line 1201 of file mh.c.

1202{
1203 if (mutt_path_abbr_folder(buf, folder))
1204 return 0;
1205
1206 if (mutt_path_pretty(buf, buflen, HomeDir, false))
1207 return 0;
1208
1209 return -1;
1210}
+ 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 2454 of file notmuch.c.

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

◆ 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 1180 of file pop.c.

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