NeoMutt  2021-02-05-666-ge300cd
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 897 of file compress.c.

898 {
899  if (mutt_path_abbr_folder(buf, buflen, folder))
900  return 0;
901 
902  if (mutt_path_pretty(buf, buflen, HomeDir, false))
903  return 0;
904 
905  return -1;
906 }
bool mutt_path_pretty(char *buf, size_t buflen, const char *homedir, bool is_dir)
Tidy a filesystem path.
Definition: path.c:186
char * HomeDir
User's home directory.
Definition: mutt_globals.h:45
bool mutt_path_abbr_folder(char *buf, size_t buflen, const char *folder)
Create a folder abbreviation.
Definition: path.c:492
+ 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 2451 of file imap.c.

2452 {
2453  if (!folder)
2454  return -1;
2455 
2456  imap_pretty_mailbox(buf, buflen, folder);
2457  return 0;
2458 }
void imap_pretty_mailbox(char *path, size_t pathlen, const char *folder)
Prettify an IMAP mailbox name.
Definition: util.c:590
+ 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 1615 of file maildir.c.

1616 {
1617  if (mutt_path_abbr_folder(buf, buflen, folder))
1618  return 0;
1619 
1620  if (mutt_path_pretty(buf, buflen, HomeDir, false))
1621  return 0;
1622 
1623  return -1;
1624 }
bool mutt_path_pretty(char *buf, size_t buflen, const char *homedir, bool is_dir)
Tidy a filesystem path.
Definition: path.c:186
char * HomeDir
User's home directory.
Definition: mutt_globals.h:45
bool mutt_path_abbr_folder(char *buf, size_t buflen, const char *folder)
Create a folder abbreviation.
Definition: path.c:492
+ 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 1193 of file mh.c.

1194 {
1195  if (mutt_path_abbr_folder(buf, buflen, folder))
1196  return 0;
1197 
1198  if (mutt_path_pretty(buf, buflen, HomeDir, false))
1199  return 0;
1200 
1201  return -1;
1202 }
bool mutt_path_pretty(char *buf, size_t buflen, const char *homedir, bool is_dir)
Tidy a filesystem path.
Definition: path.c:186
char * HomeDir
User's home directory.
Definition: mutt_globals.h:45
bool mutt_path_abbr_folder(char *buf, size_t buflen, const char *folder)
Create a folder abbreviation.
Definition: path.c:492
+ 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 1707 of file mbox.c.

1708 {
1709  if (mutt_path_abbr_folder(buf, buflen, folder))
1710  return 0;
1711 
1712  if (mutt_path_pretty(buf, buflen, HomeDir, false))
1713  return 0;
1714 
1715  return -1;
1716 }
bool mutt_path_pretty(char *buf, size_t buflen, const char *homedir, bool is_dir)
Tidy a filesystem path.
Definition: path.c:186
char * HomeDir
User's home directory.
Definition: mutt_globals.h:45
bool mutt_path_abbr_folder(char *buf, size_t buflen, const char *folder)
Create a folder abbreviation.
Definition: path.c:492
+ 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 2731 of file nntp.c.

2732 {
2733  /* Succeed, but don't do anything, for now */
2734  return 0;
2735 }

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

2478 {
2479  /* Succeed, but don't do anything, for now */
2480  return 0;
2481 }

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

1188 {
1189  /* Succeed, but don't do anything, for now */
1190  return 0;
1191 }