diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-06-26 13:59:45 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-06-26 13:59:45 +0000 |
commit | a79c617c7df8a0ac7e086019e8ab51a2cd658b83 (patch) | |
tree | 4cff23830fae0a9a7d63201805051d629e18e1f6 /mailbox | |
parent | 1a3afcb7eef0fc7c0f55dceb420afd2a12d1d91b (diff) | |
download | mailutils-a79c617c7df8a0ac7e086019e8ab51a2cd658b83.tar.gz mailutils-a79c617c7df8a0ac7e086019e8ab51a2cd658b83.tar.bz2 |
Prefer mu_header_sget where possible. Remove obsolete header calls.
Diffstat (limited to 'mailbox')
-rw-r--r-- | mailbox/amd.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/mailbox/amd.c b/mailbox/amd.c index c68da33d6..455a77bd9 100644 --- a/mailbox/amd.c +++ b/mailbox/amd.c @@ -1,6 +1,6 @@ /* GNU Mailutils -- a suite of utilities for electronic mail Copyright (C) 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006 Free Software Foundation, Inc. + 2004, 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 @@ -97,8 +97,6 @@ static int amd_body_lines (mu_body_t body, size_t *plines); static int amd_header_fill (mu_header_t header, char *buffer, size_t len, mu_off_t off, size_t *pnread); -static int amd_header_size (mu_header_t header, size_t *psize); -static int amd_header_lines (mu_header_t header, size_t *plines); static int amd_get_attr_flags (mu_attribute_t attr, int *pflags); static int amd_set_attr_flags (mu_attribute_t attr, int flags); @@ -422,8 +420,6 @@ _amd_attach_message (mu_mailbox_t mailbox, struct _amd_message *mhm, return status; } mu_header_set_fill (header, amd_header_fill, msg); - mu_header_set_size (header, amd_header_size, msg); - mu_header_set_lines (header, amd_header_lines, msg); /*FIXME: mu_header_set_get_fvalue (header, amd_header_get_fvalue, msg); */ @@ -1355,33 +1351,7 @@ amd_header_fill (mu_header_t header, char *buffer, size_t len, amd_pool_open (mhm); return amd_readstream (mhm, buffer, len, off, pnread, 0, - 0, mhm->body_start); -} - -static int -amd_header_size (mu_header_t header, size_t *psize) -{ - mu_message_t msg = mu_header_get_owner (header); - struct _amd_message *mhm = mu_message_get_owner (msg); - if (mhm == NULL) - return EINVAL; - amd_check_message (mhm); - if (psize) - *psize = mhm->body_start; - return 0; -} - -static int -amd_header_lines (mu_header_t header, size_t *plines) -{ - mu_message_t msg = mu_header_get_owner (header); - struct _amd_message *mhm = mu_message_get_owner (msg); - if (mhm == NULL) - return EINVAL; - amd_check_message (mhm); - if (plines) - *plines = mhm->header_lines; - return 0; + 0, mhm->body_start); } /* Attributes */ |