Prefer mu_header_sget where possible. Remove obsolete header calls.
Showing
1 changed file
with
1 additions
and
31 deletions
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | 1 | /* GNU Mailutils -- a suite of utilities for electronic mail |
2 | Copyright (C) 1999, 2000, 2001, 2002, 2003, | 2 | Copyright (C) 1999, 2000, 2001, 2002, 2003, |
3 | 2004, 2005, 2006 Free Software Foundation, Inc. | 3 | 2004, 2005, 2006, 2007 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | 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); | ... | @@ -97,8 +97,6 @@ static int amd_body_lines (mu_body_t body, size_t *plines); |
97 | 97 | ||
98 | static int amd_header_fill (mu_header_t header, char *buffer, size_t len, | 98 | static int amd_header_fill (mu_header_t header, char *buffer, size_t len, |
99 | mu_off_t off, size_t *pnread); | 99 | mu_off_t off, size_t *pnread); |
100 | static int amd_header_size (mu_header_t header, size_t *psize); | ||
101 | static int amd_header_lines (mu_header_t header, size_t *plines); | ||
102 | 100 | ||
103 | static int amd_get_attr_flags (mu_attribute_t attr, int *pflags); | 101 | static int amd_get_attr_flags (mu_attribute_t attr, int *pflags); |
104 | static int amd_set_attr_flags (mu_attribute_t attr, int flags); | 102 | 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, | ... | @@ -422,8 +420,6 @@ _amd_attach_message (mu_mailbox_t mailbox, struct _amd_message *mhm, |
422 | return status; | 420 | return status; |
423 | } | 421 | } |
424 | mu_header_set_fill (header, amd_header_fill, msg); | 422 | mu_header_set_fill (header, amd_header_fill, msg); |
425 | mu_header_set_size (header, amd_header_size, msg); | ||
426 | mu_header_set_lines (header, amd_header_lines, msg); | ||
427 | /*FIXME: | 423 | /*FIXME: |
428 | mu_header_set_get_fvalue (header, amd_header_get_fvalue, msg); | 424 | mu_header_set_get_fvalue (header, amd_header_get_fvalue, msg); |
429 | */ | 425 | */ |
... | @@ -1358,32 +1354,6 @@ amd_header_fill (mu_header_t header, char *buffer, size_t len, | ... | @@ -1358,32 +1354,6 @@ amd_header_fill (mu_header_t header, char *buffer, size_t len, |
1358 | 0, mhm->body_start); | 1354 | 0, mhm->body_start); |
1359 | } | 1355 | } |
1360 | 1356 | ||
1361 | static int | ||
1362 | amd_header_size (mu_header_t header, size_t *psize) | ||
1363 | { | ||
1364 | mu_message_t msg = mu_header_get_owner (header); | ||
1365 | struct _amd_message *mhm = mu_message_get_owner (msg); | ||
1366 | if (mhm == NULL) | ||
1367 | return EINVAL; | ||
1368 | amd_check_message (mhm); | ||
1369 | if (psize) | ||
1370 | *psize = mhm->body_start; | ||
1371 | return 0; | ||
1372 | } | ||
1373 | |||
1374 | static int | ||
1375 | amd_header_lines (mu_header_t header, size_t *plines) | ||
1376 | { | ||
1377 | mu_message_t msg = mu_header_get_owner (header); | ||
1378 | struct _amd_message *mhm = mu_message_get_owner (msg); | ||
1379 | if (mhm == NULL) | ||
1380 | return EINVAL; | ||
1381 | amd_check_message (mhm); | ||
1382 | if (plines) | ||
1383 | *plines = mhm->header_lines; | ||
1384 | return 0; | ||
1385 | } | ||
1386 | |||
1387 | /* Attributes */ | 1357 | /* Attributes */ |
1388 | static int | 1358 | static int |
1389 | amd_get_attr_flags (mu_attribute_t attr, int *pflags) | 1359 | amd_get_attr_flags (mu_attribute_t attr, int *pflags) | ... | ... |
-
Please register or sign in to post a comment