Sender: hurtta@attruh.keh.iki.fi Subject: Patch: Elm ME+ 2.5 PLalpha1 -> Elm ME+ 2.5 PLalpha2 [5/5] From: "Kari E. Hurtta" Newsgroups: alt.sources,comp.mail.elm Reply-To: "Kari E. Hurtta" Message-ID: References: In-Reply-To: "Kari E. Hurtta"'s message Lines: 2026 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 20 Aug 2004 17:31:57 GMT NNTP-Posting-Host: 193.208.81.208 X-Complaints-To: abuse@inet.fi X-Trace: read3.inet.fi 1093023117 193.208.81.208 (Fri, 20 Aug 2004 20:31:57 EEST) NNTP-Posting-Date: Fri, 20 Aug 2004 20:31:57 EEST Organization: Sonera corp Internet services Xref: newsread3.funet.fi comp.mail.elm:2025 alt.sources:966 Archive-name: elmME+2.5/PLalpha2.5 Elm ME+ 2.5 PLalpha2 - Is available on ftp.funet.fi via anonymous ftp directory pub/unix/mail/elm/elm-ME+2.5/ file elm-ME+2.5.PLalpha2.patch.gz or - Is available with via WWW (1). 1) NOTE: It is currently unknown what will be done for ftp.ozone.fmi.fi www.ozone.fmi.fi. Also ozone.fmi.fi will retire. Before applying patch catenate parts 1 - 5 first. This patch (Elm ME+ 2.5 PLalpha2) is agaist Elm ME+ 2.5 PLalpha1. After that patch apply also Elm ME+ 2.5 PLalpha3 patch. ================================================ ( part 5/5 ) =============== --- 147,153 ---- *************** *** 213,218 **** --- 211,218 ---- { int result = 0; int dummy = 0; + struct MailboxView *m; + int idx2 = 0; SIGDPRINT(Debug,1, (&Debug, "\n\n** Received SIGUSR1 **\n\n\n\n")); if (!InGetPrompt || !wait_can_signal) { *************** *** 220,248 **** return; } - /* !! FIXME?? Differs from Elm 2.5 */ - while (current_mailbox && - (result = leave_mbox(TRUE, FALSE, FALSE, NULL, current_mailbox, - &dummy, default_context)) - == -1) { - int idx; - int mbxcount = get_storage_count(current_mailbox); ! for (idx = 0 ; idx < mbxcount; idx++) { ! struct current_storage * storage = get_storage(current_mailbox, ! idx); ! if (!storage || ! !storage->current_folder) ! continue; ! ! read_new_mails(storage, default_context); ! } } if (result >= 0) ! leave(!InGetPrompt, ¤t_mailbox, ¤t_aliaslist); } SIGHAND_TYPE --- 220,253 ---- return; } ! while (NULL != (m = give_next_open_mailbox(&idx2,!InGetPrompt))) { ! ! /* !! FIXME?? Differs from Elm 2.5 */ ! while (m && ! (result = leave_mbox(TRUE, FALSE, FALSE, NULL, m, ! &dummy, default_context)) ! == -1) { ! int idx; ! int mbxcount = get_storage_count(m); ! for (idx = 0 ; idx < mbxcount; idx++) { ! ! struct current_storage * storage = get_storage(m,idx); ! if (!storage || ! !storage->current_folder) ! continue; ! ! read_new_mails(storage, default_context); ! } ! } ! if (result < 0) ! break; } if (result >= 0) ! leave(!InGetPrompt); } SIGHAND_TYPE *************** *** 250,255 **** --- 255,262 ---- { int result = 0; int dummy = 0; + struct MailboxView *m; + int idx2 = 0; SIGDPRINT(Debug,1, (&Debug, "\n\n** Received SIGUSR2 **\n\n\n\n")); *************** *** 257,285 **** SIGDPRINT(Debug,1, (&Debug, "-- can't leave folder\n")); return; } - - while (current_mailbox && - (result = leave_mbox(FALSE, TRUE, FALSE, NULL, - current_mailbox, &dummy, - default_context)) == -1) { - int idx; - int mbxcount = get_storage_count(current_mailbox); ! for (idx = 0 ; idx < mbxcount; idx++) { ! ! struct current_storage * storage = get_storage(current_mailbox, ! idx); ! if (!storage || ! !storage->current_folder) ! continue; ! ! read_new_mails(storage, default_context); ! } } - if (result >= 0) ! leave(!InGetPrompt, ¤t_mailbox, ¤t_aliaslist); } void init_signals() --- 264,295 ---- SIGDPRINT(Debug,1, (&Debug, "-- can't leave folder\n")); return; } ! while (NULL != (m = give_next_open_mailbox(&idx2,!InGetPrompt))) { ! ! while (m && ! (result = leave_mbox(FALSE, TRUE, FALSE, NULL, ! m, &dummy, ! default_context)) == -1) { ! int idx; ! int mbxcount = get_storage_count(m); ! for (idx = 0 ; idx < mbxcount; idx++) { ! ! struct current_storage * storage = get_storage(m,idx); ! ! if (!storage || ! !storage->current_folder) ! continue; ! ! read_new_mails(storage, default_context); ! } ! } ! if (result < 0) ! break; } if (result >= 0) ! leave(!InGetPrompt); } void init_signals() Index: elmME+.2.5.alpha2-cvs/src/syscall.c *** elmME+.2.5.alpha1/src/syscall.c 2004-05-16 17:43:45.000000000 +0300 --- elmME+.2.5.alpha2-cvs/src/syscall.c 2004-08-14 09:40:49.000000000 +0300 *************** *** 1,15 **** ! static char rcsid[] = "@(#)$Id: syscall.c,v 1.33.2.1 2004/05/14 19:48:18 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.33.2.1 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) ****************************************************************************** * The Elm Mail System * * Copyright (c) 1988-1992 USENET Community Trust * Copyright (c) 1986,1987 Dave Taylor *****************************************************************************/ /** These routines are used for user-level system calls, including the --- 1,26 ---- ! static char rcsid[] = "@(#)$Id: syscall.c,v 1.33.2.4 2004/08/14 06:40:49 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.33.2.4 $ $State: Exp $ ! * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) ****************************************************************************** + * Based on Elm 2.4 src/syscall.c. That code was following copyright: + * * The Elm Mail System * * Copyright (c) 1988-1992 USENET Community Trust * Copyright (c) 1986,1987 Dave Taylor + ***************************************************************************** + * Incorparated Elm 2.5 code from src/syscall.c. + * That code was following copyright: + * + * The Elm Mail System + * + * Copyright (c) 1988-1995 USENET Community Trust + * Copyright (c) 1986,1987 Dave Taylor *****************************************************************************/ /** These routines are used for user-level system calls, including the *************** *** 21,27 **** #include "s_elm.h" #include "s_me.h" ! DEBUG_VAR(Debug,__FILE__,"misc"); #include --- 32,38 ---- #include "s_elm.h" #include "s_me.h" ! DEBUG_VAR(Debug,__FILE__,"system"); #include *************** *** 35,46 **** #ifdef ALLOW_SUBSHELL ! int subshell(mailbox, page) struct MailboxView *mailbox; struct menu_context *page; { /** spawn a subshell with either the specified command ! returns non-zero if screen rewrite needed **/ char command[SLEN]; --- 46,58 ---- #ifdef ALLOW_SUBSHELL ! void subshell(mailbox, page) struct MailboxView *mailbox; struct menu_context *page; { /** spawn a subshell with either the specified command ! ! If redraw is needes use menu_trigger_redraw() **/ char command[SLEN]; *************** *** 63,69 **** "Shell command: ")); CleartoEOS(); command[0] = '\0'; ! status = optionally_enter(command, LINES-3, 15, OE_REDRAW_MARK, sizeof command, page); while (REDRAW_MARK == status) { --- 75,82 ---- "Shell command: ")); CleartoEOS(); command[0] = '\0'; ! status = optionally_enter(command, LINES-3, 15, OE_REDRAW_MARK| ! OE_SIG_CHAR /* Ctrl-C */, sizeof command, page); while (REDRAW_MARK == status) { *************** *** 72,88 **** CATGETS(elm_msg_cat, ElmSet, ElmShellCommand, "Shell command: ")); status = optionally_enter(command, LINES-3, 15, ! OE_REDRAW_MARK|OE_APPEND_CURRENT, sizeof command, page); } ! if (0 != status && command[0] == 0) { if (helpful) MoveCursor(LINES-4,COLUMNS-40); else MoveCursor(LINES-3,0); CleartoEOS(); ! return redraw; } MoveCursor(LINES-1,0); --- 85,107 ---- CATGETS(elm_msg_cat, ElmSet, ElmShellCommand, "Shell command: ")); status = optionally_enter(command, LINES-3, 15, ! OE_REDRAW_MARK|OE_APPEND_CURRENT| ! OE_SIG_CHAR /* Ctrl-C */, sizeof command, page); } ! ! if (0 != status || command[0] == 0) { if (helpful) MoveCursor(LINES-4,COLUMNS-40); else MoveCursor(LINES-3,0); CleartoEOS(); ! ! if (redraw) ! menu_trigger_redraw(page); ! ! return; } MoveCursor(LINES-1,0); *************** *** 123,129 **** "Return code was %d."), ret); ! return 1; } #endif /* ALLOW_SUBSHELL */ --- 142,150 ---- "Return code was %d."), ret); ! menu_trigger_redraw(page); ! ! return; } #endif /* ALLOW_SUBSHELL */ *************** *** 193,199 **** } /* if we aren't reading a folder then a state dump is meaningless */ ! if (mail_only) options &= ~SY_DUMPSTATE; /* see if we need to dump out the folder state */ --- 214,220 ---- } /* if we aren't reading a folder then a state dump is meaningless */ ! if (!OPMODE_IS_READMODE(opmode)) options &= ~SY_DUMPSTATE; /* see if we need to dump out the folder state */ *************** *** 336,347 **** return(stat); } ! int do_pipe(mailbox, page) struct MailboxView *mailbox; struct menu_context *page; { /** pipe the current message or tagged messages to ! the specified sequence.. **/ char command[SLEN], buffer[SLEN], *prompt; register int ret; --- 357,371 ---- return(stat); } ! void do_pipe(mailbox, page) struct MailboxView *mailbox; struct menu_context *page; { /** pipe the current message or tagged messages to ! the specified sequence.. ! ! if redraw is needed use menu_trigger_redraw() ! **/ char command[SLEN], buffer[SLEN], *prompt; register int ret; *************** *** 358,377 **** PutLine0(LINES-3, 0, prompt); command[0] = '\0'; status = optionally_enter(command, LINES-3, strlen(prompt), ! OE_REDRAW_MARK, sizeof command, page); while (status == REDRAW_MARK) { redraw = TRUE; PutLine0(LINES-1-2, 0, prompt); status = optionally_enter(command, LINES-3, strlen(prompt), ! OE_REDRAW_MARK|OE_APPEND_CURRENT, sizeof command, page); } if (0 != status || command[0] == '\0') { MoveCursor(LINES-3,0); CleartoEOLN(); ! return(redraw); } MoveCursor(LINES-1,0); --- 382,406 ---- PutLine0(LINES-3, 0, prompt); command[0] = '\0'; status = optionally_enter(command, LINES-3, strlen(prompt), ! OE_REDRAW_MARK| ! OE_SIG_CHAR /* Ctrl-C */, sizeof command, page); while (status == REDRAW_MARK) { redraw = TRUE; PutLine0(LINES-1-2, 0, prompt); status = optionally_enter(command, LINES-3, strlen(prompt), ! OE_REDRAW_MARK|OE_APPEND_CURRENT| ! OE_SIG_CHAR /* Ctrl-C */, sizeof command, page); } if (0 != status || command[0] == '\0') { MoveCursor(LINES-3,0); CleartoEOLN(); ! ! if (redraw) ! menu_trigger_redraw(page); ! return; } MoveCursor(LINES-1,0); *************** *** 407,413 **** lib_error(CATGETS(elm_msg_cat, ElmSet, ElmReturnCodeWas, "Return code was %d."), ret); ! return(1); } int have_printout() { --- 436,445 ---- lib_error(CATGETS(elm_msg_cat, ElmSet, ElmReturnCodeWas, "Return code was %d."), ret); ! ! ! menu_trigger_redraw(page); ! return; } int have_printout() { *************** *** 451,462 **** return return_value; } ! int print_text(pause_on_scroll, mailbox, header_page, page) int pause_on_scroll; struct MailboxView *mailbox; int header_page; struct menu_context *page; { int tagged = 0, i, old_raw; int redraw_it = 0; char *fname = NULL; --- 483,498 ---- return return_value; } ! void print_text(pause_on_scroll, mailbox, header_page, page) int pause_on_scroll; struct MailboxView *mailbox; int header_page; struct menu_context *page; { + /* If redraw is needed use + menu_trigger_redraw(page) + */ + int tagged = 0, i, old_raw; int redraw_it = 0; char *fname = NULL; *************** *** 482,488 **** * Make sure we know how to print. */ if (!have_printout() || !mailbox) ! return 0; fname = elm_message(FRM("%sprintdecode-%d"), temp_dir, getpid ()); --- 518,524 ---- * Make sure we know how to print. */ if (!have_printout() || !mailbox) ! return; fname = elm_message(FRM("%sprintdecode-%d"), temp_dir, getpid ()); *************** *** 653,664 **** clean: if (fname) free(fname); - return redraw_it; - } - ! int print_msg(pause_on_scroll, mailbox, page) int pause_on_scroll; struct MailboxView *mailbox; struct menu_context *page; --- 689,701 ---- clean: if (fname) free(fname); + if (redraw_it) + menu_trigger_redraw(page); + return; + } ! void print_msg(pause_on_scroll, mailbox, page) int pause_on_scroll; struct MailboxView *mailbox; struct menu_context *page; *************** *** 671,680 **** * Printing will be done through a pipe so we can print the number * of lines output. This is used to determine whether the screen * got trashed by the print command. One limitation is that only ! * stdout lines are counted, not stderr output. A nonzero result ! * is returned if we think enough output was generated to trash ! * the display, a zero result indicates the display is probably ! * alright. Further, if the display is trashed and "pause_on_scroll" * is true then we'll give a "hit any key" prompt before returning. * * This routine has two modes of behavior, depending upon whether --- 708,719 ---- * Printing will be done through a pipe so we can print the number * of lines output. This is used to determine whether the screen * got trashed by the print command. One limitation is that only ! * stdout lines are counted, not stderr output. ! * ! * If redraw is needed use ! * menu_trigger_redraw(page) ! * ! * Further, if the display is trashed and "pause_on_scroll" * is true then we'll give a "hit any key" prompt before returning. * * This routine has two modes of behavior, depending upon whether *************** *** 713,719 **** * Make sure we know how to print. */ if (!have_printout()) ! return 0; XX[0] = '\0'; --- 752,758 ---- * Make sure we know how to print. */ if (!have_printout()) ! return; XX[0] = '\0'; *************** *** 804,809 **** --- 843,849 ---- if (ReadCh(REDRAW_MARK) == REDRAW_MARK) { + menu_trigger_redraw(page); nlines = 2; goto redraw; } *************** *** 843,852 **** free(filename); } (void) remove_folder_state_file(); ! res = nlines > 1; free_it: ! return res; } static char folder_state_env_param[SLEN], *folder_state_fname; --- 883,893 ---- free(filename); } (void) remove_folder_state_file(); ! if (nlines > 1) ! menu_trigger_redraw(page); free_it: ! return; } static char folder_state_env_param[SLEN], *folder_state_fname; Index: elmME+.2.5.alpha2-cvs/src/utils.c *** elmME+.2.5.alpha1/src/utils.c 2004-03-30 19:38:44.000000000 +0300 --- elmME+.2.5.alpha2-cvs/src/utils.c 2004-08-07 21:07:19.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: utils.c,v 1.33 2004/03/27 18:31:46 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.33 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: utils.c,v 1.33.8.1 2004/08/07 18:07:19 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.33.8.1 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 112,117 **** --- 112,120 ---- void emergency_exit(interrupt) int interrupt; { + struct MailboxView *m; + int idx = 0; + /* if interrupt is true we can't call anything which * is not reentrant */ *************** *** 145,156 **** SIGDPRINT(Debug,1, (&Debug, " possibly leaving behind the following files;\n")); ! if (current_mailbox) { ! int mc = get_storage_count(current_mailbox); int i; for (i = 0; i < mc; i++) { ! struct current_storage * storage = get_storage(current_mailbox,i); if (storage && storage->current_folder) { SIGDPRINT(Debug,1, (&Debug, --- 148,159 ---- SIGDPRINT(Debug,1, (&Debug, " possibly leaving behind the following files;\n")); ! while (NULL != (m = give_next_open_mailbox(&idx,interrupt))) { ! int mc = get_storage_count(m); int i; for (i = 0; i < mc; i++) { ! struct current_storage * storage = get_storage(m,i); if (storage && storage->current_folder) { SIGDPRINT(Debug,1, (&Debug, *************** *** 194,202 **** exit(127); } ! void rm_temps_exit(mailbox,aview) ! struct MailboxView **mailbox; ! struct AliasView **aview; { int do_cursor = RawState(); int LINES, COLUMNS; --- 197,203 ---- exit(127); } ! void rm_temps_exit() { int do_cursor = RawState(); int LINES, COLUMNS; *************** *** 229,241 **** if (cur_editfile[0]) unlink(cur_editfile); /* editor buffer */ ! if (*mailbox) { ! free_mailbox(mailbox); ! } ! ! if (*aview) { ! free_aliasview(aview); ! } #ifdef REMOTE_MBX close_cached_connections(); --- 230,237 ---- if (cur_editfile[0]) unlink(cur_editfile); /* editor buffer */ ! free_all_mailboxes(); ! free_all_aliasviews(); #ifdef REMOTE_MBX close_cached_connections(); *************** *** 251,263 **** /*ARGSUSED*/ /*VARARGS0*/ ! void leave(interrupt, mailbox, aview) int interrupt; - struct MailboxView **mailbox; - struct AliasView **aview; { int do_cursor = RawState(); - /* if interrupt is true do not call anything which is not re-entrant */ /* --- 247,292 ---- /*ARGSUSED*/ /*VARARGS0*/ ! static void mailbox_unlock P_((int interrupt)); ! static void mailbox_unlock(interrupt) ! int interrupt; ! { ! struct MailboxView *m; ! int idx = 0; ! ! while (NULL != (m = give_next_open_mailbox(&idx,interrupt))) { ! int mc = get_storage_count(m); ! int i; ! ! ! for (i = 0; i < mc; i++) { ! struct current_storage * storage = get_storage(m,i); ! if (storage) { ! if (storage->current_folder) { ! unlock(interrupt, storage->current_folder); /* remove lock file if any */ ! ! } ! } ! } ! } ! } ! ! static void mailbox_close P_((int interrupt)); ! static void mailbox_close(interrupt) ! int interrupt; ! { ! ! mailbox_unlock(interrupt); ! ! if (!interrupt) ! free_all_mailboxes(); ! } ! ! ! void leave(interrupt) int interrupt; { int do_cursor = RawState(); /* if interrupt is true do not call anything which is not re-entrant */ /* *************** *** 289,319 **** if (cur_editfile[0]) unlink(cur_editfile); /* editor buffer */ ! ! if (*mailbox) { ! int mc = get_storage_count(*mailbox); ! int i; ! ! for (i = 0; i < mc; i++) { ! struct current_storage * storage = get_storage(*mailbox,i); ! if (storage) { ! if (storage->current_folder) { ! unlock(interrupt, storage->current_folder); /* remove lock file if any */ ! ! } ! } ! } ! ! if (!interrupt) ! free_mailbox(mailbox); ! ! } ! ! if (*aview) { ! if (!interrupt) ! free_aliasview(aview); ! } #ifdef REMOTE_MBX if (!interrupt) --- 318,330 ---- if (cur_editfile[0]) unlink(cur_editfile); /* editor buffer */ ! ! mailbox_close(interrupt); ! ! if (!interrupt) ! free_all_aliasviews(); ! #ifdef REMOTE_MBX if (!interrupt) *************** *** 329,337 **** _exit(0); } ! void silently_exit(mailbox, aview) ! struct MailboxView **mailbox; ! struct AliasView **aview; { /** This is the same as 'leave', but it doesn't remove any non-pid files. It's used when we notice that we're trying to create a --- 340,346 ---- _exit(0); } ! void silently_exit() { /** This is the same as 'leave', but it doesn't remove any non-pid files. It's used when we notice that we're trying to create a *************** *** 364,385 **** Raw_OFF(1); } ! if (*mailbox) { ! int mc = get_storage_count(*mailbox); ! int i; ! ! ! for (i = 0; i < mc; i++) { ! struct current_storage * storage = get_storage(*mailbox,i); ! ! if (storage && storage->current_folder) ! unlock (0,storage->current_folder); ! } ! } ! if (*aview) { ! free_aliasview(aview); ! } #ifdef REMOTE_MBX close_cached_connections(); --- 373,381 ---- Raw_OFF(1); } ! mailbox_unlock(0); ! free_all_aliasviews(); #ifdef REMOTE_MBX close_cached_connections(); *************** *** 391,400 **** /*ARGSUSED0*/ #ifndef REMOVE_AT_LAST ! void leave_locked(mailbox, aview) ! struct MailboxView **mailbox; ! struct AliasView **aview; { /** same as leave routine, but don't disturb lock file **/ int do_cursor = RawState(); --- 387,397 ---- /*ARGSUSED0*/ #ifndef REMOVE_AT_LAST ! void leave_locked() { + struct MailboxView *m; + int idx = 0; + /** same as leave routine, but don't disturb lock file **/ int do_cursor = RawState(); *************** *** 421,434 **** if (cur_editfile[0]) unlink(cur_editfile); /* editor buffer */ ! ! if (*mailbox) { ! int mc = get_storage_count(*mailbox); int i; for (i = 0; i < mc; i++) { ! struct current_storage * storage = get_storage(*mailbox,i); if (storage && storage->current_folder) { leave_old_folder(& storage->current_folder,CLOSE_LEAVE_LOCKED); --- 418,430 ---- if (cur_editfile[0]) unlink(cur_editfile); /* editor buffer */ ! while (NULL != (m = give_next_open_mailbox(&idx,0))) { ! int mc = get_storage_count(m); int i; for (i = 0; i < mc; i++) { ! struct current_storage * storage = get_storage(m,i); if (storage && storage->current_folder) { leave_old_folder(& storage->current_folder,CLOSE_LEAVE_LOCKED); *************** *** 436,444 **** } } ! if (*aview) { ! free_aliasview(aview); ! } #ifdef REMOTE_MBX close_cached_connections(); --- 432,438 ---- } } ! free_all_aliasviews(); #ifdef REMOTE_MBX close_cached_connections(); Index: elmME+.2.5.alpha2-cvs/utils/answer.c *** elmME+.2.5.alpha1/utils/answer.c 2004-03-30 19:38:44.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/answer.c 2004-08-15 10:34:25.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: answer.c,v 1.16 2004/03/27 18:31:48 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.16 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: answer.c,v 1.16.8.2 2004/08/15 07:34:25 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.16.8.2 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 49,54 **** --- 49,59 ---- char name[SLEN], user_name[SLEN], in_line[SLEN]; int msgnum = 0, eof, allow_name = 0, phone_slip = 0; int ans_pid = getpid(); + int c; + + extern int optind; + extern char *optarg; + #if DEBUG init_debugfile("ANSWER"); *************** *** 60,92 **** exit_word = catgets(elm_msg_cat, AnswerSet, AnswerExitWord, "exit"); done_word = catgets(elm_msg_cat, AnswerSet, AnswerDoneWord, "done"); bye_word = catgets(elm_msg_cat, AnswerSet, AnswerByeWord, "bye"); /* - * simplistic crack arguments, looking for -u/-p * -u = allow user names not in alias table * -p = prompt for phone slip messages */ ! for (msgnum = 1; msgnum < argc; msgnum++) { ! if (istrcmp(argv[msgnum], "-u") == 0) ! allow_name = 1; ! if (istrcmp(argv[msgnum], "-p") == 0) ! phone_slip = 1; ! if (istrcmp(argv[msgnum], "-pu") == 0) { ! allow_name = 1; ! phone_slip = 1; ! } ! if (istrcmp(argv[msgnum], "-up") == 0) { ! allow_name = 1; ! phone_slip = 1; ! } ! if (strncmp(argv[msgnum], "-d",2) == 0) { #if DEBUG ! set_debugging(argv[msgnum]+2); #endif } } - user_init(); - init_defaults(); read_rc_file(0); elm_sfprintf(version_buff, sizeof version_buff, --- 65,97 ---- exit_word = catgets(elm_msg_cat, AnswerSet, AnswerExitWord, "exit"); done_word = catgets(elm_msg_cat, AnswerSet, AnswerDoneWord, "done"); bye_word = catgets(elm_msg_cat, AnswerSet, AnswerByeWord, "bye"); + + user_init(); + init_defaults(); + /* * -u = allow user names not in alias table * -p = prompt for phone slip messages */ ! while ((c = getopt(argc, argv, "upd:r:")) != EOF) { ! switch (c) { ! case 'u': ! allow_name = 1; ! break; ! case 'p': ! phone_slip = 1; ! break; ! case 'd': #if DEBUG ! set_debugging(optarg); #endif + break; + case 'r': + set_user_rc_location(optarg); + break; } } read_rc_file(0); elm_sfprintf(version_buff, sizeof version_buff, *************** *** 105,111 **** panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! error_sleep(5+sleepmsg); #endif } } --- 110,116 ---- panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! sleep(5+sleepmsg); #endif } } Index: elmME+.2.5.alpha2-cvs/utils/elmalias.c *** elmME+.2.5.alpha1/utils/elmalias.c 2004-03-30 19:38:44.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/elmalias.c 2004-07-19 12:20:03.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: elmalias.c,v 1.16 2004/03/27 18:31:49 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.16 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: elmalias.c,v 1.16.8.1 2004/07/19 09:20:03 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.16.8.1 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 239,245 **** panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! error_sleep(5+sleepmsg); #endif } } --- 239,245 ---- panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! sleep(5+sleepmsg); #endif } } Index: elmME+.2.5.alpha2-cvs/utils/elmbindata.c *** elmME+.2.5.alpha1/utils/elmbindata.c 2004-03-30 19:38:44.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/elmbindata.c 2004-07-19 12:20:03.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: elmbindata.c,v 1.5 2004/03/27 18:31:49 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.5 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: elmbindata.c,v 1.5.8.1 2004/07/19 09:20:03 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.5.8.1 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 133,139 **** panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! error_sleep(5+sleepmsg); #endif } } --- 133,139 ---- panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! sleep(5+sleepmsg); #endif } } Index: elmME+.2.5.alpha2-cvs/utils/elmcharset.c *** elmME+.2.5.alpha1/utils/elmcharset.c 2004-03-30 19:38:44.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/elmcharset.c 2004-08-15 11:28:34.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: elmcharset.c,v 1.29 2004/03/27 18:31:49 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.29 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: elmcharset.c,v 1.29.8.2 2004/08/15 08:28:34 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.29.8.2 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 44,50 **** user_init(); init_defaults(); ! while ((c = getopt(argc, argv, "Gd:w:I:S:M")) != EOF) { FILE *X; char buf[LONG_STRING]; --- 44,50 ---- user_init(); init_defaults(); ! while ((c = getopt(argc, argv, "Gd:w:I:S:Mr:")) != EOF) { FILE *X; char buf[LONG_STRING]; *************** *** 67,72 **** --- 67,75 ---- "Warning: system created without debugging enabled - request ignored\n")); #endif break; + case 'r': + set_user_rc_location(optarg); + break; case 'w' : targetfile = optarg; if (0 != access(targetfile,WRITE_ACCESS)) { *************** *** 163,169 **** panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! error_sleep(5+sleepmsg); #endif } } --- 166,172 ---- panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! sleep(5+sleepmsg); #endif } } Index: elmME+.2.5.alpha2-cvs/utils/elmlibregister.c *** elmME+.2.5.alpha1/utils/elmlibregister.c 2004-07-04 14:36:51.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/elmlibregister.c 2004-08-15 13:51:08.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: elmlibregister.c,v 1.6.8.1 2004/07/03 15:23:07 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.6.8.1 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) ***************************************************************************** --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: elmlibregister.c,v 1.6.8.3 2004/08/15 10:51:08 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.6.8.3 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) ***************************************************************************** *************** *** 52,58 **** REGHELPER_INIT(argv[0]); ! while ((c = getopt(argc, argv, "GId:w:C:")) != EOF) { switch(c) { case 'G': --- 52,58 ---- REGHELPER_INIT(argv[0]); ! while ((c = getopt(argc, argv, "GId:w:C:r:")) != EOF) { switch(c) { case 'G': *************** *** 72,77 **** --- 72,81 ---- #endif break; + case 'r': + set_user_rc_location(optarg); + break; + case 'w' : targetfile = optarg; if (0 != access(targetfile,WRITE_ACCESS)) { *************** *** 135,141 **** panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! error_sleep(5+sleepmsg); #endif } } --- 139,145 ---- panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! sleep(5+sleepmsg); #endif } } Index: elmME+.2.5.alpha2-cvs/utils/elmrc-write.c *** elmME+.2.5.alpha1/utils/elmrc-write.c 2004-07-04 14:36:51.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/elmrc-write.c 2004-08-15 13:51:08.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: elmrc-write.c,v 1.13.8.1 2004/07/03 15:23:08 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.13.8.1 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) ***************************************************************************** --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: elmrc-write.c,v 1.13.8.3 2004/08/15 10:51:08 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.13.8.3 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) ***************************************************************************** *************** *** 32,38 **** int register_fd = -1; char * program_name = "elmrc-write"; - int main(argc, argv) int argc; char *argv[]; --- 32,37 ---- *************** *** 51,57 **** REGHELPER_INIT(argv[0]); ! while ((c = getopt(argc, argv, "GId:w:C:")) != EOF) { switch(c) { case 'G': --- 50,56 ---- REGHELPER_INIT(argv[0]); ! while ((c = getopt(argc, argv, "GId:w:C:r:")) != EOF) { switch(c) { case 'G': *************** *** 71,76 **** --- 70,79 ---- #endif break; + case 'r': + set_user_rc_location(optarg); + break; + case 'w' : targetfile = optarg; if (0 != access(targetfile,WRITE_ACCESS)) { *************** *** 133,139 **** panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! error_sleep(5+sleepmsg); #endif } } --- 136,142 ---- panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! sleep(5+sleepmsg); #endif } } Index: elmME+.2.5.alpha2-cvs/utils/elmregister.c *** elmME+.2.5.alpha1/utils/elmregister.c 2004-07-04 14:36:51.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/elmregister.c 2004-08-07 21:07:20.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: elmregister.c,v 1.15.8.1 2004/05/22 14:50:34 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.15.8.1 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: elmregister.c,v 1.15.8.2 2004/08/07 18:07:20 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.15.8.2 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 1459,1465 **** #endif /* DIROPS == USE_DIRENT */ #if DIROPS == USE_SYSDIR ! char * entryname = safe_malloc(Xptr->d_namlen+1); if (!entryname) { fprintf(stderr,"%s: malloc %d bytes failed\n", --- 1459,1465 ---- #endif /* DIROPS == USE_DIRENT */ #if DIROPS == USE_SYSDIR ! char * entryname = malloc(Xptr->d_namlen+1); if (!entryname) { fprintf(stderr,"%s: malloc %d bytes failed\n", Index: elmME+.2.5.alpha2-cvs/utils/elmstringconvert.c *** elmME+.2.5.alpha1/utils/elmstringconvert.c 2004-03-30 19:38:44.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/elmstringconvert.c 2004-08-15 15:21:35.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: elmstringconvert.c,v 1.8 2004/03/27 18:31:49 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.8 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: elmstringconvert.c,v 1.8.8.2 2004/08/15 12:21:35 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.8.8.2 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 165,171 **** user_init(); init_defaults(); ! while ((c = getopt(argc, argv, "Gd:w:S:T:")) != EOF) { charset_t wanted_charset; switch(c) { --- 165,171 ---- user_init(); init_defaults(); ! while ((c = getopt(argc, argv, "Gd:w:S:T:r:")) != EOF) { charset_t wanted_charset; switch(c) { *************** *** 216,221 **** --- 216,224 ---- "Warning: system created without debugging enabled - request ignored\n")); #endif break; + case 'r': + set_user_rc_location(optarg); + break; case 'w' : targetfile = optarg; if (0 != access(targetfile,WRITE_ACCESS)) { *************** *** 252,258 **** panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! error_sleep(5+sleepmsg); #endif } } --- 255,261 ---- panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! sleep(5+sleepmsg); #endif } } Index: elmME+.2.5.alpha2-cvs/utils/elmterminal.c *** elmME+.2.5.alpha1/utils/elmterminal.c 2004-03-30 19:38:44.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/elmterminal.c 2004-08-15 15:28:48.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: elmterminal.c,v 1.13 2004/03/27 18:31:49 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.13 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: elmterminal.c,v 1.13.8.2 2004/08/15 12:28:48 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.13.8.2 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 39,45 **** user_init(); init_defaults(); ! while ((c = getopt(argc, argv, "Gd:w:")) != EOF) { switch(c) { case 'G': global++; --- 39,45 ---- user_init(); init_defaults(); ! while ((c = getopt(argc, argv, "Gd:w:r:")) != EOF) { switch(c) { case 'G': global++; *************** *** 52,57 **** --- 52,60 ---- "Warning: system created without debugging enabled - request ignored\n")); #endif break; + case 'r': + set_user_rc_location(optarg); + break; case 'w' : targetfile = optarg; if (0 != access(targetfile,WRITE_ACCESS)) { *************** *** 88,94 **** panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! error_sleep(5+sleepmsg); } #endif } --- 91,97 ---- panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! sleep(5+sleepmsg); } #endif } Index: elmME+.2.5.alpha2-cvs/utils/elmunidata.c *** elmME+.2.5.alpha1/utils/elmunidata.c 2004-03-30 19:38:44.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/elmunidata.c 2004-08-15 15:39:29.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: elmunidata.c,v 1.18 2004/03/27 18:31:49 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.18 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: elmunidata.c,v 1.18.8.2 2004/08/15 12:39:29 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.18.8.2 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 30,35 **** --- 30,36 ---- FILE * logfile = NULL; int err = 0; int silent_gaps = 0; + int rc_readed = 0; int c; *************** *** 42,55 **** user_init(); init_defaults(); - read_rc_file(READ_FLAG_UNIDATA_INIT); ! while ((c = getopt(argc, argv, "w:l:sd:b:BIT:")) != EOF) { switch(c) { case 'w': target_file = optarg; break; case 'I': target_file = unidata_path; break; case 'l': --- 43,58 ---- user_init(); init_defaults(); ! while ((c = getopt(argc, argv, "w:l:sd:b:BIT:r:")) != EOF) { switch(c) { case 'w': target_file = optarg; break; case 'I': + if (!rc_readed++) + read_rc_file(READ_FLAG_UNIDATA_INIT); + target_file = unidata_path; break; case 'l': *************** *** 66,72 **** --- 69,81 ---- "Warning: system created without debugging enabled - request ignored\n")); #endif break; + case 'r': + set_user_rc_location(optarg); + break; case 'B': + if (!rc_readed++) + read_rc_file(READ_FLAG_UNIDATA_INIT); + unidata = default_unidata(); if (!unidata) { err = 1; *************** *** 95,100 **** --- 104,111 ---- } } + if (!rc_readed++) + read_rc_file(READ_FLAG_UNIDATA_INIT); elm_sfprintf(version_buff, sizeof version_buff, FRM("%s PL%s"), VERSION, PATCHLEVEL); *************** *** 111,117 **** panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! error_sleep(5+sleepmsg); #endif } } --- 122,128 ---- panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! sleep(5+sleepmsg); #endif } } Index: elmME+.2.5.alpha2-cvs/utils/fastmail.c *** elmME+.2.5.alpha1/utils/fastmail.c 2004-03-30 19:38:44.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/fastmail.c 2004-07-19 12:20:03.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: fastmail.c,v 1.30 2004/03/27 18:31:49 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.30 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: fastmail.c,v 1.30.8.1 2004/07/19 09:20:03 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.30.8.1 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 406,412 **** panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! error_sleep(5+sleepmsg); #endif } } --- 406,412 ---- panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! sleep(5+sleepmsg); #endif } } Index: elmME+.2.5.alpha2-cvs/utils/from.c *** elmME+.2.5.alpha1/utils/from.c 2004-07-04 14:36:51.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/from.c 2004-08-15 09:30:00.000000000 +0300 *************** *** 1,15 **** ! static char rcsid[] = "@(#)$Id: from.c,v 1.48.8.2 2004/07/03 15:23:08 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.48.8.2 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) ****************************************************************************** * The Elm Mail System * * Copyright (c) 1988-1992 USENET Community Trust * Copyright (c) 1986,1987 Dave Taylor *****************************************************************************/ /** print out whom each message is from in the pending folder or specified --- 1,25 ---- ! static char rcsid[] = "@(#)$Id: from.c,v 1.48.8.4 2004/08/15 06:30:00 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.48.8.4 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) ****************************************************************************** + * Based on Elm 2.4 utils/from.c. That code was following copyright: + * * The Elm Mail System * * Copyright (c) 1988-1992 USENET Community Trust * Copyright (c) 1986,1987 Dave Taylor + ***************************************************************************** + * Incorparated Elm 2.5 code from utils/from.c. + * That code was following copyright: + * + * The Elm Mail System + * + * Copyright (c) 1988-1995 USENET Community Trust + * Copyright (c) 1986,1987 Dave Taylor *****************************************************************************/ /** print out whom each message is from in the pending folder or specified *************** *** 104,109 **** --- 114,120 ---- int no_files, c; int total_msgs = 0, selected_msgs = 0; char realname[SLEN]; + int TreatAsSpool = 0; extern int optind; extern char *optarg; *************** *** 115,121 **** user_init(); strfcpy(realname,username,sizeof realname); init_defaults(); - read_rc_file(0); /* * check the first character of the command basename to --- 126,131 ---- *************** *** 131,137 **** case 'r': selct |= READ_MSG; break; } ! while ((c = getopt(argc, argv, "hnQqSs:tvd:X:")) != EOF) switch (c) { case 'd' : #if DEBUG --- 141,147 ---- case 'r': selct |= READ_MSG; break; } ! while ((c = getopt(argc, argv, "hnQqSs:tvd:X:Mr:")) != EOF) { switch (c) { case 'd' : #if DEBUG *************** *** 142,149 **** --- 152,161 ---- #endif break; case 'n': number++; break; + case 'M': TreatAsSpool++;break; case 'Q': veryquiet++; break; case 'q': quiet++; break; + case 'r' : set_user_rc_location(optarg); break; case 'S': summarize++; break; case 't': tidy++; break; case 'v': verbose++; break; *************** *** 188,193 **** --- 200,208 ---- argv[0]); exit(EXIT_ERROR); } + } + read_rc_file(0); + if (quiet && verbose) { lib_error(CATGETS(elm_msg_cat,FromSet,FromNoQuietVerbose, *************** *** 327,333 **** /* check if this is a mailbox or not, and attempt to open it */ ! folder = enter_new_folder(infile); if (!folder) continue; --- 342,348 ---- /* check if this is a mailbox or not, and attempt to open it */ ! folder = enter_new_folder(infile,TreatAsSpool); if (!folder) continue; Index: elmME+.2.5.alpha2-cvs/utils/newalias.c *** elmME+.2.5.alpha1/utils/newalias.c 2004-03-30 19:38:44.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/newalias.c 2004-07-19 12:20:03.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: newalias.c,v 1.15 2004/03/27 18:31:49 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.15 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: newalias.c,v 1.15.8.1 2004/07/19 09:20:03 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.15.8.1 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 87,93 **** panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! error_sleep(5+sleepmsg); #endif } } --- 87,93 ---- panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! sleep(5+sleepmsg); #endif } } Index: elmME+.2.5.alpha2-cvs/utils/newmail.c *** elmME+.2.5.alpha1/utils/newmail.c 2004-07-04 14:36:51.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/newmail.c 2004-08-15 09:37:44.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: newmail.c,v 1.35.8.2 2004/07/03 15:23:08 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.35.8.2 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: newmail.c,v 1.35.8.4 2004/08/15 06:37:44 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.35.8.4 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 124,130 **** static void usage P_((char *name)); static void pad_prefixes P_((void)); ! int interval_time, /* how long to sleep between checks */ in_window = 0, /* are we running as 'wnewmail'? */ total_folders = 0, /* # of folders we're monitoring */ print_prefix = 0, /* force printing of prefix */ --- 124,131 ---- static void usage P_((char *name)); static void pad_prefixes P_((void)); ! static int TreatAsSpool; ! static int interval_time, /* how long to sleep between checks */ in_window = 0, /* are we running as 'wnewmail'? */ total_folders = 0, /* # of folders we're monitoring */ print_prefix = 0, /* force printing of prefix */ *************** *** 180,186 **** #endif user_init(); init_defaults(); - read_rc_file(0); /* Get the No subject string */ --- 181,186 ---- *************** *** 216,222 **** if (ptr == argv[0] && i == 0 && argv[0][0] == 'w') in_window = 1; ! while ((c = getopt(argc, argv, "d:i:wX:")) != EOF) { switch (c) { case 'd' : #if DEBUG --- 216,222 ---- if (ptr == argv[0] && i == 0 && argv[0][0] == 'w') in_window = 1; ! while ((c = getopt(argc, argv, "d:i:wX:Mr:")) != EOF) { switch (c) { case 'd' : #if DEBUG *************** *** 228,233 **** --- 228,235 ---- #endif break; case 'i' : interval_time = atoi(optarg); break; + case 'M' : TreatAsSpool++; break; + case 'r' : set_user_rc_location(optarg); break; case 'w' : in_window = 1; break; case 'X' : #ifdef REMOTE_MBX *************** *** 240,245 **** --- 242,249 ---- } } + read_rc_file(0); + elm_sfprintf(version_buff, sizeof version_buff, FRM("%s PL%s"), VERSION, PATCHLEVEL); *************** *** 658,664 **** if (metachar(name[0])) { expand_filename(name, buf, sizeof buf); ! folder_list[current_folder].F = enter_new_folder(buf); } else if (access(name, ACCESS_EXISTS) == -1) { /* let's try it in the mail home directory */ --- 662,669 ---- if (metachar(name[0])) { expand_filename(name, buf, sizeof buf); ! folder_list[current_folder].F = enter_new_folder(buf, ! TreatAsSpool); } else if (access(name, ACCESS_EXISTS) == -1) { /* let's try it in the mail home directory */ *************** *** 666,677 **** FRM("%s%s"), mailhome, name); if (access(buf,ACCESS_EXISTS) != -1) /* aha! */ ! folder_list[current_folder].F = enter_new_folder(buf); else ! folder_list[current_folder].F = enter_new_folder(name); } else ! folder_list[current_folder].F = enter_new_folder(name); if (!folder_list[current_folder].F) { DPRINT(Debug,1,(&Debug, --- 671,684 ---- FRM("%s%s"), mailhome, name); if (access(buf,ACCESS_EXISTS) != -1) /* aha! */ ! folder_list[current_folder].F = enter_new_folder(buf, ! TreatAsSpool); else ! folder_list[current_folder].F = enter_new_folder(name, ! TreatAsSpool); } else ! folder_list[current_folder].F = enter_new_folder(name,TreatAsSpool); if (!folder_list[current_folder].F) { DPRINT(Debug,1,(&Debug, *************** *** 720,726 **** if (!default_val) return; ! folder_list[0].F = enter_new_folder(default_val); if (!folder_list[0].F) { DPRINT(Debug,1,(&Debug, --- 727,733 ---- if (!default_val) return; ! folder_list[0].F = enter_new_folder(default_val,TreatAsSpool); if (!folder_list[0].F) { DPRINT(Debug,1,(&Debug, Index: elmME+.2.5.alpha2-cvs/utils/prlong.c *** elmME+.2.5.alpha1/utils/prlong.c 2004-05-16 17:43:45.000000000 +0300 --- elmME+.2.5.alpha2-cvs/utils/prlong.c 2004-07-19 12:20:03.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: prlong.c,v 1.11.8.1 2004/04/18 16:55:43 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.11.8.1 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: prlong.c,v 1.11.8.2 2004/07/19 09:20:03 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.11.8.2 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 134,140 **** panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! error_sleep(5+sleepmsg); #endif } } --- 134,140 ---- panic_dprint("WARNING: Edit manually out sensitive information from that file!\n"); lower_prompt("WARNING: Debug file may include passwords -- edit it!"); ! sleep(5+sleepmsg); #endif } }