Commit 652afe9a 652afe9a09cc20a21695f0dbdbfc5121a6daf555 by Sergey Poznyakoff

* configure.ac (VI_CURRENT): Raise to 3;

(MU_APP_LIBRARIES): Rename libargp.a to libmuargp.a
* NEWS: Update.

* comsat/comsat.c, dotlock/dotlock.c, examples/muauth.c,
examples/muemail.c, frm/frm.h, guimb/main.c, imap4d/imap4d.c,
libargp/auth.c, libargp/cmdline.c, libargp/common.c,
libargp/gsasl.c, libargp/mu_argp.c, libargp/pam.c,
libargp/radius.c, libargp/sieve.c, libargp/sql.c, libargp/tls.c,
libargp/virtdomain.c, maidag/maidag.h, mail/mail.c,
mail.local/main.c, mail.remote/mail.remote.c, messages/messages.c,
mimeview/mimetypes.y, mimeview/mimeview.c, movemail/movemail.c,
pop3d/extra.c, pop3d/pop3d.c, pop3d/popauth.c, readmsg/readmsg.c,
sieve/sieve.c: Include mailutils/libargp.h.

* config/mailutils-config.c: New arguments to --link: cfg and argp.

* include/mailutils/Makefile.am (pkginclude_HEADERS): Remove
compat.h, add libargp.h, libcfg.h and version.h
* include/mailutils/compat.h: Remove
* include/mailutils/libargp.h: New file (from libargp/cmdline.h)
* include/mailutils/libcfg.h: New file (from (libcfg/)
* include/mailutils/version.h: New file

* include/mailutils/folder.h (struct mu_0_6_folder_list): Remove
(mu_0_6_folder_list, mu_0_6_folder_lsub)
(mu_0_6_folder_list_destroy): Remove.

* include/mailutils/mailutils.h: Include version.h
Remove 0.6 compatibility layer.
* mailbox/folder.c (list_to_0_6_folder_list, mu_0_6_folder_list)
(mu_0_6_folder_lsub, mu_0_6_folder_list_destroy): Remove.

* lib/Makefile.am (libmuaux_la_SOURCES): Remove argpinit.c,
muinit.h and muinit.c

* libargp/Makefile.am (noinst_LIBRARIES, noinst_HEADERS): Remove
(lib_LIBRARIES): Add libmuargp.a
* libargp/compat.c: New file.
* libargp/muinit.c: New file.
* libargp/cmdline.h: Remove.

* libcfg/Makefile.am (noinst_HEADERS): Remove.
* libcfg/auth.c, libcfg/common.c, libcfg/gsasl.c, libcfg/init.c,
libcfg/pam.c, libcfg/radius.c, libcfg/sieve.c, libcfg/sql.c,
libcfg/tls.c, libcfg/virtdomain.c: Include mailutils/libcfg.h

* mailbox/Makefile.am (libmailutils_la_SOURCES): Add version.c
* mailbox/cfg_lexer.c (_mu_parse_config): Do nothing if
root_container is NULL.

* mh/ali.c, mh/anno.c, mh/burst.c, mh/comp.c, mh/fmtcheck.c,
mh/folder.c, mh/forw.c, mh/inc.c, mh/install-mh.c, mh/mark.c,
mh/mhl.c, mh/mhn.c, mh/mhparam.c, mh/mhpath.c, mh/pick.c,
mh/refile.c, mh/repl.c, mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c,
mh/sortm.c, mh/whatnow.c, mh/whom.c: Use mh_argp_init instead of
mu_argp_init.
* mh/mh_argp.c, mh/mh_getopt.h (mh_argp_init): New function
1 parent 701c0182
Showing 88 changed files with 741 additions and 1084 deletions
2007-11-19 Sergey Poznyakoff <gray@gnu.org.ua>
* configure.ac (VI_CURRENT): Raise to 3;
(MU_APP_LIBRARIES): Rename libargp.a to libmuargp.a
* NEWS: Update.
* comsat/comsat.c, dotlock/dotlock.c, examples/muauth.c,
examples/muemail.c, frm/frm.h, guimb/main.c, imap4d/imap4d.c,
libargp/auth.c, libargp/cmdline.c, libargp/common.c,
libargp/gsasl.c, libargp/mu_argp.c, libargp/pam.c,
libargp/radius.c, libargp/sieve.c, libargp/sql.c, libargp/tls.c,
libargp/virtdomain.c, maidag/maidag.h, mail/mail.c,
mail.local/main.c, mail.remote/mail.remote.c, messages/messages.c,
mimeview/mimetypes.y, mimeview/mimeview.c, movemail/movemail.c,
pop3d/extra.c, pop3d/pop3d.c, pop3d/popauth.c, readmsg/readmsg.c,
sieve/sieve.c: Include mailutils/libargp.h.
* config/mailutils-config.c: New arguments to --link: cfg and argp.
* include/mailutils/Makefile.am (pkginclude_HEADERS): Remove
compat.h, add libargp.h, libcfg.h and version.h
* include/mailutils/compat.h: Remove
* include/mailutils/libargp.h: New file (from libargp/cmdline.h)
* include/mailutils/libcfg.h: New file (from (libcfg/)
* include/mailutils/version.h: New file
* include/mailutils/folder.h (struct mu_0_6_folder_list): Remove
(mu_0_6_folder_list, mu_0_6_folder_lsub)
(mu_0_6_folder_list_destroy): Remove.
* include/mailutils/mailutils.h: Include version.h
Remove 0.6 compatibility layer.
* mailbox/folder.c (list_to_0_6_folder_list, mu_0_6_folder_list)
(mu_0_6_folder_lsub, mu_0_6_folder_list_destroy): Remove.
* lib/Makefile.am (libmuaux_la_SOURCES): Remove argpinit.c,
muinit.h and muinit.c
* libargp/Makefile.am (noinst_LIBRARIES, noinst_HEADERS): Remove
(lib_LIBRARIES): Add libmuargp.a
* libargp/compat.c: New file.
* libargp/muinit.c: New file.
* libargp/cmdline.h: Remove.
* libcfg/Makefile.am (noinst_HEADERS): Remove.
* libcfg/auth.c, libcfg/common.c, libcfg/gsasl.c, libcfg/init.c,
libcfg/pam.c, libcfg/radius.c, libcfg/sieve.c, libcfg/sql.c,
libcfg/tls.c, libcfg/virtdomain.c: Include mailutils/libcfg.h
* mailbox/Makefile.am (libmailutils_la_SOURCES): Add version.c
* mailbox/cfg_lexer.c (_mu_parse_config): Do nothing if
root_container is NULL.
* mh/ali.c, mh/anno.c, mh/burst.c, mh/comp.c, mh/fmtcheck.c,
mh/folder.c, mh/forw.c, mh/inc.c, mh/install-mh.c, mh/mark.c,
mh/mhl.c, mh/mhn.c, mh/mhparam.c, mh/mhpath.c, mh/pick.c,
mh/refile.c, mh/repl.c, mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c,
mh/sortm.c, mh/whatnow.c, mh/whom.c: Use mh_argp_init instead of
mu_argp_init.
* mh/mh_argp.c, mh/mh_getopt.h (mh_argp_init): New function
2007-11-18 Sergey Poznyakoff <gray@gnu.org.ua>
* bootstrap (cp_mark_as_generated): Create target directory if
......
GNU mailutils NEWS -- history of user-visible changes. 2007-11-10
GNU mailutils NEWS -- history of user-visible changes. 2007-11-19
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
See the end of file for copying conditions.
......@@ -94,6 +94,8 @@ Previous versions incorrectly understood such an URL as `a/b'
* Fixed APOP handling.
* Remove v0.6 compatibility layer.
Version 1.2:
......
......@@ -18,7 +18,7 @@
MA 02110-1301 USA */
#include "comsat.h"
#include "muinit.h"
#include "mailutils/libargp.h"
#ifndef PATH_DEV
# define PATH_DEV "/dev"
......
......@@ -22,7 +22,7 @@
#include <string.h>
#include <mailutils/mailutils.h>
#include <mu_asprintf.h>
#include "muinit.h"
#include "mailutils/libargp.h"
const char *program_version = "mailutils-config (" PACKAGE_STRING ")";
static char doc[] = N_("GNU mailutils-config -- Display compiler and loader options needed for building a program with mailutils");
......@@ -185,7 +185,7 @@ main (int argc, char **argv)
int j;
char *ptr;
add_entry (-1, LINK_FLAGS);
add_entry (-100, LINK_FLAGS);
add_entry (100, LINK_POSTFLAGS);
add_entry (1, "-lmailutils");
#ifdef ENABLE_NLS
......@@ -205,6 +205,10 @@ main (int argc, char **argv)
add_entry (-1, "-lmu_scm " GUILE_LIBS);
}
#endif
else if (strcmp (argv[0], "cfg") == 0)
add_entry (-1, "-lmucfg");
else if (strcmp (argv[0], "argp") == 0)
add_entry (-2, "-lmuargp");
else if (strcmp (argv[0], "all") == 0)
{
struct lib_descr *p;
......
......@@ -26,7 +26,7 @@ AC_CONFIG_HEADERS([config.h])
AC_PREREQ(2.60)
dnl Library versioning
AC_SUBST(VI_CURRENT, 2)
AC_SUBST(VI_CURRENT, 3)
AC_SUBST(VI_REVISION, 2)
AC_SUBST(VI_AGE, 1)
......@@ -50,7 +50,7 @@ dnl Other variables
AC_SUBST(SIEVE_MODDIR,'$(libdir)/$(PACKAGE)')
AC_SUBST(MU_COMMON_LIBRARIES,'$(LTLIBINTL) $(LTLIBICONV)')
AC_SUBST(MU_APP_LIBRARIES,'../lib/libmuaux.la ../libargp/libargp.a -L${top_builddir}/libcfg -lmucfg')
AC_SUBST(MU_APP_LIBRARIES,'../lib/libmuaux.la ../libargp/libmuargp.a ../libcfg/libmucfg.la')
AC_SUBST(MU_COMMON_INCLUDES,'-I${srcdir} -I${top_srcdir}/include -I${top_srcdir}/lib -I${top_builddir}/lib -I${top_builddir} -I${top_builddir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/libargp -I${top_srcdir}/libcfg')
......
......@@ -31,7 +31,7 @@
#include <mailutils/locker.h>
#include <mailutils/nls.h>
#include "muinit.h"
#include "mailutils/libargp.h"
const char *program_version = "GNU dotlock (" PACKAGE_STRING ")";
static char doc[] =
......
......@@ -25,7 +25,7 @@
#include <ctype.h>
#include <string.h>
#include <mailutils/mailutils.h>
#include "muinit.h"
#include "mailutils/libargp.h"
const char *program_version = "muauth (" PACKAGE_STRING ")";
static char doc[] =
......
......@@ -19,7 +19,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <mailutils/mutil.h>
#include "muinit.h"
#include "mailutils/libargp.h"
const char *capa[] = {
"address",
......
......@@ -64,7 +64,7 @@
#include <mailutils/mutil.h>
#include <mailutils/mime.h>
#include "muinit.h"
#include "mailutils/libargp.h"
typedef int (*frm_select_t) (size_t index, mu_message_t msg);
......
......@@ -18,7 +18,7 @@
MA 02110-1301 USA */
#include "guimb.h"
#include "muinit.h"
#include "mailutils/libargp.h"
char *program_file;
char *program_expr;
......
......@@ -21,7 +21,7 @@
#ifdef WITH_GSASL
# include <mailutils/gsasl.h>
#endif
#include "muinit.h"
#include "mailutils/libargp.h"
mu_mailbox_t mbox;
char *homedir;
......
......@@ -36,7 +36,6 @@ pkginclude_HEADERS = \
auth.h\
body.h\
cfg.h\
compat.h\
daemon.h\
debug.h\
envelope.h\
......@@ -49,6 +48,8 @@ pkginclude_HEADERS = \
guile.h\
header.h\
iterator.h\
libargp.h\
libcfg.h\
libsieve.h\
list.h\
locker.h\
......@@ -77,7 +78,8 @@ pkginclude_HEADERS = \
syslog.h\
sql.h\
tls.h\
url.h
url.h\
version.h
nobase_pkginclude_HEADERS = \
sys/nntp.h\
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
/* Compatibility defines for mailutils vers. <= 0.6 */
#define _address _mu_address
#define _attribute _mu_attribute
#define _authority _mu_authority
#define _body _mu_body
#define _debug _mu_debug
#define _envelope _mu_envelope
#define _filter _mu_filter
#define _filter_record _mu_filter_record
#define _filter_record _mu_filter_record
#define _folder _mu_folder
#define _header _mu_header
#define _iterator _mu_iterator
#define _list _mu_list
#define _locker _mu_locker
#define _mailbox _mu_mailbox
#define _mailcap _mu_mailcap
#define _mailcap_entry _mu_mailcap_entry
#define _mailer _mu_mailer
#define _message _mu_message
#define _mime _mu_mime
#define _observable _mu_observable
#define _observer _mu_observer
#define _property _mu_property
#define _record _mu_record
#define _record _mu_record
#define _refcount _mu_refcount
#define _stream _mu_stream
#define _ticket _mu_ticket
#define _url _mu_url
#define _wicket _mu_wicket
#define address_aget_domain mu_address_aget_domain
#define address_aget_email mu_address_aget_email
#define address_aget_local_part mu_address_aget_local_part
#define address_aget_personal mu_address_aget_personal
#define address_concatenate mu_address_concatenate
#define address_contains_email mu_address_contains_email
#define address_create mu_address_create
#define address_createv mu_address_createv
#define address_destroy mu_address_destroy
#define address_dup mu_address_dup
#define address_format_string mu_address_format_string
#define address_get_comments mu_address_get_comments
#define address_get_count mu_address_get_count
#define address_get_domain mu_address_get_domain
#define address_get_email mu_address_get_email
#define address_get_email_count mu_address_get_email_count
#define address_get_group_count mu_address_get_group_count
#define address_get_local_part mu_address_get_local_part
#define address_get_nth mu_address_get_nth
#define address_get_personal mu_address_get_personal
#define address_get_route mu_address_get_route
#define address_get_unix_mailbox_count mu_address_get_unix_mailbox_count
#define address_is_group mu_address_is_group
#define address_t mu_address_t
#define address_to_string mu_address_to_string
#define address_union mu_address_union
#define argcv_free mu_argcv_free
#define argcv_get mu_argcv_get
#define argcv_get_n mu_argcv_get_n
#define argcv_quote_char mu_argcv_quote_char
#define argcv_quote_copy mu_argcv_quote_copy
#define argcv_quoted_length mu_argcv_quoted_length
#define argcv_string mu_argcv_string
#define argcv_unquote_char mu_argcv_unquote_char
#define argcv_unquote_copy mu_argcv_unquote_copy
#define attribute_clear_modified mu_attribute_clear_modified
#define attribute_copy mu_attribute_copy
#define attribute_create mu_attribute_create
#define attribute_destroy mu_attribute_destroy
#define attribute_get_flags mu_attribute_get_flags
#define attribute_get_owner mu_attribute_get_owner
#define attribute_is_answered mu_attribute_is_answered
#define attribute_is_deleted mu_attribute_is_deleted
#define attribute_is_draft mu_attribute_is_draft
#define attribute_is_equal mu_attribute_is_equal
#define attribute_is_flagged mu_attribute_is_flagged
#define attribute_is_modified mu_attribute_is_modified
#define attribute_is_read mu_attribute_is_read
#define attribute_is_recent mu_attribute_is_recent
#define attribute_is_seen mu_attribute_is_seen
#define attribute_is_userflag mu_attribute_is_userflag
#define attribute_set_answered mu_attribute_set_answered
#define attribute_set_deleted mu_attribute_set_deleted
#define attribute_set_draft mu_attribute_set_draft
#define attribute_set_flagged mu_attribute_set_flagged
#define attribute_set_flags mu_attribute_set_flags
#define attribute_set_get_flags mu_attribute_set_get_flags
#define attribute_set_modified mu_attribute_set_modified
#define attribute_set_read mu_attribute_set_read
#define attribute_set_recent mu_attribute_set_recent
#define attribute_set_seen mu_attribute_set_seen
#define attribute_set_set_flags mu_attribute_set_set_flags
#define attribute_set_unset_flags mu_attribute_set_unset_flags
#define attribute_set_userflag mu_attribute_set_userflag
#define attribute_t mu_attribute_t
#define attribute_to_string mu_attribute_to_string
#define attribute_unset_answered mu_attribute_unset_answered
#define attribute_unset_deleted mu_attribute_unset_deleted
#define attribute_unset_draft mu_attribute_unset_draft
#define attribute_unset_flagged mu_attribute_unset_flagged
#define attribute_unset_flags mu_attribute_unset_flags
#define attribute_unset_read mu_attribute_unset_read
#define attribute_unset_recent mu_attribute_unset_recent
#define attribute_unset_seen mu_attribute_unset_seen
#define attribute_unset_userflag mu_attribute_unset_userflag
#define authority_authenticate mu_authority_authenticate
#define authority_create mu_authority_create
#define authority_create_null mu_authority_create_null
#define authority_destroy mu_authority_destroy
#define authority_get_owner mu_authority_get_owner
#define authority_get_ticket mu_authority_get_ticket
#define authority_set_authenticate mu_authority_set_authenticate
#define authority_set_ticket mu_authority_set_ticket
#define authority_t mu_authority_t
#define base64_filter mu_base64_filter
#define binary_filter mu_binary_filter
#define bit7_filter mu_bit7_filter
#define bit8_filter mu_bit8_filter
#define body_clear_modified mu_body_clear_modified
#define body_create mu_body_create
#define body_destroy mu_body_destroy
#define body_get_filename mu_body_get_filename
#define body_get_owner mu_body_get_owner
#define body_get_stream mu_body_get_stream
#define body_is_modified mu_body_is_modified
#define body_lines mu_body_lines
#define body_set_lines mu_body_set_lines
#define body_set_size mu_body_set_size
#define body_set_stream mu_body_set_stream
#define body_size mu_body_size
#define body_t mu_body_t
#define construct_user_mailbox_url mu_construct_user_mailbox_url
#define daemon_create_pidfile mu_daemon_create_pidfile
#define daemon_remove_pidfile mu_daemon_remove_pidfile
#define debug_create mu_debug_create
#define debug_destroy mu_debug_destroy
#define debug_get_level mu_debug_get_level
#define debug_get_owner mu_debug_get_owner
#define debug_print mu_debug_print
#define debug_printv mu_debug_printv
#define debug_set_level mu_debug_set_level
#define debug_set_print mu_debug_set_print
#define debug_t mu_debug_t
#define decoder_stream_create mu_decoder_stream_create
#define encoder_stream_create mu_encoder_stream_create
#define envelope_create mu_envelope_create
#define envelope_date mu_envelope_date
#define envelope_destroy mu_envelope_destroy
#define envelope_get_owner mu_envelope_get_owner
#define envelope_sender mu_envelope_sender
#define envelope_set_date mu_envelope_set_date
#define envelope_set_sender mu_envelope_set_sender
#define envelope_t mu_envelope_t
#define error_pfn_t mu_error_pfn_t
#define file_stream_create mu_file_stream_create
#define filter_create mu_filter_create
#define filter_get_list mu_filter_get_list
#define filter_iconv_create mu_filter_iconv_create
#define filter_prog_stream_create mu_filter_prog_stream_create
#define filter_record_t mu_filter_record_t
#define filter_t mu_filter_t
#define folder_close mu_folder_close
#define folder_create mu_folder_create
#define folder_decrement mu_folder_decrement
#define folder_delete mu_folder_delete
#define folder_destroy mu_folder_destroy
#define folder_directory mu_folder_directory
#define folder_get_authority mu_folder_get_authority
#define folder_get_debug mu_folder_get_debug
#define folder_get_observable mu_folder_get_observable
#define folder_get_stream mu_folder_get_stream
#define folder_get_url mu_folder_get_url
#define folder_has_debug mu_folder_has_debug
#define folder_list mu_0_6_folder_list
#define folder_list_destroy mu_0_6_folder_list_destroy
#define folder_lsub mu_0_6_folder_lsub
#define folder_open mu_folder_open
#define folder_rename mu_folder_rename
#define folder_set_authority mu_folder_set_authority
#define folder_set_debug mu_folder_set_debug
#define folder_set_stream mu_folder_set_stream
#define folder_set_url mu_folder_set_url
#define folder_subscribe mu_folder_subscribe
#define folder_t mu_folder_t
#define folder_unsubscribe mu_folder_unsubscribe
#define gsasl_stream_create mu_gsasl_stream_create
#define header_aget_field_name mu_header_aget_field_name
#define header_aget_field_value mu_header_aget_field_value
#define header_aget_field_value_unfold mu_header_aget_field_value_unfold
#define header_aget_value mu_header_aget_value
#define header_aget_value_unfold mu_header_aget_value_unfold
#define header_clear_modified mu_header_clear_modified
#define header_create mu_header_create
#define header_destroy mu_header_destroy
#define header_get_address mu_header_get_address
#define header_get_field_count mu_header_get_field_count
#define header_get_field_name mu_header_get_field_name
#define header_get_field_value mu_header_get_field_value
#define header_get_field_value_unfold mu_header_get_field_value_unfold
#define header_get_owner mu_header_get_owner
#define header_get_stream mu_header_get_stream
#define header_get_value mu_header_get_value
#define header_get_value_unfold mu_header_get_value_unfold
#define header_is_modified mu_header_is_modified
#define header_lines mu_header_lines
#define header_set_fill mu_header_set_fill
#define header_set_get_fvalue mu_header_set_get_fvalue
#define header_set_get_value mu_header_set_get_value
#define header_set_lines mu_header_set_lines
#define header_set_set_value mu_header_set_set_value
#define header_set_size mu_header_set_size
#define header_set_stream mu_header_set_stream
#define header_set_value mu_header_set_value
#define header_size mu_header_size
#define header_t mu_header_t
#define imap_record mu_imap_record
#define iterator_advance mu_iterator_advance
#define iterator_attach mu_iterator_attach
#define iterator_create mu_iterator_create
#define iterator_current mu_iterator_current
#define iterator_destroy mu_iterator_destroy
#define iterator_detach mu_iterator_detach
#define iterator_dup mu_iterator_dup
#define iterator_first mu_iterator_first
#define iterator_is_done mu_iterator_is_done
#define iterator_next mu_iterator_next
#define iterator_set_curitem_p mu_iterator_set_curitem_p
#define iterator_set_destroy mu_iterator_set_destroy
#define iterator_set_dup mu_iterator_set_dup
#define iterator_set_finished_p mu_iterator_set_finished_p
#define iterator_set_first mu_iterator_set_first
#define iterator_set_getitem mu_iterator_set_getitem
#define iterator_set_next mu_iterator_set_next
#define iterator_t mu_iterator_t
#define list_action_t mu_list_action_t
#define list_append mu_list_append
#define list_comparator_t mu_list_comparator_t
#define list_count mu_list_count
#define list_create mu_list_create
#define list_destroy mu_list_destroy
#define list_do mu_list_do
#define list_get mu_list_get
#define list_get_iterator mu_list_get_iterator
#define list_insert mu_list_insert
#define list_is_empty mu_list_is_empty
#define list_locate mu_list_locate
#define list_prepend mu_list_prepend
#define list_remove mu_list_remove
#define list_replace mu_list_replace
#define list_response mu_list_response
#define list_response_free mu_list_response_free
#define list_set_comparator mu_list_set_comparator
#define list_set_destroy_item mu_list_set_destroy_item
#define list_t mu_list_t
#define list_t mu_list_t
#define list_t mu_list_t
#define list_to_array mu_list_to_array
#define locker_create mu_locker_create
#define locker_destroy mu_locker_destroy
#define locker_get_expire_time mu_locker_get_expire_time
#define locker_get_external mu_locker_get_external
#define locker_get_flags mu_locker_get_flags
#define locker_get_retries mu_locker_get_retries
#define locker_get_retry_sleep mu_locker_get_retry_sleep
#define locker_lock mu_locker_lock
#define locker_remove_lock mu_locker_remove_lock
#define locker_set_default_expire_timeout mu_locker_set_default_expire_timeout
#define locker_set_default_external_program mu_locker_set_default_external_program
#define locker_set_default_flags mu_locker_set_default_flags
#define locker_set_default_retry_count mu_locker_set_default_retry_count
#define locker_set_default_retry_timeout mu_locker_set_default_retry_timeout
#define locker_set_expire_time mu_locker_set_expire_time
#define locker_set_external mu_locker_set_external
#define locker_set_flags mu_locker_set_flags
#define locker_set_retries mu_locker_set_retries
#define locker_set_retry_sleep mu_locker_set_retry_sleep
#define locker_t mu_locker_t
#define locker_touchlock mu_locker_touchlock
#define locker_unlock mu_locker_unlock
#define mail_directory mu_mail_directory
#define mailbox_append_message mu_mailbox_append_message
#define mailbox_close mu_mailbox_close
#define mailbox_create mu_mailbox_create
#define mailbox_create_default mu_mailbox_create_default
#define mailbox_destroy mu_mailbox_destroy
#define mailbox_expunge mu_mailbox_expunge
#define mailbox_flush mu_mailbox_flush
#define mailbox_get_debug mu_mailbox_get_debug
#define mailbox_get_flags mu_mailbox_get_flags
#define mailbox_get_folder mu_mailbox_get_folder
#define mailbox_get_locker mu_mailbox_get_locker
#define mailbox_get_message mu_mailbox_get_message
#define mailbox_get_observable mu_mailbox_get_observable
#define mailbox_get_property mu_mailbox_get_property
#define mailbox_get_size mu_mailbox_get_size
#define mailbox_get_stream mu_mailbox_get_stream
#define mailbox_get_url mu_mailbox_get_url
#define mailbox_has_debug mu_mailbox_has_debug
#define mailbox_is_updated mu_mailbox_is_updated
#define mailbox_lock mu_mailbox_lock
#define mailbox_message_unseen mu_mailbox_message_unseen
#define mailbox_messages_count mu_mailbox_messages_count
#define mailbox_messages_recent mu_mailbox_messages_recent
#define mailbox_open mu_mailbox_open
#define mailbox_save_attributes mu_mailbox_save_attributes
#define mailbox_scan mu_mailbox_scan
#define mailbox_set_debug mu_mailbox_set_debug
#define mailbox_set_folder mu_mailbox_set_folder
#define mailbox_set_locker mu_mailbox_set_locker
#define mailbox_set_stream mu_mailbox_set_stream
#define mailbox_t mu_mailbox_t
#define mailbox_uidnext mu_mailbox_uidnext
#define mailbox_uidvalidity mu_mailbox_uidvalidity
#define mailbox_unlock mu_mailbox_unlock
#define mailcap_create mu_mailcap_create
#define mailcap_destroy mu_mailcap_destroy
#define mailcap_entries_count mu_mailcap_entries_count
#define mailcap_entry_copiousoutput mu_mailcap_entry_copiousoutput
#define mailcap_entry_fields_count mu_mailcap_entry_fields_count
#define mailcap_entry_get_compose mu_mailcap_entry_get_compose
#define mailcap_entry_get_composetyped mu_mailcap_entry_get_composetyped
#define mailcap_entry_get_description mu_mailcap_entry_get_description
#define mailcap_entry_get_edit mu_mailcap_entry_get_edit
#define mailcap_entry_get_field mu_mailcap_entry_get_field
#define mailcap_entry_get_nametemplate mu_mailcap_entry_get_nametemplate
#define mailcap_entry_get_notes mu_mailcap_entry_get_notes
#define mailcap_entry_get_test mu_mailcap_entry_get_test
#define mailcap_entry_get_textualnewlines mu_mailcap_entry_get_textualnewlines
#define mailcap_entry_get_typefield mu_mailcap_entry_get_typefield
#define mailcap_entry_get_value mu_mailcap_entry_get_value
#define mailcap_entry_get_viewcommand mu_mailcap_entry_get_viewcommand
#define mailcap_entry_get_x11bitmap mu_mailcap_entry_get_x11bitmap
#define mailcap_entry_needsterminal mu_mailcap_entry_needsterminal
#define mailcap_entry_t mu_mailcap_entry_t
#define mailcap_get_entry mu_mailcap_get_entry
#define mailcap_t mu_mailcap_t
#define maildir_record mu_maildir_record
#define mailer_check_from mu_mailer_check_from
#define mailer_check_to mu_mailer_check_to
#define mailer_close mu_mailer_close
#define mailer_create mu_mailer_create
#define mailer_destroy mu_mailer_destroy
#define mailer_get_debug mu_mailer_get_debug
#define mailer_get_observable mu_mailer_get_observable
#define mailer_get_property mu_mailer_get_property
#define mailer_get_stream mu_mailer_get_stream
#define mailer_get_url mu_mailer_get_url
#define mailer_get_url_default mu_mailer_get_url_default
#define mailer_open mu_mailer_open
#define mailer_send_message mu_mailer_send_message
#define mailer_set_debug mu_mailer_set_debug
#define mailer_set_stream mu_mailer_set_stream
#define mailer_set_url_default mu_mailer_set_url_default
#define mailer_t mu_mailer_t
#define mapfile_stream_create mu_mapfile_stream_create
#define mbox_record mu_mbox_record
#define memory_stream_create mu_memory_stream_create
#define message_aget_attachment_name mu_message_aget_attachment_name
#define message_clear_modified mu_message_clear_modified
#define message_create mu_message_create
#define message_create_attachment mu_message_create_attachment
#define message_create_copy mu_message_create_copy
#define message_destroy mu_message_destroy
#define message_encapsulate mu_message_encapsulate
#define message_get_attachment_name mu_message_get_attachment_name
#define message_get_attribute mu_message_get_attribute
#define message_get_body mu_message_get_body
#define message_get_envelope mu_message_get_envelope
#define message_get_header mu_message_get_header
#define message_get_mailbox mu_message_get_mailbox
#define message_get_num_parts mu_message_get_num_parts
#define message_get_observable mu_message_get_observable
#define message_get_owner mu_message_get_owner
#define message_get_part mu_message_get_part
#define message_get_stream mu_message_get_stream
#define message_get_uid mu_message_get_uid
#define message_get_uidl mu_message_get_uidl
#define message_is_modified mu_message_is_modified
#define message_is_multipart mu_message_is_multipart
#define message_lines mu_message_lines
#define message_ref mu_message_ref
#define message_save_attachment mu_message_save_attachment
#define message_save_to_mailbox mu_message_save_to_mailbox
#define message_set_attribute mu_message_set_attribute
#define message_set_body mu_message_set_body
#define message_set_envelope mu_message_set_envelope
#define message_set_get_num_parts mu_message_set_get_num_parts
#define message_set_get_part mu_message_set_get_part
#define message_set_header mu_message_set_header
#define message_set_is_multipart mu_message_set_is_multipart
#define message_set_lines mu_message_set_lines
#define message_set_mailbox mu_message_set_mailbox
#define message_set_size mu_message_set_size
#define message_set_stream mu_message_set_stream
#define message_set_uid mu_message_set_uid
#define message_set_uidl mu_message_set_uidl
#define message_size mu_message_size
#define message_t mu_message_t
#define message_unencapsulate mu_message_unencapsulate
#define message_unref mu_message_unref
#define mh_record mu_mh_record
#define mime_add_part mu_mime_add_part
#define mime_create mu_mime_create
#define mime_destroy mu_mime_destroy
#define mime_get_message mu_mime_get_message
#define mime_get_num_parts mu_mime_get_num_parts
#define mime_get_part mu_mime_get_part
#define mime_is_multipart mu_mime_is_multipart
#define mime_t mu_mime_t
#define monitor_create mu_monitor_create
#define monitor_destroy mu_monitor_destroy
#define monitor_get_owner mu_monitor_get_owner
#define monitor_notify mu_monitor_notify
#define monitor_rdlock mu_monitor_rdlock
#define monitor_unlock mu_monitor_unlock
#define monitor_wait mu_monitor_wait
#define monitor_wrlock mu_monitor_wrlock
#define munre_set_regex mu_unre_set_regex
#define munre_subject mu_unre_subject
#define nntp_record mu_nntp_record
#define observable_attach mu_observable_attach
#define observable_create mu_observable_create
#define observable_destroy mu_observable_destroy
#define observable_detach mu_observable_detach
#define observable_get_owner mu_observable_get_owner
#define observable_notify mu_observable_notify
#define observable_t mu_observable_t
#define observer_action mu_observer_action
#define observer_create mu_observer_create
#define observer_destroy mu_observer_destroy
#define observer_get_owner mu_observer_get_owner
#define observer_set_action mu_observer_set_action
#define observer_set_destroy mu_observer_set_destroy
#define observer_set_flags mu_observer_set_flags
#define observer_t mu_observer_t
#define parse822_addr_spec mu_parse822_addr_spec
#define parse822_address mu_parse822_address
#define parse822_address_list mu_parse822_address_list
#define parse822_atom mu_parse822_atom
#define parse822_comment mu_parse822_comment
#define parse822_d_text mu_parse822_d_text
#define parse822_date mu_parse822_date
#define parse822_date_time mu_parse822_date_time
#define parse822_day mu_parse822_day
#define parse822_digits mu_parse822_digits
#define parse822_domain mu_parse822_domain
#define parse822_domain_literal mu_parse822_domain_literal
#define parse822_domain_ref mu_parse822_domain_ref
#define parse822_field_body mu_parse822_field_body
#define parse822_field_name mu_parse822_field_name
#define parse822_group mu_parse822_group
#define parse822_is_atom_char mu_parse822_is_atom_char
#define parse822_is_char mu_parse822_is_char
#define parse822_is_ctl mu_parse822_is_ctl
#define parse822_is_d_text mu_parse822_is_d_text
#define parse822_is_digit mu_parse822_is_digit
#define parse822_is_htab mu_parse822_is_htab
#define parse822_is_lwsp_char mu_parse822_is_lwsp_char
#define parse822_is_q_text mu_parse822_is_q_text
#define parse822_is_smtp_q mu_parse822_is_smtp_q
#define parse822_is_space mu_parse822_is_space
#define parse822_is_special mu_parse822_is_special
#define parse822_local_part mu_parse822_local_part
#define parse822_mail_box mu_parse822_mail_box
#define parse822_phrase mu_parse822_phrase
#define parse822_quote_local_part mu_parse822_quote_local_part
#define parse822_quote_string mu_parse822_quote_string
#define parse822_quoted_pair mu_parse822_quoted_pair
#define parse822_quoted_string mu_parse822_quoted_string
#define parse822_route mu_parse822_route
#define parse822_route_addr mu_parse822_route_addr
#define parse822_skip_comments mu_parse822_skip_comments
#define parse822_skip_crlf mu_parse822_skip_crlf
#define parse822_skip_lwsp mu_parse822_skip_lwsp
#define parse822_skip_lwsp_char mu_parse822_skip_lwsp_char
#define parse822_skip_nl mu_parse822_skip_nl
#define parse822_special mu_parse822_special
#define parse822_sub_domain mu_parse822_sub_domain
#define parse822_time mu_parse822_time
#define parse822_unix_mbox mu_parse822_unix_mbox
#define parse822_word mu_parse822_word
#define path_record mu_path_record
#define pop_record mu_pop_record
#define prog_stream_create mu_prog_stream_create
#define property_create mu_property_create
#define property_destroy mu_property_destroy
#define property_get_owner mu_property_get_owner
#define property_get_value mu_property_get_value
#define property_is_set mu_property_is_set
#define property_set mu_property_set
#define property_set_value mu_property_set_value
#define property_t mu_property_t
#define property_unset mu_property_unset
#define qp_filter mu_qp_filter
#define rdl_done_t mu_rdl_done_t
#define rdl_init_t mu_rdl_init_t
#define record_get_folder mu_record_get_folder
#define record_get_mailbox mu_record_get_mailbox
#define record_get_mailer mu_record_get_mailer
#define record_get_url mu_record_get_url
#define record_is_scheme mu_record_is_scheme
#define record_set_folder mu_record_set_folder
#define record_set_get_folder mu_record_set_get_folder
#define record_set_get_mailbox mu_record_set_get_mailbox
#define record_set_get_mailer mu_record_set_get_mailer
#define record_set_get_url mu_record_set_get_url
#define record_set_is_scheme mu_record_set_is_scheme
#define record_set_mailbox mu_record_set_mailbox
#define record_set_mailer mu_record_set_mailer
#define record_set_scheme mu_record_set_scheme
#define record_set_url mu_record_set_url
#define record_t mu_record_t
#define refcount_t mu_refcount_t
#define registrar_get_iterator mu_registrar_get_iterator
#define registrar_get_list mu_registrar_get_list
#define registrar_lookup mu_0_6_registrar_lookup
#define registrar_record mu_registrar_record
#define rfc2047_decode mu_rfc2047_decode
#define rfc2047_encode mu_rfc2047_encode
#define rfc822_filter mu_rfc822_filter
#define rfc_2047_B_filter mu_rfc_2047_B_filter
#define rfc_2047_Q_filter mu_rfc_2047_Q_filter
#define scm_makenum mu_scm_makenum
#define sendmail_record mu_sendmail_record
#define set_folder_directory mu_set_folder_directory
#define set_mail_directory mu_set_mail_directory
#define sieve_abort mu_sieve_abort
#define sieve_action_log_t mu_sieve_action_log_t
#define sieve_action_lookup mu_sieve_action_lookup
#define sieve_alloc mu_sieve_alloc
#define sieve_arg_error mu_sieve_arg_error
#define sieve_argp_init mu_sieve_argp_init
#define sieve_comparator_lookup mu_sieve_comparator_lookup
#define sieve_comparator_t mu_sieve_comparator_t
#define sieve_compile mu_sieve_compile
#define sieve_data_type mu_sieve_data_type
#define sieve_debug mu_sieve_debug
#define sieve_destructor_t mu_sieve_destructor_t
#define sieve_disass mu_sieve_disass
#define sieve_error mu_sieve_error
#define sieve_get_comparator mu_sieve_get_comparator
#define sieve_get_daemon_email mu_sieve_get_daemon_email
#define sieve_get_data mu_sieve_get_data
#define sieve_get_debug_level mu_sieve_get_debug_level
#define sieve_get_identifier mu_sieve_get_identifier
#define sieve_get_locus mu_sieve_get_locus
#define sieve_get_mailer mu_sieve_get_mailer
#define sieve_get_message mu_sieve_get_message
#define sieve_get_message_num mu_sieve_get_message_num
#define sieve_get_message_sender mu_sieve_get_message_sender
#define sieve_get_relcmp mu_sieve_get_relcmp
#define sieve_get_ticket mu_sieve_get_ticket
#define sieve_handler_t mu_sieve_handler_t
#define sieve_is_dry_run mu_sieve_is_dry_run
#define sieve_load_ext mu_sieve_load_ext
#define sieve_locus_t mu_sieve_locus_t
#define sieve_log_action mu_sieve_log_action
#define sieve_machine_add_destructor mu_sieve_machine_add_destructor
#define sieve_machine_destroy mu_sieve_machine_destroy
#define sieve_machine_init mu_sieve_machine_init
#define sieve_machine_t mu_sieve_machine_t
#define sieve_mailbox mu_sieve_mailbox
#define sieve_malloc mu_sieve_malloc
#define sieve_match_part_checker mu_sieve_match_part_checker
#define sieve_message mu_sieve_message
#define sieve_mfree mu_sieve_mfree
#define sieve_mrealloc mu_sieve_mrealloc
#define sieve_mstrdup mu_sieve_mstrdup
#define sieve_palloc mu_sieve_palloc
#define sieve_parse_error_t mu_sieve_parse_error_t
#define sieve_pfree mu_sieve_pfree
#define sieve_prealloc mu_sieve_prealloc
#define sieve_printf_t mu_sieve_printf_t
#define sieve_pstrdup mu_sieve_pstrdup
#define sieve_register_action mu_sieve_register_action
#define sieve_register_comparator mu_sieve_register_comparator
#define sieve_register_t mu_sieve_register_t
#define sieve_register_test mu_sieve_register_test
#define sieve_relcmp_t mu_sieve_relcmp_t
#define sieve_relcmpn_t mu_sieve_relcmpn_t
#define sieve_require mu_sieve_require
#define sieve_require_action mu_sieve_require_action
#define sieve_require_comparator mu_sieve_require_comparator
#define sieve_require_relational mu_sieve_require_relational
#define sieve_require_test mu_sieve_require_test
#define sieve_retrieve_t mu_sieve_retrieve_t
#define sieve_runtime_tag mu_sieve_runtime_tag
#define sieve_runtime_tag_t mu_sieve_runtime_tag_t
#define sieve_set_daemon_email mu_sieve_set_daemon_email
#define sieve_set_debug mu_sieve_set_debug
#define sieve_set_debug_level mu_sieve_set_debug_level
#define sieve_set_error mu_sieve_set_error
#define sieve_set_logger mu_sieve_set_logger
#define sieve_set_mailer mu_sieve_set_mailer
#define sieve_set_parse_error mu_sieve_set_parse_error
#define sieve_set_ticket mu_sieve_set_ticket
#define sieve_slist_destroy mu_sieve_slist_destroy
#define sieve_str_to_relcmp mu_sieve_str_to_relcmp
#define sieve_tag_checker_t mu_sieve_tag_checker_t
#define sieve_tag_def_t mu_sieve_tag_def_t
#define sieve_tag_group_t mu_sieve_tag_group_t
#define sieve_tag_lookup mu_sieve_tag_lookup
#define sieve_test_lookup mu_sieve_test_lookup
#define sieve_type_str mu_sieve_type_str
#define sieve_value_get mu_sieve_value_get
#define sieve_value_t mu_sieve_value_t
#define sieve_value_t mu_sieve_value_t
#define sieve_vlist_compare mu_sieve_vlist_compare
#define sieve_vlist_do mu_sieve_vlist_do
#define sieve_yydebug mu_sieve_yydebug
#define smtp_record mu_smtp_record
#define stdio_stream_create mu_stdio_stream_create
#define stream_close mu_stream_close
#define stream_create mu_stream_create
#define stream_destroy mu_stream_destroy
#define stream_flush mu_stream_flush
#define stream_get_flags mu_stream_get_flags
#define stream_get_owner mu_stream_get_owner
#define stream_get_property mu_stream_get_property
#define stream_get_state mu_stream_get_state
#define stream_get_transport mu_stream_get_transport
#define stream_get_transport2 mu_stream_get_transport2
#define stream_is_seekable mu_stream_is_seekable
#define stream_open mu_stream_open
#define stream_printf mu_stream_printf
#define stream_read mu_stream_read
#define stream_readline mu_stream_readline
#define stream_seek mu_stream_seek
#define stream_sequential_read mu_stream_sequential_read
#define stream_sequential_readline mu_stream_sequential_readline
#define stream_sequential_write mu_stream_sequential_write
#define stream_set_close mu_stream_set_close
#define stream_set_destroy mu_stream_set_destroy
#define stream_set_flags mu_stream_set_flags
#define stream_set_flush mu_stream_set_flush
#define stream_set_get_transport2 mu_stream_set_get_transport2
#define stream_set_open mu_stream_set_open
#define stream_set_owner mu_stream_set_owner
#define stream_set_property mu_stream_set_property
#define stream_set_read mu_stream_set_read
#define stream_set_readline mu_stream_set_readline
#define stream_set_size mu_stream_set_size
#define stream_set_strerror mu_stream_set_strerror
#define stream_set_truncate mu_stream_set_truncate
#define stream_set_wait mu_stream_set_wait
#define stream_set_write mu_stream_set_write
#define stream_setbufsiz mu_stream_setbufsiz
#define stream_size mu_stream_size
#define stream_strerror mu_stream_strerror
#define stream_t mu_stream_t
#define stream_truncate mu_stream_truncate
#define stream_wait mu_stream_wait
#define stream_write mu_stream_write
#define string_to_flags mu_string_to_flags
#define tcp_stream_create mu_tcp_stream_create
#define ticket_create mu_ticket_create
#define ticket_destroy mu_ticket_destroy
#define ticket_get_data mu_ticket_get_data
#define ticket_get_owner mu_ticket_get_owner
#define ticket_pop mu_ticket_pop
#define ticket_set_data mu_ticket_set_data
#define ticket_set_destroy mu_ticket_set_destroy
#define ticket_set_pop mu_ticket_set_pop
#define ticket_t mu_ticket_t
#define tls_stream_create mu_tls_stream_create
#define tls_stream_create_client mu_tls_stream_create_client
#define tls_stream_create_client_from_tcp mu_tls_stream_create_client_from_tcp
#define transport_t mu_transport_t
#define unregistrar_record mu_unregistrar_record
#define url_create mu_url_create
#define url_decode mu_url_decode
#define url_destroy mu_url_destroy
#define url_get_auth mu_url_get_auth
#define url_get_host mu_url_get_host
#define url_get_passwd mu_url_get_passwd
#define url_get_path mu_url_get_path
#define url_get_port mu_url_get_port
#define url_get_query mu_url_get_query
#define url_get_scheme mu_url_get_scheme
#define url_get_user mu_url_get_user
#define url_is_same_host mu_url_is_same_host
#define url_is_same_path mu_url_is_same_path
#define url_is_same_port mu_url_is_same_port
#define url_is_same_scheme mu_url_is_same_scheme
#define url_is_same_user mu_url_is_same_user
#define url_is_scheme mu_url_is_scheme
#define url_is_ticket mu_url_is_ticket
#define url_parse mu_url_parse
#define url_t mu_url_t
#define url_to_string mu_url_to_string
#define wicket_create mu_wicket_create
#define wicket_destroy mu_wicket_destroy
#define wicket_get_filename mu_wicket_get_filename
#define wicket_get_ticket mu_wicket_get_ticket
#define wicket_set_filename mu_wicket_set_filename
#define wicket_set_ticket mu_wicket_set_ticket
#define wicket_t mu_wicket_t
......@@ -77,22 +77,6 @@ extern int mu_folder_decrement (mu_folder_t);
extern void mu_list_response_free (void *data);
/* Deprecated calls */
struct mu_0_6_folder_list
{
struct mu_list_response **element;
size_t num;
};
extern int mu_0_6_folder_list (mu_folder_t, const char *, const char *,
struct mu_0_6_folder_list *)
__attribute__((deprecated));
extern int mu_0_6_folder_lsub (mu_folder_t, const char *, const char *,
struct mu_0_6_folder_list *)
__attribute__((deprecated));
extern int mu_0_6_folder_list_destroy (struct mu_0_6_folder_list *)
__attribute__((deprecated));
#ifdef __cplusplus
}
#endif
......
......@@ -17,20 +17,20 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifndef _MAILUTILS_CMDLINE_H
#define _MAILUTILS_CMDLINE_H
#ifndef _MAILUTILS_LIBARGP_H
#define _MAILUTILS_LIBARGP_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "mailutils/types.h"
#include "mailutils/gocs.h"
#include "mailutils/nls.h"
#include "mailutils/error.h"
#include "mailutils/errno.h"
#include "mailutils/version.h"
#include "argp.h"
#include <errno.h> /* May declare program_invocation_name */
#include <strings.h>
#include "errno.h"
#include "strings.h"
#include "mailutils/libcfg.h"
#ifdef __cplusplus
extern "C" {
......@@ -103,8 +103,6 @@ extern struct mu_cmdline_capa mu_sql_cmdline;
extern struct mu_cmdline_capa mu_virtdomain_cmdline;
extern struct mu_cmdline_capa mu_auth_cmdline;
extern char *mu_license_text;
extern void mu_libargp_init (void);
extern struct argp *mu_argp_build (const struct argp *argp);
......@@ -112,8 +110,17 @@ extern void mu_argp_done (struct argp *argp);
extern int mu_register_argp_capa (const char *name, struct argp_child *child);
extern void mu_print_options (void);
extern const char *mu_check_option (char *name);
void mu_argp_init (const char *vers, const char *bugaddr);
int mu_app_init (struct argp *myargp, const char **capa,
struct mu_cfg_param *cfg_param,
int argc, char **argv, int flags, int *pindex, void *data);
error_t mu_argp_parse (const struct argp *myargp,
int *pargc, char **pargv[],
unsigned flags,
const char *capa[],
int *arg_index,
void *input) __attribute__ ((deprecated));
#ifdef __cplusplus
}
......
......@@ -16,9 +16,9 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef _MAILUTILS_LIBCFG_H
#define _MAILUTILS_LIBCFG_H
#include <mailutils/cfg.h>
#include <mailutils/gocs.h>
#include <mailutils/nls.h>
......@@ -33,6 +33,10 @@
# define MU_USER_CONFIG_FILE "~/.mailutils"
#endif
#ifdef __cplusplus
extern "C" {
#endif
struct mu_cfg_capa
{
char *name;
......@@ -89,3 +93,8 @@ extern struct mu_cfg_capa mu_sql_cfg_capa;
extern struct mu_cfg_capa mu_tls_cfg_capa;
extern struct mu_cfg_capa mu_virtdomain_cfg_capa;
#ifdef __cplusplus
}
#endif
#endif
......
......@@ -53,9 +53,10 @@
#include <mailutils/types.h>
#include <mailutils/url.h>
#include <mailutils/gocs.h>
#include <mailutils/version.h>
#ifdef MU_COMPAT
# include <mailutils/compat.h>
# error "Version 0.6 is no longer supported. Please, update your program."
#endif
/* EOF */
......
......@@ -16,16 +16,22 @@
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifdef HAVE_CONFIG_H
# include <config.h>
#ifndef _MAILUTILS_VERSION_H
#define _MAILUTILS_VERSION_H
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
#include "muinit.h"
extern char *mu_license_text;
extern void mu_print_options (void);
extern void mu_fprint_options (FILE *fp);
extern const char *mu_check_option (char *name);
void
mu_argp_init (const char *vers, const char *bugaddr)
{
argp_program_version = vers ? vers : PACKAGE_STRING;
argp_program_bug_address = bugaddr ? bugaddr : "<" PACKAGE_BUGREPORT ">";
#ifdef __cplusplus
}
#endif
#endif
......
......@@ -23,11 +23,8 @@ include gnulib.mk
INCLUDES = @MU_COMMON_INCLUDES@
libmuaux_la_SOURCES += \
argpinit.c\
daemon.c\
mailcap.c\
muinit.h\
muinit.c\
mu_dbm.c
noinst_HEADERS +=\
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2007 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#include "cmdline.h"
#include "libcfg.h"
void mu_argp_init (const char *vers, const char *bugaddr);
int mu_app_init (struct argp *myargp, const char **capa,
struct mu_cfg_param *cfg_param,
int argc, char **argv, int flags, int *pindex, void *data);
......@@ -20,16 +20,17 @@ INCLUDES = @MU_COMMON_INCLUDES@
AM_CFLAGS = -DSITE_VIRTUAL_PWDDIR=\"@SITE_VIRTUAL_PWDDIR@\" \
-DSITE_CRAM_MD5_PWD=\"@SITE_CRAM_MD5_PWD@\"
noinst_LIBRARIES = libargp.a
noinst_HEADERS = cmdline.h
lib_LIBRARIES = libmuargp.a
libargp_a_SOURCES =\
libmuargp_a_SOURCES =\
auth.c\
cmdline.c\
common.c\
compat.c\
gsasl.c\
mu_argp.h\
mu_argp.c\
muinit.c\
pam.c\
radius.c\
sieve.c\
......
......@@ -19,8 +19,7 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "cmdline.h"
#include "mailutils/libargp.h"
/* ************************************************************************* */
......
......@@ -19,8 +19,7 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "cmdline.h"
#include "mailutils/libargp.h"
static struct mu_cmdline_capa *all_cmdline_capa[] = {
&mu_common_cmdline,
......
......@@ -19,8 +19,7 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "cmdline.h"
#include "mailutils/libargp.h"
#include <string.h>
#include <mailutils/syslog.h>
#include <mailutils/daemon.h>
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2007 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include "mailutils/libargp.h"
#include "mailutils/argcv.h"
#include "mailutils/mutil.h"
#ifdef WITH_TLS
# include "mailutils/tls.h"
#endif
#ifdef WITH_GSASL
# include "mailutils/gsasl.h"
#endif
#include "mailutils/libsieve.h"
#ifndef MU_COMPAT_CONFIG_FILE
# define MU_COMPAT_CONFIG_FILE SYSCONFDIR "/mailutils.rc"
#endif
#ifndef MU_COMPAT_USER_CONFIG_FILE
# define MU_COMPAT_USER_CONFIG_FILE "~/.mailutils"
#endif
static int
member (const char *array[], const char *text, size_t len)
{
int i;
for (i = 0; array[i]; i++)
if (strncmp (array[i], text, len) == 0)
return 1;
return 0;
}
/* Appends applicable options found in file NAME to argv. If progname
is NULL, all the options found are assumed to apply. Otherwise they
apply only if the line starts with ":something", and something is
found in the CAPA array, or the line starts with PROGNAME.
*/
void
read_rc (const char *progname, const char *name, const char *capa[],
int *argc, char ***argv)
{
FILE *fp;
char *linebuf = NULL;
char *buf = NULL;
size_t n = 0;
int x_argc = *argc;
char **x_argv = *argv;
char* rcfile = mu_tilde_expansion (name, "/", NULL);
if (!rcfile)
return;
fp = fopen (rcfile, "r");
if (!fp)
{
free(rcfile);
return;
}
while (getline (&buf, &n, fp) > 0)
{
char *kwp, *p;
int len;
for (kwp = buf; *kwp && isspace (*kwp); kwp++)
;
if (*kwp == '#' || *kwp == 0)
continue;
len = strlen (kwp);
if (kwp[len-1] == '\n')
kwp[--len] = 0;
if (kwp[len-1] == '\\' || linebuf)
{
int cont;
if (kwp[len-1] == '\\')
{
kwp[--len] = 0;
cont = 1;
}
else
cont = 0;
if (!linebuf)
linebuf = calloc (len + 1, 1);
else
linebuf = realloc (linebuf, strlen (linebuf) + len + 1);
if (!linebuf)
{
fprintf (stderr, _("%s: not enough memory\n"), progname);
exit (1);
}
strcpy (linebuf + strlen (linebuf), kwp);
if (cont)
continue;
kwp = linebuf;
}
len = 0;
if (progname)
{
for (p = kwp; *p && !isspace (*p); p++)
len++;
}
else
p = kwp; /* Use the whole line. */
if (progname == NULL
|| (kwp[0] == ':' && member (capa, kwp+1, len-1))
|| strncmp (progname, kwp, len) == 0
)
{
int i, n_argc = 0;
char **n_argv;
if (mu_argcv_get (p, "", NULL, &n_argc, &n_argv))
{
mu_argcv_free (n_argc, n_argv);
if (linebuf)
free (linebuf);
linebuf = NULL;
continue;
}
x_argv = realloc (x_argv,
(x_argc + n_argc) * sizeof (x_argv[0]));
if (!x_argv)
{
fprintf (stderr, _("%s: not enough memory\n"), progname);
exit (1);
}
for (i = 0; i < n_argc; i++)
x_argv[x_argc++] = mu_tilde_expansion (n_argv[i], "/", NULL);
free (n_argv);
}
if (linebuf)
free (linebuf);
linebuf = NULL;
}
fclose (fp);
free(rcfile);
*argc = x_argc;
*argv = x_argv;
}
void
mu_create_argcv (const char *capa[],
int argc, char **argv, int *p_argc, char ***p_argv)
{
char *progname;
int x_argc;
char **x_argv;
int i;
int rcdir = 0;
progname = strrchr (argv[0], '/');
if (progname)
progname++;
else
progname = argv[0];
x_argv = malloc (sizeof (x_argv[0]));
if (!x_argv)
{
fprintf (stderr, _("%s: not enough memory\n"), progname);
exit (1);
}
/* Add command name */
x_argc = 0;
x_argv[x_argc] = argv[x_argc];
x_argc++;
/* Add global config file. */
read_rc (progname, MU_COMPAT_CONFIG_FILE, capa, &x_argc, &x_argv);
/* Look for per-user config files in ~/.mailutils/ or in ~/, but
not both. This allows mailutils' utilities to have their config
files segregated, if necessary. */
{
struct stat s;
char *rcdirname = mu_tilde_expansion (MU_COMPAT_USER_CONFIG_FILE, "/", NULL);
if (!rcdirname
|| (stat(rcdirname, &s) == 0 && S_ISDIR(s.st_mode)))
rcdir = 1;
free(rcdirname);
}
/* Add per-user config file. */
if (!rcdir)
{
read_rc (progname, MU_COMPAT_USER_CONFIG_FILE, capa, &x_argc, &x_argv);
}
else
{
char *userrc = NULL;
userrc = malloc (sizeof (MU_COMPAT_USER_CONFIG_FILE)
/* provides an extra slot
for null byte as well */
+ 1 /* slash */
+ 9 /*mailutils*/);
if (!userrc)
{
fprintf (stderr, _("%s: not enough memory\n"), progname);
exit (1);
}
sprintf (userrc, "%s/mailutils", MU_COMPAT_USER_CONFIG_FILE);
read_rc (progname, userrc, capa, &x_argc, &x_argv);
free (userrc);
}
/* Add per-user, per-program config file. */
{
char *progrc = NULL;
int size;
if (rcdir)
size = sizeof (MU_COMPAT_USER_CONFIG_FILE)
+ 1
+ strlen (progname)
+ 2 /* rc */;
else
size = 6 /*~/.mu.*/
+ strlen (progname)
+ 3 /* "rc" + null terminator */;
progrc = malloc (size);
if (!progrc)
{
fprintf (stderr, _("%s: not enough memory\n"), progname);
exit (1);
}
if (rcdir)
sprintf (progrc, "%s/%src", MU_COMPAT_USER_CONFIG_FILE, progname);
else
sprintf (progrc, "~/.mu.%src", progname);
read_rc (NULL, progrc, capa, &x_argc, &x_argv);
free (progrc);
}
/* Finally, add the command line options */
x_argv = realloc (x_argv, (x_argc + argc) * sizeof (x_argv[0]));
for (i = 1; i < argc; i++)
x_argv[x_argc++] = argv[i];
x_argv[x_argc] = NULL;
*p_argc = x_argc;
*p_argv = x_argv;
}
error_t
mu_argp_parse (const struct argp *myargp,
int *pargc, char **pargv[],
unsigned flags,
const char *capa[],
int *arg_index,
void *input)
{
struct argp *argp;
error_t rc;
const struct argp argpnull = { 0 };
int i;
/* Make sure we have program version and bug address initialized */
mu_argp_init (argp_program_version, argp_program_bug_address);
mu_set_program_name ((*pargv)[0]);
mu_libargp_init ();
for (i = 0; capa[i]; i++)
{
#ifdef WITH_TLS
if (strcmp (capa[i], "tls") == 0)
mu_gocs_register ("tls", mu_tls_module_init);
else
#endif /* WITH_TLS */
#ifdef WITH_GSASL
if (strcmp (capa[i], "gsasl") == 0)
mu_gocs_register ("gsasl", mu_gsasl_module_init);
else
#endif
if (strcmp (capa[i], "sieve") == 0)
mu_gocs_register ("sieve", mu_sieve_module_init);
else
mu_gocs_register_std (capa[i]);
}
if (!myargp)
myargp = &argpnull;
argp = mu_argp_build (myargp);
rc = argp_parse (argp, *pargc, *pargv, flags, arg_index, input);
mu_argp_done (argp);
if (rc)
return rc;
mu_gocs_flush ();
return 0;
}
......@@ -19,8 +19,7 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "cmdline.h"
#include "mailutils/libargp.h"
#include <mailutils/gsasl.h>
static struct argp_option _gsasl_argp_options[] = {
......
......@@ -20,7 +20,6 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
......@@ -31,135 +30,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include "cmdline.h"
char *mu_license_text =
N_(" GNU Mailutils is free software; you can redistribute it and/or modify\n"
" it under the terms of the GNU General Public License as published by\n"
" the Free Software Foundation; either version 3 of the License, or\n"
" (at your option) any later version.\n"
"\n"
" GNU Mailutils is distributed in the hope that it will be useful,\n"
" but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
" GNU General Public License for more details.\n"
"\n"
" You should have received a copy of the GNU General Public License along\n"
" with GNU Mailutils; if not, write to the Free Software Foundation,\n"
" Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n"
"\n"
"\n"
);
static char *mu_conf_option[] = {
"VERSION=" VERSION,
#ifdef USE_LIBPAM
"USE_LIBPAM",
#endif
#ifdef HAVE_LIBLTDL
"HAVE_LIBLTDL",
#endif
#ifdef WITH_BDB2
"WITH_BDB2",
#endif
#ifdef WITH_NDBM
"WITH_NDBM",
#endif
#ifdef WITH_OLD_DBM
"WITH_OLD_DBM",
#endif
#ifdef WITH_GDBM
"WITH_GDBM",
#endif
#ifdef WITH_GNUTLS
"WITH_GNUTLS",
#endif
#ifdef WITH_GSASL
"WITH_GSASL",
#endif
#ifdef WITH_GSSAPI
"WITH_GSSAPI",
#endif
#ifdef WITH_GUILE
"WITH_GUILE",
#endif
#ifdef WITH_PTHREAD
"WITH_PTHREAD",
#endif
#ifdef WITH_READLINE
"WITH_READLINE",
#endif
#ifdef HAVE_MYSQL
"HAVE_MYSQL",
#endif
#ifdef HAVE_PGSQL
"HAVE_PGSQL",
#endif
#ifdef ENABLE_VIRTUAL_DOMAINS
"ENABLE_VIRTUAL_DOMAINS",
#endif
#ifdef ENABLE_IMAP
"ENABLE_IMAP",
#endif
#ifdef ENABLE_POP
"ENABLE_POP",
#endif
#ifdef ENABLE_MH
"ENABLE_MH",
#endif
#ifdef ENABLE_MAILDIR
"ENABLE_MAILDIR",
#endif
#ifdef ENABLE_SMTP
"ENABLE_SMTP",
#endif
#ifdef ENABLE_SENDMAIL
"ENABLE_SENDMAIL",
#endif
#ifdef ENABLE_NNTP
"ENABLE_NNTP",
#endif
#ifdef ENABLE_RADIUS
"ENABLE_RADIUS",
#endif
#ifdef WITH_INCLUDED_LIBINTL
"WITH_INCLUDED_LIBINTL",
#endif
NULL
};
void
mu_print_options ()
{
int i;
for (i = 0; mu_conf_option[i]; i++)
printf ("%s\n", mu_conf_option[i]);
}
const char *
mu_check_option (char *name)
{
int i;
for (i = 0; mu_conf_option[i]; i++)
{
int len;
char *q, *p = strchr (mu_conf_option[i], '=');
if (p)
len = p - mu_conf_option[i];
else
len = strlen (mu_conf_option[i]);
if (strncasecmp (mu_conf_option[i], name, len) == 0)
return mu_conf_option[i];
else if ((q = strchr (mu_conf_option[i], '_')) != NULL
&& strncasecmp (q + 1, name,
len - (q - mu_conf_option[i]) - 1) == 0)
return mu_conf_option[i];
}
return NULL;
}
#include "mailutils/libargp.h"
/* ************************************************************************* */
......
......@@ -20,7 +20,15 @@
# include <config.h>
#endif
#include "muinit.h"
#include "mailutils/libcfg.h"
#include "mailutils/libargp.h"
void
mu_argp_init (const char *vers, const char *bugaddr)
{
argp_program_version = vers ? vers : PACKAGE_STRING;
argp_program_bug_address = bugaddr ? bugaddr : "<" PACKAGE_BUGREPORT ">";
}
int
mu_app_init (struct argp *myargp, const char **capa,
......
......@@ -20,7 +20,7 @@
# include <config.h>
#endif
#include "cmdline.h"
#include "mailutils/libargp.h"
#include <mailutils/pam.h>
static char *service_name;
......
......@@ -20,7 +20,7 @@
# include <config.h>
#endif
#include "cmdline.h"
#include "mailutils/libargp.h"
#include <mailutils/radius.h>
static struct argp_option mu_radius_argp_option[] = {
......
......@@ -20,7 +20,7 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "cmdline.h"
#include "mailutils/libargp.h"
#include "mailutils/libsieve.h"
......
......@@ -20,7 +20,7 @@
# include <config.h>
#endif
#include "cmdline.h"
#include "mailutils/libargp.h"
#include "mailutils/sql.h"
#include "mailutils/mutil.h"
......
......@@ -20,7 +20,7 @@
# include <config.h>
#endif
#include "cmdline.h"
#include "mailutils/libargp.h"
#include <mailutils/tls.h>
static struct argp_option _tls_argp_options[] = {
......
......@@ -20,7 +20,7 @@
# include <config.h>
#endif
#include "cmdline.h"
#include "mailutils/libargp.h"
static char *virtdir;
......
......@@ -21,7 +21,6 @@ AM_CFLAGS = -DSITE_VIRTUAL_PWDDIR=\"@SITE_VIRTUAL_PWDDIR@\" \
-DSITE_CRAM_MD5_PWD=\"@SITE_CRAM_MD5_PWD@\"
lib_LTLIBRARIES = libmucfg.la
noinst_HEADERS = libcfg.h
libmucfg_la_SOURCES=\
auth.c\
common.c\
......
......@@ -15,7 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "libcfg.h"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "mailutils/libcfg.h"
#include <mailutils/mu_auth.h>
#include <string.h>
......
......@@ -15,7 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "libcfg.h"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "mailutils/libcfg.h"
#include <string.h>
#include <mailutils/daemon.h>
......@@ -124,3 +127,4 @@ static struct mu_cfg_param mu_daemon_param[] = {
{ NULL }
};
DCL_CFG_CAPA (daemon);
......
......@@ -15,7 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "libcfg.h"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "mailutils/libcfg.h"
#include <mailutils/gsasl.h>
static struct mu_gsasl_module_data gsasl_settings;
......
......@@ -15,7 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "libcfg.h"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "mailutils/libcfg.h"
#include <string.h>
#include <stdlib.h>
......
......@@ -15,7 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "libcfg.h"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "mailutils/libcfg.h"
static char *pam_settings;
......
......@@ -15,7 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "libcfg.h"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "mailutils/libcfg.h"
#include <mailutils/radius.h>
static struct mu_radius_module_data radius_settings;
......
......@@ -15,7 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "libcfg.h"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "mailutils/libcfg.h"
#include <mailutils/libsieve.h>
static struct mu_gocs_sieve sieve_settings;
......
......@@ -15,7 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "libcfg.h"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "mailutils/libcfg.h"
#include <mailutils/sql.h>
#include <mailutils/mutil.h>
......
......@@ -15,7 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "libcfg.h"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "mailutils/libcfg.h"
#include <mailutils/tls.h>
static struct mu_tls_module_config tls_settings;
......
......@@ -15,7 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "libcfg.h"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "mailutils/libcfg.h"
static char *virtdomain_settings;
......
......@@ -91,7 +91,7 @@
# define USE_MAILBOX_QUOTAS 1
#endif
#include "muinit.h"
#include "mailutils/libargp.h"
/* Debug */
extern int debug_level;
......
......@@ -18,7 +18,7 @@
MA 02110-1301 USA */
#include <mail.local.h>
#include "muinit.h"
#include "mailutils/libargp.h"
int multiple_delivery; /* Don't return errors when delivering to multiple
recipients */
......
......@@ -43,7 +43,7 @@
#include <mailutils/error.h>
#include <mailutils/nls.h>
#include <mailutils/mu_auth.h>
#include "muinit.h"
#include "mailutils/libargp.h"
const char *program_version = "mail.remote (" PACKAGE_STRING ")";
static char doc[] =
......
......@@ -18,7 +18,7 @@
MA 02110-1301 USA */
#include "mail.h"
#include "muinit.h"
#include "mailutils/libargp.h"
/* Global variables and constants*/
mu_mailbox_t mbox; /* Mailbox being operated upon */
......
......@@ -95,6 +95,7 @@ libmailutils_la_SOURCES = \
tcp.c\
ticket.c\
url.c\
version.c\
wicket.c\
imaxtostr.c offtostr.c umaxtostr.c
......
......@@ -635,7 +635,7 @@ _mu_parse_config (char *file, char *progname,
NULL,
NULL);
if (rc == 0)
if (rc == 0 && root_container)
{
struct mu_cfg_cont *cont = root_container;
......
......@@ -442,88 +442,3 @@ is_known_folder (mu_url_t url, mu_folder_t *pfolder)
return ret;
}
/* Deprecated functions */
static int
list_to_0_6_folder_list (mu_list_t flist, struct mu_0_6_folder_list *pflist)
{
int status = 0;
size_t count;
mu_list_count (flist, &count);
pflist->num = count;
if (count == 0)
pflist->element = NULL;
else
{
pflist->element = calloc (count, sizeof (pflist->element[0]));
if (!pflist->element)
status = ENOMEM;
else
{
size_t i;
mu_iterator_t itr;
mu_list_set_destroy_item (flist, NULL);
mu_list_get_iterator (flist, &itr);
for (mu_iterator_first (itr), i = 0;
!mu_iterator_is_done (itr); mu_iterator_next(itr), i++)
mu_iterator_current (itr, (void**) &pflist->element[i]);
mu_iterator_destroy (&itr);
}
}
return status;
}
int
mu_0_6_folder_list (mu_folder_t folder,
const char *dirname, const char *basename,
struct mu_0_6_folder_list *pflist)
{
mu_list_t flist;
int status = 0;
status = mu_folder_list (folder, dirname, basename, 0, &flist);
if (status)
return status;
status = list_to_0_6_folder_list (flist, pflist);
mu_list_destroy (&flist);
return status;
}
int
mu_0_6_folder_lsub (mu_folder_t folder,
const char *dirname, const char *basename,
struct mu_0_6_folder_list *pflist)
{
mu_list_t flist;
int status = 0;
status = mu_folder_lsub (folder, dirname, basename, &flist);
if (status)
return status;
status = list_to_0_6_folder_list (flist, pflist);
mu_list_destroy (&flist);
return status;
}
int
mu_0_6_folder_list_destroy (struct mu_0_6_folder_list *pflist)
{
size_t i;
if (pflist == NULL)
return 0;
for (i = 0 ; i < pflist->num; i++)
{
if (pflist->element[i])
{
if (pflist->element[i]->name)
free (pflist->element[i]->name);
free (pflist->element[i]);
}
}
if (i > 0)
free (pflist->element);
pflist->element = NULL;
pflist->num = 0;
return 0;
}
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2007 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <mailutils/nls.h>
#include <stdio.h>
#include <string.h>
char *mu_license_text =
N_(" GNU Mailutils is free software; you can redistribute it and/or modify\n"
" it under the terms of the GNU General Public License as published by\n"
" the Free Software Foundation; either version 3 of the License, or\n"
" (at your option) any later version.\n"
"\n"
" GNU Mailutils is distributed in the hope that it will be useful,\n"
" but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
" GNU General Public License for more details.\n"
"\n"
" You should have received a copy of the GNU General Public License along\n"
" with GNU Mailutils; if not, write to the Free Software Foundation,\n"
" Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n"
"\n"
"\n"
);
static char *mu_conf_option[] = {
"VERSION=" VERSION,
#ifdef USE_LIBPAM
"USE_LIBPAM",
#endif
#ifdef HAVE_LIBLTDL
"HAVE_LIBLTDL",
#endif
#ifdef WITH_BDB2
"WITH_BDB2",
#endif
#ifdef WITH_NDBM
"WITH_NDBM",
#endif
#ifdef WITH_OLD_DBM
"WITH_OLD_DBM",
#endif
#ifdef WITH_GDBM
"WITH_GDBM",
#endif
#ifdef WITH_GNUTLS
"WITH_GNUTLS",
#endif
#ifdef WITH_GSASL
"WITH_GSASL",
#endif
#ifdef WITH_GSSAPI
"WITH_GSSAPI",
#endif
#ifdef WITH_GUILE
"WITH_GUILE",
#endif
#ifdef WITH_PTHREAD
"WITH_PTHREAD",
#endif
#ifdef WITH_READLINE
"WITH_READLINE",
#endif
#ifdef HAVE_MYSQL
"HAVE_MYSQL",
#endif
#ifdef HAVE_PGSQL
"HAVE_PGSQL",
#endif
#ifdef ENABLE_VIRTUAL_DOMAINS
"ENABLE_VIRTUAL_DOMAINS",
#endif
#ifdef ENABLE_IMAP
"ENABLE_IMAP",
#endif
#ifdef ENABLE_POP
"ENABLE_POP",
#endif
#ifdef ENABLE_MH
"ENABLE_MH",
#endif
#ifdef ENABLE_MAILDIR
"ENABLE_MAILDIR",
#endif
#ifdef ENABLE_SMTP
"ENABLE_SMTP",
#endif
#ifdef ENABLE_SENDMAIL
"ENABLE_SENDMAIL",
#endif
#ifdef ENABLE_NNTP
"ENABLE_NNTP",
#endif
#ifdef ENABLE_RADIUS
"ENABLE_RADIUS",
#endif
#ifdef WITH_INCLUDED_LIBINTL
"WITH_INCLUDED_LIBINTL",
#endif
NULL
};
void
mu_fprint_options (FILE *fp)
{
int i;
for (i = 0; mu_conf_option[i]; i++)
fprintf (fp, "%s\n", mu_conf_option[i]);
}
void
mu_print_options (FILE *fp)
{
mu_fprint_options (stdout);
}
const char *
mu_check_option (char *name)
{
int i;
for (i = 0; mu_conf_option[i]; i++)
{
int len;
char *q, *p = strchr (mu_conf_option[i], '=');
if (p)
len = p - mu_conf_option[i];
else
len = strlen (mu_conf_option[i]);
if (strncasecmp (mu_conf_option[i], name, len) == 0)
return mu_conf_option[i];
else if ((q = strchr (mu_conf_option[i], '_')) != NULL
&& strncasecmp (q + 1, name,
len - (q - mu_conf_option[i]) - 1) == 0)
return mu_conf_option[i];
}
return NULL;
}
......@@ -27,7 +27,7 @@
#endif
#include <mailutils/mailutils.h>
#include "muinit.h"
#include "mailutils/libargp.h"
static int messages_count (const char *);
......
......@@ -194,7 +194,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -118,7 +118,7 @@ main (int argc, char **argv)
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -550,7 +550,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -212,7 +212,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -105,7 +105,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, NULL);
......
......@@ -937,7 +937,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -425,7 +425,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -181,7 +181,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, NULL);
......
......@@ -71,7 +71,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_auto_install = 0;
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, NULL);
......
......@@ -194,7 +194,7 @@ main (int argc, char **argv)
mu_url_t url;
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -94,6 +94,13 @@ my_argp_parse (struct argp *argp, int argc, char **argv, int flags,
return rc;
}
void
mh_argp_init (const char *vers)
{
argp_program_version = vers ? vers : PACKAGE_STRING;
argp_program_bug_address = "<" PACKAGE_BUGREPORT ">";
}
int
mh_argp_parse (int *pargc, char **pargv[],
int flags,
......
......@@ -18,7 +18,7 @@
#include <mailutils/nls.h>
#include "argp.h"
#include "muinit.h"
#include "mailutils/libargp.h"
#define MH_OPT_BOOL 1
#define MH_OPT_ARG 2
......@@ -182,6 +182,7 @@ enum mh_arg {
ARG_ZERO
};
void mh_argp_init (const char *vers);
void mh_argv_preproc (int argc, char **argv, struct mh_argp_data *data);
int mh_getopt (int argc, char **argv, struct mh_option *mh_opt, const char *doc);
int mh_argp_parse (int *argc, char **argv[],
......
......@@ -223,7 +223,7 @@ main (int argc, char **argv)
interactive = isatty (1) && isatty (0);
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -2763,7 +2763,7 @@ main (int argc, char **argv)
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -125,7 +125,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -82,7 +82,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -348,7 +348,7 @@ main (int argc, char **argv)
flags = mh_interactive_mode_p () ? 0 : ARGP_NO_ERRS;
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, flags, options, mh_option,
args_doc, doc, opt_handler, NULL, &index);
if (pick_parse (lexlist))
......
......@@ -231,7 +231,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -405,7 +405,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -194,7 +194,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, NULL);
......
......@@ -77,7 +77,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -178,7 +178,7 @@ main (int argc, char **argv)
/* Native Language Support */
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -734,7 +734,7 @@ main (int argc, char **argv)
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -554,7 +554,7 @@ main (int argc, char **argv)
mu_url_t url;
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option,
args_doc, doc, opt_handler, NULL, &index);
if (!oplist)
......
......@@ -108,7 +108,7 @@ main (int argc, char **argv)
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
argc -= index;
......
......@@ -113,7 +113,7 @@ main (int argc, char **argv)
mu_init_nls ();
mu_argp_init (program_version, NULL);
mh_argp_init (program_version);
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
......@@ -20,7 +20,8 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <ctype.h>
#include <mimeview.h>
#include <mimetypes-decl.h>
......
......@@ -25,7 +25,7 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include "muinit.h"
#include "mailutils/libargp.h"
const char *program_version = "mimeview (" PACKAGE_STRING ")";
static char doc[] = N_("GNU mimeview -- display files, using mailcap mechanism.")
......
......@@ -25,7 +25,7 @@
#include <mailutils/mailutils.h>
#include <mailutils/tls.h>
#include <mu_asprintf.h>
#include "muinit.h"
#include "mailutils/libargp.h"
const char *program_version = "movemail (" PACKAGE_STRING ")";
static char doc[] = N_("GNU movemail");
......
......@@ -18,7 +18,7 @@
MA 02110-1301 USA */
#include "pop3d.h"
#include "muinit.h"
#include "mailutils/libargp.h"
static mu_stream_t istream, ostream;
......
......@@ -19,7 +19,7 @@
#include "pop3d.h"
#include "mailutils/pam.h"
#include "muinit.h"
#include "mailutils/libargp.h"
mu_mailbox_t mbox;
int state;
......
......@@ -19,7 +19,7 @@
#include "pop3d.h"
#include <mailutils/argcv.h>
#include <xalloc.h>
#include "muinit.h"
#include "mailutils/libargp.h"
int db_list (char *input_name, char *output_name);
int db_make (char *input_name, char *output_name);
......
......@@ -23,7 +23,7 @@
#include "readmsg.h"
#include "xalloc.h"
#include "muinit.h"
#include "mailutils/libargp.h"
#define WEEDLIST_SEPARATOR " :,"
......
......@@ -45,7 +45,7 @@
#include <mailutils/nls.h>
#include <mailutils/tls.h>
#include "muinit.h"
#include "mailutils/libargp.h"
const char *program_version = "sieve (" PACKAGE_STRING ")";
......