NeoMutt
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
path_pretty()

Abbreviate a Mailbox path. More...

+ Collaboration diagram for path_pretty():

Functions

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

Detailed Description

Abbreviate a Mailbox path.

Parameters
pathPath to modify
folderBase path for '=' substitution
Return values
0Success
-1Failure
Precondition
path is not NULL

Function Documentation

◆ comp_path_pretty()

static int comp_path_pretty ( struct Buffer path,
const char *  folder 
)
static

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

Definition at line 918 of file compress.c.

919{
920 if (mutt_path_abbr_folder(path, folder))
921 return 0;
922
923 if (mutt_path_pretty(path, HomeDir, false))
924 return 0;
925
926 return -1;
927}
char * HomeDir
User's home directory.
Definition: globals.c:39
bool mutt_path_abbr_folder(struct Buffer *path, const char *folder)
Create a folder abbreviation.
Definition: path.c:494
bool mutt_path_pretty(struct Buffer *path, const char *homedir, bool is_dir)
Tidy a filesystem path.
Definition: path.c:188
+ Here is the call graph for this function:

◆ imap_path_pretty()

static int imap_path_pretty ( struct Buffer path,
const char *  folder 
)
static

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

Definition at line 2378 of file imap.c.

2379{
2380 if (!folder)
2381 return -1;
2382
2383 imap_pretty_mailbox(path->data, path->dsize, folder);
2384 return 0;
2385}
void imap_pretty_mailbox(char *path, size_t pathlen, const char *folder)
Prettify an IMAP mailbox name.
Definition: util.c:578
size_t dsize
Length of data.
Definition: buffer.h:37
char * data
Pointer to data.
Definition: buffer.h:35
+ Here is the call graph for this function:

◆ maildir_path_pretty()

static int maildir_path_pretty ( struct Buffer path,
const char *  folder 
)
static

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

Definition at line 1650 of file maildir.c.

1651{
1652 if (mutt_path_abbr_folder(path, folder))
1653 return 0;
1654
1655 if (mutt_path_pretty(path, HomeDir, false))
1656 return 0;
1657
1658 return -1;
1659}
+ Here is the call graph for this function:

◆ mh_path_pretty()

static int mh_path_pretty ( struct Buffer path,
const char *  folder 
)
static

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

Definition at line 1192 of file mh.c.

1193{
1194 if (mutt_path_abbr_folder(path, folder))
1195 return 0;
1196
1197 if (mutt_path_pretty(path, HomeDir, false))
1198 return 0;
1199
1200 return -1;
1201}
+ Here is the call graph for this function:

◆ mbox_path_pretty()

static int mbox_path_pretty ( struct Buffer path,
const char *  folder 
)
static

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

Definition at line 1622 of file mbox.c.

1623{
1624 if (mutt_path_abbr_folder(path, folder))
1625 return 0;
1626
1627 if (mutt_path_pretty(path, HomeDir, false))
1628 return 0;
1629
1630 return -1;
1631}
+ Here is the call graph for this function:

◆ nntp_path_pretty()

static int nntp_path_pretty ( struct Buffer path,
const char *  folder 
)
static

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

Definition at line 2756 of file nntp.c.

2757{
2758 /* Succeed, but don't do anything, for now */
2759 return 0;
2760}

◆ nm_path_pretty()

static int nm_path_pretty ( struct Buffer path,
const char *  folder 
)
static

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

Definition at line 2462 of file notmuch.c.

2463{
2464 /* Succeed, but don't do anything, for now */
2465 return 0;
2466}

◆ pop_path_pretty()

static int pop_path_pretty ( struct Buffer path,
const char *  folder 
)
static

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

Definition at line 1176 of file pop.c.

1177{
1178 /* Succeed, but don't do anything, for now */
1179 return 0;
1180}