init_menu (&state, menu, title, sizeof (title), buffy);
- FOREVER {
+ for (;;) {
switch (i = mutt_menuLoop (menu)) {
case OP_GENERIC_SELECT_ENTRY:
/* find the smallest available index (object) */
i = 1;
- FOREVER {
+ for (;;) {
p = ColorList;
while (p) {
if (p->index == i)
printw ("%.*s%s", COLS - answer_string_len, msg, answer_string);
p_delete(&answer_string);
- FOREVER {
+ for (;;) {
mutt_refresh ();
ch = mutt_getch ();
if (CI_is_return (ch.ch))
mvaddstr (LINES - 1, 0, prompt);
clrtoeol ();
- FOREVER {
+ for (;;) {
mutt_refresh ();
ch = mutt_getch ();
if (ch.ch == -1 || CI_is_return (ch.ch)) {
sidebar_set_current (Context->path);
}
- FOREVER {
+ for (;;) {
tag = 0; /* clear the tag-prefix */
menu->max = Context ? Context->vcount : 0;
if ((cur = cur->child) == NULL)
return (0);
- FOREVER {
+ for (;;) {
if (cur->message)
mutt_set_flag (Context, cur->message, flag, bf);
if (!map)
return (retry_generic (menu, NULL, 0, 0));
- FOREVER {
+ for (;;) {
/* ncurses doesn't return on resized screen when timeout is set to zero */
if (menu != MENU_EDITOR)
timeout ((Timeout > 0 ? Timeout : 60) * 1000);
if (!map)
return (0);
- FOREVER {
+ for (;;) {
strfcpy (s, km_keyname (map->keys[p]), len);
len -= (l = m_strlen(s));
*size = STRING;
}
- FOREVER {
+ for (;;) {
if (fgets (s + offset, *size - offset, fp) == NULL) {
p_delete(&s);
return NULL;
# define MAX(a,b) ((a) < (b) ? (b) : (a))
# define MIN(a,b) ((a) < (b) ? (a) : (b))
-#define FOREVER while (1)
-
void mutt_exit (int);
/* Exit values used in send_msg() */
buf[sizeof (buf) - 1] = 0;
- FOREVER {
+ for (;;) {
if (fgets (buf, sizeof (buf) - 1, ctx->fp) == NULL)
break;
{
int i = OP_NULL;
- FOREVER {
+ for (;;) {
if (option (OPTMENUCALLER)) {
unset_option (OPTMENUCALLER);
return OP_NULL;
int fd;
char path[_POSIX_PATH_MAX];
- FOREVER {
+ for (;;) {
snprintf (path, _POSIX_PATH_MAX, "%s/.mutt-%s-%d-%d",
dest->path, NONULL (Hostname), (int) getpid (), Counter++);
umask (Umask);
else
strfcpy (subdir, "new", sizeof (subdir));
- FOREVER {
+ for (;;) {
snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%ld.%u_%d.%s%s",
dest->path, subdir, (long) time (NULL),
(unsigned int) getpid (), Counter++, NONULL (Hostname), suffix);
suffix[0] = '\0';
/* construct a new file name. */
- FOREVER {
+ for (;;) {
snprintf (path, _POSIX_PATH_MAX, "%s/%ld.%u_%d.%s%s", subdir,
(long) time (NULL), (unsigned int) getpid (), Counter++,
NONULL (Hostname), suffix);
* slot.
*/
- FOREVER {
+ for (;;) {
hi++;
snprintf (tmp, sizeof (tmp), "%d", hi);
snprintf (path, sizeof (path), "%s/%s", ctx->path, tmp);
mutt_socket_close (serv->conn);
- FOREVER {
+ for (;;) {
if (nntp_connect_and_auth (serv) == 0)
return 0;
line = 0;
inbuf = p_new(char, sizeof(buf));
- FOREVER {
+ for (;;) {
chunk = mutt_socket_readln_d (buf, sizeof (buf), nntp_data->nserv->conn,
M_SOCK_LOG_HDR);
if (chunk < 0)
char ch;
size_t offset = 0;
- FOREVER {
+ for (;;) {
if (fgets (buf, *linelen - offset, f) == NULL || /* end of file or */
(ISSPACE (*line) && !offset)) { /* end of headers */
*line = 0;
}
- FOREVER {
+ for (;;) {
resp[0] = 0;
if (mutt_get_field (tag, resp, sizeof (resp), M_CLEAR) != 0)
return NULL;
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 (!method)
method = pop_data->auth_list;
- FOREVER {
+ for (;;) {
#ifdef USE_SASL
rc =
sasl_client_start (saslconn, method, &interaction, &pc, &olen, &mech);
olen = strlen (buf);
/* looping protocol */
- FOREVER {
+ for (;;) {
strfcpy (buf + olen, "\r\n", sizeof (buf) - olen);
mutt_socket_write (pop_data->conn, buf);
if (mutt_socket_readln (inbuf, sizeof (inbuf), pop_data->conn) < 0) {
}
if (!client_start)
- FOREVER {
+ for (;;) {
rc = sasl_client_step (saslconn, buf, len, &interaction, &pc, &olen);
if (rc != SASL_INTERACT)
break;
inbuf = p_new(char, sizeof(buf));
- FOREVER {
+ for (;;) {
chunk =
mutt_socket_readln_d (buf, sizeof (buf), pop_data->conn,
M_SOCK_LOG_HDR);
if (pop_data->status == POP_BYE)
return PQ_NOT_CONNECTED;
- FOREVER {
+ for (;;) {
mutt_socket_close (pop_data->conn);
ret = pop_open_connection (pop_data);
attach_collapse (cur, 0, 1, 0);
mutt_update_attach_index (cur, &idx, &idxlen, &idxmax, menu);
- FOREVER {
+ for (;;) {
if (op == OP_NULL)
op = mutt_menuLoop (menu);
switch (op) {
}
fclose (index);
- FOREVER {
+ for (;;) {
*qry = 0;
if (mutt_get_field (prompt, qry, sizeof (qry), 0))
return NULL;
tree = tree->next;
*max_depth = 0;
- FOREVER {
+ for (;;) {
if (depth > *max_depth)
*max_depth = depth;
/* now fix up for the OPTHIDETOP* options if necessary */
if (hide_top_limited || hide_top_missing) {
tree = ctx->tree;
- FOREVER {
+ for (;;) {
if (!tree->visible && tree->deep && tree->subtree_visible < 2
&& ((tree->message && hide_top_limited)
|| (!tree->message && hide_top_missing)))
LIST *curlist, *oldlist, *newlist, *subjects = NULL;
int rc = 0;
- FOREVER {
+ for (;;) {
while (!cur->message)
cur = cur->child;
insert_message (&parent->child, parent, cur);
parent->sort_children = 1;
tmp = cur;
- FOREVER {
+ for (;;) {
while (!tmp->message)
tmp = tmp->child;
while (reverse && cur->next)
cur = cur->next;
- FOREVER {
+ for (;;) {
if (cur->message && cur->message->virtual >= 0)
return (cur->message);
return (min_unread);
}
- FOREVER {
+ for (;;) {
cur = thread->message;
if (cur) {