PCOAKHST.TXT History of changes to the PCOak mail program (based on PCElm) =============================================================================== *PLEASE NOTE* : PCOak is *NOT* in any way supported by Demon Internet; it is an entirely unofficial program based on the Demon Internet version of PCElm, and is being developed by users of PCElm as a more stable, less buggy, and better featured replacement for PCElm. Demon WILL NOT support this software; but it is being actively developed, and reports of problems, bugs etc. may be more likely to elicit a timely response than complaints to Demon about the "officially supported" PCElm software. PCOak is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 1, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. See the file COPYING, which contains a copy of the GNU General Public License. =============================================================================== Version numbering: in general, "stable" releases of PCOak will have "major.minor" version numbers only: 0.1, 0.2, 1.4 etc. Versions which also have a third "patchlevel" number (0.0.9, 0.1.1, 1.4.3 etc.) are broadly regarded as "test" versions which are closer to the cutting edge, and therefore may not be suitable for use by particularly cautious users, unless announcements about particular versions are made to the contrary. =============================================================================== PCOak 0.2.1 Simon Turner, Pete Disdale 27 March 2006 =============================================================================== PCOak development stalled again in late 2003, but is picking up again in 2006. 0.2.1 is intended to be a "last hurrah" for the old "full" version (with all the ancient baggage of Internet/uucp support, dot menu, MMDF support and the internal editor); the next version (already under development) will dispense with these historical artefacts to allow easier development in future. 0.2.1 is based on an internal version that Simon has been using for over two years, with some recent amendments; while these new amendments have been carefully checked, and 0.2.1 should therefore be safe for use by anyone, it should initially be regarded as a "test" version (hence the x.y.z numbering). If no faults are reported, it may be re-graded to "known safe" but is unlikely to be re-released with a different version number. Changes since 0.2 that affect the user, in no particular order, are: -- Functionality enhancements: 1 New scrolling single-line editor for long prompts (e.g. "To:"): "overflow" characters at each end indicate if scrolled text is available (configurable: see items 15 & 16); improved cursor movement; new deletion commands (Ctrl-Backspace, Ctrl-Home, Ctrl-End) 2 Basic MIME header decoding for "From:" and "Subject:" header fields (see items 9 & 14 below) 3 Intelligent change-tracking system (e.g. deleting and then undeleting a message no longer marks the mailbox as "changed") 4 Optional KA9Q-style file locking: locks all mailbox/folder files and sequence file while they are read/written (see item 13 below) 5 Improve invalid format date parsing; date sorting also works better for messages with invalid or missing dates 6 Subject search pattern now defaults to previous search instead of being blank each time 7 Help screen revised and updated to match current commands; 4-line help display on index page revised to match reality 8 A separate "long subject" version of PCOak (0.2.1-L) is available, which stores longer subjects (this generally requires more memory than the regular version); subject display length on the index page is controlled with the left- and right-arrow keys, which allow three different subject lengths to be shown at the expense of other parts of the display (see item 18 below) -- New commands: 9 '=' toggles MIME header decoding on/off -- New config options (see sample PCOAK.RC file): 10 "boxchars" optionally redefines box- and separator-drawing characters 11 "colors" may have an optional 7th value, which defines the colour for the text overflow indicators (see items 1 & 16) [def: selection bar] 12 "confirmdelete" option to confirm deletion of messages [def: off] 13 "locking" turns file locking on/off [def: on] 14 "mimehdrdecode" sets initial setting for "From:" and "Subject:" MIME header decoding [def: off] 15 "sequence" entry may specify full path instead of name in mailqdir 16 "textoverind" overrides/disables text overflow indicators (see items 1 & 11 above) [def: < >] 17 "yeardispsep" defines separator character for index page year display [def: space] 18 (0.2.1-L only) "subjectsize" defines initial long subject display setting (0-2) [def: 0] -- Other changes: 19 The cursor is hidden during major screen updates (reduces flicker) 20 Some file-reading sanity checks are done at the end of mailbox reading 21 "Create new folder" prompt now says "Y/N" instead of "Y\N" 22 Index screen says "Folder =name" (instead of "Mailbox =name") when viewing a folder 23 Centred information lines are now properly centred =============================================================================== PCOak 0.2 Simon Turner, Pete Disdale 14 November 2003 =============================================================================== PCOak development stalled in late 2002 for various reasons (mostly lack of time); several major changes had been made, not least a (sadly not quite complete) total overhaul of the file reading and writing code, leaving a codebase that needed quite a lot of work to get it to a releasable state. Meanwhile, the venerable 0.1.1 release was still in "beta"; it contained a few minor bugs (and one major one, left over from PCElm -- see below) which needed to be corrected before it could be declared a "stable" release, so the focus moved from completing the major changes dormant since 2002, to fixing the known bugs in 0.1.1 and releasing a stable 0.2. More "exciting" development can now restart from this new stable release, with fewer changes being attempted at once! (One day I'll learn.) After 18 months of use, 0.1.1 is known to work well. 0.2 is functionally identical to 0.1.1, with a few fixes made which have been carefully tested. The changes have been deliberately restricted to fixing known issues with 0.1.1, so as not to affect stability; 0.2 should be a good stable release. Changes since 0.1.1, in order of bug index number, are: 1 An old PCElm bug which caused a spurious character to be printed at the end of a message being sent directly to a printer has been fixed (bug 053) 2 An unnecessary warning about buffer overrun when parsing long "Date:" headers has been removed (bug 054) 3 Message bodies in sent mail which started with whitespace are no longer merged with the message header before sending (fixes bug 055) 4 File type detection when transmitting files has been further improved; in particular, it now recognises ASCII files ending with Ctrl-Z as such, instead of regarding them as binary (fixes bug 056) 5 Spurious default search patterns are no longer offered when searching subjects from the index page (fixes bug 057) 6 When changing folder to one that doesn't exist, and creating a new empty folder, the message list is now properly cleared; it no longer displays the contents of the previous folder (fixes bug 060) 7 A long-hidden PCElm bug (bug 061) has been fixed: new mail added to a mailbox/folder since PCOak took its copy could be lost, if (a) PCOak had made changes to its copy and (b) the file was closed and updated before the regular "idle" scan had spotted the new mail =============================================================================== PCOak 0.1.1 Simon Turner, Pete Disdale 10 April 2002 =============================================================================== What was originally intended as a quick addition of a few extra features, for release within a month or two of 0.1, turned into a rather more substantial set of modifications, involving fixing all bar three of the known bugs and implementing 30 items from the wishlist, as well as some fairly substantial internal changes. Progress was badly affected from August 2001 onwards by various personal factors, but it is hoped that this should no longer be the case; a gap of almost 11 months between versions is ridiculous! After quite a lot of testing, PCOak 0.1.1 appears to work well and be a good improvement over 0.1. Due to the nature and scale of some of the modifications, it is entirely possible that problems exist; while the testing process hasn't shown up anything nasty, anything is possible. 0.1.1 should therefore be regarded initially as a "beta" release, which may not be suitable for more timid users. Changes since 0.1 that affect the user are (not in any particular order) ------------------------------------------------------------------------ -- Bug fixes: 1 The message list is now a doubly-linked list, rather than an array of pointers, which considerably increases the size of mailbox that can be read in without running out of memory (fixes bug 018) 2 When there is insufficient memory to read a mailbox, the failure is handled much more gracefully, and no memory is "lost" 3 Multiple-option prompt dialogs made more consistent, and correct width (some text/html prompts used to be 1 char too narrow; bug 027) 4 End of line detection is now much improved; extremely long lines should no longer pose a problem (fixes bug 029) 5 The "Reply-To:" line would sometimes be used instead of the "From:" line for attributions (bug 030); now fixed 6 Fixed "deleting penultimate msg from within pager goes back to index instead of reading next message" bug (bug 031) 7 File writing errors should now all be detected and reported (fixes bug 032) 8 Internal pager handles control characters (e.g. raw carriage return, backspace) properly (fixes bug 034) 9 MIME multipart boundary checking improved; poorly chosen boundaries shouldn't confuse things any more (fixes bug 035) 10 Cursor now positioned correctly on bottom-line prompts (fixes bug 036) 11 Fixed quoted-printable display glitch when wrapping at end of line (bug 038) 12 Bugs relating to "Status:" lines not always being added have been fixed (bug 039 in particular) 13 Fixed bug when skipping over an encoded section which is the whole message (bug 040) 14 Fixed bug with header weeding failing with long folded lines (bug 041) 15 Fixed bogus address shown on index screen if mail from you has no "To:" line (bug 042) 16 Fixed bug with first message length confusion if mailbox/folder doesn't begin with Start-Of-Header line (bug 043) 17 Fixed BIOS video bug with restoring wrong attribute after bold text (bug 044) 18 Removal of own address when group replying now case insensitive (fixes bug 046) 19 Fixed "current message confusion" bug when saving and immediately re-opening a changed folder, after an attempt to change to a non-existent folder fails (bug 047) 20 Header lines with no space after the ':' are now recognised correctly (fixes bug 049) 21 Replying to messages with "To: him ,her ,me" works properly (old versions didn't always remove your own address from the list, bug 050) 22 Fixed problems when message or transmitted file doesn't end with newline (bug 051) 23 Fixed Undelete/Delete display update bug, with one tagged message which wasn't the currently selected one (bug 052) 24 Always returns to starting directory after running external commands and shells, even if the drive letter was changed (old bug) -- New commands: 25 Allow '!' to run a shell from within the pager 26 'E' command reads message with external pager, just this once 27 'e' from within pager re-reads message with external pager, like 'E' -- New config options: 28 "confirmfoldcreate" option to confirm the creation of new folders 29 "confirmsendabort" option to confirm aborting a new message being sent 30 "cursors" entry to define sizes of overwrite and insert mode cursors (see item 49 below) 31 "enclong" option controls quoted-printable encoding of message bodies with long lines (see item 42 below) 32 "insertmode" option specifies initial insert/overwrite mode for line editing (see item 49 below) 33 "miscview" entry to override, or completely disable, the "program" command prompt shown after decoding an unknown attachment type 34 "prnweedlevel" specifies header weeding level for printing messages (see item 52 below) 35 "retendquit" option to allow at end of message to quit the pager 36 "usraddr" option to specify "local-part" of address separately from "user" entry, if desired 37 "viewdelread" option for whether 'd' in pager automatically reads next message 38 "viewnextunread" option for whether 'n' in pager automatically reads next unread message, rather than just selecting it in the index screen 39 "weedlist2", "weedlevel" and "weedstyle" control new header weeding (see items 51-52 below) 40 "yeardispage" option for messages older than a user-definable age to display year, not time, on index screen -- New functionality enhancements: 41 Dates are correctly parsed from the message "Date:" header field, including the timezone, with much better robustness when faced with non-compliant formats; sorting by date now uses date *and* time 42 Proper GTZ/TZ environment variable use; generated "Date:" timestamps now feature the correct timezone automatically, and the old "zone" config entry is no longer used 43 Some work on RFC 2822 compliance when generating messages: - the "From:" address is now of form "Full Name " rather than the old, now deprecated, form "user@domain (Full Name)", and with properly quoted "Full Name" if quotes are needed - the "Date:" line is now only added when the message is queued for sending, rather than when editing starts - the timezone information in the "Date:" header uses the "+hhmm" form rather than timezone names - header lines are folded at 78 chars instead of 80 - if a message body contains lines over 78 chars long, it will be MIME quoted-printable encoded to reduce the line length (this can be disabled or made promptable with the "enclong" config option) 44 Although not yet a MIME type, "message/rfc2822" is supported anyway 45 Critical errors (e.g. missing floppy disks) are handled much better 46 The non-standard and often incorrect "Lines:" header line is no longer added to messages 47 The index screen display format has been tweaked to show more of the subject line and less of the author's name/address; the 'T' tagged marker is now a '+' between the message number and author, which saves a column; and the full width of the display is now used (the 80th column wasn't used before) 48 Message numbers over 999, and message sizes over 999999 bytes, no longer mess up the alignment so badly 49 8-bit encoded plain text messages are displayed automatically, rather than getting the big "Multimedia" dialog 50 Proper insert mode available in line editing prompts, with cursor changing shape to indicate overwrite and insert mode; user-definable cursor sizes and choice of initial insert/overwrite mode with "cursors" and "insertmode" config entries 51 No more prompting to continue after running a shell; other external programs, like the "multimedia" one, can avoid the prompt by starting the command line with the special character '*' 52 Header weeding expanded to allow case-insensitive or wildcard matching (with inverse wildcard patterns, starting with '!', to avoid matching particular patterns) 53 Additional header weeding level 2 added to choose only those headers which *will* be shown ("summary" headers); also level 3 which weeds out all headers, including the blank line; 'H' cycles between all the available header viewing options; "weedlevel" config entry choose initial weeding level 54 'T'ransmitted file contents now checked better, with more useful encoding suggestions 55 Message bodies checked for control characters as well as just 8-bit binary characters; as before, such non-ASCII messages are q-p encoded before sending 56 Don't flag the mailbox as "changed" if we've only re-read it from disk because of new mail 57 Allow up-arrow keys, other command keys etc. to be pressed when at multipart prompts in the pager 58 Remove unnecessary and annoying "End of Multipart Mime Message" prompt 59 When forwarding a quoted-printable message, decode the forwarded copy (only works with whole quoted-printable messages at the moment; q-p multipart body parts don't get decoded, sorry) -- Other changes: 60 The PCOAK.MSG file is no longer used; all message strings etc. are now contained within the program 61 Temporary file use has been rethought; it no longer uses a new PCOAKAA.??? file every time you change mailbox/folder 62 Only one overrun warning message is issued (instead of a seemingly endless flurry) when multiple overruns occur trying to unfold a single long, folded, header line into a fixed-length array 63 Config file lines may now be 512 characters long instead of 256 64 Reports "Message 1234 done." rather than "Message-ID 1234 done." 65 Report when a saved folder was created, instead of always saying the folder was appended 66 MIME base64 encoded lines are now 76 characters long, not 64 67 The filename can now appear anywhere in "multimedia", "gifview" etc. commands (not just at the end): use "%s" or "$" in config file 68 You can now use \ as well as / in pathnames in config file; entries which are directories or commands don't get the \-escape processing, although others still do 69 Transmitted text files get "name=..." in the Content-Type header field 70 "Folder name does not exist" query now uses "=name" instead of "name" Programming changes since 0.1 invisible to the user (not in any order) ---------------------------------------------------------------------- 1 The HTL struct for messages has been modified somewhat, with enums replacing #defined constants for many things, the old date storage mechanism has been replaced by a single time_t etc. 2 To save space, we no longer store the file positions of Content-* header lines in the HTL struct, but go back to the message start when we need to find them 3 Many functions and variables declared in pcoak.h are now more precisely targetted in the source files that use them 4 Strings are now generally dynamically allocated, rather than using fixed-length arrays; we now check for NULL pointers rather than empty strings 5 The configuration mechanism has been moved to config.c and heavily rewritten (although it should work exactly as before, complete with all the odd irregularities of environment variable handling, some string entries which cannot be redefined etc.); compile-time variable defaults reflect config defaults properly 6 Some variable and macro renaming for clarity of purpose, brevity etc. 7 Display handling has been made more consistent with display.{c,h} and the global struct variable; replaced old (and broken!) NUMLINES macro with ; init_video() -> disp_init(); window() etc. calls now go through disp_window() etc. 8 Boolean flags should now use type BOOL rather than int 9 Old "MixedCapsNames" variables and functions have bene renamed to use "lower_case_names" style instead 10 rip() returns the char ripped, if any; end-of-line detection with long lines should now be correct everywhere 11 Header field names are now handled by an array [] of known names; functions htype(), htype_match() are used for testing matches; always use the [] names instead of local strings 12 Various file and memory leaks have been tracked down and fixed; no further leaks have been encountered during tests (fixes bug 037) 13 Avoid using [used_mailsystem] array indexing for variables that have both ham and uucp settings; use single pointers instead, and switch modes consistently with set_system() 14 SYS_HAM and SYS_UUCP used everywhere (sometimes [1] and [0] were used instead, which was thoroughly confusing); also changed them so that SYS_HAM is now 0, and SYS_UUCP is 1, ready for UUCP support to be a compile-time option 15 The old logic has been reversed; we now use '\' everywhere in paths, and change them to '/' iff we need to, when calling the editor 16 Stop calling Bcc "bounce"! is renamed etc. 17 Stop passing the main() buffer around as a temporary work space; functions use their own arrays, and is now renamed to reflect it sole use as a status message buffer 18 Moved all message sending stuff (like reply() etc.) to send.c, which reduced use of global variables (free_reply() now not needed, etc.) 19 Numerous fgets()/fputs() loops replaced by copy_txtfile() function 20 Command key system slightly overhauled to avoid confusion between keypresses and command codes; examination improved 21 Removed "Saving message"/"Saved message" printfs when calling multimedia program (why were they ever there?) 22 Replaced all system() calls with disp_system(), which ensures display resetting, correctly returning to original directory, skipping over a leading '*' in the command (see user item 51 above) etc. 23 Replaced most window() calls with disp_fullscreen() / disp_fixtop() 24 Modified savemsg(), mailto(), reply(), dosmtpsend() etc. to remove global and , and use passed arguments properly to define their actions; use header weeding levels HW_NONE, HW_FULL etc. rather than WITH_HEADER etc. 25 PHTL parameters made const (PCHTL) where possible 26 copymail() now takes argument; avoids closenotes() fiddling with message list sort order; closenotes() is now the only place where file is closed 27 Various (!numtagged) replaced by (numtagged == 0); it's a count, not a flag! 28 Try to avoid duplicating string constants, especially between modules; use global const char arrays, common ones in str.c 29 Uses of sprintf() either (a) modified and checked carefully for no possibility of buffer overrun, or (b) replaced by the overrun-proof AUSTRLCPY3() etc. 30 *ALL* file writes and calls to fclose() checked for errors; any that aren't checked in situ should have a comment explaining why it is safe to do so 31 errordsp() no longer does backslash() and now takes const char * arg; backslash() now done before call to errordsp() where required 32 Some spurious calls to backslash() removed where path is known to use backslashes already 33 Bizarre \n\r in PCELM.RC error message replaced by \r\n 34 Four-line index help now an array of strings; length could now vary, if required in the future 35 Replaced wildmat.c with Pete's modified GremNOS version 36 Some temp. message buffers resized 64 -> 81 37 Added hdr_body() function to give ptr to header field body 38 Wait 2 secs, not 1, when showing config. warnings 39 Ensure "Message-ID:" line always added, even if no "To:" or even blank line after the header 40 Ensure Status line gets written back to mailbox even if no body 41 Don't exit() if create_mailbody() gets a write failure! 42 Use static variable in append_signature() to ensure sig only added once (don't use global any more) 43 Use beep() instead of putchar(7) 44 Replaced manifest character values in switches with K* macros 45 , etc. get cbackslash() rather than backslash(), which stops doing / -> \ at first whitespace char =============================================================================== PCOak 0.1 Simon Turner, Pete Disdale 17 May 2001 =============================================================================== After six months of testing by several people, during which time no bugs have been reported which are not also present in PCElm, 0.0.9 seems to be a suitable basis for the first "known to be stable" release of PCOak; with a few minor fixes made, which have been tested and which should not affect the stability of the program, version 0.1 is finally ready. PCOak 0.1 is intended to be a good stable version, which even the most timid PCElm user should be happy to upgrade to. Changes since 0.0.9 are: 1 An old PCElm bug, which confused the pager if you tried to save an attachment to an invalid filename, has been fixed 2 An old PCElm bug with restoring the screen size and cursor position after shelling out has been fixed (this one only really affected non-standard screen sizes) 3 The screen is no longer redrawn black-on-black upon a normal exit, rendering the command prompt invisible unless the cursor was on the bottom line of the screen; the command prompt should now always be visible after exiting 4 MIME entities of type message/delivery-status are now displayed as plain text, without prompting 5 When skipping over entities within a multipart MIME message, a "Skipping..." message is displayed at the bottom of the screen so the user knows what's happening 6 The prompts for ignoring or viewing "extra" multipart/alternative entities have been revised to be more intuitive and easier to use 7 The DPMI-friendly keyboard processing code (which reduces CPU usage under Windows) has been moved into keymake.c, removing the need to use a modified version of Borland's (copyrighted) kbhit.cas =============================================================================== PCOak 0.0.9 Simon Turner, Pete Disdale 20 October 2000 =============================================================================== After a hiatus of some months, enough work has finally been done to make this a possible candidate for initial release, as a working replacement for PCElm. It should function as a drop-in replacement: renaming PCOAK.EXE to PCELM.EXE and copying this over the existing PCELM.EXE should give you a working system. If you want to use some of the newer features of PCOak (e.g. sending via a smarthost), some edits will be needed to PCELM.RC: see PCOAK.RC for details. Changes since the st-base version that affect the user: 1 Buffer overruns are now detected and reported, with detailed fault location reports in a popup box when an overrun is caught (if REPORT_OVERRUNS is #defined, as it is in 0.0.9); this applies to all strcpy(), strcat(), strncpy() etc. which are not obviously completely safe 2 All sprintf() calls that are not obviously completely safe get a CHKSTR() call immediately afterwards to check for buffer overrun; the CHKSTR macro produces an overrun report as above if an overrun is detected 3 Fixed numerous file handle and dynamic memory leaks 4 Replaced get_next_reciver() with more flexible next_address(): address parsing from "To"/"Cc" lists should now work for all common forms of address and full name, and alias expansion is only attempted on an address with no whitespace in it 5 Header weeding can be toggled on and off with 'H' (this affects both external pagers, and the initial weedout state of the internal pager) 6 If an external pager in defined, its usage can be cycled through threee states with 'e' (never use the external pager; use the external, but offer the internal for certain messages; always use the external, never the internal); the initial state can be defined with the "extpager" config entry 7 Saving a changed working copy of a mailbox back to the real mailbox, when the original has grown since the working copy was taken, should now work correctly even if the mailbox is sorted by date and/or in reverse order; there used to be a silly bug which could cause the entire mailbox to be duplicated when re-written 8 Smarthost support for sending messages via a defined smarthost, with three modes: 0 (always use direct MX), 1 (always use the smarthost), or 2 (use the smarthost if message has > 1 destination system) 9 Added Thomas Wagner's swapping exec() code to give more free memory when shelled out; side effects of this include losing the "(PCElm active)" prompt when shelled out, and open files are no longer flushed to disk upon calling system() 10 Modified version of kbhit() which allows Windows to get some CPU time work each time kbhit() is called; vastly improves Windows performance when running in a DOS box 11 Some "serious" error messages now get a popup box, rather than a just a line at the bottom of the screen which disappears after a 3-second pause 12 Numeric keypad cursor movement keys, Enter, Del, Insert etc. are now supported by the general text input mechanism 13 The internal pager's mechanism for knowing which lines are displayed on the screen could easily get hopelessly lost and start seeking to random areas in the file; it has been completely replaced with a better system, which also makes the "More (xx%)" display accurate for the *bottom* line on the screen at all times, rather than sometimes being the bottom line and sometimes the top line; searching a message body works better, and is less prone to being confused by moving backwards through the document 14 quoted-printable display and line wrapping should now work correctly; the type of line displayed is stored, so going back to earlier q-p lines in a multipart message should still recognise them as q-p and display them accordingly 15 uuencode "begin" line detection should be improved and standardised across the various things which use it 16 MIME Content-Type recognition greatly enlarged 17 MIME Content-Transfer-Encoding recognition and support enlarged and enhanced 18 MIME Content-Type and Content-Transfer-Encoding support is now much more in line with RFCs 19 Multipart handling in the internal pager is enhanced: nested multiparts are supported to a depth of 5, and ending an outer one without ending one of the inner ones works properly; the multipart boundary detection now compares with lists of known boundaries; basic support for multipart/alternative is added; user actions on multiparts are more flexible and better implemented; reaching the end of a multipart message now puts you back to the "Command? (100%)" prompt, allowing you to redisplay the message etc., rather than just exiting the viewer with no choice in the matter 20 MIME headers are unfolded before being processed, so charsets, attachment names etc. should now be recognised correctly; when trying to find the start of a MIME entity's body, it no longer stops scanning headers after finding 5 lines of them (!) 21 All MIME text messages which can be displayed are now just displayed; previously, some 7bit and/or "none" text encodings could pop up the "probably a multimedia mail" dialog, which was silly 22 Quoted-printable attachments can now be saved to file with q-p decoding 23 Base64 decoding is now correct; files should be the right length, and illegal characters discovered will abort the decoding operation; base64 encoding will now encode files with the correct length, rather than rounding the length up to a 3-byte boundary 24 Quoting of a quoted-printable message when repying/forwarding now forces a line break if it comes across a soft break ("=\n") in the q-p text; previously it put a quote string ("> ") at that point with no newline, and concatenated the next line on after the quote string (giving one long line with embedded "> " every so often) 25 When transmitting a file, quoted-printable is now offered as well as base64 and uuencode 26 Producing DOS filenames from mail addresses is now done in one place, making "sent" and "received" saved filenames consistent; it should now also work much better, and *should* always produce valid DOS 8.3 names 27 Removal of the user's address in a group reply now removes the entire address (including full name, <> etc.) rather than just the addr-spec (SMTP address) as before; with addresses and full names now supported, replies and group replies now use the full address of the original author, rather than just the addr-spec 28 The "In message writes:" introduction to a reply which quotes the original message is now split over two lines if it won't all fit on one line 29 When sending, wrapping of long header lines now doesn't wrap before a comma at the 80th char, and tries where possible to wrap just after a comma: this means that mail addresses on long "To" and "Cc" lines shouldn't be broken in mid-address, which looks nicer 8-) 30 When mail from the user is shown as "To: foobar" in the main selection screen, now try to extract the full name rather than just quote the entire "To" header line as before 31 Beeps on invalid character at "send, edit, abort?" prompt; uses full return from GetKey(), so spurious keys don't have unexpected effects any more 32 Handle errors when sending mail and copying/renaming mail bodies etc. properly, rather than just displaying a short error message and carrying on as though everything was fine 33 New version/about information and help details for PCOak 34 drawbox() now provides the full x width; it used to stop 1 short 35 Compatibility: if environment variable PCOAK, RC file PCOAK.RC, or message file PCOAK.MSG are not found, their PCELM equivalents are tried before giving up Programming changes invisible to the user: 1 Added GPL copyright text to all files, and replaced "PCElm" with "PCOak" throughout where appropriate; pcelm.h renamed to pcoak.h 2 Wrote ustring.{c,h} which contain safe replacements for strcpy(), strcat(), strncpy() and new functions ustrlcpy() and ustrlcat() for concatenating lists of multiple strings together in a single function call, rather than use several separate calls to strcat() as often seen. The new functions are generally called from macros AUSTRCPY() etc. which handle sizeof for arrays; there are PUSTRCPY() equivalents which expect a pointer and a buffer size. 3 Put macros for often-used filenames in filename.h, moving them out of pcoak.h 4 Wrote some useful character handling routines in miscutil.c, with some useful macros for them in chars.h; these provide things like skipping leading LWSP-chars, finding the "leaf" filename of a path, a case-insensitive strstr() etc. 5 Moved config file entry list from pcoak.h to config.h 6 Moved command list from pcoak.h to commands.h 7 Moved message tagging stuff from pcoak.h to tags.h 8 Any PC-lint overrides which are correct, rather than indicating bugs, are marked with an /* OK */ comment to show this 9 Many "char *" function arguments changed to "const char *" for safety, and to indicate that they shouldn't be changed 10 Many instances of "int" changed to "unsigned int" or "size_t" as appropriate 11 Explicit uses of array sizes (e.g. LINELEN as an argument) replaced by sizeof operator, except where deliberately smaller than the actual array size (e.g. reading LINELEN into a LLINELEN array) 12 Dynamically allocated buffers generally have a size_t companion containing their allocated size 13 Removed many redundant routines (cmpspace(), strsave(), strlower(), slashcat(), padright() and others); instr() moved from instr.c to notepad.c, the only place which still uses it 14 Fixed open/closed file handle confusion in calls to invoke_editor() 15 When arrays are passed to functions to be filled in, their size is also passed so that we can watch for buffer overruns 16 Places where ".txt" was hard-wired for mailbox filenames now use mboxextension[used_mailsystem] (as they should); similarly the various ".wrk" and ".lck" have been replaced by single global strings to ensure consistency 17 The old RECEIVED header type (which actually meant Start Of Header -- "From " -- not "Received") has been replaced by SOH; RECEIVED now means a "Received" header; Content-Disposition is added as a known header; unknown Content-* headers get CONTENT_UNKNOWN rather than the general UNKNOWN header type; UUCPFROM and NOHEADER are removed 18 Use of NULL to terminate an array of structs is replaced by using the actual number of elements in the array (courtesy of sizeof) 19 getwin() now uses the general vdispwin()/restwin() functions; new functions dispwin() and errorbox() also use these 20 Some ints being used as TRUE/FALSE booleans are now BOOLs -- this needs doing more widely (it makes no *difference*, since BOOL is a typedef for int, but it makes intentions much more obvious) 21 Places where a function (e.g. getenv(), strchr() etc.) was called twice in succession (to check the return isn't NULL, then again to copy the non-NULL return to somewhere else) now use a temporary variable to hold the first return value, rather than calling the function twice 22 Many instances of while (!feof(fp)) if (fgets(buf, siz, fp) == NULL) break; have been replaced by the simpler while (fgets(buf, siz, fp) != NULL) 23 Switches with no default generally have one put in, mostly for tidiness and to keep PC-lint happy 24 Places where an integer pointer to a message number was being passed, only for it to be dereferenced once and not used again, now pass an integer (rather than a pointer); arguably they should pass a PHTL 25 Removed the multipart entity/attachment handling from the bowels of doviewmsg() and split it off into a somewhat better-structured separate function handle_entity(); asking the user for commands to run on decoded attachments now uses one function, rather than 5 sets of almost identical code 26 The LOCAL_TABSIZE variable (yes, variable!) is now local_tabsize 27 The "!QWERTY.$$$" temporary filename for files to forward is now a global variable, rather than two separate hard-wired strings 28 "Date" header parsing broken out of CopyMail() function; it can be more easily rewritten now 29 Replaced "fseek(fp, 0L, SEEK_SET)" with "rewind(fp)" throughout for consistency, and to ensure that error flags are cleared 30 Write errors when sending mail are now checked for more often 31 Creating backup files while merging headers and bodies etc. is now done centrally by file_backup() 32 Increased size of notename[], firstname[] and foldername[] buffers from 9 to 64 bytes to avoid the (frequent) overruns 33 pager string is now prepared for accepting target file with '$' as soon as it's provided, rather than when it's used 34 End-of-header checks are done correctly, by looking for "\n" or "\r\n" rather than simply using strlen(s) < 3 -- this could fall over in all sorts of ways, especially with line wrapping in the header 35 exist() replaced with access() calls 36 GetKey() returns treated with a little more respect 37 Subject searching no longer runs over the end of the mbox[] array 38 Zero-length string checks now examine the first byte of the string, rather than checking strlen() == 0 (which was incredibly inefficient) 39 Some of the config string settings used strncat() rather then strncpy(), for some strange reason which was probably complete rubbish; they now all use the AUSTRCPY() macro (safe strcpy()) 40 Commented-out code which was obviously long dead has been removed 41 Blind calls to fgets() etc. which didn't check the return value now do so =============================================================================== PCElm 1.12 (st-base) Simon Turner 1 March 2000 =============================================================================== A tidied up version of Demon's source for the PCElm 1.12 beta 4 release; this compiles to give the same executable as the Demon source, but has initial tidying and error-spotting work done on it, in preparation for getting to grips with the bugs. ===============================================================================