Commit 6c6627a0 6c6627a0f6c53869b87c507d8cf0f3c6526e3f35 by Sergey Poznyakoff

Include <mailutils/guile.h>

1 parent 2d6a699c
1 /* GNU Mailutils -- a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 GNU Mailutils is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
18 #if defined(HAVE_CONFIG_H) 18 #if defined(HAVE_CONFIG_H)
19 # include <config.h> 19 # include <config.h>
20 #endif 20 #endif
21
21 #include <stdlib.h> 22 #include <stdlib.h>
22 #include <stdio.h> 23 #include <stdio.h>
23 #include <unistd.h> 24 #include <unistd.h>
...@@ -40,68 +41,10 @@ ...@@ -40,68 +41,10 @@
40 #include <mailutils/mailer.h> 41 #include <mailutils/mailer.h>
41 #include <mailutils/envelope.h> 42 #include <mailutils/envelope.h>
42 #include <mailutils/url.h> 43 #include <mailutils/url.h>
44 #include <mailutils/mime.h>
45 #include <mailutils/registrar.h>
46 #include <mailutils/mu_auth.h>
43 47
44 #include <libguile.h> 48 #include <mailutils/guile.h>
45
46 #if GUILE_VERSION == 14
47
48 # define SCM_STRING_CHARS SCM_CHARS
49 # define scm_list_1 SCM_LIST1
50 # define scm_list_2 SCM_LIST2
51 # define scm_list_3 SCM_LIST3
52 # define scm_list_4 SCM_LIST4
53 # define scm_list_5 SCM_LIST5
54 # define scm_list_n SCM_LISTN
55 # define scm_c_define scm_sysintern
56 # define scm_primitive_eval_x scm_eval_x
57 # define scm_i_big2dbl scm_big2dbl
58
59 extern SCM scm_long2num (long val);
60
61 #endif
62
63 typedef struct
64 {
65 int debug_guile;
66 mailbox_t mbox;
67 char *user_name;
68 int (*init) __P((void *data));
69 SCM (*catch_body) __P((void *data, mailbox_t mbox));
70 SCM (*catch_handler) __P((void *data, SCM tag, SCM throw_args));
71 int (*next) __P((void *data, mailbox_t mbox));
72 int (*exit) __P((void *data, mailbox_t mbox));
73 void *data;
74 } guimb_param_t;
75
76 extern SCM _mu_scm_mailer;
77 extern SCM _mu_scm_debug;
78
79 extern SCM scm_makenum __P((unsigned long val));
80 extern void mu_set_variable (const char *name, SCM value);
81 extern void mu_scm_init __P((void));
82
83 extern void mu_scm_mailbox_init __P((void));
84 extern SCM mu_scm_mailbox_create __P((mailbox_t mbox));
85 extern int mu_scm_is_mailbox __P((SCM scm));
86
87 extern void mu_scm_message_init __P((void));
88 extern SCM mu_scm_message_create __P((SCM owner, message_t msg));
89 extern int mu_scm_is_message __P((SCM scm));
90 extern const message_t mu_scm_message_get __P((SCM MESG));
91
92 extern int mu_scm_is_body __P((SCM scm));
93 extern void mu_scm_body_init __P((void));
94 extern SCM mu_scm_body_create __P((SCM mesg, body_t body));
95
96 extern void mu_scm_address_init __P((void));
97 extern void mu_scm_logger_init __P((void));
98
99 extern void mu_scm_port_init __P((void));
100 extern SCM mu_port_make_from_stream __P((SCM msg, stream_t stream, long mode));
101
102 extern void mu_scm_mime_init __P((void));
103 extern void mu_scm_message_add_owner __P((SCM MESG, SCM owner));
104 49
105 extern void mu_process_mailbox __P((int argc, char *argv[], guimb_param_t *param));
106 50
107 extern void mu_scm_mutil_init __P((void));
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
18 #include <mail.local.h> 18 #include <mail.local.h>
19 19
20 #ifdef WITH_GUILE 20 #ifdef WITH_GUILE
21 #include <mu_scm.h> 21 #include <mailutils/guile.h>
22 22
23 int debug_guile; 23 int debug_guile;
24 24
......