diff options
31 files changed, 512 insertions, 31 deletions
diff --git a/Makefile.am b/Makefile.am index aed3f5ac4..d17f724e5 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -94,6 +94,7 @@ SUBDIRS = . \ | |||
94 | sql\ | 94 | sql\ |
95 | libmu_auth\ | 95 | libmu_auth\ |
96 | libproto\ | 96 | libproto\ |
97 | libmu_compat\ | ||
97 | testsuite\ | 98 | testsuite\ |
98 | lib\ | 99 | lib\ |
99 | libmu_argp\ | 100 | libmu_argp\ |
diff --git a/configure.ac b/configure.ac index abcf5c9fb..aafad7f31 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1205,6 +1205,7 @@ AC_ARG_WITH([mh-bindir], | |||
1205 | # Initialize the (autotest) test suite. | 1205 | # Initialize the (autotest) test suite. |
1206 | AC_CONFIG_TESTDIR(libmailutils/tests) | 1206 | AC_CONFIG_TESTDIR(libmailutils/tests) |
1207 | AC_CONFIG_TESTDIR(testsuite) | 1207 | AC_CONFIG_TESTDIR(testsuite) |
1208 | AC_CONFIG_TESTDIR(libmu_compat/tests) | ||
1208 | AC_CONFIG_TESTDIR(frm/tests) | 1209 | AC_CONFIG_TESTDIR(frm/tests) |
1209 | AC_CONFIG_TESTDIR(maidag/tests) | 1210 | AC_CONFIG_TESTDIR(maidag/tests) |
1210 | AC_CONFIG_TESTDIR(messages/tests) | 1211 | AC_CONFIG_TESTDIR(messages/tests) |
@@ -1214,6 +1215,8 @@ AC_CONFIG_TESTDIR(mh/tests) | |||
1214 | 1215 | ||
1215 | AC_CONFIG_FILES([libmailutils/tests/Makefile | 1216 | AC_CONFIG_FILES([libmailutils/tests/Makefile |
1216 | libmailutils/tests/atlocal | 1217 | libmailutils/tests/atlocal |
1218 | libmu_compat/tests/Makefile | ||
1219 | libmu_compat/tests/atlocal | ||
1217 | testsuite/Makefile | 1220 | testsuite/Makefile |
1218 | testsuite/atlocal | 1221 | testsuite/atlocal |
1219 | frm/tests/Makefile | 1222 | frm/tests/Makefile |
@@ -1368,6 +1371,7 @@ AC_CONFIG_FILES([ | |||
1368 | libproto/pop/Makefile | 1371 | libproto/pop/Makefile |
1369 | libproto/nntp/Makefile | 1372 | libproto/nntp/Makefile |
1370 | libproto/imap/Makefile | 1373 | libproto/imap/Makefile |
1374 | libmu_compat/Makefile | ||
1371 | maidag/Makefile | 1375 | maidag/Makefile |
1372 | mail/Makefile | 1376 | mail/Makefile |
1373 | mail/testsuite/Makefile | 1377 | mail/testsuite/Makefile |
@@ -1384,6 +1388,7 @@ AC_CONFIG_FILES([ | |||
1384 | libmailutils/server/Makefile | 1388 | libmailutils/server/Makefile |
1385 | libmailutils/string/Makefile | 1389 | libmailutils/string/Makefile |
1386 | libmailutils/stream/Makefile | 1390 | libmailutils/stream/Makefile |
1391 | libmailutils/stdstream/Makefile | ||
1387 | libmailutils/url/Makefile | 1392 | libmailutils/url/Makefile |
1388 | libmailutils/Makefile | 1393 | libmailutils/Makefile |
1389 | messages/Makefile | 1394 | messages/Makefile |
diff --git a/include/mailutils/Makefile.am b/include/mailutils/Makefile.am index b52db2c78..b31515819 100644 --- a/include/mailutils/Makefile.am +++ b/include/mailutils/Makefile.am | |||
@@ -61,6 +61,7 @@ pkginclude_HEADERS = \ | |||
61 | libcfg.h\ | 61 | libcfg.h\ |
62 | list.h\ | 62 | list.h\ |
63 | locker.h\ | 63 | locker.h\ |
64 | log.h\ | ||
64 | mailbox.h\ | 65 | mailbox.h\ |
65 | mailcap.h\ | 66 | mailcap.h\ |
66 | mailer.h\ | 67 | mailer.h\ |
@@ -90,6 +91,7 @@ pkginclude_HEADERS = \ | |||
90 | server.h\ | 91 | server.h\ |
91 | sieve.h\ | 92 | sieve.h\ |
92 | smtp.h\ | 93 | smtp.h\ |
94 | stdstream.h\ | ||
93 | stream.h\ | 95 | stream.h\ |
94 | syslog.h\ | 96 | syslog.h\ |
95 | sql.h\ | 97 | sql.h\ |
diff --git a/include/mailutils/argcv.h b/include/mailutils/argcv.h index 49d3bfa2d..4a8f29399 100644 --- a/include/mailutils/argcv.h +++ b/include/mailutils/argcv.h | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <unistd.h> | 24 | #include <unistd.h> |
25 | #include <string.h> | 25 | #include <string.h> |
26 | 26 | ||
27 | #include <mailutils/types.h> | ||
28 | |||
27 | #ifdef __cplusplus | 29 | #ifdef __cplusplus |
28 | extern "C" { | 30 | extern "C" { |
29 | #endif | 31 | #endif |
@@ -37,20 +39,22 @@ enum mu_argcv_escape | |||
37 | mu_argcv_escape_c | 39 | mu_argcv_escape_c |
38 | /* mu_argcv_escape_sh */ | 40 | /* mu_argcv_escape_sh */ |
39 | }; | 41 | }; |
42 | |||
40 | int mu_argcv_join (int argc, char **argv, char *delim, | 43 | int mu_argcv_join (int argc, char **argv, char *delim, |
41 | enum mu_argcv_escape esc, | 44 | enum mu_argcv_escape esc, |
42 | char **pstring); | 45 | char **pstring); |
43 | int mu_argcv_string (int argc, char **argv, char **string); | ||
44 | |||
45 | void mu_argcv_remove (int *pargc, char ***pargv, | 46 | void mu_argcv_remove (int *pargc, char ***pargv, |
46 | int (*sel) (const char *, void *), void *); | 47 | int (*sel) (const char *, void *), void *); |
47 | 48 | int mu_argcv_string (int argc, char **argv, char **string); | |
49 | |||
50 | |||
48 | /* Deprecated interfaces */ | 51 | /* Deprecated interfaces */ |
52 | |||
49 | #define MU_ARGCV_RETURN_DELIMS 0x01 | 53 | #define MU_ARGCV_RETURN_DELIMS 0x01 |
50 | 54 | ||
51 | #ifndef MU_ARCGV_DEPRECATED | 55 | #ifndef MU_ARCGV_DEPRECATED |
52 | # define MU_ARCGV_DEPRECATED __attribute__((deprecated)) | 56 | # define MU_ARCGV_DEPRECATED MU_DEPRECATED |
53 | #endif | 57 | #endif |
54 | 58 | ||
55 | int mu_argcv_get (const char *command, const char *delim, | 59 | int mu_argcv_get (const char *command, const char *delim, |
56 | const char *cmnt, | 60 | const char *cmnt, |
diff --git a/include/mailutils/log.h b/include/mailutils/log.h new file mode 100644 index 000000000..a36b85ab5 --- /dev/null +++ b/include/mailutils/log.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | ||
2 | Copyright (C) 2010 Free Software Foundation, Inc. | ||
3 | |||
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 | ||
6 | the Free Software Foundation; either version 3, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | GNU Mailutils is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. */ | ||
16 | |||
17 | #ifndef _MAILUTILS_LOG_H | ||
18 | #define _MAILUTILS_LOG_H | ||
19 | |||
20 | #ifdef __cplusplus | ||
21 | extern "C" { | ||
22 | #endif | ||
23 | |||
24 | #include <mailutils/types.h> | ||
25 | |||
26 | #define MU_LOG_DEBUG 0 | ||
27 | #define MU_LOG_INFO 1 | ||
28 | #define MU_LOG_NOTICE 2 | ||
29 | #define MU_LOG_WARNING 3 | ||
30 | #define MU_LOG_ERROR 4 | ||
31 | #define MU_LOG_CRIT 5 | ||
32 | #define MU_LOG_ALERT 6 | ||
33 | #define MU_LOG_EMERG 7 | ||
34 | |||
35 | #define MU_LOGMODE_SEVERITY 0x0001 | ||
36 | #define MU_LOGMODE_LOCUS 0x0002 | ||
37 | |||
38 | int mu_log_stream_create (mu_stream_t *, mu_stream_t); | ||
39 | int mu_syslog_stream_create (mu_stream_t *, int); | ||
40 | |||
41 | extern char *_mu_severity_str[]; | ||
42 | extern int _mu_severity_num; | ||
43 | |||
44 | #ifdef __cplusplus | ||
45 | } | ||
46 | #endif | ||
47 | |||
48 | #endif | ||
49 | |||
diff --git a/include/mailutils/mailutils.h b/include/mailutils/mailutils.h index ccaa3d5e6..19b8e773f 100644 --- a/include/mailutils/mailutils.h +++ b/include/mailutils/mailutils.h | |||
@@ -59,12 +59,12 @@ | |||
59 | #include <mailutils/url.h> | 59 | #include <mailutils/url.h> |
60 | #include <mailutils/gocs.h> | 60 | #include <mailutils/gocs.h> |
61 | #include <mailutils/version.h> | 61 | #include <mailutils/version.h> |
62 | #include <mailutils/vartab.h> | ||
63 | #include <mailutils/io.h> | 62 | #include <mailutils/io.h> |
64 | #include <mailutils/secret.h> | 63 | #include <mailutils/secret.h> |