diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-11-21 19:14:06 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-11-21 19:21:34 +0200 |
commit | e6927c46013d391242d76b63cdb7b044d9ba8065 (patch) | |
tree | bc78c457286b5aa7b3d6edbbdc2293149b3db7e8 /mh/mh.h | |
parent | 597404315ba308889ea2776c56c184d1eb9b02fc (diff) | |
download | mailutils-e6927c46013d391242d76b63cdb7b044d9ba8065.tar.gz mailutils-e6927c46013d391242d76b63cdb7b044d9ba8065.tar.bz2 |
mh: Fix compatibility issues in the draftfolder facility. Implement whatnowproc.
* mh/whatnowenv.c: New source.
* mh/Makefile.am (libmh_a_SOURCES): Add whatnowenv.c
* mh/TODO: Update.
* mh/comp.c: Implement draftfolder, whatnowproc and the -use option.
* mh/forw.c: Likewise.
* mh/repl.c: Likewise.
* mh/compcommon.c (check_draft_disposition): Fix typo.
* mh/mh.h (mh_whatnow_env) <draftfolder>: Remove.
<mbox>: New member.
(mh_whatnowproc): New proto.
(mh_whatnow_env_from_environ)
(mh_whatnow_env_to_environ): New proto.
* mh/mh_global.c (prop_merger): Bugfix: initialize dst.
* mh/mh_init.c (mh_draft_message): Update cur msg.
* mh/mh_whatnow.c (mh_whatnowproc): New function.
* mh/whatnow.c (opt_handler): Do not read Draft-Folder variable.
(main): Initialize data from the environment.
Diffstat (limited to 'mh/mh.h')
-rw-r--r-- | mh/mh.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -218,11 +218,11 @@ struct mh_whatnow_env /* whatnow shell environment */ char *file; /* The file being processed */ char *msg; /* File name of the original message (if any) */ char *draftfile; /* File to preserve the draft into */ - const char *draftfolder; const char *editor; char *prompt; char *anno_field; /* Annotate field to be used */ mu_list_t anno_list; /* List of messages (mu_message_t) to annotate */ + mu_mailbox_t mbox; }; #define DISP_QUIT 0 @@ -330,6 +330,9 @@ int mh_draft_message (const char *name, const char *msgspec, char **pname); int mh_spawnp (const char *prog, const char *file); int mh_whatnow (struct mh_whatnow_env *wh, int initial_edit); +int mh_whatnowproc (struct mh_whatnow_env *wh, int initial_edit, + const char *prog); + int mh_disposition (const char *filename); int mh_usedraft (const char *filename); int mh_file_copy (const char *from, const char *to); @@ -381,3 +384,5 @@ char *mh_safe_make_file_name (const char *dir, const char *file); void mh_mailbox_get_cur (mu_mailbox_t mbox, size_t *pcur); void mh_mailbox_set_cur (mu_mailbox_t mbox, size_t cur); +void mh_whatnow_env_from_environ (struct mh_whatnow_env *wh); +void mh_whatnow_env_to_environ (struct mh_whatnow_env *wh); |