Commit 345f2cec 345f2cec351cd21b8d708a8895a8c75c02e60ad4 by Sergey Poznyakoff

Indentation fixes

1 parent 7fa065e5
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, 2003, 2 Copyright (C) 1999, 2000, 2001, 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
...@@ -248,7 +248,7 @@ mbox_open (mu_mailbox_t mailbox, int flags) ...@@ -248,7 +248,7 @@ mbox_open (mu_mailbox_t mailbox, int flags)
248 mu_stream_destroy (&mailbox->stream, NULL); 248 mu_stream_destroy (&mailbox->stream, NULL);
249 return status; 249 return status;
250 } 250 }
251 /* Even on top, of normal FILE *, lets agressively cache. But this 251 /* Even on top of normal FILE *, lets agressively cache. But this
252 may not be suitable for system tight on memory. */ 252 may not be suitable for system tight on memory. */
253 mu_stream_setbufsiz (mailbox->stream, BUFSIZ); 253 mu_stream_setbufsiz (mailbox->stream, BUFSIZ);
254 } 254 }
...@@ -834,7 +834,8 @@ mbox_message_uid (mu_message_t msg, size_t *puid) ...@@ -834,7 +834,8 @@ mbox_message_uid (mu_message_t msg, size_t *puid)
834 } 834 }
835 835
836 static int 836 static int
837 mbox_get_body_transport (mu_stream_t is, mu_transport_t *pin, mu_transport_t *pout) 837 mbox_get_body_transport (mu_stream_t is, mu_transport_t *pin,
838 mu_transport_t *pout)
838 { 839 {
839 mu_body_t body = mu_stream_get_owner (is); 840 mu_body_t body = mu_stream_get_owner (is);
840 mu_message_t msg = mu_body_get_owner (body); 841 mu_message_t msg = mu_body_get_owner (body);
...@@ -843,7 +844,8 @@ mbox_get_body_transport (mu_stream_t is, mu_transport_t *pin, mu_transport_t *po ...@@ -843,7 +844,8 @@ mbox_get_body_transport (mu_stream_t is, mu_transport_t *pin, mu_transport_t *po
843 } 844 }
844 845
845 static int 846 static int
846 mbox_get_transport2 (mbox_message_t mum, mu_transport_t *pin, mu_transport_t *pout) 847 mbox_get_transport2 (mbox_message_t mum, mu_transport_t *pin,
848 mu_transport_t *pout)
847 { 849 {
848 if (mum == NULL) 850 if (mum == NULL)
849 return EINVAL; 851 return EINVAL;
...@@ -938,7 +940,8 @@ mbox_readstream (mbox_message_t mum, char *buffer, size_t buflen, ...@@ -938,7 +940,8 @@ mbox_readstream (mbox_message_t mum, char *buffer, size_t buflen,
938 /* Position the file pointer and the buffer. */ 940 /* Position the file pointer and the buffer. */
939 nread = ((size_t)ln < buflen) ? (size_t)ln : buflen; 941 nread = ((size_t)ln < buflen) ? (size_t)ln : buflen;
940 if (isreadline) 942 if (isreadline)
941 status = mu_stream_readline (mum->mud->mailbox->stream, buffer, buflen, 943 status = mu_stream_readline (mum->mud->mailbox->stream,
944 buffer, buflen,
942 start + off, &nread); 945 start + off, &nread);
943 else 946 else
944 status = mu_stream_read (mum->mud->mailbox->stream, buffer, nread, 947 status = mu_stream_read (mum->mud->mailbox->stream, buffer, nread,
...@@ -1081,7 +1084,8 @@ mbox_envelope_date (mu_envelope_t envelope, char *buf, size_t len, ...@@ -1081,7 +1084,8 @@ mbox_envelope_date (mu_envelope_t envelope, char *buf, size_t len,
1081 if (mum == NULL) 1084 if (mum == NULL)
1082 return EINVAL; 1085 return EINVAL;
1083 1086
1084 status = mu_stream_readline (mum->mud->mailbox->stream, buffer, sizeof(buffer), 1087 status = mu_stream_readline (mum->mud->mailbox->stream,
1088 buffer, sizeof(buffer),
1085 mum->header_from, &n); 1089 mum->header_from, &n);
1086 if (status != 0) 1090 if (status != 0)
1087 { 1091 {
...@@ -1125,7 +1129,8 @@ mbox_envelope_sender (mu_envelope_t envelope, char *buf, size_t len, ...@@ -1125,7 +1129,8 @@ mbox_envelope_sender (mu_envelope_t envelope, char *buf, size_t len,
1125 if (mum == NULL) 1129 if (mum == NULL)
1126 return EINVAL; 1130 return EINVAL;
1127 1131
1128 status = mu_stream_readline (mum->mud->mailbox->stream, buffer, sizeof(buffer), 1132 status = mu_stream_readline (mum->mud->mailbox->stream, buffer,
1133 sizeof(buffer),
1129 mum->header_from, &n); 1134 mum->header_from, &n);
1130 if (status != 0) 1135 if (status != 0)
1131 { 1136 {
...@@ -1311,7 +1316,8 @@ mbox_append_message (mu_mailbox_t mailbox, mu_message_t msg) ...@@ -1311,7 +1316,8 @@ mbox_append_message (mu_mailbox_t mailbox, mu_message_t msg)
1311 mu_off_t size; 1316 mu_off_t size;
1312 /* Move to the end of the file, not necesary if _APPEND mode. */ 1317 /* Move to the end of the file, not necesary if _APPEND mode. */
1313 if ((status = mu_stream_size (mailbox->stream, &size)) != 0 1318 if ((status = mu_stream_size (mailbox->stream, &size)) != 0
1314 || (status = mbox_append_message0 (mailbox, msg, &size, 0, 0)) != 0) 1319 || (status = mbox_append_message0 (mailbox, msg,
1320 &size, 0, 0)) != 0)
1315 { 1321 {
1316 if (status != EAGAIN) 1322 if (status != EAGAIN)
1317 mu_locker_unlock (mailbox->locker); 1323 mu_locker_unlock (mailbox->locker);
...@@ -1388,10 +1394,9 @@ restore_date (mu_message_t msg, mbox_data_t mud) ...@@ -1388,10 +1394,9 @@ restore_date (mu_message_t msg, mbox_data_t mud)
1388 date = strdup (ctime (&t)); 1394 date = strdup (ctime (&t));
1389 } 1395 }
1390 1396
1391 mud->date = strdup (date); 1397 mud->date = date;
1392 if (!mud->date) 1398 if (!mud->date)
1393 rc = ENOMEM; 1399 rc = ENOMEM;
1394 free (date);
1395 return rc; 1400 return rc;
1396 } 1401 }
1397 1402
...@@ -1668,7 +1673,8 @@ mbox_append_message0 (mu_mailbox_t mailbox, mu_message_t msg, mu_off_t *psize, ...@@ -1668,7 +1673,8 @@ mbox_append_message0 (mu_mailbox_t mailbox, mu_message_t msg, mu_off_t *psize,
1668 return status; 1673 return status;
1669 } 1674 }
1670 mud->off += nread; 1675 mud->off += nread;
1671 status = mu_stream_write (mailbox->stream, buffer, nread, *psize, &n); 1676 status = mu_stream_write (mailbox->stream, buffer, nread,
1677 *psize, &n);
1672 if (status) 1678 if (status)
1673 break; 1679 break;
1674 *psize += n; 1680 *psize += n;
......