Sender: hurtta@attruh.keh.iki.fi From: "Kari E. Hurtta" Subject: Patch: Elm 2.4ME+ PL115 (25) -> Elm 2.4ME+ PL116 (25) Newsgroups: alt.sources,comp.mail.elm Reply-To: "Kari E. Hurtta" Message-ID: References: In-Reply-To: Lines: 5261 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, 21 May 2004 14:35:29 GMT NNTP-Posting-Host: 193.208.81.208 X-Complaints-To: abuse@inet.fi X-Trace: read3.inet.fi 1085150129 193.208.81.208 (Fri, 21 May 2004 17:35:29 EEST) NNTP-Posting-Date: Fri, 21 May 2004 17:35:29 EEST Organization: Sonera corp Internet services Xref: newsread1.funet.fi alt.sources:897 comp.mail.elm:1931 Archive-name: elm2.4ME+/PL116 Is available on ozone.FMI.FI (1) via anonymous ftp directory KEH/ files elm-2.4ME+PL116.patch.gz and elm-2.4ME+116.tar.gz for a moment (2). Is available on ftp.funet.fi via anonymous ftp directory pub/unix/mail/elm/elm-2.4ME+/ files elm-2.4ME+PL116.patch.gz and elm-2.4ME+116.tar.gz Is available with and via WWW. Is available with and via WWW. (1) Was ftp.ozone.fmi.fi but name ftp.ozone.fmi.fi will probably point to service which no have anonymous ftp before ozone.fmi.fi retires. So use ozone.fmi.fi for a moment instead of ftp.ozone.fmi.fi. (2) NOTE: It is currently unknown what will be done for ftp.ozone.fmi.fi and www.ozone.fmi.fi. Also ozone.fmi.fi will retire. For apply patch use command patch -p1 < {path...}/elm-2.4ME+PL116.patch on top level directory of Elm 2.4ME+ distribution (ie. on directory where Configure is.) Undo Elm2.4ME+ PL115a (25) patch before applying this patch. SUMMARY: This patch fixes handling of unexpected return value of nl_langinfo(CODESET) on AIX, fixes value check of "internal-mailcaps" and "metamail-mailcaps" elmrc variables, fixes some prompts on situation where leaving of folder fails, reimplements "alternatives" and "weedout" elmrc variables, changes elm.filelist format (adds subcommand "copydoc" to elmregister), adds -s option to elmregister and adds RFC 2919 List-ID to list of known headers. Notice: ME+ series is not official Elm. This patch is agaist Elm 2.4ME+ PL115 (25) -------------------------------- Unistall Elm2.4ME+ PL115a (25) patch before installing that patch. For installing that patch run patch -p1 < {this-file} on directory where Configure is. Index: elm2.4.ME+.116-cvs/hdrs/patchlevel.h Prereq: 1113000000 *** elm2.4.ME+.115/hdrs/patchlevel.h 2004-04-13 14:26:13.000000000 +0300 --- elm2.4.ME+.116-cvs/hdrs/patchlevel.h 2004-05-18 22:30:03.000000000 +0300 *************** *** 1,12 **** ! #define PATCHLEVEL "115 (25)" /* Used by Configure: ! SHAREDTAG: .1.0.115 */ ! #define LAST_REPORT_TIME 1113000000 #define BUG_REPORT_ADDR "Kari Hurtta " ! #define VERS_DATE "Apr, 2004" /* for elm -v option */ #define WHAT_STRING \ ! "@(#) Version 2.4(ME+), USENET supported version, released Apr, 2004" /* * Local Variables: --- 1,12 ---- ! #define PATCHLEVEL "116 (25)" /* Used by Configure: ! SHAREDTAG: .1.0.116 */ ! #define LAST_REPORT_TIME 1116400000 #define BUG_REPORT_ADDR "Kari Hurtta " ! #define VERS_DATE "May, 2004" /* for elm -v option */ #define WHAT_STRING \ ! "@(#) Version 2.4(ME+), USENET supported version, released May, 2004" /* * Local Variables: Index: elm2.4.ME+.116-cvs/README.ME+ *** elm2.4.ME+.115/README.ME+ 2004-04-13 14:26:13.000000000 +0300 --- elm2.4.ME+.116-cvs/README.ME+ 2004-05-19 15:02:16.000000000 +0300 *************** *** 1,4 **** ! $Header: /data/cvsroot/mail/elmme+/README.ME+,v 1.733 2004/04/12 19:27:31 hurtta Exp $ Version Elm2.4ME+ PL0 (25) is based on version Elm2.4 PL24 ME8b+. Version Elm2.4 PL24 ME8b+ is based on version Elm2.4 PL24 ME8b. --- 1,4 ---- ! $Header: /data/cvsroot/mail/elmme+/README.ME+,v 1.760 2004/05/19 12:02:16 hurtta Exp $ Version Elm2.4ME+ PL0 (25) is based on version Elm2.4 PL24 ME8b+. Version Elm2.4 PL24 ME8b+ is based on version Elm2.4 PL24 ME8b. *************** *** 13,30 **** Version Elm2.4 PL24 ME8b is based on version Elm2.4 PL24. Version Elm2.4ME+ PLx (25) includes patch of version Elm2.4 PL25. Changes of Elm2.4ME+ PL115 (25) compared with Elm2.4ME+ PL114 (25) ------------------------------------------------------------------ ! SuMMARY: This release changes temporary folder ! location on some situations, fixs crash on c)hange command on alias menu, adds elmrc options "local-sessionlock-dir" and "local-sessionlock-use-home", and changes ! SIGWICH handling when waiting of editor. ! - If opened local mailbox is on somewhere other ! location than on spool directory, use "tmpdir" setting from elm.rc for location of temporary file "mbox.{mailbox}-{username}" instead default_temp. --- 13,161 ---- Version Elm2.4 PL24 ME8b is based on version Elm2.4 PL24. Version Elm2.4ME+ PLx (25) includes patch of version Elm2.4 PL25. + Changes of Elm2.4ME+ PL116 (25) compared with Elm2.4ME+ PL115 (25) + ------------------------------------------------------------------- + + SUMMARY: This patch fixes handling of unexpected return + value of nl_langinfo(CODESET) on AIX, fixes + value check of "internal-mailcaps" and + "metamail-mailcaps" elmrc variables, + fixes some prompts on situation where leaving + of folder fails, reimplements + "alternatives" and "weedout" elmrc variables, + changes elm.filelist format (adds subcommand + "copydoc" to elmregister), adds -s option + to elmregister and adds RFC 2919 List-ID to + list of known headers. + + WARNING: There is small change on elm.filelist format, so + downgrading from Elm2.4ME+ PL116 (25) to + Elm 2.4ME+ PL115 (25) or to Elm ME+ 2.5 PLalpha0 + will not work (you need unistall or remove + elm.filelist first.) + + - " When installing ELM (on AIX 5L), I get the following message: + + | Elm: Unable to map en_US locale (LC_CTYPE) to MIME charset. + | Codeset name ISO8859-1 was unknown. Treating ISO8859-1 as MIME name. + | Check /usr/local/lib/elm/elm.mimecharsets or + | noam/.elm/mime.charsets + | WARNING: Locale en_US (charset ISO8859-1) is unsupported, will cause problems! + | Problem with locale (system character set)! Elm ME+ will + | behave erratically." + Problem noted by: Noam G. Nudelman + + - dt_PATH_print_value() was not printing always empty values + correctly. + + - fix test on expand_dt_path(). Specially non-file + values on "internal-mailcaps" and "metamail-mailcaps" was + not giving error message. + + - Prompt "Failed to leave folder: Try to change again ? + [P]anic" did not worked. Added new routine prompt_letter() + + - Changed prompt "Failed to leave folder: Try to quit again ?" + + - Changed prompt ""received" folder not available, continue? (y/n) n" + - Also changed default answer to be yes on that prompt + (that is usefull only when received folder is remote, + but that error may occur also is somebody is set + receivedmail = /invalid + ) + + - Fix some possible compilation problems with traditional + C compilers (as opposed to ANSI C ompilers) + + - Reimplemeted elmrc "alternatives" as type PATH and + removed special elmrc type for alternatives. + + - Reimplemeted elmrc "weedout" as type PATH and + removed special elmrc type for weedout. + If first element on list is "*clear-weed-list*", + then builtin weedout list is not used. + + - Fix typo PROMTP_yesno (to PROMPT_yesno) on + Elm2.4ME+ PL115a (25) + + - Added command "elmregister copydoc" which + works like "elmregister copy", but marks + file to be document. + + - Added option "-s {stage-subdir}" to command + "elmregister {command}". + + - Added RFC 2919 List-ID -header to array on + lib/headers.c + - Fix missing space between pharse and < > + on result of hdr_decode_from_phrase() on + lib/headers.c + + - If on header editing screen incoked editor + and address was on form '"a" (c)", + and then edited it on header editing screen + address become as '"a" (c('. Changed + on '(' to ')' on make_surface_addr() on + lib/outheaders.c + + + Changes of Elm2.4ME+ PL115a (25) compared with Elm2.4ME+ PL115 (25) + ------------------------------------------------------------------- + + [ This patch is branch from the main line. ] + + SUMMARY: This patch fixes handling of unexpected return + value of nl_langinfo(CODESET) on AIX, fixes + value check of "internal-mailcaps" and + "metamail-mailcaps" elmrc variables and + fixes some prompts on situation where leaving + of folder fails. + + - " When installing ELM (on AIX 5L), I get the following message: + + | Elm: Unable to map en_US locale (LC_CTYPE) to MIME charset. + | Codeset name ISO8859-1 was unknown. Treating ISO8859-1 as MIME name. + | Check /usr/local/lib/elm/elm.mimecharsets or + | noam/.elm/mime.charsets + | WARNING: Locale en_US (charset ISO8859-1) is unsupported, will cause problems! + | Problem with locale (system character set)! Elm ME+ will + | behave erratically." + Problem noted by: Noam G. Nudelman + + - dt_PATH_print_value() was not printing always empty values + correctly. + + - fix test on expand_dt_path(). Specially non-file + values on "internal-mailcaps" and "metamail-mailcaps" was + not giving error message. + + - Prompt "Failed to leave folder: Try to change again ? + [P]anic" did not worked. Added new routine prompt_letter() + + - Changed prompt "Failed to leave folder: Try to quit again ?" + + - Changed prompt ""received" folder not available, continue? (y/n) n" + - Also changed default answer to be yes on that prompt + (that is usefull only when received folder is remote, + but that error may occur also is somebody is set + receivedmail = /invalid + ) + + - Fix some possible compilation problems with traditional + C compilers (as opposed to ANSI C ompilers) + Changes of Elm2.4ME+ PL115 (25) compared with Elm2.4ME+ PL114 (25) ------------------------------------------------------------------ ! SUMMARY: This release changes temporary folder ! location on some situations, fixes crash on c)hange command on alias menu, adds elmrc options "local-sessionlock-dir" and "local-sessionlock-use-home", and changes ! SIGWINCH handling when waiting for editor. ! - If opened local mailbox is on somewhere else ! than on spool directory, use "tmpdir" setting from elm.rc for location of temporary file "mbox.{mailbox}-{username}" instead default_temp. *************** *** 78,84 **** so that Elm will call menu_context_resize() when it is waiting child to complete ... - New elmrc options: local-sessionlock-dir local-sessionlock-use-home --- 209,214 ---- *************** *** 169,175 **** Changes of Elm2.4ME+ PL113a (25) compared with Elm2.4ME+ PL113 (25) ------------------------------------------------------------------- ! [ This is out of branch patch. ] - "I tried to compile elm2.4.ME+.113 on AIX 5.1 (maintenance level 05) or on AIX 5.2 (maintenance level 02) --- 299,305 ---- Changes of Elm2.4ME+ PL113a (25) compared with Elm2.4ME+ PL113 (25) ------------------------------------------------------------------- ! [ This patch is branch from the main line. ] - "I tried to compile elm2.4.ME+.113 on AIX 5.1 (maintenance level 05) or on AIX 5.2 (maintenance level 02) *************** *** 338,344 **** Changes of Elm2.4ME+ PL111b (25) compared with Elm2.4ME+ PL111a (25) -------------------------------------------------------------------- ! [ This is out of branch patch. ] - Fix crash on parse failure on command "View digest as mailbox". --- 468,474 ---- Changes of Elm2.4ME+ PL111b (25) compared with Elm2.4ME+ PL111a (25) -------------------------------------------------------------------- ! [ This patch is branch from the main line. ] - Fix crash on parse failure on command "View digest as mailbox". *************** *** 346,352 **** Changes of Elm2.4ME+ PL111a (25) compared with Elm2.4ME+ PL111 (25) ------------------------------------------------------------------- ! [ This is out of branch patch. ] SUMMARY: This patch fixes crash caused by 'U' command on aliases menu. --- 476,482 ---- Changes of Elm2.4ME+ PL111a (25) compared with Elm2.4ME+ PL111 (25) ------------------------------------------------------------------- ! [ This patch is branch from the main line. ] SUMMARY: This patch fixes crash caused by 'U' command on aliases menu. *************** *** 429,435 **** Changes of Elm2.4ME+ PL110a (25) compared with Elm2.4ME+ PL110 (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] SUMMARY: This patch fixes case, where output of pgp/gpg was not shown sometimes (on non-MIME messages), --- 559,565 ---- Changes of Elm2.4ME+ PL110a (25) compared with Elm2.4ME+ PL110 (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] SUMMARY: This patch fixes case, where output of pgp/gpg was not shown sometimes (on non-MIME messages), *************** *** 569,575 **** Changes of Elm2.4ME+ PL109b (25) compared with Elm2.4ME+ PL109a (25) ------------------------------------------------------------------- ! [ This is out of branch patch. ] SUMMARY: This patch fixes segmentation violation on l)imit command and problem where user alias --- 699,705 ---- Changes of Elm2.4ME+ PL109b (25) compared with Elm2.4ME+ PL109a (25) ------------------------------------------------------------------- ! [ This patch is branch from the main line. ] SUMMARY: This patch fixes segmentation violation on l)imit command and problem where user alias *************** *** 585,591 **** Changes of Elm2.4ME+ PL109a (25) compared with Elm2.4ME+ PL109 (25) ------------------------------------------------------------------- ! [ This is out of branch patch. ] Undo Elm2.4ME+ PL109S (25) patch before applying this patch. --- 715,721 ---- Changes of Elm2.4ME+ PL109a (25) compared with Elm2.4ME+ PL109 (25) ------------------------------------------------------------------- ! [ This patch is branch from the main line. ] Undo Elm2.4ME+ PL109S (25) patch before applying this patch. *************** *** 814,820 **** Changes of Elm2.4ME+ PL108a (25) compared with Elm2.4ME+ PL108 (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] SUMMARY: This patch makes some fixes for elmregister, and elm's search command ('/'). --- 944,950 ---- Changes of Elm2.4ME+ PL108a (25) compared with Elm2.4ME+ PL108 (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] SUMMARY: This patch makes some fixes for elmregister, and elm's search command ('/'). *************** *** 929,935 **** Changes of Elm2.4ME+ PL107a (25) compared with Elm2.4ME+ PL107 (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] SUMMARY: This patch corrects page when returning from o)ptions screen and fixes some other --- 1059,1065 ---- Changes of Elm2.4ME+ PL107a (25) compared with Elm2.4ME+ PL107 (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] SUMMARY: This patch corrects page when returning from o)ptions screen and fixes some other *************** *** 1242,1248 **** Changes of Elm2.4ME+ PL102a (25) compared with Elm2.4ME+ PL102 (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] SUMMARY: This patch fixes temp file leak when forwarding with mimeforward = YES and --- 1372,1378 ---- Changes of Elm2.4ME+ PL102a (25) compared with Elm2.4ME+ PL102 (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] SUMMARY: This patch fixes temp file leak when forwarding with mimeforward = YES and *************** *** 1571,1577 **** Changes of Elm2.4ME+ PL101c (25) compared with Elm2.4ME+ PL101b (25) -------------------------------------------------------------------- ! [ This is out of branch patch. ] SUMMARY: This patch fixes segmentation fault, when when viewing attachment with unxepected --- 1701,1707 ---- Changes of Elm2.4ME+ PL101c (25) compared with Elm2.4ME+ PL101b (25) -------------------------------------------------------------------- ! [ This patch is branch from the main line. ] SUMMARY: This patch fixes segmentation fault, when when viewing attachment with unxepected *************** *** 1784,1790 **** Changes of Elm2.4ME+ PL101b (25) compared with Elm2.4ME+ PL101a (25) -------------------------------------------------------------------- ! [ This is out of branch patch. ] SUMMARY: This patch makes possible to set incoming-mailbox = $USER@imap-sever on --- 1914,1920 ---- Changes of Elm2.4ME+ PL101b (25) compared with Elm2.4ME+ PL101a (25) -------------------------------------------------------------------- ! [ This patch is branch from the main line. ] SUMMARY: This patch makes possible to set incoming-mailbox = $USER@imap-sever on *************** *** 1832,1838 **** Changes of Elm2.4ME+ PL101a (25) compared with Elm2.4ME+ PL101 (25) ------------------------------------------------------------------- ! [ This is out of branch patch. ] SUMMARY: This patch fixes crash on internal mailcap parser and on header editing screen. --- 1962,1968 ---- Changes of Elm2.4ME+ PL101a (25) compared with Elm2.4ME+ PL101 (25) ------------------------------------------------------------------- ! [ This patch is branch from the main line. ] SUMMARY: This patch fixes crash on internal mailcap parser and on header editing screen. *************** *** 2014,2020 **** Changes of Elm2.4ME+ PL100a (25) compared with Elm2.4ME+ PL100 (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] - Configure did not generated mapping for iso_8859_1 locale (on SunOS). --- 2144,2150 ---- Changes of Elm2.4ME+ PL100a (25) compared with Elm2.4ME+ PL100 (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] - Configure did not generated mapping for iso_8859_1 locale (on SunOS). *************** *** 2341,2347 **** Changes of Elm2.4ME+ PL99f (25) compared with Elm2.4ME+ PL99e (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] - Fix panic on header editing screen on In-Reply-To: STRING PANIC in cs_binary.c:1043:cs_give_unicode_from_ascii --- 2471,2477 ---- Changes of Elm2.4ME+ PL99f (25) compared with Elm2.4ME+ PL99e (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] - Fix panic on header editing screen on In-Reply-To: STRING PANIC in cs_binary.c:1043:cs_give_unicode_from_ascii *************** *** 2366,2372 **** Changes of Elm2.4ME+ PL99e (25) compared with Elm2.4ME+ PL99d (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] - Trying send pgp2 (signed or encrypted) message was causing crash. --- 2496,2502 ---- Changes of Elm2.4ME+ PL99e (25) compared with Elm2.4ME+ PL99d (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] - Trying send pgp2 (signed or encrypted) message was causing crash. *************** *** 2394,2400 **** Changes of Elm2.4ME+ PL99d (25) compared with Elm2.4ME+ PL99c (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] - "I'm working on updating the Debian elm-me+ package; a number of patches have accumulated over the years, and --- 2524,2530 ---- Changes of Elm2.4ME+ PL99d (25) compared with Elm2.4ME+ PL99c (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] - "I'm working on updating the Debian elm-me+ package; a number of patches have accumulated over the years, and *************** *** 2475,2481 **** Changes of Elm2.4ME+ PL99c (25) compared with Elm2.4ME+ PL99b (25) ---------------------------------------------------------------- ! [ This is out of branch patch. ] - Handling of multipart/signed and multipart/encrypted was broken Elm2.4ME+ PL98 (25) --- 2605,2611 ---- Changes of Elm2.4ME+ PL99c (25) compared with Elm2.4ME+ PL99b (25) ---------------------------------------------------------------- ! [ This patch is branch from the main line. ] - Handling of multipart/signed and multipart/encrypted was broken Elm2.4ME+ PL98 (25) *************** *** 2484,2490 **** Changes of Elm2.4ME+ PL99b (25) compared with Elm2.4ME+ PL99a (25) ---------------------------------------------------------------- ! [ This is out of branch patch. ] - Fix panic with ISO-2022-JP text with message STRING PANIC in cs_iso2022.c:1757:add_char_stream --- 2614,2620 ---- Changes of Elm2.4ME+ PL99b (25) compared with Elm2.4ME+ PL99a (25) ---------------------------------------------------------------- ! [ This patch is branch from the main line. ] - Fix panic with ISO-2022-JP text with message STRING PANIC in cs_iso2022.c:1757:add_char_stream *************** *** 2495,2501 **** Changes of Elm2.4ME+ PL99a (25) compared with Elm2.4ME+ PL99 (25) ---------------------------------------------------------------- ! [ This is out of branch patch. ] - There should not be Return-Path header visible on Pre-Send screen on Beginner user level. --- 2625,2631 ---- Changes of Elm2.4ME+ PL99a (25) compared with Elm2.4ME+ PL99 (25) ---------------------------------------------------------------- ! [ This patch is branch from the main line. ] - There should not be Return-Path header visible on Pre-Send screen on Beginner user level. *************** *** 2744,2750 **** Changes of Elm2.4ME+ PL98c (25) compared with Elm2.4ME+ PL98b (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] - copy_message_2() lost header name when folding happeded immediately after header name (that specially was visible --- 2874,2880 ---- Changes of Elm2.4ME+ PL98c (25) compared with Elm2.4ME+ PL98b (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] - copy_message_2() lost header name when folding happeded immediately after header name (that specially was visible *************** *** 2767,2773 **** Changes of Elm2.4ME+ PL98b (25) compared with Elm2.4ME+ PL98a (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] - Our non-standard headers was ignored: * X-ELM-OSV: hdr-charset=xxxx was ignored --- 2897,2903 ---- Changes of Elm2.4ME+ PL98b (25) compared with Elm2.4ME+ PL98a (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] - Our non-standard headers was ignored: * X-ELM-OSV: hdr-charset=xxxx was ignored *************** *** 2776,2782 **** Changes of Elm2.4ME+ PL98a (25) compared with Elm2.4ME+ PL98 (25) ---------------------------------------------------------------- ! [ This is out of branch patch. ] - "since a number of releases frm doesn't detect status new correctly for me (Linux 2.4.18, elm2.4.ME+.98)." --- 2906,2912 ---- Changes of Elm2.4ME+ PL98a (25) compared with Elm2.4ME+ PL98 (25) ---------------------------------------------------------------- ! [ This patch is branch from the main line. ] - "since a number of releases frm doesn't detect status new correctly for me (Linux 2.4.18, elm2.4.ME+.98)." *************** *** 2969,2975 **** Changes of Elm2.4ME+ PL97d (25) compared with Elm2.4ME+ PL97c (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] - If there libintl.so (from GNU gettext) installed --- 3099,3105 ---- Changes of Elm2.4ME+ PL97d (25) compared with Elm2.4ME+ PL97c (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] - If there libintl.so (from GNU gettext) installed *************** *** 3002,3008 **** Changes of Elm2.4ME+ PL97c (25) compared with Elm2.4ME+ PL97b (25) ---------------------------------------------------------------- ! [ This is out of branch patch. ] - Wrong answer to question "Any additional libraries" causes failure on "Trying locate terminfo routines" --- 3132,3138 ---- Changes of Elm2.4ME+ PL97c (25) compared with Elm2.4ME+ PL97b (25) ---------------------------------------------------------------- ! [ This patch is branch from the main line. ] - Wrong answer to question "Any additional libraries" causes failure on "Trying locate terminfo routines" *************** *** 3052,3058 **** Changes of Elm2.4ME+ PL97b (25) compared with Elm2.4ME+ PL97a (25) ---------------------------------------------------------------- ! [ This is out of branch patch. ] - binary flag was incorrectly set true (result on change on Elm2.4ME+ PL97 (25)). That caused that EOLN mail headers --- 3182,3188 ---- Changes of Elm2.4ME+ PL97b (25) compared with Elm2.4ME+ PL97a (25) ---------------------------------------------------------------- ! [ This patch is branch from the main line. ] - binary flag was incorrectly set true (result on change on Elm2.4ME+ PL97 (25)). That caused that EOLN mail headers *************** *** 3065,3071 **** Changes of Elm2.4ME+ PL97a (25) compared with Elm2.4ME+ PL97 (25) ---------------------------------------------------------------- ! [ This is out of branch patch. ] - Fix state_printf panic "Embedded newlines are not supported" on case when there is on ~/.elm/elmheaders --- 3195,3201 ---- Changes of Elm2.4ME+ PL97a (25) compared with Elm2.4ME+ PL97 (25) ---------------------------------------------------------------- ! [ This patch is branch from the main line. ] - Fix state_printf panic "Embedded newlines are not supported" on case when there is on ~/.elm/elmheaders *************** *** 3195,3201 **** Changes of Elm2.4ME+ PL96b (25) compared with Elm2.4ME+ PL96a (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] - Test whatever make sets $(MAKE) --- 3325,3331 ---- Changes of Elm2.4ME+ PL96b (25) compared with Elm2.4ME+ PL96a (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] - Test whatever make sets $(MAKE) *************** *** 3225,3231 **** Changes of Elm2.4ME+ PL96a (25) compared with Elm2.4ME+ PL96 (25) ----------------------------------------------------------------- ! [ This is out of branch patch. ] - Metamail can not cope with CRLF Problem noted by: Konstantinos Konstantinides --- 3355,3361 ---- Changes of Elm2.4ME+ PL96a (25) compared with Elm2.4ME+ PL96 (25) ----------------------------------------------------------------- ! [ This patch is branch from the main line. ] - Metamail can not cope with CRLF Problem noted by: Konstantinos Konstantinides *************** *** 3424,3430 **** Changes of Elm2.4ME+ PL95c (25) compared with Elm2.4ME+ PL95b (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] - Do not use commands "mail" or "mailx" as mailer. - Allow specify "none" as mailer on configuration time --- 3554,3560 ---- Changes of Elm2.4ME+ PL95c (25) compared with Elm2.4ME+ PL95b (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] - Do not use commands "mail" or "mailx" as mailer. - Allow specify "none" as mailer on configuration time *************** *** 3440,3446 **** Changes of Elm2.4ME+ PL95b (25) compared with Elm2.4ME+ PL95a (25) ------------------------------------------------------------------ ! [ This is out of branch patch. ] - "Using PL95 with the two patches you send me, I encountered the following problem when searching for a string in a mail message: --- 3570,3576 ---- Changes of Elm2.4ME+ PL95b (25) compared with Elm2.4ME+ PL95a (25) ------------------------------------------------------------------ ! [ This patch is branch from the main line. ] - "Using PL95 with the two patches you send me, I encountered the following problem when searching for a string in a mail message: *************** *** 3458,3464 **** Changes of Elm2.4ME+ PL95a (25) compared with Elm2.4ME+ PL95 (25) ----------------------------------------------------------------- ! [ This is out of branch patch. ] - "Following please find the error when trying to compile elm2.4.ME+.95 on AIX 4.3.3 (maintenance level 09): --- 3588,3594 ---- Changes of Elm2.4ME+ PL95a (25) compared with Elm2.4ME+ PL95 (25) ----------------------------------------------------------------- ! [ This patch is branch from the main line. ] - "Following please find the error when trying to compile elm2.4.ME+.95 on AIX 4.3.3 (maintenance level 09): *************** *** 3766,3772 **** Changes of Elm2.4ME+ PL94a (25) compared with Elm2.4ME+ PL94 (25) ----------------------------------------------------------------- ! [ This is out of branch patch. ] - When sending mail, saving copy of mail to folder failed when --- 3896,3902 ---- Changes of Elm2.4ME+ PL94a (25) compared with Elm2.4ME+ PL94 (25) ----------------------------------------------------------------- ! [ This patch is branch from the main line. ] - When sending mail, saving copy of mail to folder failed when *************** *** 3970,3976 **** Changes of Elm2.4ME+ PL92a (25) compared with Elm2.4ME+ PL92 (25) ----------------------------------------------------------------- ! [ This is out of branch patch. ] - "Until I did this I could not get it to build correctly on solaris 8 (even if I didn't want to use the sharedlibs -- --- 4100,4106 ---- Changes of Elm2.4ME+ PL92a (25) compared with Elm2.4ME+ PL92 (25) ----------------------------------------------------------------- ! [ This patch is branch from the main line. ] - "Until I did this I could not get it to build correctly on solaris 8 (even if I didn't want to use the sharedlibs -- *************** *** 4206,4212 **** Changes of Elm2.4ME+ PL90a (25) compared with Elm2.4ME+ PL90 ------------------------------------------------------------ ! [ This is out of branch patch. ] - "Running Elm 2.4ME+86, if I displayed the first 80% of a message using the built-in text browser, pressing --- 4336,4342 ---- Changes of Elm2.4ME+ PL90a (25) compared with Elm2.4ME+ PL90 ------------------------------------------------------------ ! [ This patch is branch from the main line. ] - "Running Elm 2.4ME+86, if I displayed the first 80% of a message using the built-in text browser, pressing *************** *** 4346,4352 **** Changes of Elm2.4ME+ PL88a (25) compared with Elm2.4ME+ PL88 (25) ----------------------------------------------------------------- ! [ This is out of branch patch. ] - In newmail.c and from.c utilities header_charset was not set. --- 4476,4482 ---- Changes of Elm2.4ME+ PL88a (25) compared with Elm2.4ME+ PL88 (25) ----------------------------------------------------------------- ! [ This patch is branch from the main line. ] - In newmail.c and from.c utilities header_charset was not set. *************** *** 4614,4620 **** Changes of Elm2.4ME+ PL84a (25) compared with Elm2.4ME+ PL84 (25) ----------------------------------------------------------------- ! [ This is out of branch patch. ] - 'struct string * ret' was incorrectly static on browser_descend_imap(). That caused Elm to crash, --- 4744,4750 ---- Changes of Elm2.4ME+ PL84a (25) compared with Elm2.4ME+ PL84 (25) ----------------------------------------------------------------- ! [ This patch is branch from the main line. ] - 'struct string * ret' was incorrectly static on browser_descend_imap(). That caused Elm to crash, *************** *** 5357,5363 **** Changes of Elm2.4ME+ PL76a (25) compared with Elm2.4ME+ PL76 (25) ----------------------------------------------------------------- ! [ This is out of branch patch. ] - On PL73 [encode] was producing (by mistake) text/X-ELM-encode instead of application/X-ELM-encode as --- 5487,5493 ---- Changes of Elm2.4ME+ PL76a (25) compared with Elm2.4ME+ PL76 (25) ----------------------------------------------------------------- ! [ This patch is branch from the main line. ] - On PL73 [encode] was producing (by mistake) text/X-ELM-encode instead of application/X-ELM-encode as *************** *** 6716,6722 **** Changes of Elm2.4ME+ PL53Y (25) compared with Elm2.4ME+ PL53 (25) --------------------------------------------------------------- ! [ This is out of branch patch. ] - Test that year >= 0 instead of year > 0 on cvt_yearstr_to_yearnum(). That affects if --- 6846,6852 ---- Changes of Elm2.4ME+ PL53Y (25) compared with Elm2.4ME+ PL53 (25) --------------------------------------------------------------- ! [ This patch is branch from the main line. ] - Test that year >= 0 instead of year > 0 on cvt_yearstr_to_yearnum(). That affects if *************** *** 6868,6874 **** Changes of Elm2.4ME+ PL50s (25) compared with Elm2.4ME+ PL50 (25) -------------------------------------------------------------- ! [ This is out of branch patch. ] - Fix incorrect bound checking on putc_so_string() (state.c) --- 6998,7004 ---- Changes of Elm2.4ME+ PL50s (25) compared with Elm2.4ME+ PL50 (25) -------------------------------------------------------------- ! [ This patch is branch from the main line. ] - Fix incorrect bound checking on putc_so_string() (state.c) *************** *** 7509,7515 **** Changes of Elm2.4ME+ PL31H (25) compared with Elm2.4ME+ PL31 (25) --------------------------------------------------------------- ! [ This is out of branch patch. ] - Incorrect Content-length: -header was causing corruption of folders. --- 7639,7645 ---- Changes of Elm2.4ME+ PL31H (25) compared with Elm2.4ME+ PL31 (25) --------------------------------------------------------------- ! [ This patch is branch from the main line. ] - Incorrect Content-length: -header was causing corruption of folders. Index: elm2.4.ME+.116-cvs/doc/elmrc-info *** elm2.4.ME+.115/doc/elmrc-info 2004-04-13 14:26:13.000000000 +0300 --- elm2.4.ME+.116-cvs/doc/elmrc-info 2004-05-01 22:08:18.000000000 +0300 *************** *** 1,4 **** ! #@(#)$Id: elmrc-info,v 1.61 2004/04/04 16:42:27 hurtta Exp $ # Elm Version 2.4ME+ # #$HDR - magic line to mark comments to put at top of user's elmrc file. --- 1,4 ---- ! #@(#)$Id: elmrc-info,v 1.62 2004/05/01 19:08:18 hurtta Exp $ # Elm Version 2.4ME+ # #$HDR - magic line to mark comments to put at top of user's elmrc file. *************** *** 152,157 **** --- 152,160 ---- weedout # what headers I DON'T want to see, ever. + # + # If first element on list is "*clear-weed-list*" then builtin + # weedout list is not used. bounceback # threshold for bouncing copies of remote uucp messages... Index: elm2.4.ME+.116-cvs/doc/elmregister.1 *** elm2.4.ME+.115/doc/elmregister.1 2004-02-25 21:39:18.000000000 +0200 --- elm2.4.ME+.116-cvs/doc/elmregister.1 2004-05-02 15:38:13.000000000 +0300 *************** *** 26,31 **** --- 26,33 ---- .br .B #LIB#/elmregister copy .br + .B #LIB#/elmregister copydoc + .br .B #LIB#/elmregister .I command *************** *** 105,108 **** .SH BUG REPORTS TO Kari Hurtta elm@elmme-mailer.org .SH COPYRIGHTS ! \fB\*(ct\fRCopyright 2003 by Kari Hurtta --- 107,110 ---- .SH BUG REPORTS TO Kari Hurtta elm@elmme-mailer.org .SH COPYRIGHTS ! \fB\*(ct\fRCopyright 2003, 2004 by Kari Hurtta Index: elm2.4.ME+.116-cvs/doc/Makefile.SH *** elm2.4.ME+.115/doc/Makefile.SH 2004-01-24 13:51:43.000000000 +0200 --- elm2.4.ME+.116-cvs/doc/Makefile.SH 2004-05-02 15:38:13.000000000 +0300 *************** *** 17,23 **** cat >Makefile <Makefile < * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! /* $Id: defs.h,v 1.46 2004/05/01 13:18:50 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.46 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 576,586 **** long length; /* length of alias data on file */ }; - struct addr_rec { - char address[NLEN]; /* machine!user you get mail as */ - struct addr_rec *next; /* linked list pointer to next */ - }; - #ifdef SHORTNAMES /* map long names to shorter ones */ # include --- 576,581 ---- Index: elm2.4.ME+.116-cvs/hdrs/elmlib.h *** elm2.4.ME+.115/hdrs/elmlib.h 2004-04-13 14:26:13.000000000 +0300 --- elm2.4.ME+.116-cvs/hdrs/elmlib.h 2004-05-01 22:08:18.000000000 +0300 *************** *** 1,7 **** ! /* $Id: elmlib.h,v 1.207 2004/04/04 06:17:17 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.207 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! /* $Id: elmlib.h,v 1.209 2004/05/01 19:08:18 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.209 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 725,731 **** From: -header */ extern char alternative_editor[SLEN];/* the 'other' editor */ ! extern struct addr_rec *alternative_addresses; /* how else do we get mail? */ extern int always_del; /* flag: always delete marked msgs? */ extern int always_keep; /* flag: always keep unread msgs? */ extern int always_store; /* flag: always store read mail? */ --- 725,731 ---- From: -header */ extern char alternative_editor[SLEN];/* the 'other' editor */ ! extern PATH alternative_addresses; /* how else do we get mail? */ extern int always_del; /* flag: always delete marked msgs? */ extern int always_keep; /* flag: always keep unread msgs? */ extern int always_store; /* flag: always store read mail? */ *************** *** 912,919 **** extern char v_editor[SLEN]; /* "~v" editor... */ extern int elm_filter; /* flag: weed out header lines? */ extern int send_mime_plain; /* Send text/plain US-ASCII as MIME? */ ! extern char *weedlist[MAX_IN_WEEDLIST]; ! extern int weedcount; /* how many headers to check? */ #ifdef REMOTE_MBX extern char raw_imap_charset[SLEN]; /* IMAP foldername charset */ extern int imap_fast_lookup; /* flag: skip directory listing */ --- 912,919 ---- extern char v_editor[SLEN]; /* "~v" editor... */ extern int elm_filter; /* flag: weed out header lines? */ extern int send_mime_plain; /* Send text/plain US-ASCII as MIME? */ ! extern PATH weedlist; ! #ifdef REMOTE_MBX extern char raw_imap_charset[SLEN]; /* IMAP foldername charset */ extern int imap_fast_lookup; /* flag: skip directory listing */ Index: elm2.4.ME+.116-cvs/hdrs/headers.h *** elm2.4.ME+.115/hdrs/headers.h 2004-03-30 19:38:43.000000000 +0300 --- elm2.4.ME+.116-cvs/hdrs/headers.h 2004-05-19 14:52:30.000000000 +0300 *************** *** 1,7 **** ! /* $Id: headers.h,v 1.24 2004/03/27 18:31:36 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.24 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! /* $Id: headers.h,v 1.25 2004/05/19 11:52:30 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.25 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 35,83 **** extern int sendmail_verbose; /* Allow extended debugging on sendmail */ extern int nucurr; /** change list or just the current pointer **/ - - extern char cur_editfile[SLEN]; /* editor buffer */ extern char defaultfile[SLEN]; /* name of default folder */ - - - - - - - - - - - - - - - - - - - - - - - - - - - extern char batch_subject[SLEN];/* subject buffer for batchmail */ extern char included_file[SLEN];/* name of file to place in edit buf */ - - - extern char version_buff[NLEN]; /* version buffer */ - - - extern char *def_ans_yes; /* default yes answer - single char, lc */ extern char *def_ans_no; /* default no answer - single char, lc */ extern char *nls_deleted; /* [deleted] */ --- 35,48 ---- *************** *** 104,155 **** extern int has_highlighting; /* highlighting available? */ - - - - - - - - - extern int write_elmrc; /* flag: write elmrc in starting */ - - - - - - - - - - extern int mail_only; /* flag: send mail then leave? */ extern int check_only; /* flag: check aliases and leave? */ extern int batch_only; /* flag: send without prompting? */ - extern long size_of_pathfd; /** size of pathfile, 0 if none **/ extern FILE *pathfd; /* path alias file */ extern FILE *domainfd; /* domains file */ - - - - extern int system_data; /* fileno of system data file */ extern int user_data; /* fileno of user data file */ - - - - - - - #ifdef USE_PGP extern int pgp_status; --- 69,89 ---- Index: elm2.4.ME+.116-cvs/hdrs/mbx_imp.h *** elm2.4.ME+.115/hdrs/mbx_imp.h 2004-04-13 14:26:13.000000000 +0300 --- elm2.4.ME+.116-cvs/hdrs/mbx_imp.h 2004-04-24 15:30:02.000000000 +0300 *************** *** 1,7 **** ! /* $Id: mbx_imp.h,v 1.66 2004/04/04 06:17:17 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.66 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! /* $Id: mbx_imp.h,v 1.67 2004/04/24 12:30:02 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.67 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 749,758 **** #define STFLAG_is_submission 0x0400 #define STFLAG_is_smtp 0x0800 ! extern const struct service_type * IMAP_SERVICE; ! extern const struct service_type * POP_SERVICE; ! extern const struct service_type * SUBMISSION_SERVICE; ! extern const struct service_type * SMTP_SERVICE; extern struct service_entry { int flags; --- 749,758 ---- #define STFLAG_is_submission 0x0400 #define STFLAG_is_smtp 0x0800 ! extern CONST struct service_type * IMAP_SERVICE; ! extern CONST struct service_type * POP_SERVICE; ! extern CONST struct service_type * SUBMISSION_SERVICE; ! extern CONST struct service_type * SMTP_SERVICE; extern struct service_entry { int flags; Index: elm2.4.ME+.116-cvs/hdrs/me.h *** elm2.4.ME+.115/hdrs/me.h 2004-03-30 19:38:43.000000000 +0300 --- elm2.4.ME+.116-cvs/hdrs/me.h 2004-05-02 14:15:26.000000000 +0300 *************** *** 1,7 **** ! /* $Id: me.h,v 1.87 2004/03/27 18:31:36 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.87 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! /* $Id: me.h,v 1.89 2004/05/02 11:15:26 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.89 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 119,124 **** --- 119,135 ---- int *redraw, struct menu_context *page)); + #define PROMPT_center 1 + #define PROMPT_yesno 2 + #define PROMPT_redraw_mark 4 + #define PROMTP_ctrlL 8 + + extern int prompt_letter P_((int line, char *letters, int def, + int flags, + struct menu_context *page, + const char * format, const char *msg, ...)); + + #define OE_APPEND_CURRENT (1<<0) #define OE_PASSWD (1<<1) #define OE_REDRAW_MARK (1<<2) Index: elm2.4.ME+.116-cvs/hdrs/rc_imp.h *** elm2.4.ME+.115/hdrs/rc_imp.h 2004-03-30 19:38:43.000000000 +0300 --- elm2.4.ME+.116-cvs/hdrs/rc_imp.h 2004-05-01 22:08:18.000000000 +0300 *************** *** 1,7 **** ! /* $Id: rc_imp.h,v 1.10 2004/03/28 13:37:38 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.10 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! /* $Id: rc_imp.h,v 1.12 2004/05/01 19:08:18 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.12 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 36,42 **** rc_get_value * get_value; } rc_DT_SYN, rc_DT_STR, rc_DT_NUM, rc_DT_BOL, ! rc_DT_CHR, rc_DT_WEE, rc_DT_ALT, rc_DT_SRT, rc_DT_MLT, rc_DT_ASR, rc_DT_PRM, rc_DT_FUNC, rc_DT_LONG, rc_DT_PATH, rc_DT_OBS; --- 36,42 ---- rc_get_value * get_value; } rc_DT_SYN, rc_DT_STR, rc_DT_NUM, rc_DT_BOL, ! rc_DT_CHR, rc_DT_SRT, rc_DT_MLT, rc_DT_ASR, rc_DT_PRM, rc_DT_FUNC, rc_DT_LONG, rc_DT_PATH, rc_DT_OBS; *************** *** 54,60 **** #define DT_NUM &rc_DT_NUM /* number */ #define DT_BOL &rc_DT_BOL /* ON/OFF (boolean) */ #define DT_WEE &rc_DT_WEE /* weed list */ - #define DT_ALT &rc_DT_ALT /* alternate addresses list */ #define DT_SRT &rc_DT_SRT /* sort-by code */ #define DT_MLT &rc_DT_MLT /* multiple destinations for data */ #define DT_ASR &rc_DT_ASR /* sort-by code */ --- 54,59 ---- *************** *** 73,80 **** extern int is_it_on P_((char *word)); extern void weedout P_((char *string)); extern char * mode_to_str P_((int mode)); - extern void alternatives P_((char *)); - extern int expand_dt_path P_((struct dt_path_info *ptr, char *fieldname, char *val, int recursive)); --- 72,77 ---- Index: elm2.4.ME+.116-cvs/hdrs/save_opts.h *** elm2.4.ME+.115/hdrs/save_opts.h 2004-04-13 14:26:13.000000000 +0300 --- elm2.4.ME+.116-cvs/hdrs/save_opts.h 2004-05-01 22:08:19.000000000 +0300 *************** *** 1,7 **** ! /* @(#)$Id: save_opts.h,v 1.82 2004/04/04 16:42:27 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.82 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! /* @(#)$Id: save_opts.h,v 1.84 2004/05/01 19:08:19 hurtta Exp $ */ /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.84 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 48,54 **** #define PATH_sep_comma 64 #define PATH_sep_colon 128 #define PATH_quote_single 256 ! struct dt_path_info { int flags; --- 48,54 ---- #define PATH_sep_comma 64 #define PATH_sep_colon 128 #define PATH_quote_single 256 ! #define PATH_convert_underline 512 struct dt_path_info { int flags; *************** *** 84,93 **** long *l_num; int *bol; char *chr; - char **weed; - struct addr_rec **alts; int *sort; struct dt_path_info *path; #ifdef USE_PGP enum pgp_version *pgpver; #endif --- 84,92 ---- long *l_num; int *bol; char *chr; int *sort; struct dt_path_info *path; + char **mlt; #ifdef USE_PGP enum pgp_version *pgpver; #endif *************** *** 116,125 **** #define ZZZ_DT_SRT(A) DT_SRT,0, { sort: A }, null_option_func #define ZZZ_DT_STR(A) DT_STR,0, { str: A }, null_option_func #define ZZZ_DT_STR_(x,A) DT_STR,x, { str: A }, null_option_func - #define ZZZ_DT_ALT(A) DT_ALT,0, { alts: A }, null_option_func #define ZZZ_DT_BOL(A) DT_BOL,0, { bol: A }, null_option_func #define ZZZ_DT_BOL_(x,A) DT_BOL,x, { bol: A }, null_option_func ! #define ZZZ_DT_MLT(A) DT_MLT,0, { weed: A }, null_option_func #define ZZZ_DT_SYN(A) DT_SYN,0, { str: A }, null_option_func #define ZZZ_DT_NUM(A) DT_NUM,0, { num: A }, null_option_func #define ZZZ_DT_NUM_(x,A) DT_NUM,x, { num: A }, null_option_func --- 115,123 ---- #define ZZZ_DT_SRT(A) DT_SRT,0, { sort: A }, null_option_func #define ZZZ_DT_STR(A) DT_STR,0, { str: A }, null_option_func #define ZZZ_DT_STR_(x,A) DT_STR,x, { str: A }, null_option_func #define ZZZ_DT_BOL(A) DT_BOL,0, { bol: A }, null_option_func #define ZZZ_DT_BOL_(x,A) DT_BOL,x, { bol: A }, null_option_func ! #define ZZZ_DT_MLT(A) DT_MLT,0, { mlt: A }, null_option_func #define ZZZ_DT_SYN(A) DT_SYN,0, { str: A }, null_option_func #define ZZZ_DT_NUM(A) DT_NUM,0, { num: A }, null_option_func #define ZZZ_DT_NUM_(x,A) DT_NUM,x, { num: A }, null_option_func *************** *** 131,137 **** #define ZZZ_DT_FUNC_(x,A) DT_FUNC,x, { str: NULL }, A #define ZZZ_DT_CHR(A) &rc_DT_CHR,0, { chr: A }, null_option_func #define ZZZ_DT_PRM(A) DT_PRM,0, { num: A }, null_option_func - #define ZZZ_DT_WEE(A) DT_WEE,0, { weed: A }, null_option_func #define ZZZ_DT_PATH(A) &rc_DT_PATH,0, { path: A }, null_option_func #define ZZZ_DT_OBS0 &rc_DT_OBS,0, { str: NULL }, null_option_func #define ZZZ_DT_SHARED(A) &rc_DT_SHARED,0, { shared: A }, null_option_func --- 129,134 ---- *************** *** 158,164 **** #define ZZZ_DT_SRT(A) DT_SRT, 0,(char *)A, null_option_func #define ZZZ_DT_STR(A) DT_STR, 0,A, null_option_func #define ZZZ_DT_STR_(x,A) DT_STR,x,A, null_option_func - #define ZZZ_DT_ALT(A) DT_ALT, 0,(char *)A, null_option_func #define ZZZ_DT_BOL(A) DT_BOL, 0,(char *)A, null_option_func #define ZZZ_DT_BOL_(x,A) DT_BOL,x,(char *)A, null_option_func #define ZZZ_DT_MLT(A) DT_MLT,0,(char *)A, null_option_func --- 155,160 ---- *************** *** 173,179 **** #define ZZZ_DT_FUNC_(x,A) DT_FUNC,x,NULL, A #define ZZZ_DT_CHR(A) &rc_DT_CHR,0,(char *)A, null_option_func #define ZZZ_DT_PRM(A) DT_PRM,0,(char *)A, null_option_func - #define ZZZ_DT_WEE(A) DT_WEE,0,(char *)A, null_option_func #define ZZZ_DT_PATH(A) &rc_DT_PATH,0, (char *)A, null_option_func #define ZZZ_DT_OBS0 &rc_DT_OBS,0, NULL , null_option_func #define ZZZ_DT_SHARED(A) &rc_DT_SHARED,0, (char *)A, null_option_func --- 169,174 ---- *************** *** 249,255 **** NULL}, {"alteditor", -1L,ZZZ_DT_STR(alternative_editor), sizeof alternative_editor, NULL}, ! {"alternatives", -1L,ZZZ_DT_ALT(&alternative_addresses), 0, NULL}, {"alwaysdelete", -1L,ZZZ_DT_BOL(&always_del), 0, NULL}, {"alwayskeep", -1L,ZZZ_DT_BOL(&always_keep), 0, NULL}, {"alwaysleave", -1L,ZZZ_DT_MLT(ALWAYS), 0, NULL}, --- 244,250 ---- NULL}, {"alteditor", -1L,ZZZ_DT_STR(alternative_editor), sizeof alternative_editor, NULL}, ! {"alternatives", -1L,ZZZ_DT_PATH(&alternative_addresses), 0, NULL}, {"alwaysdelete", -1L,ZZZ_DT_BOL(&always_del), 0, NULL}, {"alwayskeep", -1L,ZZZ_DT_BOL(&always_keep), 0, NULL}, {"alwaysleave", -1L,ZZZ_DT_MLT(ALWAYS), 0, NULL}, *************** *** 496,502 **** {"utf7-encode-optional", -1L,ZZZ_DT_BOL(&utf7_encode_optional), 0, NULL}, {"visualeditor", -1L,ZZZ_DT_STR(v_editor), sizeof v_editor, NULL}, {"weed", -1L,ZZZ_DT_BOL(&elm_filter), 0, NULL}, ! {"weedout", -1L,ZZZ_DT_WEE(weedlist), 0, NULL}, }; int NUMBER_OF_SAVEABLE_OPTIONS=(sizeof(save_info_data)/sizeof(ZZZ_SAVE_TYPE)); save_info_recs *save_info = (save_info_recs *) save_info_data; --- 491,497 ---- {"utf7-encode-optional", -1L,ZZZ_DT_BOL(&utf7_encode_optional), 0, NULL}, {"visualeditor", -1L,ZZZ_DT_STR(v_editor), sizeof v_editor, NULL}, {"weed", -1L,ZZZ_DT_BOL(&elm_filter), 0, NULL}, ! {"weedout", -1L,ZZZ_DT_PATH(&weedlist), 0, NULL}, }; int NUMBER_OF_SAVEABLE_OPTIONS=(sizeof(save_info_data)/sizeof(ZZZ_SAVE_TYPE)); save_info_recs *save_info = (save_info_recs *) save_info_data; Index: elm2.4.ME+.116-cvs/hdrs/s_elm.h *** elm2.4.ME+.115/hdrs/s_elm.h 2004-03-16 21:17:43.000000000 +0200 --- elm2.4.ME+.116-cvs/hdrs/s_elm.h 2004-05-01 22:08:19.000000000 +0300 *************** *** 476,484 **** #define ElmBadLineElmrc 0x230 #define ElmBatchNoticeFoldersDir 0x231 #define ElmNoticeFoldersDir 0x232 - #define ElmTooManyWeedHeaders 0x233 - #define ElmTooManyWeedPmalloc 0x234 - #define ElmNoMemDefaultWeed 0x235 #define ElmCannotInitErrorExpanding 0x236 #define ElmCouldntMakeTempFileName 0x237 #define ElmCouldntOpenForWriting 0x238 --- 476,481 ---- *************** *** 1097,1099 **** --- 1094,1097 ---- #define ElmCharsetBadOverride 0x865 #define ElmObsoleteInElmrc 0x866 #define ElmPgpRcvSure 0x867 + #define ElmFailedLeaveChange 0x868 Index: elm2.4.ME+.116-cvs/lib/bindata.c *** elm2.4.ME+.115/lib/bindata.c 2004-03-30 19:38:43.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/bindata.c 2004-04-24 15:30:02.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: bindata.c,v 1.4 2004/03/27 18:31:37 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.4 $ $State: Exp $ * * Author: Kari Hurtta *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: bindata.c,v 1.5 2004/04/24 12:30:02 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.5 $ $State: Exp $ * * Author: Kari Hurtta *****************************************************************************/ *************** *** 744,750 **** struct bindata_format_1 *v; uint16 bytevector[256]; unsigned char revvector[MAP_REV_MAP_DIV]; ! const char *filename; { int status = 0,i; struct csets_1 *y; --- 744,750 ---- struct bindata_format_1 *v; uint16 bytevector[256]; unsigned char revvector[MAP_REV_MAP_DIV]; ! CONST char *filename; { int status = 0,i; struct csets_1 *y; *************** *** 793,799 **** struct bindata_mapped_data * v; uint16 bytevector[256]; unsigned char revvector[MAP_REV_MAP_DIV]; ! const char *filename; { int r = 0; --- 793,799 ---- struct bindata_mapped_data * v; uint16 bytevector[256]; unsigned char revvector[MAP_REV_MAP_DIV]; ! CONST char *filename; { int r = 0; *************** *** 988,994 **** /* bzero is defined on hdrs/defs.h */ ! bzero(ret, sizeof (*ret)); ret->format = bindata_format_1; ret->v.f1.header = v; --- 988,994 ---- /* bzero is defined on hdrs/defs.h */ ! bzero((void *)ret, sizeof (*ret)); ret->format = bindata_format_1; ret->v.f1.header = v; *************** *** 999,1005 **** struct bindata_map * give_mapping(v,mapname) struct bindata_mapped_data *v; ! const char *mapname; { struct bindata_map *ret = NULL; --- 999,1005 ---- struct bindata_map * give_mapping(v,mapname) struct bindata_mapped_data *v; ! CONST char *mapname; { struct bindata_map *ret = NULL; Index: elm2.4.ME+.116-cvs/lib/cs_iso2022.c *** elm2.4.ME+.115/lib/cs_iso2022.c 2004-03-30 19:38:43.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/cs_iso2022.c 2004-04-24 15:30:02.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: cs_iso2022.c,v 1.35 2004/03/27 18:31:38 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.35 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: cs_iso2022.c,v 1.36 2004/04/24 12:30:02 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.36 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 1078,1084 **** S_(cs_add_intdata_to_string cs_add_intdata_to_iso2022_gen) static void cs_add_intdata_to_iso2022_gen(str,data) struct string *str; ! const struct string *data; { int i; struct mb_data * X1 = str->p->a.data; --- 1078,1084 ---- S_(cs_add_intdata_to_string cs_add_intdata_to_iso2022_gen) static void cs_add_intdata_to_iso2022_gen(str,data) struct string *str; ! CONST struct string *data; { int i; struct mb_data * X1 = str->p->a.data; *************** *** 1229,1235 **** S_(cs_give_unicode_from_string cs_give_unicode_from_iso2022_gen) static uint16 cs_give_unicode_from_iso2022_gen(str,pos,found) ! const struct string *str; int pos; int *found; { --- 1229,1235 ---- S_(cs_give_unicode_from_string cs_give_unicode_from_iso2022_gen) static uint16 cs_give_unicode_from_iso2022_gen(str,pos,found) ! CONST struct string *str; int pos; int *found; { *************** *** 1421,1427 **** static void cs_add_unicodedata_to_iso2022_gen(str,len,data) struct string *str; int len; ! const uint16 *data; { int i; --- 1421,1427 ---- static void cs_add_unicodedata_to_iso2022_gen(str,len,data) struct string *str; int len; ! CONST uint16 *data; { int i; *************** *** 3436,3442 **** S_(cs_clip_from_string cs_clip_from_iso2022_gen) static void cs_clip_from_iso2022_gen(ret,str,pos,len) struct string *ret; ! const struct string *str; int *pos; int len; { --- 3436,3442 ---- S_(cs_clip_from_string cs_clip_from_iso2022_gen) static void cs_clip_from_iso2022_gen(ret,str,pos,len) struct string *ret; ! CONST struct string *str; int *pos; int len; { *************** *** 3544,3550 **** static int cs_add_streambytes_to_iso2022_gen(str,count,data) struct string *str; int count; ! const unsigned char *data; { int i = 0; struct state_iso2022 * X ; --- 3544,3550 ---- static int cs_add_streambytes_to_iso2022_gen(str,count,data) struct string *str; int count; ! CONST unsigned char *data; { int i = 0; struct state_iso2022 * X ; Index: elm2.4.ME+.116-cvs/lib/headers.c *** elm2.4.ME+.115/lib/headers.c 2004-03-30 19:38:43.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/headers.c 2004-05-15 18:51:38.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: headers.c,v 1.29 2004/03/27 18:31:39 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: headers.c,v 1.31 2004/05/15 15:51:38 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.31 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 158,163 **** --- 158,167 ---- } else if ('<' == tokens[i][0]) { int j; + /* Add mising space wetween phrase and < > */ + if (i > 0) + add_ascii_to_string(result,us_str(" ")); + R = new_string(defcharset); add_ascii_to_string(R,us_str(tokens[i])); *************** *** 400,406 **** static int no_add_to_mail_hdr(headers,X,value,demime,defcharset,replace) struct mailing_headers * headers; header_ptr X; ! const char *value; int demime; charset_t defcharset; int replace; --- 404,410 ---- static int no_add_to_mail_hdr(headers,X,value,demime,defcharset,replace) struct mailing_headers * headers; header_ptr X; ! CONST char *value; int demime; charset_t defcharset; int replace; *************** *** 448,453 **** --- 452,460 ---- { "Content-Disposition", hdr_decode_from_comment, no_add_to_mail_hdr }, /* From RFC 1864 */ { "Content-MD5", hdr_decode_from_raw, no_add_to_mail_hdr }, + + /* From RFC 2919 */ + { "List-Id", hdr_decode_from_phrase, no_add_to_mail_hdr }, /* mailbox format */ { "Content-Length", hdr_decode_from_raw, no_add_to_mail_hdr }, Index: elm2.4.ME+.116-cvs/lib/localmbx.c *** elm2.4.ME+.115/lib/localmbx.c 2004-04-13 14:26:13.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/localmbx.c 2004-04-24 19:33:20.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: localmbx.c,v 1.64 2004/04/04 06:17:17 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.64 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) ***************************************************************************** --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: localmbx.c,v 1.65 2004/04/24 16:33:20 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.65 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) ***************************************************************************** *************** *** 1607,1613 **** can_remove = buf.st_mtime < now - 10 * 60; DPRINT(Debug,1,(&Debug, " (modified %1.1f minutes ago)\n", ! (now - buf.st_mtime) / 60.0)); } if (stat2_code == 0) { DPRINT(Debug,1,(&Debug, --- 1607,1613 ---- can_remove = buf.st_mtime < now - 10 * 60; DPRINT(Debug,1,(&Debug, " (modified %1.1f minutes ago)\n", ! (double)(now - buf.st_mtime) / 60.0)); } if (stat2_code == 0) { DPRINT(Debug,1,(&Debug, *************** *** 1617,1623 **** can_remove = 0; DPRINT(Debug,1,(&Debug, " (read %1.1f minutes ago)\n", ! (now - buf2.st_atime) / 60.0)); } DPRINT(Debug,2,(&Debug, "mbx_dotlock_file: can remove = %d \n", --- 1617,1623 ---- can_remove = 0; DPRINT(Debug,1,(&Debug, " (read %1.1f minutes ago)\n", ! (double)(now - buf2.st_atime) / 60.0)); } DPRINT(Debug,2,(&Debug, "mbx_dotlock_file: can remove = %d \n", Index: elm2.4.ME+.116-cvs/lib/mbox.c *** elm2.4.ME+.115/lib/mbox.c 2004-03-30 19:38:43.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/mbox.c 2004-04-24 15:30:02.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: mbox.c,v 1.51 2004/03/27 18:31:39 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.51 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) ***************************************************************************** --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: mbox.c,v 1.52 2004/04/24 12:30:02 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.52 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) ***************************************************************************** *************** *** 144,150 **** *ptr)); /* bzero is defined hdrs/defs.h */ ! bzero(*ptr,sizeof (struct read_folder_state)); (*ptr) -> magic = RF_magic; (*ptr) -> fbytes = 0; --- 144,150 ---- *ptr)); /* bzero is defined hdrs/defs.h */ ! bzero((void *)*ptr,sizeof (struct read_folder_state)); (*ptr) -> magic = RF_magic; (*ptr) -> fbytes = 0; *************** *** 166,172 **** *ptr)); /* bzero is defined hdrs/defs.h */ ! bzero(*ptr,sizeof (struct read_folder_state)); free(*ptr); *ptr = NULL; --- 166,172 ---- *ptr)); /* bzero is defined hdrs/defs.h */ ! bzero((void *)*ptr,sizeof (struct read_folder_state)); free(*ptr); *ptr = NULL; *************** *** 839,845 **** new_folder = safe_malloc(sizeof (struct folder_info)); /* defined in hdrs/defs.h */ ! bzero(new_folder,sizeof (struct folder_info)); new_folder -> p = NULL; new_folder -> cur_folder_sys = NULL; --- 839,845 ---- new_folder = safe_malloc(sizeof (struct folder_info)); /* defined in hdrs/defs.h */ ! bzero((void *)new_folder,sizeof (struct folder_info)); new_folder -> p = NULL; new_folder -> cur_folder_sys = NULL; Index: elm2.4.ME+.116-cvs/lib/mediatype.c *** elm2.4.ME+.115/lib/mediatype.c 2004-03-30 19:38:43.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/mediatype.c 2004-04-24 15:30:02.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: mediatype.c,v 1.12 2004/03/27 18:31:39 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.12 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: mediatype.c,v 1.13 2004/04/24 12:30:02 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.13 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 184,190 **** } enum mime_major_type give_major_type(major,create) ! const char * major; int create; { int i; --- 184,190 ---- } enum mime_major_type give_major_type(major,create) ! CONST char * major; int create; { int i; *************** *** 228,235 **** } media_type_t give_media_type(major,minor,create) ! const char * major; ! const char * minor; int create; { --- 228,235 ---- } media_type_t give_media_type(major,minor,create) ! CONST char * major; ! CONST char * minor; int create; { *************** *** 243,249 **** media_type_t give_media_type2(major_type_code,minor,create) enum mime_major_type major_type_code; ! const char * minor; int create; { struct media_type * p; --- 243,249 ---- media_type_t give_media_type2(major_type_code,minor,create) enum mime_major_type major_type_code; ! CONST char * minor; int create; { struct media_type * p; Index: elm2.4.ME+.116-cvs/lib/okay_addr.c *** elm2.4.ME+.115/lib/okay_addr.c 2004-03-30 19:38:43.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/okay_addr.c 2004-05-01 22:08:19.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: okay_addr.c,v 1.17 2004/03/27 18:31:40 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.17 $ $State: Exp $ * * Reimplemented by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: okay_addr.c,v 1.19 2004/05/01 19:08:19 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.19 $ $State: Exp $ * * Reimplemented by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 93,99 **** int addr_is_user(addr) char *addr; { ! struct addr_rec *alternatives; char our_address[SLEN]; char deqbuffer[SLEN]; --- 93,99 ---- int addr_is_user(addr) char *addr; { ! char **alternatives; char our_address[SLEN]; char deqbuffer[SLEN]; *************** *** 181,231 **** } } ! alternatives = alternative_addresses; ! while (alternatives != NULL) { ! char * host_part2 = qstrpbrk(alternatives->address,"@"); ! if (host_part2) { ! char * buffer2 = ! safe_malloc(host_part2 - alternatives->address +1); ! strncpy(buffer2,alternatives->address, ! host_part2 - alternatives->address); ! buffer2[host_part2 - alternatives->address] = '\0'; ! DPRINT(Debug,27,(&Debug, ! "addr_is_user: %s: user part=%s, host part=%s\n", ! alternatives->address,buffer2,host_part2+1)); ! if ((0 == strcmp(buffer,buffer2) || ! 0 == strcmp(buffer1,buffer2) ! ) && ! 0 == istrcmp(host_part2+1,host_part+1)) { ! DPRINT(Debug,25,(&Debug, ! "addr_is_user(\"%s\")=TRUE: matches alternative\n", ! addr)); ! free(buffer2); ! free(buffer); ! free(buffer1); buffer1 = NULL; ! return(TRUE); } - free(buffer2); } - alternatives = alternatives->next; } free(buffer); free(buffer1); buffer1 = NULL; ! } ! ! alternatives = alternative_addresses; ! while (alternatives != NULL) { ! if (0 == strcmp(addr,alternatives->address)) { ! DPRINT(Debug,25,(&Debug, ! "addr_is_user(\"%s\")=TRUE: matches alternative address\n", ! addr)); ! return(TRUE); } - alternatives = alternatives->next; } DPRINT(Debug,25,(&Debug, "addr_is_user(\"%s\")=FALSE\n",addr)); --- 181,243 ---- } } ! alternatives = give_dt_path_as_elems(&alternative_addresses, ! "alternatives"); ! if (alternatives) { ! ! int i; ! ! for (i = 0; alternatives[i]; i++) { ! char * host_part2 = qstrpbrk(alternatives[i],"@"); ! ! if (host_part2) { ! int LEN = host_part2 - alternatives[i]; ! char * buffer2 = safe_malloc(LEN+1); ! ! strncpy(buffer2,alternatives[i], LEN); ! buffer2[LEN] = '\0'; ! DPRINT(Debug,27,(&Debug, ! "addr_is_user: %s: user part=%s, host part=%s\n", ! alternatives[i],buffer2,host_part2+1)); ! if ((0 == strcmp(buffer,buffer2) || ! 0 == strcmp(buffer1,buffer2) ! ) && ! 0 == istrcmp(host_part2+1,host_part+1)) { ! DPRINT(Debug,25,(&Debug, ! "addr_is_user(\"%s\")=TRUE: matches alternative\n", ! addr)); ! free(buffer2); ! free(buffer); ! free(buffer1); buffer1 = NULL; ! return(TRUE); ! } ! free(buffer2); } } } free(buffer); free(buffer1); buffer1 = NULL; ! } ! ! alternatives = give_dt_path_as_elems(&alternative_addresses, ! "alternatives"); ! if (alternatives) { ! ! int i; ! ! for (i = 0; alternatives[i]; i++) { ! ! if (0 == strcmp(addr,alternatives[i])) { ! DPRINT(Debug,25,(&Debug, ! "addr_is_user(\"%s\")=TRUE: matches alternative address\n", ! addr)); ! return(TRUE); ! } } } DPRINT(Debug,25,(&Debug, "addr_is_user(\"%s\")=FALSE\n",addr)); Index: elm2.4.ME+.116-cvs/lib/outheaders.c *** elm2.4.ME+.115/lib/outheaders.c 2004-03-30 19:38:43.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/outheaders.c 2004-05-19 15:07:01.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: outheaders.c,v 1.14 2004/03/27 18:31:40 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.14 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: outheaders.c,v 1.18 2004/05/19 12:07:01 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.18 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 38,44 **** struct mailing_headers *hdrs; { /* bzero is defined hdrs/defs.h */ ! bzero(hdrs,sizeof (*hdrs)); hdrs->magic = MAIL_HDR_magic; --- 38,44 ---- struct mailing_headers *hdrs; { /* bzero is defined hdrs/defs.h */ ! bzero((void *)hdrs,sizeof (*hdrs)); hdrs->magic = MAIL_HDR_magic; *************** *** 114,120 **** /* Make sure that dangling pointters are catched */ /* bzero is defined hdrs/defs.h */ ! bzero(hdrs,sizeof (*hdrs)); } --- 114,120 ---- /* Make sure that dangling pointters are catched */ /* bzero is defined hdrs/defs.h */ ! bzero((void *)hdrs,sizeof (*hdrs)); } *************** *** 166,172 **** struct expanded_address *x; { /* bzero is defined hdrs/defs.h */ ! bzero(x,sizeof (*x)); x->magic = EXP_ADDR_magic; x->addrs = NULL; --- 166,172 ---- struct expanded_address *x; { /* bzero is defined hdrs/defs.h */ ! bzero((void *)x,sizeof (*x)); x->magic = EXP_ADDR_magic; x->addrs = NULL; *************** *** 285,291 **** add_unicode_to_string(result,1,&code); } ! add_ascii_to_string(result,s2us(" (")); } --- 285,291 ---- add_unicode_to_string(result,1,&code); } ! add_ascii_to_string(result,s2us(")")); } *************** *** 589,595 **** int add_subject_hdr(headers,X,value,demime,defcharset,replace) struct mailing_headers * headers; header_ptr X; ! const char *value; int demime; charset_t defcharset; int replace; --- 589,595 ---- int add_subject_hdr(headers,X,value,demime,defcharset,replace) struct mailing_headers * headers; header_ptr X; ! CONST char *value; int demime; charset_t defcharset; int replace; *************** *** 612,618 **** int add_user_hdr(headers,X,value,demime,defcharset,replace) struct mailing_headers * headers; header_ptr X; ! const char *value; int demime; charset_t defcharset; int replace; --- 612,618 ---- int add_user_hdr(headers,X,value,demime,defcharset,replace) struct mailing_headers * headers; header_ptr X; ! CONST char *value; int demime; charset_t defcharset; int replace; Index: elm2.4.ME+.116-cvs/lib/rc_handle.c *** elm2.4.ME+.115/lib/rc_handle.c 2004-03-30 19:38:43.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/rc_handle.c 2004-05-01 22:08:19.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: rc_handle.c,v 1.17 2004/03/28 13:37:39 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.17 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) **************************************************************************** --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: rc_handle.c,v 1.24 2004/05/01 19:08:19 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.24 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) **************************************************************************** *************** *** 16,22 **** --- 16,24 ---- #include "headers.h" #include "rc_imp.h" #include "save_opts.h" + #ifdef USE_DLOPEN #include "shared_imp.h" + #endif #include "s_elm.h" DEBUG_VAR(Debug,__FILE__,"config"); *************** *** 31,38 **** &rc_DT_NUM == T || &rc_DT_BOL == T || &rc_DT_CHR == T || - &rc_DT_WEE == T || - &rc_DT_ALT == T || &rc_DT_SRT == T || &rc_DT_MLT == T || &rc_DT_ASR == T || --- 33,38 ---- *************** *** 422,597 **** struct rc_type rc_DT_CHR = { dt_CHR_parse_line, BAD_parse_cline, dt_CHR_print_value, dt_CHR_get_value }; - #ifdef ANSI_C - static rc_parse_line dt_WEE_parse_line; - #endif - static int dt_WEE_parse_line(r,lcl,value,lineno,filename, e_val, negate) - struct rc_save_info_rec *r; - int lcl; - char *value; - int lineno; - char *filename; - int e_val; - int negate; - { - if (negate) { - lib_error(CATGETS(elm_msg_cat, ElmSet, ElmBadNegate, - "!%s is not supported in line %d in \"%s\" file"), - r->name,lineno,filename); - return 0; - } - - weedout(value); - return 1; - } - - #ifdef ANSI_C - static rc_parse_cline dt_WEE_parse_cline; - #endif - static int dt_WEE_parse_cline(r,lcl,value,lineno,filename) - struct rc_save_info_rec *r; - int lcl; - char *value; - int lineno; - char *filename; - { - weedout(value); - return 1; - } - - #if ANSI_C - static rc_print_value dt_WEE_print_value; - #endif - static void dt_WEE_print_value(F,r,comment) - FILE *F; - struct rc_save_info_rec *r; - int comment; - { - int len, i; - - if (comment) - fprintf(F, "### "); - fprintf(F, "%s =", r->name); - len = strlen(r->name) + 6; - - i = 0; - while (i < weedcount - && istrcmp(weedlist[i], "*end-of-defaults*")) - i++; - while (i < weedcount - && !istrcmp(weedlist[i], "*end-of-defaults*")) - i++; - if (i == 1) { - /* end-of-defaults in the first position means - ** that there are no defaults, i.e. - ** a clear-weed-list has been done. - */ - fprintf(F, " \"*clear-weed-list*\""); - len += 20; - } - - while (i <= weedcount) { - char *w; - - w = (i < weedcount) ? weedlist[i] - : "*end-of-user-headers*"; - if (strlen(w) + len > 72) { - if (!comment) - fprintf(F, "\n\t"); - else - fprintf(F, "\n###\t"); - len = 8; - } - else { - fprintf(F, " "); - ++len; - } - fprintf(F, "\"%s\"", w); - len += strlen(w) + 3; - i++; - } - fprintf(F, "\n"); - } - - struct rc_type rc_DT_WEE = { dt_WEE_parse_line, dt_WEE_parse_cline, - dt_WEE_print_value, NO_get_value }; - - #ifdef ANSI_C - static rc_parse_line dt_ALT_parse_line; - #endif - static int dt_ALT_parse_line(r,lcl,value,lineno,filename, e_val, negate) - struct rc_save_info_rec *r; - int lcl; - char *value; - int lineno; - char *filename; - int e_val; - int negate; - { - if (negate) { - lib_error(CATGETS(elm_msg_cat, ElmSet, ElmBadNegate, - "!%s is not supported in line %d in \"%s\" file"), - r->name,lineno,filename); - return 0; - } - - alternatives(value); - return 1; - } - - #ifdef ANSI_C - static rc_parse_cline dt_ALT_parse_cline; - #endif - static int dt_ALT_parse_cline(r,lcl,value,lineno,filename) - struct rc_save_info_rec *r; - int lcl; - char *value; - int lineno; - char *filename; - { - alternatives(value); - return 1; - } - - #if ANSI_C - static rc_print_value dt_ALT_print_value; - #endif - static void dt_ALT_print_value(F,r,comment) - FILE *F; - struct rc_save_info_rec *r; - int comment; - { - struct addr_rec *alts = *(r ->val.alts); - int len=0; - - if (comment) - fprintf(F, "### "); - fprintf(F, "%s =", r->name); - len = strlen(r->name) + 6; - for ( ;alts; alts = alts->next) { - if (strlen(alts->address) + len > 72) { - if (!comment) - fprintf(F, "\n\t"); - else - fprintf(F, "\n###\t"); - len = 8; - } - else { - fprintf(F, " "); - ++len; - } - fprintf(F, "%s", alts->address); - len += strlen(alts->address); - } - fprintf(F,"\n"); - - - } - - struct rc_type rc_DT_ALT = { dt_ALT_parse_line, dt_ALT_parse_cline, - dt_ALT_print_value, NO_get_value }; - - static struct { char *kw; int sv; --- 422,427 ---- *************** *** 720,726 **** return 0; } ! for (s = r->val.weed; *s; ++s) { if (!do_set(lcl, *s, value, filename)) ok = 0; } --- 550,556 ---- return 0; } ! for (s = r->val.mlt; *s; ++s) { if (!do_set(lcl, *s, value, filename)) ok = 0; } *************** *** 1117,1122 **** --- 947,954 ---- int is_sep_colon = ptr->flags & PATH_sep_colon; int is_sep_space = 0 == recursive; int is_quote_single = (ptr->flags & PATH_quote_single) && 0 == recursive; + int convert_underline = (ptr->flags & PATH_convert_underline) + && 0 == recursive; char *p; char * start_val = NULL; *************** *** 1234,1239 **** --- 1066,1079 ---- memcpy(value,start_val,Len); value[Len] = '\0'; + if (convert_underline) { + int i; + + for (i = 0; i < Len; i++) + if ('_' == value[i]) + value[i] = ' '; + } + start_val = NULL; goto expand_value; } *************** *** 1263,1269 **** int Len = p - start_val; /* Split on quote */ ! q = '"'; DPRINT(Debug,11,(&Debug, "expand_dt_path (clip len=%d)=%.*s\n", --- 1103,1109 ---- int Len = p - start_val; /* Split on quote */ ! q = '\''; DPRINT(Debug,11,(&Debug, "expand_dt_path (clip len=%d)=%.*s\n", *************** *** 1374,1380 **** } ! if (is_dir && #ifdef S_ISREG !S_ISREG(S.st_mode) #else --- 1214,1220 ---- } ! if (is_file && #ifdef S_ISREG !S_ISREG(S.st_mode) #else *************** *** 1452,1457 **** --- 1292,1298 ---- { char *res,*p; int sep; + int quote; int i,L = 1; if (!ptr->list && ptr->unexpanded) *************** *** 1466,1483 **** else if (ptr->flags & PATH_sep_colon) sep = ':'; else sep = ' '; res = safe_malloc(L); for (i = 0, p = res; i < ptr->nlen;i++) { int l = strlen(ptr->list[i]); ! if (p+l+1 >= res+L) panic("RC PANIC",__FILE__,__LINE__,"give_dt_path_as_str", "Overflow",0); if (i > 0) *p++ = sep; memcpy(p,ptr->list[i],l); p += l; } *p = '\0'; --- 1307,1339 ---- else if (ptr->flags & PATH_sep_colon) sep = ':'; else sep = ' '; + if (ptr->flags & PATH_quote) quote = '"'; + else if (ptr->flags & PATH_quote_single) quote = '\''; + else quote = 0; + + if (quote) + L += ptr->nlen * 2; + res = safe_malloc(L); for (i = 0, p = res; i < ptr->nlen;i++) { int l = strlen(ptr->list[i]); ! if (p+l+1 + (quote ? 2 : 0) >= res+L) panic("RC PANIC",__FILE__,__LINE__,"give_dt_path_as_str", "Overflow",0); if (i > 0) *p++ = sep; + + if (quote) + *p++ = quote; + memcpy(p,ptr->list[i],l); p += l; + + if (quote) + *p++ = quote; + } *p = '\0'; *************** *** 1586,1596 **** if (comment) fprintf(F, "### "); for (i = 0; i < r->val.path->nlen; i++) { ! if (0 == i) ! fprintf(F, "%s = ",r->name); ! else { if (len + strlen(r->val.path->list[i]) > 70) { fprintf(F, "\n"); if (comment) --- 1442,1452 ---- if (comment) fprintf(F, "### "); + + fprintf(F, "%s = ",r->name); for (i = 0; i < r->val.path->nlen; i++) { ! if (i > 0) { if (len + strlen(r->val.path->list[i]) > 70) { fprintf(F, "\n"); if (comment) *************** *** 1603,1609 **** } if (r->val.path->flags & PATH_quote) elm_fprintf(F,FRM("Q"),r->val.path->list[i]); ! else fputs(r->val.path->list[i],F); len += strlen(r->val.path->list[i]) + 1; } --- 1459,1469 ---- } if (r->val.path->flags & PATH_quote) elm_fprintf(F,FRM("Q"),r->val.path->list[i]); ! else if (r->val.path->flags & PATH_quote_single) { ! fputc('\'',F); ! fputs(r->val.path->list[i],F); ! fputc('\'',F); ! } else fputs(r->val.path->list[i],F); len += strlen(r->val.path->list[i]) + 1; } Index: elm2.4.ME+.116-cvs/lib/read_rc.c *** elm2.4.ME+.115/lib/read_rc.c 2004-04-13 14:26:13.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/read_rc.c 2004-05-01 22:08:19.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: read_rc.c,v 1.133 2004/04/04 06:17:18 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.133 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: read_rc.c,v 1.136 2004/05/01 19:08:19 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.136 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 48,55 **** # endif #define ASSIGNMENT 0 - #define WEEDOUT 1 - #define ALTERNATIVES 2 #define SYSTEM_RC 0 #define LOCAL_RC 1 --- 48,53 ---- *************** *** 144,150 **** /* terminal if terminal supports */ int alias_sortby = NAME_SORT; /* how to sort aliases... */ char alternative_editor[SLEN] = "EDITOR"; /* alternative editor... */ ! struct addr_rec *alternative_addresses; /* how else do we get mail? */ int always_del = 0; /* flag: always delete marked msgs? */ int always_keep = 1; /* flag: always keep unread msgs? */ int always_store = 0; /* flag: always store read msgs? */ --- 142,152 ---- /* terminal if terminal supports */ int alias_sortby = NAME_SORT; /* how to sort aliases... */ char alternative_editor[SLEN] = "EDITOR"; /* alternative editor... */ ! PATH alternative_addresses = { /* how else do we get mail? */ ! PATH_sep_comma|PATH_quote|PATH_quote_single, ! NULL, 0,NULL ! }; ! int always_del = 0; /* flag: always delete marked msgs? */ int always_keep = 1; /* flag: always keep unread msgs? */ int always_store = 0; /* flag: always store read msgs? */ *************** *** 367,374 **** characters to be encoded? */ char v_editor[SLEN] = {0}; /* "~v" editor... */ int elm_filter = 1; /* flag: weed out header lines? */ ! char *weedlist[MAX_IN_WEEDLIST] = {0}; /* */ ! int weedcount; /* */ #ifdef REMOTE_MBX char raw_imap_charset[SLEN] = "SYSTEM"; /* IMAP foldername charset */ --- 369,379 ---- characters to be encoded? */ char v_editor[SLEN] = {0}; /* "~v" editor... */ int elm_filter = 1; /* flag: weed out header lines? */ ! PATH weedlist = { ! PATH_sep_comma|PATH_quote|PATH_convert_underline, ! NULL, 0,NULL ! }; ! #ifdef REMOTE_MBX char raw_imap_charset[SLEN] = "SYSTEM"; /* IMAP foldername charset */ *************** *** 692,698 **** return; } ! if (0 == strcmp(lc_ctype,"C")) system_charset = MIME_name_to_charset("US-ASCII", CHARSET_create); else if (0 == istrcmp(lc_ctype,"ASCII") || --- 697,741 ---- return; } ! /* 1) ------ guess based on codeset ------------------------ */ ! ! if (codeset[0] && ! 0 == strincmp(codeset,"ISO-8859-",9) && ! 0 < (val = atoi(codeset+9))) { ! elm_sfprintf(buffer, sizeof buffer, ! FRM("ISO-8859-%d"), ! val); ! system_charset = MIME_name_to_charset(buffer, ! CHARSET_create); ! } else if (codeset[0] && ! 0 == strincmp(codeset,"ISO_8859-",9) && ! 0 < (val = atoi(codeset+9))) { ! elm_sfprintf(buffer, sizeof buffer, ! FRM("ISO-8859-%d"), ! val); ! system_charset = MIME_name_to_charset(buffer, ! CHARSET_create); ! } else if (codeset[0] && ! 0 == strincmp(codeset,"ISO8859-",8) && ! 0 < (val = atoi(codeset+8))) { ! elm_sfprintf(buffer, sizeof buffer, ! FRM("ISO-8859-%d"), ! val); ! system_charset = MIME_name_to_charset(buffer, ! CHARSET_create); ! } else if (codeset[0] && ! 0 == strincmp(codeset,"ISO8859",7) && ! isascii(codeset[7]) && isdigit(codeset[7]) && ! '\0' == codeset[8]) { ! elm_sfprintf(buffer, sizeof buffer, ! FRM("ISO-8859-%c"), ! codeset[7]); ! system_charset = MIME_name_to_charset(buffer, ! CHARSET_create); ! ! /* 2) ------ guess based on lc_ctype ------------------------ */ ! ! } else if (0 == strcmp(lc_ctype,"C")) system_charset = MIME_name_to_charset("US-ASCII", CHARSET_create); else if (0 == istrcmp(lc_ctype,"ASCII") || *************** *** 717,722 **** --- 760,768 ---- FRM("ISO-8859-%d"), val); system_charset = MIME_name_to_charset(buffer,CHARSET_create); + + /* 3) ------ guess based on charset part of locale ------------------------ */ + } else if (charset && (0 == istrcmp(charset,"ASCII") || 0 == istrcmp(charset,"US-ASCII"))) system_charset = MIME_name_to_charset("US-ASCII", *************** *** 888,895 **** #endif #endif - static void default_weedlist P_((void)); - static int figure_domain P_((void)); static int figure_domain() { --- 934,939 ---- *************** *** 1013,1019 **** */ - default_weedlist(); errors = 0; /* --- 1057,1062 ---- *************** *** 1081,1087 **** strfcpy(raw_defaultfile, "$MAIL", sizeof raw_defaultfile); strfcpy(defaultfile, cp, sizeof defaultfile); } - alternative_addresses = NULL; /* none yet! */ raw_local_signature[0] = raw_remote_signature[0] = local_signature[0] = remote_signature[0] = --- 1124,1129 ---- *************** *** 2141,2286 **** return eval_option(save_info,NUMBER_OF_SAVEABLE_OPTIONS, lcl,word1,word2,filename); } - - void weedout(string) - char *string; - { - /** This routine is called with a list of headers to weed out. **/ ! char *strptr, *header, *p; ! int Len; ! int finished; ! ! finished = FALSE; ! strptr = string; ! while (!finished && (header = strtokq(strptr, "\t ,", TRUE)) != NULL) { ! strptr = NULL; ! ! if (!*header) ! continue; ! ! for (p = header; *p; ++p) { ! if (*p == '_') ! *p = ' '; ! } ! if (! istrcmp(header, "*end-of-user-headers*")) ! break; ! if (! istrcmp(header, "*end-of-defaults*")) ! finished = TRUE; ! if (! istrcmp(header, "*clear-weed-list*")) { ! while (weedcount) ! free(weedlist[--weedcount]); ! header = "*end-of-defaults*"; ! } ! ! if (matches_weedlist(header)) ! continue; ! ! if (weedcount > MAX_IN_WEEDLIST) { ! lib_error(CATGETS(elm_msg_cat, ElmSet, ElmTooManyWeedHeaders, ! "Too many weed headers! Leaving...")); ! exit(1); ! } ! Len = strlen(header) + 1; ! if ((p = malloc(Len)) == NULL) { ! lib_error(CATGETS(elm_msg_cat, ElmSet, ElmTooManyWeedPmalloc, ! "Too many weed headers! Out of memory! Leaving...")); ! exit(1); ! } ! strfcpy(p, header, Len); ! weedlist[weedcount++] = p; ! } ! } ! void alternatives(string) ! char *string; ! { ! /** This routine is called with a list of alternative addresses ! that you may receive mail from (forwarded) **/ ! char *strptr, *address; ! struct addr_rec *current_record, *previous_record; ! previous_record = alternative_addresses; /* start 'er up! */ ! /* move to the END of the alternative addresses list */ ! if (previous_record != NULL) ! while (previous_record->next != NULL) ! previous_record = previous_record->next; ! ! strptr = (char *) string; ! ! while ((address = strtok(strptr, "\t ,\"'")) != NULL) { ! if (previous_record == NULL) { ! previous_record = (struct addr_rec *) pmalloc(sizeof ! *alternative_addresses); ! ! strfcpy(previous_record->address, address, ! sizeof previous_record->address); ! previous_record->next = NULL; ! alternative_addresses = previous_record; ! } ! else { ! current_record = (struct addr_rec *) pmalloc(sizeof ! *alternative_addresses); ! ! strfcpy(current_record->address, address, ! sizeof current_record->address); ! current_record->next = NULL; ! previous_record->next = current_record; ! previous_record = current_record; ! } ! strptr = (char *) NULL; } - } ! static void default_weedlist() ! { ! /** Install the default headers to weed out! Many gracious ! thanks to John Lebovitz for this dynamic method of ! allocation! ! **/ ! ! static char *default_list[] = { ">From", "In-Reply-To:", ! "References:", "Newsgroups:", "Received:", ! "Apparently-To:", "Message-Id:", "Content-Type:", ! "Content-Length", "MIME-Version", ! "Content-Transfer-Encoding", ! "From", "X-Mailer:", "Status:", ! "X-ELM-", ! "X-UIDL", /* Generated by some POP deamons */ ! "Return-Path", ! "*end-of-defaults*", NULL ! }; ! ! for (weedcount = 0; default_list[weedcount] != (char *) 0;weedcount++){ ! int Len = strlen(default_list[weedcount]) + 1; ! if ((weedlist[weedcount] = ! malloc(Len)) == NULL) { ! lib_error(CATGETS(elm_msg_cat, ElmSet, ElmNoMemDefaultWeed, ! "Not enough memory for default weedlist. Leaving.")); ! (*safe_malloc_fail_handler)("default_weedlist", Len); ! return; ! } ! strfcpy(weedlist[weedcount], default_list[weedcount], Len); } - } - - int matches_weedlist(buffer) - char *buffer; - { - /** returns true iff the first 'n' characters of 'buffer' - match an entry of the weedlist **/ - - register int i; - - for (i=0;i < weedcount; i++) - if (strincmp(buffer, weedlist[i], strlen(weedlist[i])) == 0) - return(1); - return(0); } --- 2183,2237 ---- return eval_option(save_info,NUMBER_OF_SAVEABLE_OPTIONS, lcl,word1,word2,filename); } ! static CONST char WEED_NO_DEFAULT[] = "*clear-weed-list*"; ! ! int matches_weedlist(buffer) ! char *buffer; ! { ! /** returns true iff the first 'n' characters of 'buffer' ! match an entry of the weedlist **/ ! ! int i; ! static char *default_list[] = ! { ">From", "In-Reply-To:", ! "References:", "Newsgroups:", "Received:", ! "Apparently-To:", "Message-Id:", "Content-Type:", ! "Content-Length", "MIME-Version", ! "Content-Transfer-Encoding", ! "From", "X-Mailer:", "Status:", ! "X-ELM-", ! "X-UIDL", /* Generated by some POP deamons */ ! "Return-Path", ! "*end-of-defaults*", NULL ! }; ! char **list = give_dt_path_as_elems(&weedlist,"weedout"); ! /* If fist elem is "*clear-weed-list*" then default list is not ! used ! */ ! if (!list || !list[0] || ! 0 != strcmp(list[0],WEED_NO_DEFAULT)) { ! ! for (i = 0; default_list[i]; i++) { ! if (strincmp(buffer, default_list[i], strlen(default_list[i])) == 0) ! return(1); ! } ! } ! if (list) { ! for (i=0;list[i]; i++) { ! if (strincmp(buffer, list[i], strlen(list[i])) == 0) ! return(1); ! } } return(0); } Index: elm2.4.ME+.116-cvs/lib/remote_mbx.c *** elm2.4.ME+.115/lib/remote_mbx.c 2004-04-13 14:26:13.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/remote_mbx.c 2004-04-24 15:30:02.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: remote_mbx.c,v 1.49 2004/04/04 06:17:18 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.49 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: remote_mbx.c,v 1.50 2004/04/24 12:30:02 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.50 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 9,15 **** --- 9,17 ---- #include "headers.h" #include "ss_imp.h" #include "mbx_imp.h" + #ifdef USE_DLOPEN #include "shared_imp.h" + #endif #include "s_me.h" #include "s_elm.h" *************** *** 179,185 **** struct remote_account *ra; { /* bzero is defined hdrs/defs.h */ ! bzero (ra, sizeof (struct remote_account)); ra->hostaddr.sa.sa_family = AF_UNSPEC; ra->service_idx = 0; --- 181,187 ---- struct remote_account *ra; { /* bzero is defined hdrs/defs.h */ ! bzero ((void *)ra, sizeof (struct remote_account)); ra->hostaddr.sa.sa_family = AF_UNSPEC; ra->service_idx = 0; Index: elm2.4.ME+.116-cvs/lib/savefolder.c *** elm2.4.ME+.115/lib/savefolder.c 2004-03-30 19:38:43.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/savefolder.c 2004-04-24 15:30:02.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: savefolder.c,v 1.75 2004/03/27 18:31:41 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.75 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) ***************************************************************************** --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: savefolder.c,v 1.76 2004/04/24 12:30:02 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.76 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) ***************************************************************************** *************** *** 1357,1363 **** int real_prepare_write_local(dir,ptr,filename) struct folder_browser *dir; WRITE_STATE ptr; ! const char *filename; { int ret = 0; int err = 0; --- 1357,1363 ---- int real_prepare_write_local(dir,ptr,filename) struct folder_browser *dir; WRITE_STATE ptr; ! CONST char *filename; { int ret = 0; int err = 0; *************** *** 1471,1477 **** int real_end_write_local(dir,ptr,filename) struct folder_browser *dir; WRITE_STATE ptr; ! const char *filename; { int ret = 0; --- 1471,1477 ---- int real_end_write_local(dir,ptr,filename) struct folder_browser *dir; WRITE_STATE ptr; ! CONST char *filename; { int ret = 0; *************** *** 1505,1511 **** int real_sync_write_local(dir,ptr,filename) struct folder_browser *dir; WRITE_STATE ptr; ! const char *filename; { int ret = 0; --- 1505,1511 ---- int real_sync_write_local(dir,ptr,filename) struct folder_browser *dir; WRITE_STATE ptr; ! CONST char *filename; { int ret = 0; *************** *** 2216,2222 **** dir->selection = safe_malloc(sizeof (struct name_vector)); /* bzero is defined hdrs/defs.h */ ! bzero(dir->selection,sizeof (struct name_vector)); dir->selection->sys_name = sys_name; dir->selection->disp_name = disp_name; dir->selection->flags = flags; --- 2216,2222 ---- dir->selection = safe_malloc(sizeof (struct name_vector)); /* bzero is defined hdrs/defs.h */ ! bzero((void *)dir->selection,sizeof (struct name_vector)); dir->selection->sys_name = sys_name; dir->selection->disp_name = disp_name; dir->selection->flags = flags; *************** *** 2350,2356 **** struct folder_browser * dir; dir = safe_malloc(sizeof (struct folder_browser)); ! bzero(dir,sizeof (struct folder_browser)); /* defined hdrs/defs.h */ dir->sys_dir = NULL; dir->dirname = NULL; --- 2350,2356 ---- struct folder_browser * dir; dir = safe_malloc(sizeof (struct folder_browser)); ! bzero((void *)dir,sizeof (struct folder_browser)); /* defined hdrs/defs.h */ dir->sys_dir = NULL; dir->dirname = NULL; *************** *** 2401,2407 **** dir->type->browser_free_it(dir); /* Assurance for clean start */ ! bzero(&(dir->a), sizeof (dir->a)); dir->type = new_type; dir->type->browser_zero_it(dir); --- 2401,2407 ---- dir->type->browser_free_it(dir); /* Assurance for clean start */ ! bzero((void *)&(dir->a), sizeof (dir->a)); dir->type = new_type; dir->type->browser_zero_it(dir); *************** *** 3756,3762 **** (*ptr) = safe_malloc(sizeof (struct browser_write_state)); /* bzero is defined hdrs/defs.h */ ! bzero(*ptr,sizeof (struct browser_write_state)); (*ptr)->magic = WS_magic; } --- 3756,3762 ---- (*ptr) = safe_malloc(sizeof (struct browser_write_state)); /* bzero is defined hdrs/defs.h */ ! bzero((void *)*ptr,sizeof (struct browser_write_state)); (*ptr)->magic = WS_magic; } *************** *** 3767,3773 **** { if (*ptr) { /* bzero is defined hdrs/defs.h */ ! bzero(*ptr,sizeof (struct browser_write_state)); free(*ptr); *ptr = NULL; --- 3767,3773 ---- { if (*ptr) { /* bzero is defined hdrs/defs.h */ ! bzero((void *)*ptr,sizeof (struct browser_write_state)); free(*ptr); *ptr = NULL; Index: elm2.4.ME+.116-cvs/lib/service_list.c *** elm2.4.ME+.115/lib/service_list.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/service_list.c 2004-04-24 15:30:02.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: service_list.c,v 1.26 2004/03/27 18:31:41 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.26 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: service_list.c,v 1.27 2004/04/24 12:30:02 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.27 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 9,15 **** --- 9,17 ---- #include "headers.h" #include "ss_imp.h" #include "mbx_imp.h" + #ifdef USE_DLOPEN #include "shared_imp.h" + #endif #include "s_me.h" #include "s_elm.h" *************** *** 66,75 **** }; ! const struct service_type * IMAP_SERVICE = & SERVICE_TYPES[1]; ! const struct service_type * POP_SERVICE = & SERVICE_TYPES[2]; ! const struct service_type * SUBMISSION_SERVICE = & SERVICE_TYPES[3]; ! const struct service_type * SMTP_SERVICE = & SERVICE_TYPES[4]; static void zero_service_entry P_((struct service_entry *entry, --- 68,77 ---- }; ! CONST struct service_type * IMAP_SERVICE = & SERVICE_TYPES[1]; ! CONST struct service_type * POP_SERVICE = & SERVICE_TYPES[2]; ! CONST struct service_type * SUBMISSION_SERVICE = & SERVICE_TYPES[3]; ! CONST struct service_type * SMTP_SERVICE = & SERVICE_TYPES[4]; static void zero_service_entry P_((struct service_entry *entry, *************** *** 171,183 **** static int add_option_type_to_entry(entry,Y,prefix) struct service_entry *entry; struct SE_option_type * Y; ! const char * prefix; { entry->option_list = safe_realloc(entry->option_list, (entry->option_count+1) * sizeof (entry->option_list[0])); ! bzero( &(entry->option_list[entry->option_count]), sizeof (entry->option_list[0])); entry->option_list[entry->option_count].type = Y; --- 173,185 ---- static int add_option_type_to_entry(entry,Y,prefix) struct service_entry *entry; struct SE_option_type * Y; ! CONST char * prefix; { entry->option_list = safe_realloc(entry->option_list, (entry->option_count+1) * sizeof (entry->option_list[0])); ! bzero((void *) &(entry->option_list[entry->option_count]), sizeof (entry->option_list[0])); entry->option_list[entry->option_count].type = Y; Index: elm2.4.ME+.116-cvs/lib/shared_all.c *** elm2.4.ME+.115/lib/shared_all.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/shared_all.c 2004-04-24 19:33:20.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: shared_all.c,v 1.2 2004/03/28 13:37:39 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.2 $ $State: Exp $ * * Author: Kari Hurtta *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: shared_all.c,v 1.3 2004/04/24 16:33:20 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.3 $ $State: Exp $ * * Author: Kari Hurtta *****************************************************************************/ *************** *** 78,85 **** if (reg_code1(i,k)) { i->regs[reg_idx].valid = 0; /* remove form use-library */ ! mark_changed(shared_lib_lists[j]); ! mark_changed(&use_shared_all); shared_lib_lists[j]->libraries_loaded = 0; --- 78,85 ---- if (reg_code1(i,k)) { i->regs[reg_idx].valid = 0; /* remove form use-library */ ! mark_changed((void *)shared_lib_lists[j]); ! mark_changed((void *)&use_shared_all); shared_lib_lists[j]->libraries_loaded = 0; *************** *** 196,202 **** if (reg_code1(I,m)) { found++; ! mark_changed(shared_lib_lists[k]); shared_lib_lists[k]->libraries_loaded = 0; } else { --- 196,202 ---- if (reg_code1(I,m)) { found++; ! mark_changed((void *)shared_lib_lists[k]); shared_lib_lists[k]->libraries_loaded = 0; } else { Index: elm2.4.ME+.116-cvs/lib/shared.c *** elm2.4.ME+.115/lib/shared.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/shared.c 2004-04-24 15:30:02.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: shared.c,v 1.54 2004/03/28 18:08:44 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.54 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: shared.c,v 1.55 2004/04/24 12:30:02 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.55 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 91,97 **** static wants_rand_bits_f no_wants_rand_bits; static void no_wants_rand_bits (buf,size,entropy_bits) ! const char *buf; int size; int entropy_bits; { --- 91,97 ---- static wants_rand_bits_f no_wants_rand_bits; static void no_wants_rand_bits (buf,size,entropy_bits) ! CONST char *buf; int size; int entropy_bits; { *************** *** 113,119 **** library_list[i] = safe_malloc(sizeof (* library_list[i]) ); ! bzero(library_list[i], sizeof (* library_list[i])); library_list[i]->valid = 0; library_list[i]->tag = safe_strdup(tag); --- 113,119 ---- library_list[i] = safe_malloc(sizeof (* library_list[i]) ); ! bzero((void *)library_list[i], sizeof (* library_list[i])); library_list[i]->valid = 0; library_list[i]->tag = safe_strdup(tag); *************** *** 808,814 **** } struct SE_option_type * get_option_type(prefix) ! const char *prefix; { int i; int idx1 = locate_and_load_library(prefix); --- 808,814 ---- } struct SE_option_type * get_option_type(prefix) ! CONST char *prefix; { int i; int idx1 = locate_and_load_library(prefix); Index: elm2.4.ME+.116-cvs/lib/shared_connect.c *** elm2.4.ME+.115/lib/shared_connect.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/shared_connect.c 2004-04-24 15:30:02.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: shared_connect.c,v 1.2 2004/03/28 13:37:39 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.2 $ $State: Exp $ * * Author: Kari Hurtta *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: shared_connect.c,v 1.3 2004/04/24 12:30:02 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.3 $ $State: Exp $ * * Author: Kari Hurtta *****************************************************************************/ *************** *** 449,456 **** void probe_pop_capa_lib(pop_capa_libs,pop_capa_libcount,capa,capa_args) struct POP_capa_libs * *pop_capa_libs; int * pop_capa_libcount; ! const char *capa; ! const char *capa_args; { int i; --- 449,456 ---- void probe_pop_capa_lib(pop_capa_libs,pop_capa_libcount,capa,capa_args) struct POP_capa_libs * *pop_capa_libs; int * pop_capa_libcount; ! CONST char *capa; ! CONST char *capa_args; { int i; *************** *** 622,628 **** void probe_imap_capa_lib(imap_capa_libs,imap_capa_libcount,capa) struct IMAP_capa_libs * *imap_capa_libs; int * imap_capa_libcount; ! const char *capa; { int i; --- 622,628 ---- void probe_imap_capa_lib(imap_capa_libs,imap_capa_libcount,capa) struct IMAP_capa_libs * *imap_capa_libs; int * imap_capa_libcount; ! CONST char *capa; { int i; Index: elm2.4.ME+.116-cvs/lib/streamsched.c *** elm2.4.ME+.115/lib/streamsched.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/streamsched.c 2004-04-24 15:30:02.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: streamsched.c,v 1.33 2004/03/27 18:31:41 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.33 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: streamsched.c,v 1.34 2004/04/24 12:30:02 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.34 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 10,16 **** --- 10,18 ---- #include "headers.h" #include "ss_imp.h" #include "mbx_imp.h" + #ifdef USE_DLOPEN #include "shared_imp.h" + #endif DEBUG_VAR(Debug,__FILE__,"net"); Index: elm2.4.ME+.116-cvs/lib/string.c *** elm2.4.ME+.115/lib/string.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/lib/string.c 2004-04-24 15:30:02.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: string.c,v 1.38 2004/03/27 18:31:41 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.38 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: string.c,v 1.39 2004/04/24 12:30:02 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.39 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 838,844 **** /* result is malloced */ void bytestream_from_string(str,res,reslen) ! const struct string *str; char **res; int *reslen; { --- 838,844 ---- /* result is malloced */ void bytestream_from_string(str,res,reslen) ! CONST struct string *str; char **res; int *reslen; { Index: elm2.4.ME+.116-cvs/Makefile-1.SH *** elm2.4.ME+.115/Makefile-1.SH 2004-01-24 13:51:43.000000000 +0200 --- elm2.4.ME+.116-cvs/Makefile-1.SH 2004-05-02 19:58:30.000000000 +0300 *************** *** 27,33 **** echo "Extracting Makefile-1 (with variable substitutions)" cat >Makefile-1 <Makefile-1 < (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: mimewalk.c,v 1.6 2004/04/24 12:30:03 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.6 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 24,30 **** ret = safe_malloc(sizeof(*ret)); /* bzero is defined hdrs/defs.h */ ! bzero(ret,sizeof (*ret)); ret->magic = WALKHANDLER_magic; ret->handler_type = t; --- 24,30 ---- ret = safe_malloc(sizeof(*ret)); /* bzero is defined hdrs/defs.h */ ! bzero((void *)ret,sizeof (*ret)); ret->magic = WALKHANDLER_magic; ret->handler_type = t; Index: elm2.4.ME+.116-cvs/melib/pgp_decode.c *** elm2.4.ME+.115/melib/pgp_decode.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/melib/pgp_decode.c 2004-04-24 19:33:20.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: pgp_decode.c,v 1.38 2004/03/27 18:31:43 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.38 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: pgp_decode.c,v 1.39 2004/04/24 16:33:20 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.39 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 290,296 **** array[1] = pgp_child_out[0]; array[2] = -1; ! rs->ext_init_data = &array; rs->ext_init = close_them; env[0] = NULL; --- 290,296 ---- array[1] = pgp_child_out[0]; array[2] = -1; ! rs->ext_init_data = array; rs->ext_init = close_them; env[0] = NULL; Index: elm2.4.ME+.116-cvs/nls/C/C/C/s_elm.m *** elm2.4.ME+.115/nls/C/C/C/s_elm.m 2004-03-16 21:17:43.000000000 +0200 --- elm2.4.ME+.116-cvs/nls/C/C/C/s_elm.m 2004-05-01 22:08:19.000000000 +0300 *************** *** 1013,1024 **** 562 \n\rNotice:\n\r\ ELM requires the use of a folders directory to store your mail folders in.\n\r\ Shall I create the directory %s for you (%c/%c/q)? %c%c - $ #TooManyWeedHeaders - 563 Too many weed headers! Leaving... - $ #TooManyWeedPmalloc - 564 Too many weed headers! Out of memory! Leaving... - $ #NoMemDefaultWeed - 565 Not enough memory for default weedlist. Leaving. $ #CannotInitErrorExpanding 566 Cannot initialize "%s" - error expanding "%s". $ #CouldntMakeTempFileName --- 1013,1018 ---- *************** *** 1915,1922 **** 1042 Skip recipients $ #BadValueInElmrc 1043 Value of "%s" in line %d in "%s" file is bad $ #FailedLeaveFolderQuit ! 1045 Failed to leave folder: Try to quit again ([P]anic) ? %c%c $ #NoItemToMarkUnread 1047 No %S to mark as unread! $quote " --- 1909,1918 ---- 1042 Skip recipients $ #BadValueInElmrc 1043 Value of "%s" in line %d in "%s" file is bad + $quote " $ #FailedLeaveFolderQuit ! 1045 "Failed to leave folder: Try to quit again ? ([P]anic/%c/%c) " ! $quote $ #NoItemToMarkUnread 1047 No %S to mark as unread! $quote " *************** *** 2055,2061 **** 2031 save copy $quote ' $ #NoReceived ! 2032 '"received" folder not available, continue? (%c/%c) ' $quote " $ #FileSpecify1 2033 "\n\r\n\rYou must specify a file to " --- 2051,2057 ---- 2031 save copy $quote ' $ #NoReceived ! 2032 '"received" folder not available, continue leaving folder? ([P]anic/%c/%c) ' $quote " $ #FileSpecify1 2033 "\n\r\n\rYou must specify a file to " *************** *** 2301,2303 **** --- 2297,2301 ---- $quote " $ #PgpRcvSure 2151 "The recv'd message was PGP encoded, are you sure? " + $ #FailedLeaveChange + 2152 "Failed to leave folder: Try to change again ? ([P]anic/%c/%c) " Index: elm2.4.ME+.116-cvs/src/browser.c *** elm2.4.ME+.115/src/browser.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/src/browser.c 2004-04-24 19:33:20.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: browser.c,v 1.29 2004/03/27 18:31:44 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: browser.c,v 1.30 2004/04/24 16:33:20 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.30 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 1281,1287 **** struct string **buffer; int * redraw; enum word_sel w; ! string * prev_fold; struct AliasView *aview; CONST char *format; CONST char *msg; --- 1281,1287 ---- struct string **buffer; int * redraw; enum word_sel w; ! struct string * prev_fold; struct AliasView *aview; CONST char *format; CONST char *msg; Index: elm2.4.ME+.116-cvs/src/in_utils.c *** elm2.4.ME+.115/src/in_utils.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/src/in_utils.c 2004-05-02 14:15:26.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: in_utils.c,v 1.35 2004/03/27 18:31:45 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.35 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: in_utils.c,v 1.37 2004/05/02 11:15:26 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.37 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 46,51 **** --- 46,187 ---- #define erase_a_char() { Writechar(BACKSPACE); Writechar(' '); \ Writechar(BACKSPACE); FlushBuffer(); } + int prompt_letter( + #if ANSI_C + int line, char *letters, int def, + int flags, + struct menu_context *page, + const char * format, const char *msg, ... + #else + line, letters, def, flags, page, format, msg, va_alist + #endif + ) + #if !ANSI_C + int line; + char *letters; + int def; + int flags; + struct menu_context *page; + CONST char * format; + CONST char *msg; + va_dcl + #endif + { + struct string *question = NULL; + + int ch; + int center = flags & PROMPT_center; + int yesno = flags & PROMPT_yesno; + int mark = flags & PROMPT_redraw_mark; + int ctrlL = flags & PROMTP_ctrlL; + int cols = 0; + + + va_list vl; + + Va_start(vl, msg); /* defined in defs.h */ + question = elm_smessage(0,format,msg,vl); + va_end(vl); + + do { + int LINES, COLUMNS; + int l; + char *x; + + menu_get_sizes(page,&LINES, &COLUMNS); + + /* FIXME: Not correct */ + l = string_len(question); + cols = COLUMNS - ( l + 5 ); /* 5 for "Yes." + 1 */ + if (cols < 0) { + cols = 0; + } + + + MoveCursor(line, (center || (cols < 2)) ? 0 : cols-2); + CleartoEOLN(); + + PutLineX(line, center ? cols/2 : cols, + FRM("%S%c%c"), question, def, BACKSPACE); + FlushBuffer(); + + ch = menu_ReadCh(page, REDRAW_MARK); + if (ch == REDRAW_MARK) { + if (mark) + break; + continue; + } + + if (PROMTP_ctrlL && ch == ('L'&31)) { + break; + } + + if (ch == EOF) + break; + + /* Look first letters without lowercasing */ + for (x = letters; *x; x++) { + + if (ch == *x) { + Writechar(ch); + goto out; + } + } + + if(ch == '\n' || ch == '\r') + ch = def; + else { + #ifdef ASCII_CTYPE + if (isascii(ch)) + #endif + ch = tolower(ch); + } + + for (x = letters; *x; x++) { + + if (ch == *x) { + Writechar(ch); + goto out; + } + } + + if(ch == *def_ans_yes && yesno) { + Write_to_screen(CATGETS(elm_msg_cat, ElmSet, ElmYesWord, "Yes.")); + break; + } else if (ch == *def_ans_no && yesno) { + Write_to_screen(CATGETS(elm_msg_cat, ElmSet, ElmNoWord, "No.")); + break; + } + + Writechar('?'); + FlushBuffer(); + #if POLL_METHOD + wait_for_timeout(1); + #else + sleep(1); + #endif + + } while (EOF != ch); + + + out: + FlushBuffer(); + + if (EOF != ch && REDRAW_MARK != ch && ('L'&31) != ch) { + if (sleepmsg > 0) { + #if POLL_METHOD + wait_for_timeout((sleepmsg + 1) / 2); + #else + sleep((sleepmsg + 1) / 2); + #endif + } + MoveCursor(line, (center || (cols < 2)) ? 0 : cols-2); + CleartoEOLN(); + } + + return ch; + } + int want_to(question, dflt, where, clear_and_center, page) char *question; int dflt; *************** *** 60,66 **** **/ int ch, cols; int LINES, COLUMNS; ! redraw: menu_get_sizes(page,&LINES, &COLUMNS); --- 196,202 ---- **/ int ch, cols; int LINES, COLUMNS; ! redraw: menu_get_sizes(page,&LINES, &COLUMNS); *************** *** 88,114 **** ch = tolower(ch); while (!( ch == *def_ans_yes || ch == *def_ans_no || ch == '\n' || ch == '\r')) { ! ch = menu_ReadCh(page,REDRAW_MARK); ! if (ch == REDRAW_MARK) ! goto redraw; ! if (ch == EOF) { ! leave(0, ¤t_mailbox,¤t_aliaslist); /* ???? global reference */ ! } #ifdef ASCII_CTYPE ! if (isascii(ch)) #endif ! ch = tolower(ch); } if(ch == '\n' || ch == '\r') ch = dflt; if(ch == *def_ans_yes) ! Write_to_screen(CATGETS(elm_msg_cat, ElmSet, ElmYesWord, "Yes.")); else if (ch == *def_ans_no) ! Write_to_screen(CATGETS(elm_msg_cat, ElmSet, ElmNoWord, "No.")); else { DPRINT(Debug,3,(&Debug,"want_to [%s]=%c\n",question,ch)); ! return(ch); /* Don't write anything, just return */ } FlushBuffer(); if (sleepmsg > 0) { --- 224,250 ---- ch = tolower(ch); while (!( ch == *def_ans_yes || ch == *def_ans_no || ch == '\n' || ch == '\r')) { ! ch = menu_ReadCh(page,REDRAW_MARK); ! if (ch == REDRAW_MARK) ! goto redraw; ! if (ch == EOF) { ! leave(0, ¤t_mailbox,¤t_aliaslist); /* ???? global reference */ ! } #ifdef ASCII_CTYPE ! if (isascii(ch)) #endif ! ch = tolower(ch); } if(ch == '\n' || ch == '\r') ch = dflt; if(ch == *def_ans_yes) ! Write_to_screen(CATGETS(elm_msg_cat, ElmSet, ElmYesWord, "Yes.")); else if (ch == *def_ans_no) ! Write_to_screen(CATGETS(elm_msg_cat, ElmSet, ElmNoWord, "No.")); else { DPRINT(Debug,3,(&Debug,"want_to [%s]=%c\n",question,ch)); ! return(ch); /* Don't write anything, just return */ } FlushBuffer(); if (sleepmsg > 0) { *************** *** 858,868 **** int optionally_enter2 ( #if ANSI_C struct menu_context *page, ! struct string **buffer, ! int x, int y, int flags, ! const char * format, const char *msg, ... #else ! page, buffer, x, y, flags, format, msg, va_alist #endif ) #if !ANSI_C --- 994,1004 ---- int optionally_enter2 ( #if ANSI_C struct menu_context *page, ! struct string **buffer, ! int x, int y, int flags, ! const char * format, const char *msg, ... #else ! page, buffer, x, y, flags, format, msg, va_alist #endif ) #if !ANSI_C Index: elm2.4.ME+.116-cvs/src/leavembox.c *** elm2.4.ME+.115/src/leavembox.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/src/leavembox.c 2004-05-02 14:15:26.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: leavembox.c,v 1.44 2004/03/27 18:31:45 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.44 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: leavembox.c,v 1.46 2004/05/02 11:15:26 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.46 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 734,748 **** if (need_handle) { if (!can_store) { ! char answer = '\0'; ! char * buffer = elm_message(CATGETS(elm_msg_cat, ElmSet, ! ElmNoReceived, ! "\"received\" folder not available, continue? (%c/%c) "), *def_ans_yes, *def_ans_no); ! answer = want_to(buffer, *def_ans_no, LINES-4, 0, ! page); if (answer != *def_ans_yes) { return_value = -2; /* failure */ --- 734,762 ---- if (need_handle) { if (!can_store) { ! int answer = '\0'; ! again1: ! menu_get_sizes(page, &LINES, &COLUMNS); ! ! /* NOTICE: prompt_letter may return EOF */ ! answer = prompt_letter(LINES-4,"P",*def_ans_yes, ! PROMPT_center|PROMPT_yesno| ! PROMPT_redraw_mark|PROMTP_ctrlL, ! page, ! CATGETS(elm_msg_cat, ElmSet, ! ElmNoReceived, ! "\"received\" folder not available, continue leaving folder? ([P]anic/%c/%c) "), *def_ans_yes, *def_ans_no); ! ! if (answer == ('L'&31) || answer == REDRAW_MARK) { ! menu_ClearScreen(page); ! goto again1; ! } ! ! if (answer == 'P' || answer == EOF) ! emergency_exit(0); if (answer != *def_ans_yes) { return_value = -2; /* failure */ Index: elm2.4.ME+.116-cvs/src/messages/digest.c *** elm2.4.ME+.115/src/messages/digest.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/src/messages/digest.c 2004-04-24 15:30:03.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: digest.c,v 1.9 2004/03/27 18:31:48 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.9 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: digest.c,v 1.10 2004/04/24 12:30:03 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.10 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 39,45 **** mbx->u.digest = safe_malloc(sizeof (* (mbx->u.digest))); /* bzero is defined hdrs/defs.h */ ! bzero(mbx->u.digest, sizeof (* (mbx->u.digest))); mbx->u.digest->the_digest = NULL; mbx->u.digest->digest_count = 0; --- 39,45 ---- mbx->u.digest = safe_malloc(sizeof (* (mbx->u.digest))); /* bzero is defined hdrs/defs.h */ ! bzero((void *)mbx->u.digest, sizeof (* (mbx->u.digest))); mbx->u.digest->the_digest = NULL; mbx->u.digest->digest_count = 0; Index: elm2.4.ME+.116-cvs/src/messages/messages.c *** elm2.4.ME+.115/src/messages/messages.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/src/messages/messages.c 2004-04-24 15:30:03.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: messages.c,v 1.12 2004/03/27 18:31:48 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.12 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: messages.c,v 1.13 2004/04/24 12:30:03 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.13 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 23,29 **** ret = safe_malloc(sizeof (*ret)); /* bzero is defined hdrs/defs.h */ ! bzero(ret,sizeof (*ret)); ret->magic = MAILBOXVIEW_magic; ret->mailbox_type = t; --- 23,29 ---- ret = safe_malloc(sizeof (*ret)); /* bzero is defined hdrs/defs.h */ ! bzero((void *)ret,sizeof (*ret)); ret->magic = MAILBOXVIEW_magic; ret->mailbox_type = t; Index: elm2.4.ME+.116-cvs/src/messages/partial.c *** elm2.4.ME+.115/src/messages/partial.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/src/messages/partial.c 2004-04-24 15:30:03.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: partial.c,v 1.14 2004/03/27 18:31:48 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.14 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: partial.c,v 1.15 2004/04/24 12:30:03 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.15 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 27,33 **** mbx->u.partial = safe_malloc(sizeof (* (mbx->u.partial))); /* bzero is defined hdrs/defs.h */ ! bzero(mbx->u.partial, sizeof (* (mbx->u.partial))); mbx->u.partial->parent_mailbox = NULL; --- 27,33 ---- mbx->u.partial = safe_malloc(sizeof (* (mbx->u.partial))); /* bzero is defined hdrs/defs.h */ ! bzero((void *)mbx->u.partial, sizeof (* (mbx->u.partial))); mbx->u.partial->parent_mailbox = NULL; Index: elm2.4.ME+.116-cvs/src/messages/storage.c *** elm2.4.ME+.115/src/messages/storage.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/src/messages/storage.c 2004-04-24 15:30:03.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: storage.c,v 1.6 2004/03/27 18:31:48 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.6 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: storage.c,v 1.7 2004/04/24 12:30:03 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.7 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 30,36 **** mbx->u.storage = safe_malloc(sizeof (* (mbx->u.storage))); /* bzero is defined hdrs/defs.h */ ! bzero(mbx->u.storage, sizeof (* (mbx->u.storage))); mbx->u.storage->the_mailbox = NULL; mbx->u.storage->mailbox_count = 0; --- 30,36 ---- mbx->u.storage = safe_malloc(sizeof (* (mbx->u.storage))); /* bzero is defined hdrs/defs.h */ ! bzero((void *)mbx->u.storage, sizeof (* (mbx->u.storage))); mbx->u.storage->the_mailbox = NULL; mbx->u.storage->mailbox_count = 0; Index: elm2.4.ME+.116-cvs/src/out_utils.c *** elm2.4.ME+.115/src/out_utils.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/src/out_utils.c 2004-04-24 19:33:20.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: out_utils.c,v 1.23 2004/03/27 18:31:46 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.23 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: out_utils.c,v 1.25 2004/04/24 16:33:20 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.25 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 203,217 **** char buffer[200]; int oldstate = RawState(); int LINES, COLUMNS; - struct menu_context *cpage; ! cpage = Raw(ON); ! ! menu_get_sizes(default_context,&LINES, &COLUMNS); buffer[0] = '\0'; redraw: PutLine0(LINES-3, 0,str); CleartoEOS(); show_last_error(); --- 203,216 ---- char buffer[200]; int oldstate = RawState(); int LINES, COLUMNS; ! struct menu_context *cpage = Raw(ON); buffer[0] = '\0'; redraw: + menu_get_sizes(cpage,&LINES, &COLUMNS); + PutLine0(LINES-3, 0,str); CleartoEOS(); show_last_error(); *************** *** 300,306 **** #endif ) #if !ANSI_C - int lineY; CONST char *format; CONST char *line; va_dcl --- 299,304 ---- Index: elm2.4.ME+.116-cvs/src/quit.c *** elm2.4.ME+.115/src/quit.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/src/quit.c 2004-05-02 14:15:26.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: quit.c,v 1.36 2004/03/27 18:31:46 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.36 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: quit.c,v 1.40 2004/05/02 11:15:26 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.40 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 43,50 **** int status; int LINES, COLUMNS; - menu_get_sizes(page, &LINES, &COLUMNS); - status = leave_mbox(FALSE, TRUE, prompt, NULL, *mailbox, header_page, page); if ( status == -1) --- 43,48 ---- *************** *** 65,98 **** return; again1: ! PutLineX(LINES-1,2, ! CATGETS(elm_msg_cat, ElmSet, ElmFailedLeaveFolderQuit, ! "Failed to leave folder: Try to quit again ? %c%c"), ! *def_ans_no,BACKSPACE); ! CleartoEOLN(); ! ! do { ! ans = menu_ReadCh(page,REDRAW_MARK); ! if (ans == REDRAW_MARK) ! goto again1; ! if (ans == ('L'&31)) { ! menu_ClearScreen(page); ! goto again1; ! } ! ans = tolower(ans); ! ! if (ans == *def_ans_no || '\r' == ans || '\n' == ans) { ! Write_to_screen(CATGETS(elm_msg_cat, ElmSet, ElmNoWord, ! "No.")); ! return; ! } ! if (ans == *def_ans_yes) { ! Write_to_screen(CATGETS(elm_msg_cat, ElmSet, ElmYesWord, ! "Yes.")); ! clear_error(); ! goto requit; ! } ! } while(1); } } leave(0, mailbox,aview); --- 63,96 ---- return; again1: ! menu_get_sizes(page, &LINES, &COLUMNS); ! ! /* NOTICE: prompt_letter may return EOF */ ! ans = prompt_letter(LINES-1,"P",*def_ans_no, ! PROMPT_center|PROMPT_yesno| ! PROMPT_redraw_mark|PROMTP_ctrlL, ! page, ! CATGETS(elm_msg_cat, ElmSet, ElmFailedLeaveFolderQuit, ! "Failed to leave folder: Try to quit again ? ([P]anic/%c/%c) "), ! *def_ans_yes, *def_ans_no); ! ! if (ans == ('L'&31) || ans == REDRAW_MARK) { ! menu_ClearScreen(page); ! goto again1; ! } ! ! if (ans == *def_ans_no) ! return; ! ! if (ans == *def_ans_yes) { ! clear_error(); ! goto requit; ! } ! ! if (ans == 'P' || ans == EOF) ! emergency_exit(0); ! ! return; } } leave(0, mailbox,aview); *************** *** 294,303 **** sleep_message(); again1: ! /* TODO -- CATGETS */ ! ans = want_to("Failed to leave folder: Try to change again ? [P]anic", ! *def_ans_no,LINES-1,1,page); ! if (ans == ('L'&31)) { redraw = 1; menu_ClearScreen(page); goto again1; --- 292,310 ---- sleep_message(); again1: ! menu_get_sizes(page, &LINES, &COLUMNS); ! ! /* NOTICE: prompt_letter may return EOF */ ! ans = prompt_letter(LINES-1,"P",*def_ans_no, ! PROMPT_center|PROMPT_yesno| ! PROMPT_redraw_mark|PROMTP_ctrlL, ! page, ! CATGETS(elm_msg_cat, ElmSet, ElmFailedLeaveChange, ! "Failed to leave folder: Try to change again ? ([P]anic/%c/%c) "), ! *def_ans_yes, *def_ans_no); ! ! ! if (ans == ('L'&31) || ans == REDRAW_MARK) { redraw = 1; menu_ClearScreen(page); goto again1; *************** *** 312,318 **** clear_error(); goto rechange; } ! if (ans == 'P') emergency_exit(0); if (new_folder) { --- 319,325 ---- clear_error(); goto rechange; } ! if (ans == 'P' || ans == EOF) emergency_exit(0); if (new_folder) { Index: elm2.4.ME+.116-cvs/src/read_rc.c *** elm2.4.ME+.115/src/read_rc.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/src/read_rc.c 2004-05-01 22:08:19.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: read_rc.c,v 1.24 2004/03/27 18:31:46 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.24 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: read_rc.c,v 1.26 2004/05/01 19:08:19 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.26 $ $State: Exp $ * * Modified by: Kari Hurtta * (was hurtta+elm@ozone.FMI.FI) *************** *** 275,303 **** extern char *sort_name(), *alias_sort_name(); if (DT_SYN == save_info[i].dt_type || ! DT_MLT == save_info[i].dt_type || ! /* not dumping addresses to debug file */ ! DT_ALT == save_info[i].dt_type) ! continue; ! ! if (DT_WEE == save_info[i].dt_type) { ! ! DPRINT(Debug,1,(&Debug, ! "\nAnd we're skipping the following headers:\n\t")); ! ! for (len = 8, j = 0; j < weedcount; j++) { ! if (weedlist[j][0] == '*') continue; /* skip '*end-of-defaults*' */ ! if (len + strlen(weedlist[j]) > 80) { ! DPRINT(Debug,1,(&Debug, " \n\t")); ! len = 8; ! } ! DPRINT(Debug,1,(&Debug, "%s ", weedlist[j])); ! len += strlen(weedlist[j]) + 3; ! } ! DPRINT(Debug,1,(&Debug, "\n\n")); ! continue; ! } ! { /* Not very effective */ FILE * X = debug_to_FILE(&Debug); --- 275,282 ---- extern char *sort_name(), *alias_sort_name(); if (DT_SYN == save_info[i].dt_type || ! DT_MLT == save_info[i].dt_type) ! continue; { /* Not very effective */ FILE * X = debug_to_FILE(&Debug); Index: elm2.4.ME+.116-cvs/src/screen/context.c *** elm2.4.ME+.115/src/screen/context.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/src/screen/context.c 2004-04-24 15:30:03.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: context.c,v 1.3 2004/03/27 18:31:48 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.3 $ $State: Exp $ * * Author: Kari Hurtta *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: context.c,v 1.4 2004/04/24 12:30:03 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.4 $ $State: Exp $ * * Author: Kari Hurtta *****************************************************************************/ *************** *** 41,47 **** struct menu_context *ret = safe_malloc(sizeof (*ret)); /* bzero is defined hdrs/defs.h */ ! bzero(ret,sizeof (*ret)); ret->magic = MENU_CONTEXT_magic; --- 41,47 ---- struct menu_context *ret = safe_malloc(sizeof (*ret)); /* bzero is defined hdrs/defs.h */ ! bzero((void *)ret,sizeof (*ret)); ret->magic = MENU_CONTEXT_magic; Index: elm2.4.ME+.116-cvs/utils/elmregister.c *** elm2.4.ME+.115/utils/elmregister.c 2004-03-30 19:38:44.000000000 +0300 --- elm2.4.ME+.116-cvs/utils/elmregister.c 2004-05-02 20:16:48.000000000 +0300 *************** *** 1,7 **** ! static char rcsid[] = "@(#)$Id: elmregister.c,v 1.15 2004/03/27 18:31:49 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.15 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ --- 1,7 ---- ! static char rcsid[] = "@(#)$Id: elmregister.c,v 1.18 2004/05/02 17:16:48 hurtta Exp $"; /****************************************************************************** ! * The Elm (ME+) Mail System - $Revision: 1.18 $ $State: Exp $ * * Author: Kari Hurtta (was hurtta+elm@ozone.FMI.FI) *****************************************************************************/ *************** *** 22,27 **** --- 22,29 ---- * -- copy file * * 'F' user group mode filename '\n' + * 'd' user group mode filename '\n' (document) + * 's' user group mode filename '\n' (stage file) * * -- create directory * *************** *** 322,327 **** --- 324,330 ---- switch (c) { case 'F': + case 'd': user_ptr = ptr; add_bytes(F,buffer1,&ptr); /* user */ group_ptr = ptr; add_bytes(F,buffer1,&ptr); /* group */ mode_ptr = ptr; add_bytes(F,buffer1,&ptr); /* mode */ *************** *** 700,705 **** --- 703,709 ---- case '{': case 's': case 'F': + case 'd': case 'C': if (ptr2->arg_ptrs && ptr2->arg_ptrs[0] && *************** *** 1021,1026 **** --- 1025,1032 ---- } + + read_pipe = create_pipe(argc,argv,x,&PID,installer_root); fd = fdopen(read_pipe,"r"); *************** *** 1146,1153 **** /* NOTE: LI leaked ... */ - - return 0; } --- 1152,1157 ---- *************** *** 1697,1706 **** #endif /* DIROPS */ ! static void make_argcopy P_((char *arg, int arg_len)); ! static void make_argcopy(arg,arg_len) char *arg; int arg_len; { struct stat X; --- 1701,1711 ---- #endif /* DIROPS */ ! static void make_argcopy P_((char *arg, int arg_len, char * stage_subdir )); ! static void make_argcopy(arg,arg_len, stage_subdir) char *arg; int arg_len; + char * stage_subdir; { struct stat X; *************** *** 1773,1778 **** --- 1778,1786 ---- } n = strlen(stage_dir) + arg_len; + if (stage_subdir) { + n += strlen(stage_subdir) + 1; + } target_r = malloc(n); if (!target_r) { fprintf(stderr,"%s: malloc %d bytes failed\n", *************** *** 1782,1787 **** --- 1790,1833 ---- strcpy(target_r,stage_dir+1); strcat(target_r,"/"); + if (stage_subdir) { + char * Y; + int n1; + + strcat(target_r,stage_subdir); + + n1 = strlen(installer_root) + strlen(target_r) + 3; + + Y = malloc(n1); + if (!Y) { + fprintf(stderr,"%s: malloc %d bytes failed\n", + program_name,n1); + exit(1); /* FAILURE */ + } + + strcpy(Y,installer_root); + strcat(Y,"/"); + strcat(Y,target_r); + + + + if (0 == mkdir(Y,0755)) { + fprintf(stdout, + "%s: Directory %s created\n", + program_name,Y); + } else if (errno != EEXIST) { + fprintf(stderr, + "%s: Failed to create %s directory\n", + program_name,Y); + exit(1); + } + + + free(Y); + + strcat(target_r,"/"); + } + y = strrchr(bufferz,'/'); if (y) strcat(target_r,y+1); *************** *** 2108,2113 **** --- 2154,2160 ---- (cmd = argv[x]) && ( 0 == strcmp("copy", argv[x]) || + 0 == strcmp("copydoc", argv[x]) || 0 == strcmp("mkdir", argv[x]) )) { uid_t id_user = (uid_t)-1; *************** *** 2340,2346 **** return 1; /* FAILURE */ } ! log_it("F",target_r,s_user, s_group, f_mode); free(source_r); free(source_f); free(target_r); free(target_f); --- 2387,2396 ---- return 1; /* FAILURE */ } ! if (0 == strcmp("copydoc",cmd)) ! log_it("d",target_r,s_user, s_group, f_mode); ! else ! log_it("F",target_r,s_user, s_group, f_mode); free(source_r); free(source_f); free(target_r); free(target_f); *************** *** 2353,2361 **** --- 2403,2420 ---- char buffer[ MAX_PIPE_LOG]; char *ptr; + char * stage_subdir = NULL; int L = 4; + if (x < argc -1 && 0 == strcmp("-s", argv[x])) { + int l; + + stage_subdir = argv[x+1]; + x += 2; + } + + if (argc - x >= MAX_ARGS) { fprintf(stderr, "%s: %s too many arguments\n", *************** *** 2367,2374 **** int z; if ('{' == argv[j][0] && (z = strlen(argv[j])) && '}' == argv[j][z-1]) { ! ! make_argcopy(argv[j],z); } L += strlen(argv[j]) +1; --- 2426,2432 ---- int z; if ('{' == argv[j][0] && (z = strlen(argv[j])) && '}' == argv[j][z-1]) { ! make_argcopy(argv[j],z, stage_subdir); } L += strlen(argv[j]) +1; *************** *** 2705,2711 **** break; case 'F': ! pick_one(ptr,&src,L,&id_user,&id_group,&mode,&is_dir); --- 2763,2769 ---- break; case 'F': ! case 'd': pick_one(ptr,&src,L,&id_user,&id_group,&mode,&is_dir); *************** *** 2792,2797 **** --- 2850,2856 ---- case '{': case 's': case 'F': + case 'd': case 'C': case 'M': *************** *** 2870,2875 **** --- 2929,2935 ---- case 'M': case '{': case 'F': + case 'd': case 'C': if (ptr->arg_ptrs && ptr->arg_ptrs[0]) { *************** *** 3077,3082 **** --- 3137,3143 ---- break; case 'F': + case 'd': case 's': /* also handled by unstage_list() */ if (ptr->arg_ptrs && ptr->arg_ptrs[0]) { *************** *** 3188,3193 **** --- 3249,3255 ---- break; case 'F': + case 'd': case 'C': case 'L': /* link */ case 'M': *************** *** 3407,3412 **** --- 3469,3475 ---- case 'M': case 'F': + case 'd': case 'C': p = NULL;