summaryrefslogtreecommitdiff
path: root/examples/addr.c
AgeCommit message (Collapse)AuthorFiles
2024-01-06Update copyright yearsSergey Poznyakoff1
2023-01-22Update copyright yearsSergey Poznyakoff1
2022-01-02Update copyright yearSergey Poznyakoff1
2021-01-05Update copyright yearsSergey Poznyakoff1
2020-02-08Update copyright yearsSergey Poznyakoff1
2019-01-03Update copyright yearsSergey Poznyakoff1
2018-01-19Version 3.4.90; update copyright yearsSergey Poznyakoff1
2017-01-01Happy GNU YearSergey Poznyakoff1
2016-01-22Update copyright yearsSergey Poznyakoff1
2015-03-02Update copyright yearsSergey Poznyakoff1
2014-02-05Update copyright years.Sergey Poznyakoff1
2012-01-05Happy GNU YearSergey Poznyakoff1
2011-12-21Fix API for obtaining full email address.Sergey Poznyakoff1
Old API relied on passing a pointer to the buffer string and its size, which is defective. The new API, in addtion to that, provides functions for obtaining a pointer to the statically allocated original value, a pointer to dynamically allocated copy, and a function for formatting the address directly to a MU stream. Two functions are marked as deprecated: mu_address_to_string and mu_address_format_string. Both assume a pointer to an allocated string of a fixed size, which is far from being convenient nor reliable enough. * include/mailutils/address.h (MU_ADDR_HINT_ADDR): Rename to MU_ADDR_HINT_PRINTABLE (mu_address)<addr>: Rename to printable. (mu_address_sget_printable,mu_address_aget_printable) (mu_address_get_printable): New protos. (mu_stream_format_address): New proto. (mu_address_to_string) (mu_address_format_string): Mark as deprecated. (mu_validate_email): New proto. * examples/mta.c: Use mu_address_sget_printable instead of (mu_address_to_string) * libmailutils/address/addrstream.c: New file. * libmailutils/address/Makefile.am (libaddress_la_SOURCES): Add addrstream.c * libmailutils/address/address.c (mu_address_format_string): Rewrite using streams. (mu_address_to_string): Rewrite as a wrapper over mu_address_get_printable. (mu_address_sget_printable,mu_address_aget_printable) (mu_address_get_printable): New functions. * libmailutils/mime/mimehdr.c (_mime_header_parse): Initialize rc. * mail/util.c (util_merge_addresses): Use mu_address_aget_printable. * mh/mh.h (mh_annotate): Both string args are const. * mh/mh_init.c (mh_annotate): Likewise. * mh/mh_format.c (builtin_formataddr): Use mu_address_sget_printable. * mh/mh_whatnow.c (anno_data)<field,value>: Both are consts. (annotate): Use mu_address_sget_printable. * mh/send.c (set_address_header): Use mu_address_sget_printable. * mu/imap.c (format_email): Use mu_stream_format_address. * python/libmu_py/address.c (api_address_to_string): Likewise.
2011-01-02Update copyright years.Sergey Poznyakoff1
Happy GNU year!
2010-10-10Split the mess in mutil.c into logically separated units.Sergey Poznyakoff1
* libmailutils/base/mutil.c (mu_hex2ul, mu_hexstr2ul): Move to string/hexstr.c. (mu_get_homedir, mu_get_full_path) (mu_expand_path_pattern): Move to base/filename.c. (mu_getcwd): Move to base/getcwd.c. (mu_tilde_expansion): Move to base/tilde.c (mu_cpystr): Move to string/cpystr.c. (mu_get_host_name): Move to base/hostname.c. (mu_set_user_email,mu_set_user_email_domain) (mu_get_user_email_domain,mu_aget_user_email_domain) (mu_get_user_email,mu_normalize_path): Move to base/usremail.c. (mu_tempfile,mu_tempname): Move to base/tempfile.c. (mu_spawnvp): Move to base/spawnvp.c. (mu_qualify_link,mu_unroll_symlink): Move to base/symlink.c. (mu_rfc2822_references,mu_rfc2822_msg_id) (mu_rfc2822_in_reply_to): Move to base/msgid.c. (mu_strcasestr): Move to string/cstrcasestr.c. (mu_string_unfold): Move to string/unfold.c. (mu_true_answer_p): Move to string/trueans.c. (mu_scheme_autodetect_p): Move to base/schemeauto.c. (mu_fd_wait): Move to base/fdwait.c. (mu_set_default_fallback,mu_decode_filter): Move to filter/decode.c. (__argp_base_name): Move to lib/argp_base.c. * libmailutils/base/fdwait.c: New file. * libmailutils/base/filename.c: New file. * libmailutils/base/getcwd.c: New file. * libmailutils/base/hostname.c: New file. * libmailutils/base/msgid.c: New file. * libmailutils/base/schemeauto.c: New file. * libmailutils/base/spawnvp.c: New file. * libmailutils/base/symlink.c: New file. * libmailutils/base/tempfile.c: New file. * libmailutils/base/tilde.c: New file. * libmailutils/base/usremail.c: New file. * libmailutils/base/Makefile.am: Add new files. * libmailutils/filter/decode.c: New file. * libmailutils/filter/Makefile.am: Add new files. * libmailutils/string/cpystr.c: New file. * libmailutils/string/cstrcasestr.c: New file. * libmailutils/string/hexstr.c: New file. * libmailutils/string/trueans.c: New file. * libmailutils/string/unfold.c: New file. * libmailutils/string/Makefile.am: Add new files. * lib/argp_base.c: New file. * lib/Makefile.am: Add new files. * include/mailutils/io.h: Include stdarg.h * include/mailutils/mutil.h: Rename to util.h. Reorder prototypes and declarations in logical groups. All uses changed. * include/mailutils/cstr.h (mu_strcasestr): New proto, moved from include/mailutils/mutil.h.
2010-10-09Fix copyleft notices to follow the GNU standards.Sergey Poznyakoff1
2010-01-05Update copyright years.Sergey Poznyakoff1
Happy GNU year!
2009-04-16Minor changes.Sergey Poznyakoff1
* include/mailutils/address.h (struct _mu_address): Rename to struct mu_address: it is public interface. * include/mailutils/types.hin: Likewise. * examples/addr.c: Likewise. * mailbox/address.c: Likewise. * mailbox/parse822.c: Likewise. * libmu_sieve/extensions/vacation.c (vacation_reply): Fix memory leaks. * libproto/mailer/mbox.c (remote_mbox_append_message): Use mu_address_create_hint instead of mu_set_user_email_domain/mu_address_create. * maidag/maidag.c (main): Set both diag and debug printers explicitly. * mail/from.c (mail_from0): minor change. * mail/reply.c (reply0): Fix memory leak. * mailbox/header.c: minor change.
2009-04-15Improve RFC822 address parsing.Sergey Poznyakoff1
* examples/addr.c: Allow to modify hints via command line (-v) and within the shell (\...). * include/mailutils/address.h (MU_ADDR_HINT_*): New defines. (struct _mu_address): Definition. (mu_address_create_hint): New prototype. * include/mailutils/parse822.h (mu_parse822_address_list) (mu_parse822_mail_box, mu_parse822_group) (mu_parse822_address, mu_parse822_route_addr) (mu_parse822_route, mu_parse822_addr_spec) (mu_parse822_unix_mbox, mu_parse822_local_part): Take hint and hint flags. * mailbox/parse822.c: Likewise. * libproto/include/Makefile.am (noinst_HEADERS): Remove address0.h * libproto/include/address0.h: Removed. * mailbox/address.c (mu_address_create_hint): New function. (mu_address_create): Rewrite using mu_address_create_hint. * mh/mh_init.c (mh_expand_aliases): Use mu_header_sget_field_name * mh/mh_whom.c (mh_alias_expand): Rewrite using mu_address_create_hint. This fixes parsing addresses similar to "a@b <a@b>". * mh/send.c: New command line option --preserve (--keep)
2007-12-13* examples/aclck.c, examples/addr.c, examples/base64.c,Sergey Poznyakoff1
examples/decode2047.c, examples/echosrv.c, examples/encode2047.c, examples/header.c, examples/http.c, examples/iconv.c, examples/listop.c, examples/lsf.c, examples/mailcap.c, examples/mimetest.c, examples/msg-send.c, examples/muemail.c, examples/murun.c, examples/nntpclient.c, examples/pop3client.c, examples/sfrom.c, examples/url-parse.c: Include config.h. Use MU_ASSERT instead of assert. * include/mailutils/cfg.h (struct mu_cfg_section.offset): New member. * include/mailutils/debug.hm4 (MU_ASSERT): New member. * lib/utmp.c: Include config.h. * libcfg/Makefile.am (libmucfg_la_SOURCES): Add acl.c. * libcfg/acl.c: New file. * libcfg/common.c (cb_debug_level): Immediately set debugging level. * mailbox/acl.c: mu_acl_log expands its argument. * mailbox/cfg_driver.c (mu_create_canned_section) (mu_create_canned_param): Avoid creating container twice. * mailbox/cfg_format.c (format_param): Do not pring type if argname contains a colon. * mailbox/cfg_parser.y (_scan_tree_helper): Compute target pointer. * imap4d/imap4d.c, imap4d/imap4d.h, pop3d/pop3d.c, pop3d/pop3d.h: Use MU ACLs
2007-06-27Prepare for the GPL v.3 release. Relicense programs under GPL v.3, libraries ↵Sergey Poznyakoff1
under LPGL v.3
2007-06-26Remove unused varsSergey Poznyakoff1
2007-06-24Use mu_address_sget functions, where possible.Sergey Poznyakoff1
2005-08-27Normalize global namespace. Part 2Wojciech Polak1
2005-08-26Normalize global namespace. Part 1Sergey Poznyakoff1
2005-05-17Updated FSF addressalpha_0_6_90Sergey Poznyakoff1
2004-06-02Revise the usage of return codes.Sergey Poznyakoff1
2004-01-21CosmeticsWojciech Polak1
2004-01-21Reverted to 1.13Sergey Poznyakoff1
2004-01-19UpdatedWojciech Polak1
2003-02-09Updated FSF address.Wojciech Polak1
2002-12-29Fixed C source copyrights to be compatible with the GNU 'Maintaining'Wojciech Polak1
document, i.e. "This program" -> "GNU Mailutils".
2002-12-11Include string.h. Add typecasts to the arguments of printf-like functions ↵Sergey Poznyakoff1
where necessary.
2002-12-10Include mutil.hSergey Poznyakoff1
2002-09-02Untabified. Needed for proper conversion to *.texiSergey Poznyakoff1
2002-08-29Added copyleft header. Set user email domain to localhost on startup.Sergey Poznyakoff1
2002-03-01New addr return codes.Sam Roberts1
2002-02-26Replaced strerror() with mu_errstring().Sam Roberts1
2001-06-14GNU indentedSam Roberts1
2001-05-07Implemented UID fetch BODYSTRUCTURE and multiple access to mailbox via IMAPAlain Magloire1
2001-04-15From Sam.Alain Magloire1
* examples/{Makefile,Addrs,addr.c,Addrs.good}: address test f/w. * include/mailutils/address.h,mailbox/{address.c,parse822.c}: now stuff a group name into an _address, and added a function to do a quick check if it is a group. * mailbox/parse822.c: fixed bug where ",sam@foo.bar" wasn't valid.
2001-04-10New example from Sam Roberts.Alain Magloire1
2001-04-07Test program.Alain Magloire1

Return to:

Send suggestions and report system problems to the System administrator.