projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bring in all of the mh-e support that is actually used
[mmh]
/
uip
/
whatnowproc.c
diff --git
a/uip/whatnowproc.c
b/uip/whatnowproc.c
index
12cd13a
..
f3c46f8
100644
(file)
--- a/
uip/whatnowproc.c
+++ b/
uip/whatnowproc.c
@@
-16,8
+16,8
@@
** then execs the command.
*/
int
** then execs the command.
*/
int
-what_now(char *ed, int nedit, int use, char *file, char *altmsg, int dist,
- struct msgs *mp, char *text, int inplace, char *cwd)
+what_now(char *ed, int use, char *file, char *altmsg, int dist,
+ struct msgs *mp, char *text, char *cwd)
{
int found, k, msgnum, vecp;
int len, buflen;
{
int found, k, msgnum, vecp;
int len, buflen;
@@
-48,18
+48,18
@@
what_now(char *ed, int nedit, int use, char *file, char *altmsg, int dist,
m_putenv("editalt", bp);
snprintf(buffer, sizeof(buffer), "%d", dist);
m_putenv("mhdist", buffer);
m_putenv("editalt", bp);
snprintf(buffer, sizeof(buffer), "%d", dist);
m_putenv("mhdist", buffer);
- if (nedit) {
- unputenv("mheditor");
+ if (!ed) {
+ m_putenv("mheditor", defaulteditor);
+ } else if (*ed) {
+ m_putenv("mheditor", ed);
} else {
} else {
- m_putenv("mheditor", ed ? ed : (ed = context_find("editor")) ?
- ed : defaulteditor);
+ unputenv("mheditor");
}
snprintf(buffer, sizeof(buffer), "%d", use);
m_putenv("mhuse", buffer);
unputenv("mhmessages");
unputenv("mhannotate");
}
snprintf(buffer, sizeof(buffer), "%d", use);
m_putenv("mhuse", buffer);
unputenv("mhmessages");
unputenv("mhannotate");
- unputenv("mhinplace");
if (text && mp && !is_readonly(mp)) {
found = 0;
if (text && mp && !is_readonly(mp)) {
found = 0;
@@
-87,8
+87,6
@@
what_now(char *ed, int nedit, int use, char *file, char *altmsg, int dist,
if (found) {
m_putenv("mhmessages", buffer);
m_putenv("mhannotate", text);
if (found) {
m_putenv("mhmessages", buffer);
m_putenv("mhannotate", text);
- snprintf(buffer, sizeof(buffer), "%d", inplace);
- m_putenv("mhinplace", buffer);
}
}
}
}