projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Code cosmetics
[mmh]
/
uip
/
scan.c
diff --git
a/uip/scan.c
b/uip/scan.c
index
03a260b
..
5cac626
100644
(file)
--- a/
uip/scan.c
+++ b/
uip/scan.c
@@
-73,7
+73,7
@@
main(int argc, char **argv)
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
- invo_name = r1bindex(argv[0], '/');
+ invo_name = mhbasename(argv[0]);
/* read user profile/context */
context_read();
/* read user profile/context */
context_read();
@@
-143,8
+143,8
@@
main(int argc, char **argv)
case FILESW:
if (!(cp = *argp++) || (cp[0] == '-' && cp[1]))
adios(NULL, "missing argument to %s", argp[-2]);
case FILESW:
if (!(cp = *argp++) || (cp[0] == '-' && cp[1]))
adios(NULL, "missing argument to %s", argp[-2]);
- if (strcmp(file = cp, "-"))
- file = path(cp, TFILE);
+ if (strcmp(file = cp, "-")!=0)
+ file = getcpy(expanddir(cp));
continue;
}
}
continue;
}
}
@@
-152,14
+152,11
@@
main(int argc, char **argv)
if (folder)
adios(NULL, "only one folder at a time!");
else
if (folder)
adios(NULL, "only one folder at a time!");
else
- folder = pluspath(cp);
+ folder = getcpy(expandfol(cp));
} else
} else
- app_msgarg(&msgs, cp);
+ app_msgarg(&msgs, cp);
}
}
- if (!context_find("path"))
- free(path("./", TFOLDER));
-
/*
** Get new format string. Must be before chdir().
*/
/*
** Get new format string. Must be before chdir().
*/
@@
-178,9
+175,8
@@
main(int argc, char **argv)
if (strcmp(file, "-") == 0) {
in = stdin;
file = "stdin";
if (strcmp(file, "-") == 0) {
in = stdin;
file = "stdin";
- } else {
- if ((in = fopen(file, "r")) == NULL)
- adios(file, "unable to open");
+ } else if (!(in = fopen(file, "r"))) {
+ adios(file, "unable to open");
}
#ifndef JLR
}
#ifndef JLR
@@
-207,8
+203,8
@@
main(int argc, char **argv)
if (!msgs.size)
app_msgarg(&msgs, "all");
if (!folder)
if (!msgs.size)
app_msgarg(&msgs, "all");
if (!folder)
- folder = getfolder(1);
- maildir = m_maildir(folder);
+ folder = getcurfol();
+ maildir = toabsdir(folder);
if (chdir(maildir) == NOTOK)
adios(maildir, "unable to change directory to");
if (chdir(maildir) == NOTOK)
adios(maildir, "unable to change directory to");
@@
-227,7
+223,7
@@
main(int argc, char **argv)
done(1);
seq_setprev(mp); /* set the Previous-Sequence */
done(1);
seq_setprev(mp); /* set the Previous-Sequence */
- context_replace(pfolder, folder); /* update current folder */
+ context_replace(curfolder, folder); /* update current folder */
seq_save(mp); /* synchronize message sequences */
context_save(); /* save the context file */
seq_save(mp); /* synchronize message sequences */
context_save(); /* save the context file */