X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fnew.c;h=c4026ba48d20057bfdb383fe05bb34616d5abad7;hb=fd00a3b030ab9d854eac79641f7bf25e6538acc1;hp=92366623e2d69fcc66549d2eee71ae2299cf0ac7;hpb=714b5c530ece27ea2835a313013f5b770163403c;p=mmh diff --git a/uip/new.c b/uip/new.c index 9236662..c4026ba 100644 --- a/uip/new.c +++ b/uip/new.c @@ -94,7 +94,7 @@ seq_in_list(char *name, char *sequences[]) static char * get_msgnums(char *folder, char *sequences[]) { - char *seqfile = concat(m_maildir(folder), "/", mh_seq, (void *)NULL); + char *seqfile = concat(toabsdir(folder), "/", mh_seq, (void *)NULL); FILE *fp = fopen(seqfile, "r"); int state; char name[NAMESZ], field[BUFSIZ]; @@ -252,7 +252,7 @@ check_folders(struct node **first, struct node **last, b.sequences = sequences; if (folders == NULL) { - chdir(m_maildir("")); + chdir(toabsdir("+")); crawl_folders(".", crawl_callback, &b); } else { fp = fopen(folders, "r"); @@ -436,7 +436,7 @@ main(int argc, char **argv) #ifdef LOCALE setlocale(LC_ALL, ""); #endif - invo_name = r1bindex(argv[0], '/'); + invo_name = mhbasename(argv[0]); /* read user profile/context */ context_read(); @@ -475,7 +475,7 @@ main(int argc, char **argv) if (!(invo_name = *argp++) || *invo_name == '-') adios(NULL, "missing argument to %s", argp[-2]); - invo_name = r1bindex(invo_name, '/'); + invo_name = mhbasename(invo_name); continue; } } @@ -497,7 +497,7 @@ main(int argc, char **argv) /* will flists */ } else { if (folders[0] != '/') { - folders = m_maildir(folders); + folders = toabsdir(folders); } } @@ -513,7 +513,7 @@ main(int argc, char **argv) } sequences[i] = NULL; - folder = doit(context_find(pfolder), folders, sequences); + folder = doit(context_find(curfolder), folders, sequences); if (folder == NULL) { done(0); return 1; @@ -527,11 +527,11 @@ main(int argc, char **argv) ** has in memory. So, we'll be lame, too. I'm not sure if i ** should just change context_replace... */ - context_replace(pfolder, "defeat_context_replace_optimization"); + context_replace(curfolder, "defeat_context_replace_optimization"); } /* update current folder */ - context_replace(pfolder, folder->n_name); + context_replace(curfolder, folder->n_name); if (run_mode == FNEXT || run_mode == FPREV) { printf("%s %s\n", folder->n_name, folder->n_field);