- for (;;) {
- /*
- * Get the message number we will attempt to add.
- */
- if (first_time) {
- /* should we preserve the numbering of the message? */
- if (preserve && (msgnum = m_atoi (msgfile)) > 0) {
- ;
- } else if (mp->nummsg == 0) {
- /* check if we are adding to empty folder */
- msgnum = 1;
- } else {
- /* else use highest message number + 1 */
- msgnum = mp->hghmsg + 1;
- }
- first_time = 0;
- } else {
- /* another attempt, so try next higher message number */
- msgnum++;
- }