#endif
#include <lib-lib/mem.h>
+#include <lib-lib/file.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
sscanf (line, "%d %s", &index, line);
for (i = 0; i < ctx->msgcount; i++)
- if (!str_cmp (line, ctx->hdrs[i]->data))
+ if (!m_strcmp(line, ctx->hdrs[i]->data))
break;
if (i == ctx->msgcount) {
conn->data = pop_data;
- FOREVER {
+ for (;;) {
if (pop_reconnect (ctx) != PQ_OK)
return -1;
}
}
- FOREVER {
+ for (;;) {
if (pop_reconnect (ctx) != PQ_OK)
return -1;
pop_data->check_time = 0;
- FOREVER {
+ for (;;) {
if (pop_reconnect (ctx) != PQ_OK)
return PQ_NOT_CONNECTED;
}
if (ret == PQ_OK) {
- strfcpy (buf, "QUIT\r\n", sizeof (buf));
+ m_strcpy(buf, sizeof(buf), "QUIT\r\n");
ret = pop_query (pop_data, buf, sizeof (buf));
}
mutt_message _("Checking for new messages...");
/* find out how many messages are in the mailbox. */
- strfcpy (buffer, "STAT\r\n", sizeof (buffer));
+ m_strcpy(buffer, sizeof(buffer), "STAT\r\n");
ret = pop_query (pop_data, buffer, sizeof (buffer));
if (ret == PQ_NOT_CONNECTED)
goto fail;
/* only get unread messages */
if (msgs > 0 && option (OPTPOPLAST)) {
- strfcpy (buffer, "LAST\r\n", sizeof (buffer));
+ m_strcpy(buffer, sizeof(buffer), "LAST\r\n");
ret = pop_query (pop_data, buffer, sizeof (buffer));
if (ret == PQ_NOT_CONNECTED)
goto fail;
if (rset) {
/* make sure no messages get deleted */
- strfcpy (buffer, "RSET\r\n", sizeof (buffer));
+ m_strcpy(buffer, sizeof(buffer), "RSET\r\n");
if (pop_query (pop_data, buffer, sizeof (buffer)) == PQ_NOT_CONNECTED)
goto fail;
}
finish:
/* exit gracefully */
- strfcpy (buffer, "QUIT\r\n", sizeof (buffer));
+ m_strcpy(buffer, sizeof(buffer), "QUIT\r\n");
if (pop_query (pop_data, buffer, sizeof (buffer)) == PQ_NOT_CONNECTED)
goto fail;
mutt_socket_close (conn);