Commit 35bbe788 35bbe7882496b0732e4e94d3a273c294c2a19b9b by Sergey Poznyakoff

(mh_file_to_message,mh_stream_to_message): New functions.

(mhl_format_compile,mhl_format_run,mhl_format_destroy): New functions.
1 parent 6203fdd4
Showing 1 changed file with 13 additions and 1 deletions
...@@ -44,10 +44,15 @@ ...@@ -44,10 +44,15 @@
44 #include <mailutils/argcv.h> 44 #include <mailutils/argcv.h>
45 #include <mailutils/debug.h> 45 #include <mailutils/debug.h>
46 #include <mailutils/mailer.h> 46 #include <mailutils/mailer.h>
47 #include <mailutils/envelope.h>
47 48
48 #include <mu_asprintf.h> 49 #include <mu_asprintf.h>
49 #include <getline.h> 50 #include <getline.h>
50 51
52 #if !HAVE_DECL_STRCHRNUL
53 extern char *strchrnul __P((const char *s, int c_in));
54 #endif
55
51 #define MH_FMT_RALIGN 0x1000 56 #define MH_FMT_RALIGN 0x1000
52 #define MH_FMT_ZEROPAD 0x2000 57 #define MH_FMT_ZEROPAD 0x2000
53 #define MH_WIDTH_MASK 0x0fff 58 #define MH_WIDTH_MASK 0x0fff
...@@ -215,7 +220,8 @@ void mh_init __P((void)); ...@@ -215,7 +220,8 @@ void mh_init __P((void));
215 void mh_init2 __P((void)); 220 void mh_init2 __P((void));
216 void mh_read_profile __P((void)); 221 void mh_read_profile __P((void));
217 int mh_read_formfile __P((char *name, char **pformat)); 222 int mh_read_formfile __P((char *name, char **pformat));
218 mailbox_t mh_open_msg_file (char *folder, char *file_name); 223 message_t mh_file_to_message (char *folder, char *file_name);
224 message_t mh_stream_to_message (stream_t stream);
219 void mh_install __P((char *name, int automode)); 225 void mh_install __P((char *name, int automode));
220 226
221 char *mh_global_profile_get __P((char *name, char *defval)); 227 char *mh_global_profile_get __P((char *name, char *defval));
...@@ -291,3 +297,9 @@ int mh_usedraft __P((const char *filename)); ...@@ -291,3 +297,9 @@ int mh_usedraft __P((const char *filename));
291 int mh_file_copy __P((const char *from, const char *to)); 297 int mh_file_copy __P((const char *from, const char *to));
292 298
293 void mh_annotate __P((message_t msg, char *field, char *text, int date)); 299 void mh_annotate __P((message_t msg, char *field, char *text, int date));
300
301 list_t mhl_format_compile __P((char *name));
302 int mhl_format_run __P((list_t fmt, int width, int length,
303 int clearscreen, int bell,
304 message_t msg, stream_t output));
305 void mhl_format_destroy (list_t *fmt);
......