int mutt_get_tmp_attachment(struct Body *a)
{
char type[STRING];
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
FILE *fpin = NULL, *fpout = NULL;
struct stat st;
{
char type[STRING];
char command[HUGE_STRING];
- char newfile[_POSIX_PATH_MAX] = "";
+ char newfile[PATH_MAX] = "";
struct Rfc1524MailcapEntry *entry = rfc1524_new_entry();
bool unlink_newfile = false;
int rc = 0;
if (r != -1 && entry->composetypecommand)
{
struct Body *b = NULL;
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
FILE *fp = mutt_file_fopen(a->filename, "r");
if (!fp)
{
char type[STRING];
char command[HUGE_STRING];
- char newfile[_POSIX_PATH_MAX] = "";
+ char newfile[PATH_MAX] = "";
struct Rfc1524MailcapEntry *entry = rfc1524_new_entry();
bool unlink_newfile = false;
int rc = 0;
int mutt_view_attachment(FILE *fp, struct Body *a, int flag, struct Header *hdr,
struct AttachCtx *actx)
{
- char tempfile[_POSIX_PATH_MAX] = "";
- char pagerfile[_POSIX_PATH_MAX] = "";
+ char tempfile[PATH_MAX] = "";
+ char pagerfile[PATH_MAX] = "";
bool use_mailcap = false;
bool use_pipe = false;
bool use_pager = true;
*/
int mutt_print_attachment(FILE *fp, struct Body *a)
{
- char newfile[_POSIX_PATH_MAX] = "";
+ char newfile[PATH_MAX] = "";
char type[STRING];
pid_t thepid;
FILE *ifp = NULL, *fpout = NULL;
*/
struct BodyCache
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
size_t pathlen;
};
static int mutt_bcache_move(struct BodyCache *bcache, const char *id, const char *newid)
{
- char path[_POSIX_PATH_MAX];
- char newpath[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
+ char newpath[PATH_MAX];
if (!bcache || !id || !*id || !newid || !*newid)
return -1;
FILE *mutt_bcache_get(struct BodyCache *bcache, const char *id)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
FILE *fp = NULL;
if (!id || !*id || !bcache)
int mutt_bcache_commit(struct BodyCache *bcache, const char *id)
{
- char tmpid[_POSIX_PATH_MAX];
+ char tmpid[PATH_MAX];
snprintf(tmpid, sizeof(tmpid), "%s.tmp", id);
int mutt_bcache_del(struct BodyCache *bcache, const char *id)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
if (!id || !*id || !bcache)
return -1;
int mutt_bcache_exists(struct BodyCache *bcache, const char *id)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
struct stat st;
int rc = 0;
if (!tgt || !src)
return -1;
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
struct Body *b = NULL;
bool use_disp;
int num;
};
-static char OldLastDir[_POSIX_PATH_MAX] = "";
-static char LastDir[_POSIX_PATH_MAX] = "";
+static char OldLastDir[PATH_MAX] = "";
+static char LastDir[PATH_MAX] = "";
/**
* destroy_state - Free the BrowserState
static int link_is_dir(const char *folder, const char *path)
{
struct stat st;
- char fullpath[_POSIX_PATH_MAX];
+ char fullpath[PATH_MAX];
mutt_file_concat_path(fullpath, folder, path, sizeof(fullpath));
struct stat s;
DIR *dp = NULL;
struct dirent *de = NULL;
- char buffer[_POSIX_PATH_MAX + SHORT_STRING];
+ char buffer[PATH_MAX + SHORT_STRING];
struct Buffy *tmp = NULL;
while (stat(d, &s) == -1)
}
else
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
menu->is_mailbox_list = 0;
mutt_str_strfcpy(path, LastDir, sizeof(path));
mutt_pretty_mailbox(path, sizeof(path));
int ldlen = mutt_str_strlen(LastDir);
if ((ldlen > 0) && (mutt_str_strncmp(LastDir, OldLastDir, ldlen) == 0))
{
- char TargetDir[_POSIX_PATH_MAX] = "";
+ char TargetDir[PATH_MAX] = "";
#ifdef USE_IMAP
/* Use mx_is_imap to check what kind of dir is OldLastDir.
void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfiles)
{
- char buf[_POSIX_PATH_MAX];
- char prefix[_POSIX_PATH_MAX] = "";
+ char buf[PATH_MAX];
+ char prefix[PATH_MAX] = "";
char helpstr[LONG_STRING];
char title[STRING];
struct BrowserState state;
/* Keeps in memory the directory we were in when hitting '='
* to go directly to $folder (Folder)
*/
- char GotoSwapper[_POSIX_PATH_MAX] = "";
+ char GotoSwapper[PATH_MAX] = "";
buffy = buffy && folder;
#endif
else
{
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
mutt_file_concat_path(tmp, LastDir,
state.entry[menu->current].name, sizeof(tmp));
mutt_str_strfcpy(LastDir, tmp, sizeof(LastDir));
struct FolderFile ff = state.entry[j];
if (ff.tagged)
{
- char full[_POSIX_PATH_MAX];
+ char full[PATH_MAX];
mutt_file_concat_path(full, LastDir, ff.name, sizeof(full));
mutt_expand_path(full, sizeof(full));
tfiles[k++] = mutt_str_strdup(full);
{
/* in case dir is relative, make it relative to LastDir,
* not current working dir */
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
mutt_file_concat_path(tmp, LastDir, buf, sizeof(tmp));
mutt_str_strfcpy(buf, tmp, sizeof(buf));
}
}
else
{
- char buf2[_POSIX_PATH_MAX];
+ char buf2[PATH_MAX];
mutt_file_concat_path(buf2, LastDir, state.entry[menu->current].name,
sizeof(buf2));
unsigned long data, struct Buffer *err)
{
struct Buffy **b = NULL;
- char buf[_POSIX_PATH_MAX];
+ char buf[PATH_MAX];
struct stat sb;
char f1[PATH_MAX];
char *p = NULL;
int mutt_parse_unmailboxes(struct Buffer *path, struct Buffer *s,
unsigned long data, struct Buffer *err)
{
- char buf[_POSIX_PATH_MAX];
+ char buf[PATH_MAX];
bool clear_all = false;
while (!clear_all && MoreArgs(s))
bool mutt_buffy_list(void)
{
struct Buffy *b = NULL;
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
char buffylist[2 * STRING];
size_t pos = 0;
int first = 1;
*/
struct Buffy
{
- char path[_POSIX_PATH_MAX];
- char realpath[_POSIX_PATH_MAX]; /**< used for duplicate detection, context
- * comparison, and the sidebar */
+ char path[PATH_MAX];
+ char realpath[PATH_MAX]; /**< used for duplicate detection, context
+ * comparison, and the sidebar */
char *desc;
off_t size;
struct Buffy *next;
static const char *ExtPagerProgress = "all";
/** The folder the user last saved to. Used by ci_save_message() */
-static char LastSaveFolder[_POSIX_PATH_MAX] = "";
+static char LastSaveFolder[PATH_MAX] = "";
int mutt_display_message(struct Header *cur)
{
- char tempfile[_POSIX_PATH_MAX], buf[LONG_STRING];
+ char tempfile[PATH_MAX], buf[LONG_STRING];
int rc = 0;
bool builtin = false;
int cmflags = MUTT_CM_DECODE | MUTT_CM_DISPLAY | MUTT_CM_CHARCONV;
int mutt_save_message(struct Header *h, int delete, int decode, int decrypt)
{
int need_passphrase = 0, app = 0;
- char buf[_POSIX_PATH_MAX];
+ char buf[PATH_MAX];
const char *prompt = NULL;
struct Context ctx;
struct stat st;
struct dirent *de = NULL;
int i, init = 0;
size_t len;
- char dirpart[_POSIX_PATH_MAX], exp_dirpart[_POSIX_PATH_MAX];
- char filepart[_POSIX_PATH_MAX];
+ char dirpart[PATH_MAX], exp_dirpart[PATH_MAX];
+ char filepart[PATH_MAX];
#ifdef USE_IMAP
char imap_path[LONG_STRING];
#endif
p = strrchr(buf, '/');
if (p)
{
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
if (mutt_file_concatn_path(tmp, sizeof(tmp), exp_dirpart, strlen(exp_dirpart),
buf + 1, (size_t)(p - buf - 1)) == NULL)
{
}
else
{
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
struct stat st;
mutt_str_strfcpy(filepart, de->d_name, sizeof(filepart));
{
int r;
struct stat st;
- char pretty[_POSIX_PATH_MAX], msg[_POSIX_PATH_MAX + SHORT_STRING];
+ char pretty[PATH_MAX], msg[PATH_MAX + SHORT_STRING];
for (int i = 0; i < actx->idxlen; i++)
{
{
char helpstr[LONG_STRING];
char buf[LONG_STRING];
- char fname[_POSIX_PATH_MAX];
+ char fname[PATH_MAX];
struct AttachPtr *new = NULL;
int i, close = 0;
int r = -1; /* return value */
if (!ctx)
return -1;
- char tmppath[_POSIX_PATH_MAX];
+ char tmppath[PATH_MAX];
/* Setup the right paths */
FREE(&ctx->realpath);
if (!HAVE_ENTROPY())
{
/* load entropy from files */
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
add_entropy(EntropyFile);
add_entropy(RAND_file_name(path, sizeof(path)));
*/
static int edit_or_view_one_message(bool edit, struct Context *ctx, struct Header *cur)
{
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
char buf[STRING];
int omagic;
int oerrno;
char buffer[LONG_STRING];
char type[STRING];
char command[HUGE_STRING];
- char tempfile[_POSIX_PATH_MAX] = "";
+ char tempfile[PATH_MAX] = "";
char *fname = NULL;
FILE *fpin = NULL;
FILE *fpout = NULL;
{
const int orig_type = b->type;
#ifndef USE_FMEMOPEN
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
#endif
if (!plaintext)
{
DB_ENV *env;
DB *db;
int fd;
- char lockfile[_POSIX_PATH_MAX];
+ char lockfile[PATH_MAX];
};
/**
if (!path)
return false;
- static char dir[_POSIX_PATH_MAX];
+ static char dir[PATH_MAX];
mutt_str_strfcpy(dir, path, sizeof(dir));
char *p = strrchr(dir, '/');
*/
static const char *hcache_per_folder(const char *path, const char *folder, hcache_namer_t namer)
{
- static char hcpath[_POSIX_PATH_MAX];
+ static char hcpath[PATH_MAX];
char suffix[32] = "";
struct stat sb;
else
{
unsigned char m[16]; /* binary md5sum */
- char name[_POSIX_PATH_MAX];
+ char name[PATH_MAX];
snprintf(name, sizeof(name), "%s|%s", hcache_get_ops()->name, folder);
mutt_md5(name, m);
mutt_md5_toascii(m, name);
*/
void *mutt_hcache_fetch_raw(header_cache_t *h, const char *key, size_t keylen)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
const struct HcacheOps *ops = hcache_get_ops();
if (!h || !ops)
int mutt_hcache_store_raw(header_cache_t *h, const char *key, size_t keylen,
void *data, size_t dlen)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
const struct HcacheOps *ops = hcache_get_ops();
if (!h || !ops)
*/
int mutt_hcache_delete(header_cache_t *h, const char *key, size_t keylen)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
const struct HcacheOps *ops = hcache_get_ops();
if (!h)
*/
static void *hcache_kyotocabinet_open(const char *path)
{
- char kcdbpath[_POSIX_PATH_MAX];
+ char kcdbpath[PATH_MAX];
int printfresult;
printfresult = snprintf(kcdbpath, sizeof(kcdbpath), "%s#type=kct#opts=%s#rcomp=lex",
void mutt_edit_headers(const char *editor, const char *body, struct Header *msg,
char *fcc, size_t fcclen)
{
- char path[_POSIX_PATH_MAX]; /* tempfile used to edit headers + body */
+ char path[PATH_MAX]; /* tempfile used to edit headers + body */
char buffer[LONG_STRING];
const char *p = NULL;
int i;
void mutt_help(int menu)
{
- char t[_POSIX_PATH_MAX];
+ char t[PATH_MAX];
char buf[SHORT_STRING];
FILE *f = NULL;
*/
static void shrink_histfile(void)
{
- char tmpfname[_POSIX_PATH_MAX];
+ char tmpfname[PATH_MAX];
FILE *tmp = NULL;
int n[HC_LAST] = { 0 };
int line, hclass, read;
bool not = false;
regex_t *rx = NULL;
struct Pattern *pat = NULL;
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
mutt_buffer_init(&pattern);
mutt_buffer_init(&command);
addr = NULL;
if (addr)
{
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
mutt_safe_path(tmp, sizeof(tmp), addr);
snprintf(path, pathlen, "=%s", tmp);
}
if ((SaveName || ForceName) && (env->to || env->cc || env->bcc))
{
struct Address *addr = env->to ? env->to : (env->cc ? env->cc : env->bcc);
- char buf[_POSIX_PATH_MAX];
+ char buf[PATH_MAX];
mutt_safe_path(buf, sizeof(buf), addr);
mutt_file_concat_path(path, NONULL(Folder), buf, pathlen);
if (!ForceName && mx_access(path, W_OK) != 0)
*/
static int imap_msg_open_new(struct Context *ctx, struct Message *msg, struct Header *hdr)
{
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
mutt_mktemp(tmp, sizeof(tmp));
msg->fp = mutt_file_fopen(tmp, "w");
*/
static struct BodyCache *msg_cache_open(struct ImapData *idata)
{
- char mailbox[_POSIX_PATH_MAX];
+ char mailbox[PATH_MAX];
if (idata->bcache)
return idata->bcache;
{
char *hdrreq = NULL;
FILE *fp = NULL;
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
int msgno, idx;
struct ImapHeader h;
struct ImapStatus *status = NULL;
{
struct Envelope *newenv = NULL;
char buf[LONG_STRING];
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
char *pc = NULL;
unsigned int bytes;
struct Progress progressbar;
FREE((char **) p->var);
if (init)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
mutt_str_strfcpy(path, init, sizeof(path));
mutt_expand_path(path, sizeof(path));
*((char **) p->var) = mutt_str_strdup(path);
static int parse_path_list(struct Buffer *buf, struct Buffer *s,
unsigned long data, struct Buffer *err)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
do
{
static int parse_path_unlist(struct Buffer *buf, struct Buffer *s,
unsigned long data, struct Buffer *err)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
do
{
}
else if ((idx >= 0) && (DTYPE(MuttVars[idx].type) == DT_PATH))
{
- char scratch[_POSIX_PATH_MAX];
+ char scratch[PATH_MAX];
mutt_str_strfcpy(scratch, buf->data, sizeof(scratch));
mutt_expand_path(scratch, sizeof(scratch));
if (mutt_str_strcmp(MuttVars[idx].name, "debug_file") == 0)
static int parse_source(struct Buffer *buf, struct Buffer *s,
unsigned long data, struct Buffer *err)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
do
{
*/
int main(int argc, char *argv[], char *envp[])
{
- char folder[_POSIX_PATH_MAX] = "";
+ char folder[PATH_MAX] = "";
char *subject = NULL;
char *include_file = NULL;
char *draft_file = NULL;
if (!OptNoCurses && Folder)
{
struct stat sb;
- char fpath[_POSIX_PATH_MAX];
+ char fpath[PATH_MAX];
mutt_str_strfcpy(fpath, Folder, sizeof(fpath));
mutt_expand_path(fpath, sizeof(fpath));
char *tempfile = NULL, *infile = NULL;
char *bodytext = NULL, *bodyfile = NULL;
int rv = 0;
- char expanded_infile[_POSIX_PATH_MAX];
+ char expanded_infile[PATH_MAX];
if (!OptNoCurses)
mutt_flushinp();
*/
static int mbox_mbox_sync(struct Context *ctx, int *index_hint)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
char buf[32];
int i, j, save_sort = SORT_ORDER;
int rc = -1;
* around
*/
- char savefile[_POSIX_PATH_MAX];
+ char savefile[PATH_MAX];
snprintf(savefile, sizeof(savefile), "%s/neomutt.%s-%s-%u", NONULL(Tmpdir),
NONULL(Username), NONULL(ShortHostname), (unsigned int) getpid());
short f;
int first, last, rc = 0;
- char pathname[_POSIX_PATH_MAX];
+ char pathname[PATH_MAX];
snprintf(pathname, sizeof(pathname), "%s/.mh_sequences", path);
FILE *fp = fopen(pathname, "r");
*/
static int mh_sequences_changed(struct Buffy *b)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
struct stat sb;
if ((snprintf(path, sizeof(path), "%s/.mh_sequences", b->path) < sizeof(path)) &&
*/
static int mh_already_notified(struct Buffy *b, int msgno)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
struct stat sb;
if ((snprintf(path, sizeof(path), "%s/%d", b->path, msgno) < sizeof(path)) &&
static int mh_mkstemp(struct Context *dest, FILE **fp, char **tgt)
{
int fd;
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
mode_t omask;
omask = umask(mh_umask(dest));
{
FILE *ofp = NULL, *nfp = NULL;
- char sequences[_POSIX_PATH_MAX];
+ char sequences[PATH_MAX];
char *tmpfname = NULL;
char *buf = NULL;
char *p = NULL;
FILE *ofp = NULL, *nfp = NULL;
char *tmpfname = NULL;
- char sequences[_POSIX_PATH_MAX];
+ char sequences[PATH_MAX];
char seq_unseen[STRING];
char seq_replied[STRING];
static void maildir_update_mtime(struct Context *ctx)
{
- char buf[_POSIX_PATH_MAX];
+ char buf[PATH_MAX];
struct stat st;
struct MhData *data = mh_data(ctx);
{
DIR *dirp = NULL;
struct dirent *de = NULL;
- char buf[_POSIX_PATH_MAX];
+ char buf[PATH_MAX];
int is_old = 0;
struct Maildir *entry = NULL;
struct Header *h = NULL;
struct Progress *progress)
{
struct Maildir *p, *last = NULL;
- char fn[_POSIX_PATH_MAX];
+ char fn[PATH_MAX];
int count;
int sort = 0;
#ifdef USE_HCACHE
return -1;
}
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
snprintf(tmp, sizeof(tmp), "%s/cur", ctx->path);
if (mkdir(tmp, S_IRWXU))
{
return -1;
}
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
snprintf(tmp, sizeof(tmp), "%s/.mh_sequences", ctx->path);
const int i = creat(tmp, S_IRWXU);
if (i == -1)
int msgno, int is_maildir)
{
struct Header *cur = ctx->hdrs[msgno];
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
snprintf(path, sizeof(path), "%s/%s", ctx->path, cur->path);
struct Header *hdr)
{
int fd;
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
char suffix[16];
char subdir[16];
mode_t omask;
{
char subdir[4];
char suffix[16];
- char path[_POSIX_PATH_MAX];
- char full[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
+ char full[PATH_MAX];
char *s = NULL;
if (mutt_file_fsync_close(&msg->fp))
struct dirent *de = NULL;
char *cp = NULL, *dep = NULL;
unsigned int n, hi = 0;
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
char tmp[16];
if (mutt_file_fsync_close(&msg->fp))
int rc = mutt_copy_message_ctx(dest->fp, ctx, h, MUTT_CM_UPDATE, CH_UPDATE | CH_UPDATE_LEN);
if (rc == 0)
{
- char oldpath[_POSIX_PATH_MAX];
- char partpath[_POSIX_PATH_MAX];
+ char oldpath[PATH_MAX];
+ char partpath[PATH_MAX];
snprintf(oldpath, sizeof(oldpath), "%s/%s", ctx->path, h->path);
mutt_str_strfcpy(partpath, h->path, sizeof(partpath));
if (ctx->magic == MUTT_MH && rc == 0)
{
- char newpath[_POSIX_PATH_MAX];
+ char newpath[PATH_MAX];
snprintf(newpath, sizeof(newpath), "%s/%s", ctx->path, h->path);
rc = mutt_file_safe_rename(newpath, oldpath);
if (rc == 0)
{
/* we just have to rename the file. */
- char newpath[_POSIX_PATH_MAX];
- char partpath[_POSIX_PATH_MAX];
- char fullpath[_POSIX_PATH_MAX];
- char oldpath[_POSIX_PATH_MAX];
+ char newpath[PATH_MAX];
+ char partpath[PATH_MAX];
+ char fullpath[PATH_MAX];
+ char oldpath[PATH_MAX];
char suffix[16];
char *p = strrchr(h->path, '/');
if (h->deleted && (ctx->magic != MUTT_MAILDIR || !MaildirTrash))
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
snprintf(path, sizeof(path), "%s/%s", ctx->path, h->path);
if (ctx->magic == MUTT_MAILDIR || (MhPurge && ctx->magic == MUTT_MH))
{
/* MH just moves files out of the way when you delete them */
if (*h->path != ',')
{
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
snprintf(tmp, sizeof(tmp), "%s/,%s", ctx->path, h->path);
unlink(tmp);
rename(path, tmp);
{
struct stat st_new; /* status of the "new" subdirectory */
struct stat st_cur; /* status of the "cur" subdirectory */
- char buf[_POSIX_PATH_MAX];
+ char buf[PATH_MAX];
int changed = 0; /* bitmask representing which subdirectories
have changed. 0x1 = new, 0x2 = cur */
bool occult = false; /* messages were removed from the mailbox */
*/
static int mh_mbox_check(struct Context *ctx, int *index_hint)
{
- char buf[_POSIX_PATH_MAX];
+ char buf[PATH_MAX];
struct stat st, st_cur;
bool modified = false, have_new = false, occult = false, flags_changed = false;
struct Maildir *md = NULL, *p = NULL;
static FILE *md_open_find_message(const char *folder, const char *unique,
const char *subfolder, char **newname)
{
- char dir[_POSIX_PATH_MAX];
- char tunique[_POSIX_PATH_MAX];
+ char dir[PATH_MAX];
+ char tunique[PATH_MAX];
char fname[LONG_STRING];
struct dirent *de = NULL;
FILE *maildir_open_find_message(const char *folder, const char *msg, char **newname)
{
- char unique[_POSIX_PATH_MAX];
+ char unique[PATH_MAX];
static unsigned int new_hits = 0, cur_hits = 0; /* simple dynamic optimization */
DIR *dp = NULL;
struct dirent *de = NULL;
int r = 1; /* assume empty until we find a message */
- char realpath[_POSIX_PATH_MAX];
+ char realpath[PATH_MAX];
int iter = 0;
/* Strategy here is to look for any file not beginning with a period */
bool mx_is_maildir(const char *path)
{
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
struct stat st;
snprintf(tmp, sizeof(tmp), "%s/cur", path);
bool mx_is_mh(const char *path)
{
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
snprintf(tmp, sizeof(tmp), "%s/.mh_sequences", path);
if (access(tmp, F_OK) == 0)
#endif
/* PATH_MAX is undefined on the hurd */
-#if !defined(PATH_MAX) && defined(_POSIX_PATH_MAX)
-#define PATH_MAX _POSIX_PATH_MAX
+#ifndef PATH_MAX
+#define PATH_MAX 4096
#endif
#ifdef HAVE_FGETS_UNLOCKED
static int mkwrapdir(const char *path, char *newfile, size_t nflen, char *newdir, size_t ndlen)
{
const char *basename = NULL;
- char parent[_POSIX_PATH_MAX];
+ char parent[PATH_MAX];
char *p = NULL;
mutt_str_strfcpy(parent, NONULL(path), sizeof(parent));
}
else
{
- char abs_oldpath[_POSIX_PATH_MAX];
+ char abs_oldpath[PATH_MAX];
if ((getcwd(abs_oldpath, sizeof(abs_oldpath)) == NULL) ||
((strlen(abs_oldpath) + 1 + strlen(oldpath) + 1) > sizeof(abs_oldpath)))
if (flags & O_EXCL)
{
- char safe_file[_POSIX_PATH_MAX];
- char safe_dir[_POSIX_PATH_MAX];
+ char safe_file[PATH_MAX];
+ char safe_dir[PATH_MAX];
if (mkwrapdir(path, safe_file, sizeof(safe_file), safe_dir, sizeof(safe_dir)) == -1)
return -1;
lua_init(&Lua);
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
if (mutt_extract_token(tmp, s, 0) != 0)
{
*/
static int get_database_mtime(struct NmCtxData *data, time_t *mtime)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
struct stat st;
if (!data)
static int rename_maildir_filename(const char *old, char *newpath, size_t newsz,
struct Header *h)
{
- char filename[_POSIX_PATH_MAX];
- char suffix[_POSIX_PATH_MAX];
- char folder[_POSIX_PATH_MAX];
+ char filename[PATH_MAX];
+ char suffix[PATH_MAX];
+ char folder[PATH_MAX];
mutt_str_strfcpy(folder, old, sizeof(folder));
char *p = strrchr(folder, '/');
msg && ls && notmuch_filenames_valid(ls); notmuch_filenames_move_to_next(ls))
{
const char *path = notmuch_filenames_get(ls);
- char newpath[_POSIX_PATH_MAX];
+ char newpath[PATH_MAX];
if (strcmp(new, path) == 0)
continue;
{
mutt_debug(2, "(%s)\n", buf);
struct NmCtxData *data = get_ctxdata(ctx);
- char uri[_POSIX_PATH_MAX + LONG_STRING + 32]; /* path to DB + query + URI "decoration" */
+ char uri[PATH_MAX + LONG_STRING + 32]; /* path to DB + query + URI "decoration" */
int added;
if (data)
for (int i = 0; notmuch_messages_valid(msgs) && ((limit == 0) || (i < limit));
notmuch_messages_move_to_next(msgs), i++)
{
- char old[_POSIX_PATH_MAX];
+ char old[PATH_MAX];
const char *new = NULL;
notmuch_message_t *m = notmuch_messages_get(msgs);
for (int i = 0; i < ctx->msgcount; i++)
{
- char old[_POSIX_PATH_MAX], new[_POSIX_PATH_MAX];
+ char old[PATH_MAX], new[PATH_MAX];
struct Header *h = ctx->hdrs[i];
struct NmHdrData *hd = h->data;
if (!ctx || !msg)
return 1;
struct Header *cur = ctx->hdrs[msgno];
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
char *folder = nm_header_get_folder(cur);
snprintf(path, sizeof(path), "%s/%s", folder, cur->path);
}
else
{
- char prefix[_POSIX_PATH_MAX];
+ char prefix[PATH_MAX];
mutt_str_strfcpy(prefix, s, sizeof(prefix));
mutt_file_sanitize_filename(prefix, true);
snprintf(s, l, "%s/%s", NONULL(Tmpdir), prefix);
char *mutt_expand_path_regex(char *s, size_t slen, bool regex)
{
- char p[_POSIX_PATH_MAX] = "";
- char q[_POSIX_PATH_MAX] = "";
- char tmp[_POSIX_PATH_MAX];
+ char p[PATH_MAX] = "";
+ char q[PATH_MAX] = "";
+ char tmp[PATH_MAX];
char *t = NULL;
char *tail = "";
else if ((rc = mutt_yesorno(_("File is a directory, save under it?"), MUTT_YES)) != MUTT_YES)
return (rc == MUTT_NO) ? 1 : -1;
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
mutt_str_strfcpy(tmp, mutt_file_basename(NONULL(attname)), sizeof(tmp));
if (mutt_get_field(_("File under directory: "), tmp, sizeof(tmp),
MUTT_FILE | MUTT_CLEAR) != 0 ||
*/
int mutt_save_confirm(const char *s, struct stat *st)
{
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
int ret = 0;
int rc;
int magic = 0;
{
int i, move_messages = 0, purge = 1, read_msgs = 0;
struct Context f;
- char mbox[_POSIX_PATH_MAX];
+ char mbox[PATH_MAX];
char buf[SHORT_STRING];
if (!ctx)
void crypt_extract_keys_from_messages(struct Header *h)
{
- char tempfname[_POSIX_PATH_MAX], *mbox = NULL;
+ char tempfname[PATH_MAX], *mbox = NULL;
struct Address *tmp = NULL;
FILE *fpout = NULL;
if (sigcnt)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
mutt_mktemp(tempfile, sizeof(tempfile));
bool goodsig = true;
if (crypt_write_signed(a, s, tempfile) == 0)
*/
static gpgme_data_t body_to_data_object(struct Body *a, int convert)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
int err = 0;
gpgme_data_t data;
static char *data_object_to_tempfile(gpgme_data_t data, char *tempf, FILE **ret_fp)
{
int err;
- char tempfb[_POSIX_PATH_MAX];
+ char tempfb[PATH_MAX];
FILE *fp = NULL;
ssize_t nread = 0;
*/
int pgp_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
struct State s;
struct Body *first_part = b;
int is_signed = 0;
*/
int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
struct State s;
FILE *tmpfp = NULL;
int is_signed;
{
/* there's no side-effect free way to view key data in GPGME,
* so we import the key into a temporary keyring */
- char tmpdir[_POSIX_PATH_MAX];
- char tmpfile[_POSIX_PATH_MAX];
+ char tmpdir[PATH_MAX];
+ char tmpfile[PATH_MAX];
gpgme_ctx_t tmpctx;
gpgme_error_t err;
gpgme_engine_info_t engineinfo;
*/
static int pgp_check_traditional_one_body(FILE *fp, struct Body *b)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
char buf[HUGE_STRING];
FILE *tfp = NULL;
*/
int pgp_gpgme_encrypted_handler(struct Body *a, struct State *s)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
int is_signed;
int rc = 0;
*/
int smime_gpgme_application_handler(struct Body *a, struct State *s)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
int is_signed;
int rc = 0;
*/
static void verify_key(struct CryptKeyInfo *key)
{
- char cmd[LONG_STRING], tempfile[_POSIX_PATH_MAX];
+ char cmd[LONG_STRING], tempfile[PATH_MAX];
const char *s = NULL;
gpgme_ctx_t listctx = NULL;
gpgme_error_t err;
long bytes;
LOFF_T last_pos, offset;
char buf[HUGE_STRING];
- char outfile[_POSIX_PATH_MAX];
- char tmpfname[_POSIX_PATH_MAX];
+ char outfile[PATH_MAX];
+ char tmpfname[PATH_MAX];
FILE *pgpout = NULL, *pgpin = NULL, *pgperr = NULL;
FILE *tmpfp = NULL;
pid_t thepid;
static int pgp_check_traditional_one_body(FILE *fp, struct Body *b)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
char buf[HUGE_STRING];
FILE *tfp = NULL;
int pgp_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile)
{
- char sigfile[_POSIX_PATH_MAX], pgperrfile[_POSIX_PATH_MAX];
+ char sigfile[PATH_MAX], pgperrfile[PATH_MAX];
FILE *pgpout = NULL, *pgperr = NULL;
pid_t thepid;
int badsig = -1;
static void pgp_extract_keys_from_attachment(FILE *fp, struct Body *top)
{
struct State s;
- char tempfname[_POSIX_PATH_MAX];
+ char tempfname[PATH_MAX];
mutt_mktemp(tempfname, sizeof(tempfname));
FILE *tempfp = mutt_file_fopen(tempfname, "w");
FILE *pgpin = NULL, *pgpout = NULL, *pgptmp = NULL;
struct stat info;
struct Body *tattach = NULL;
- char pgperrfile[_POSIX_PATH_MAX];
- char pgptmpfile[_POSIX_PATH_MAX];
+ char pgperrfile[PATH_MAX];
+ char pgptmpfile[PATH_MAX];
pid_t thepid;
int rv;
int pgp_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
struct State s;
struct Body *p = b;
bool need_decode = false;
*/
int pgp_encrypted_handler(struct Body *a, struct State *s)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
FILE *fpin = NULL;
struct Body *tattach = NULL;
int rc = 0;
{
struct Body *t = NULL;
char buffer[LONG_STRING];
- char sigfile[_POSIX_PATH_MAX], signedfile[_POSIX_PATH_MAX];
+ char sigfile[PATH_MAX], signedfile[PATH_MAX];
FILE *pgpin = NULL, *pgpout = NULL, *pgperr = NULL, *sfp = NULL;
bool err = false;
bool empty = true;
struct Body *pgp_encrypt_message(struct Body *a, char *keylist, int sign)
{
char buf[LONG_STRING];
- char tempfile[_POSIX_PATH_MAX], pgperrfile[_POSIX_PATH_MAX];
- char pgpinfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX], pgperrfile[PATH_MAX];
+ char pgpinfile[PATH_MAX];
FILE *pgpin = NULL, *pgperr = NULL, *fptmp = NULL;
struct Body *t = NULL;
int err = 0;
{
struct Body *b = NULL;
- char pgpoutfile[_POSIX_PATH_MAX];
- char pgperrfile[_POSIX_PATH_MAX];
- char pgpinfile[_POSIX_PATH_MAX];
+ char pgpoutfile[PATH_MAX];
+ char pgperrfile[PATH_MAX];
+ char pgpinfile[PATH_MAX];
char body_charset[STRING];
char *from_charset = NULL;
void pgp_invoke_import(const char *fname)
{
- char tmp_fname[_POSIX_PATH_MAX + SHORT_STRING];
+ char tmp_fname[PATH_MAX + SHORT_STRING];
char cmd[HUGE_STRING];
struct PgpCommandContext cctx;
int i;
bool done = false;
char helpstr[LONG_STRING], buf[LONG_STRING], tmpbuf[STRING];
- char cmd[LONG_STRING], tempfile[_POSIX_PATH_MAX];
+ char cmd[LONG_STRING], tempfile[PATH_MAX];
FILE *fp = NULL, *devnull = NULL;
pid_t thepid;
struct PgpKeyInfo *kp = NULL;
{
struct Body *att = NULL;
char buf[LONG_STRING];
- char tempfb[_POSIX_PATH_MAX], tmp[STRING];
+ char tempfb[PATH_MAX], tmp[STRING];
FILE *tempfp = NULL;
FILE *devnull = NULL;
struct stat sb;
static short pgp_find_hash(const char *fname)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
size_t l;
short rc = -1;
char SmimePass[STRING];
time_t SmimeExptime = 0; /* when does the cached passphrase expire? */
-static char SmimeKeyToUse[_POSIX_PATH_MAX] = { 0 };
-static char SmimeCertToUse[_POSIX_PATH_MAX];
-static char SmimeIntermediateToUse[_POSIX_PATH_MAX];
+static char SmimeKeyToUse[PATH_MAX] = { 0 };
+static char SmimeCertToUse[PATH_MAX];
+static char SmimeIntermediateToUse[PATH_MAX];
static void smime_free_key(struct SmimeKey **keylist)
{
{
if (!optional)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
char buf1[LONG_STRING], buf2[LONG_STRING];
struct stat sb;
static struct SmimeKey *smime_get_candidates(char *search, short public)
{
- char index_file[_POSIX_PATH_MAX];
+ char index_file[PATH_MAX];
char buf[LONG_STRING];
struct SmimeKey *key = NULL, *results = NULL;
struct SmimeKey **results_end = &results;
static int smime_handle_cert_email(char *certificate, char *mailbox, int copy,
char ***buffer, int *num)
{
- char tmpfname[_POSIX_PATH_MAX];
+ char tmpfname[PATH_MAX];
char email[STRING];
int rc = -1, count = 0;
pid_t thepid;
static char *smime_extract_certificate(char *infile)
{
- char pk7out[_POSIX_PATH_MAX], certfile[_POSIX_PATH_MAX];
- char tmpfname[_POSIX_PATH_MAX];
+ char pk7out[PATH_MAX], certfile[PATH_MAX];
+ char tmpfname[PATH_MAX];
pid_t thepid;
int empty;
static char *smime_extract_signer_certificate(char *infile)
{
- char certfile[_POSIX_PATH_MAX];
- char tmpfname[_POSIX_PATH_MAX];
+ char certfile[PATH_MAX];
+ char tmpfname[PATH_MAX];
pid_t thepid;
int empty;
*/
void smime_invoke_import(char *infile, char *mailbox)
{
- char tmpfname[_POSIX_PATH_MAX], *certfile = NULL, buf[STRING];
+ char tmpfname[PATH_MAX], *certfile = NULL, buf[STRING];
FILE *smimein = NULL;
mutt_mktemp(tmpfname, sizeof(tmpfname));
int smime_verify_sender(struct Header *h)
{
- char *mbox = NULL, *certfile = NULL, tempfname[_POSIX_PATH_MAX];
+ char *mbox = NULL, *certfile = NULL, tempfname[PATH_MAX];
int retval = 1;
mutt_mktemp(tempfname, sizeof(tempfname));
struct Body *smime_build_smime_entity(struct Body *a, char *certlist)
{
char buf[LONG_STRING], certfile[LONG_STRING];
- char tempfile[_POSIX_PATH_MAX], smimeerrfile[_POSIX_PATH_MAX];
- char smimeinfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX], smimeerrfile[PATH_MAX];
+ char smimeinfile[PATH_MAX];
char *cert_start, *cert_end;
FILE *smimein = NULL;
int err = 0, empty, off;
struct Body *smime_sign_message(struct Body *a)
{
char buffer[LONG_STRING];
- char signedfile[_POSIX_PATH_MAX], filetosign[_POSIX_PATH_MAX];
+ char signedfile[PATH_MAX], filetosign[PATH_MAX];
FILE *smimein = NULL, *smimeout = NULL, *smimeerr = NULL, *sfp = NULL;
int err = 0;
int empty = 0;
int smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile)
{
- char signedfile[_POSIX_PATH_MAX], smimeerrfile[_POSIX_PATH_MAX];
+ char signedfile[PATH_MAX], smimeerrfile[PATH_MAX];
FILE *smimeout = NULL;
pid_t thepid;
int badsig = -1;
*/
static struct Body *smime_handle_entity(struct Body *m, struct State *s, FILE *out_file)
{
- char outfile[_POSIX_PATH_MAX], errfile[_POSIX_PATH_MAX];
- char tmpfname[_POSIX_PATH_MAX];
+ char outfile[PATH_MAX], errfile[PATH_MAX];
+ char tmpfname[PATH_MAX];
FILE *smimeout = NULL, *smimein = NULL, *smimeerr = NULL;
FILE *tmpfp = NULL, *tmpfp_buffer = NULL, *fpout = NULL;
struct stat info;
fflush(smimeout);
rewind(smimeout);
- char tmptmpfname[_POSIX_PATH_MAX];
+ char tmptmpfname[PATH_MAX];
if (out_file)
fpout = out_file;
else
int smime_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
struct State s;
LOFF_T tmpoffset = b->offset;
size_t tmplength = b->length;
static int update_file(char *filename, char *buf)
{
FILE *fp = NULL;
- char tmpfile[_POSIX_PATH_MAX];
+ char tmpfile[PATH_MAX];
int rc = -1;
while (true)
static void cache_expand(char *dst, size_t dstlen, struct Account *acct, char *src)
{
char *c = NULL;
- char file[_POSIX_PATH_MAX];
+ char file[PATH_MAX];
/* server subdirectory */
if (acct)
static int active_get_cache(struct NntpServer *nserv)
{
char buf[HUGE_STRING];
- char file[_POSIX_PATH_MAX];
+ char file[PATH_MAX];
time_t t;
cache_expand(file, sizeof(file), &nserv->conn->account, ".active");
*/
int nntp_active_save_cache(struct NntpServer *nserv)
{
- char file[_POSIX_PATH_MAX];
+ char file[PATH_MAX];
char *buf = NULL;
size_t buflen, off;
int rc;
header_cache_t *nntp_hcache_open(struct NntpData *nntp_data)
{
struct Url url;
- char file[_POSIX_PATH_MAX];
+ char file[PATH_MAX];
if (!nntp_data->nserv || !nntp_data->nserv->cacheable ||
!nntp_data->nserv->conn || !nntp_data->group ||
return;
#ifdef USE_HCACHE
- char file[_POSIX_PATH_MAX];
+ char file[PATH_MAX];
nntp_hcache_namer(nntp_data->group, file, sizeof(file));
cache_expand(file, sizeof(file), &nntp_data->nserv->conn->account, file);
unlink(file);
*/
void nntp_clear_cache(struct NntpServer *nserv)
{
- char file[_POSIX_PATH_MAX];
+ char file[PATH_MAX];
char *fp = NULL;
struct dirent *entry = NULL;
DIR *dp = NULL;
*/
struct NntpServer *nntp_select_server(char *server, bool leave_lock)
{
- char file[_POSIX_PATH_MAX];
+ char file[PATH_MAX];
#ifdef USE_HCACHE
char *p = NULL;
#endif
}
else
{
- char buf[_POSIX_PATH_MAX];
+ char buf[PATH_MAX];
/* don't try to fetch article from removed newsgroup */
if (nntp_data->deleted)
return -1;
{
void *uidl = NULL;
char buf[LONG_STRING];
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
struct Progress progressbar;
struct PopData *pop_data = (struct PopData *) ctx->data;
struct PopCache *cache = NULL;
{
/* if we have a maildir mailbox, we need to stat the "new" dir */
- char buf[_POSIX_PATH_MAX];
+ char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/new", Postponed);
if (access(buf, F_OK) == 0 && stat(buf, &st) == -1)
struct Header *hdr, short resend)
{
struct Message *msg = NULL;
- char file[_POSIX_PATH_MAX];
+ char file[PATH_MAX];
struct Body *b = NULL;
FILE *bfp = NULL;
int rc = -1;
{
if (aptr->content->filename && *aptr->content->filename == '/')
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
mutt_str_strfcpy(path, aptr->content->filename, sizeof(path));
mutt_pretty_mailbox(path, sizeof(path));
struct Header *hdr, char **directory)
{
char *prompt = NULL;
- char buf[_POSIX_PATH_MAX], tfile[_POSIX_PATH_MAX];
+ char buf[PATH_MAX], tfile[PATH_MAX];
int append = 0;
int rc;
void mutt_save_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag,
struct Body *top, struct Header *hdr, struct Menu *menu)
{
- char buf[_POSIX_PATH_MAX], tfile[_POSIX_PATH_MAX];
+ char buf[PATH_MAX], tfile[PATH_MAX];
char *directory = NULL;
int rc = 1;
int last = menu ? menu->current : -1;
static void query_pipe_attachment(char *command, FILE *fp, struct Body *body, bool filter)
{
- char tfile[_POSIX_PATH_MAX];
+ char tfile[PATH_MAX];
if (filter)
{
- char warning[STRING + _POSIX_PATH_MAX];
+ char warning[STRING + PATH_MAX];
snprintf(warning, sizeof(warning),
_("WARNING! You are about to overwrite %s, continue?"), body->filename);
if (mutt_yesorno(warning, MUTT_NO) != MUTT_YES)
{
/* decode and print */
- char newfile[_POSIX_PATH_MAX] = "";
+ char newfile[PATH_MAX] = "";
FILE *ifp = NULL;
mutt_mktemp(newfile, sizeof(newfile));
bool mime_fwd_any = true;
struct Header *parent_hdr = NULL;
FILE *parent_fp = NULL;
- char tmpbody[_POSIX_PATH_MAX];
+ char tmpbody[PATH_MAX];
char prefix[STRING];
int rc = 0;
struct State st;
int rc;
struct Body **last = NULL;
- char tmpbody[_POSIX_PATH_MAX];
+ char tmpbody[PATH_MAX];
FILE *tmpfp = NULL;
int chflags = CH_XMIT;
struct Header *tmphdr = NULL;
struct State st;
- char tmpbody[_POSIX_PATH_MAX];
+ char tmpbody[PATH_MAX];
FILE *tmpfp = NULL;
char prefix[SHORT_STRING];
int rfc1524_mailcap_lookup(struct Body *a, char *type,
struct Rfc1524MailcapEntry *entry, int opt)
{
- char path[_POSIX_PATH_MAX];
+ char path[PATH_MAX];
int found = false;
char *curr = MailcapPath;
int i, j, k, ps;
char *s = NULL;
bool lmatch = false, rmatch = false;
- char left[_POSIX_PATH_MAX];
- char right[_POSIX_PATH_MAX];
+ char left[PATH_MAX];
+ char right[PATH_MAX];
newfile[0] = 0;
unsigned char c = '\0';
FILE *in = NULL, *out = NULL;
char buf[LONG_STRING];
- char tmpfile[_POSIX_PATH_MAX];
+ char tmpfile[PATH_MAX];
if (!hdr || !hdr->content || !hdr->content->filename)
return;
static int send_message(struct Header *msg)
{
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
int i;
#ifdef USE_SMTP
short old_write_bcc;
struct Context *ctx, struct Header *cur)
{
char buffer[LONG_STRING];
- char fcc[_POSIX_PATH_MAX] = ""; /* where to copy this message */
+ char fcc[PATH_MAX] = ""; /* where to copy this message */
FILE *tempfp = NULL;
struct Body *pbody = NULL;
int i;
static void transform_to_7bit(struct Body *a, FILE *fpin)
{
- char buf[_POSIX_PATH_MAX];
+ char buf[PATH_MAX];
struct State s;
struct stat sb;
void mutt_message_to_7bit(struct Body *a, FILE *fp)
{
- char temp[_POSIX_PATH_MAX];
+ char temp[PATH_MAX];
char *line = NULL;
FILE *fpin = NULL;
FILE *fpout = NULL;
if (SendmailWait >= 0 && tempfile)
{
- char tmp[_POSIX_PATH_MAX];
+ char tmp[PATH_MAX];
mutt_mktemp(tmp, sizeof(tmp));
*tempfile = mutt_str_strdup(tmp);
{
int rc = 0;
FILE *f = NULL;
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
struct Message *msg = NULL;
if (!h)
int mutt_write_multiple_fcc(const char *path, struct Header *hdr, const char *msgid,
int post, char *fcc, char **finalpath)
{
- char fcc_tok[_POSIX_PATH_MAX];
- char fcc_expanded[_POSIX_PATH_MAX];
+ char fcc_tok[PATH_MAX];
+ char fcc_expanded[PATH_MAX];
mutt_str_strfcpy(fcc_tok, path, sizeof(fcc_tok));
{
struct Context f;
struct Message *msg = NULL;
- char tempfile[_POSIX_PATH_MAX];
+ char tempfile[PATH_MAX];
FILE *tempfp = NULL;
int rc = -1;
bool need_buffy_cleanup = false;