========================================= Combined STLFilt.pl / CL.cpp Revision Log ========================================= ==== 2007 ==== 10/22 Tested all components under the Visual Studio 2008 Express Edition (Beta 2) IDE and "VS9" compiler (version 15.x). No modifications were required. 10/16 (CL.CPP v2.50) Finally added code solving the Unicode-in-pipes problem when operating within the new (2005+) Visual Studio IDE. NOTE: Requires also configuring an IDE option (in Configuration Properties... C/C++... General, make sure the "Use UNICODE Response Files" option is set to "No") Of course, remember to also add "/WL" to the commmand-line options under C/C++. SPECIAL THANKS to Kevin Frei for finally providing the solution to this several-year-old problem with UNICODE in Visual Studio. 10/16 (STLFilt.pl v2.74) Added new filtering rules for iterator and const_iterator of list and deque containers in VC8. ==== 2005 ==== 12/20 (CL.CPP v2.45a) Changing the default value of DEBUG_DIR in PROXY-CL.INI to an empty string (in order to let the debug log be created in the current working directory by default) was a great idea....except for the fact that CL.CPP *broke* with an empty value there. Oops. Fixed it so the empty value is properly handled. 10/26 (CL.CPP v2.45) Fixed response file handling. Now the source file name may appear on any line of the response file, not just the last. Also, whitespace outside of quotation marks is properly ignored. A big "Thank You" to Phillip Seaver for bringing the response file problem to my attention and assisting me in coding the fix. 6/29 (STLFilt.pl v2.73b) Fixed problem with $def_iter_policy being set to "L" not working right (thanks, Dave Abrahams, for pointing this one out.) 2/10 (CL.CPP v2.44a) Corrected a Proxy CL bug that inhibited Decryption (didn't bother invoking Perl) when a filename having an '.exe' extension was supplied as an arg to a command-line option. For example, cl foo.cpp /o foo.exe would compile without employing decryption (even when Decryption was enabled.) Re-ordering the command-line (putting the .cpp filename last) was an interim fix that allowed it to work. ==== 2004 ==== 12/31 (STLFilt.pl v2.73a) Minor tweaks. 12/09 (STLFilt.pl v2.73) Corrected a bug that improperly stripped '(' characters when they appeared immediately following the __cdecl keyword, causing an internal error in /break:D wrapping mode. (Thanks to Stuart Dootson for reporting the bug.) 11/28 (STLFilt.pl v2.72) Added the ability to strip trailing "null"-style boost arguments from template argument lists. By default, the arguments boost::tuples::null_type and mpl_::na are removed. The following notes all relate to this feature. Any number of additional fully-qualified type names may be added by specifying the -nullarg:xxx option once for each type name (with xxx being the name to be deleted). if xxx is 'clear', the null argument list is emptied; subsequent -nullarg specifications appearing on the command line will be applied, but not the defaults as listed above (unless they're re-specified using the -nullarg option later on the command line.) The default list of automatically-deleted typenames may be configured by editing the @nullargs variable in the user-configurable section of the Perl script. This feature was suggested by Stuart Dootson. 9/9 (STLFilt.pl v2.71) Added Support for MSVC 8 (Visual Studio 2005 a.k.a. "Whidbey") 5/13 A version of STLTask.EXE accidentally compiled with MSVC71 instead of MSVC6 has been in the distribution for a while. I've put the version compiled with MSVC6 back in, so folks aren't required to have the MSVCP71.DLL file in order to run STLTask. 2/21 (STLFilt.pl v2.70a) Augmented list of recognized source file extensions within the Perl script for consistency with recent CL.CPP corrections. 2/3 Added the following information to the "Bugs/Limitations" section of README.TXT: When the Proxy CL.EXE is linked with setargv.obj for support of automatic wild-card expansion, the command: cl /? (with or without the space) will fail if the root directory of your current drive contains any entries having a name exactly one character in length. Unfortunately, setargv.obj does not seem to recognize the slash as an option delimiter, and treats the sequence the same as it would "\?". Workaround: use /help instead of /? whenever you get a bunch of "illegal option" diagnostics while using cl/? . 1/15 (cl.cpp v2.43a) Added ".cc" as a recognized C++ source file extension, and ".o" as a recognized object file extension, to the Proxy compiler. Thanks to Stefan Naewe for pointing out these omissions. ==== 2003 ==== 12/23 (STLFilt.pl v2.70, CL.CPP v2.43) Corrected a /meta:D mode parsing bug that caused internal errors and/ or strange line breaks if the sequence ">> " appeared in a message in the context of closing delimiters for nested template parameter lists. The sequence ">> " in a message, when referring to the right-shift operator, was incorrectly being turned into "> > ". Corrected another /meta:D bug involving appearances of the sequence "()" in various contexts. Corrected a premature closing of the NativeLog.txt file in the event of an internal parsing error, causing errors on all subsequent attempts to write to the file. The Proxy CL now accepts the /lognative option to force creation of the Perl script debugging log file NativeLog.txt. Formerly, the only way to specify creation of the log file when using the Proxy CL was to configure the option LOG_NATIVE_MSGS in Proxy-CL.INI. 12/17 (STLFilt.pl v2.69) Added logic to correct for when MSVC inserts gratuitous CR-LF characters into certain diagnostics exceeding 2048 characters in length. This issue showed up in, but may not necessarily be restricted to, .PLG files being processed by the VC Tools technique. A couple of clarifications/corrections to the comments in Proxy-CL.INI: 1. Clarification: In the comment at the end of Proxy-CL.INI's "NATIVE_CL" configuration line, the NATIVE_CL value must be base filename only (not a complete "pathname" specification). 2. Correction: In the comment at the end of the DEBUG_DIR line, the debug log file name is cl-dblog.txt, *not* cl-log.txt (that's *this* file!) 12/12 (STLFilt.pl v2.68) Enhanced the .PLG-file processing algorithm (used in the "MSVC Tools" approach to on-demand Decryption within the MSVC IDE). A big Thank You to Karl Bouchard for analyzing a slew of PLG files to help define a more general solution than had been implemented previously. The new algorithm is described in detail near the end of the updated README-VCTool.txt file. 12/04 (STLFilt.pl v2.67a) Fixed wrapping error in /break:D mode when the text ">", "<", ">>" or "<<" appeared in a message. 11/28 (STLFilt.pl v2.67) Corrected several r.e. clauses that could possibly have lead to "use of uninitialized value" messages from Perl. 11/19 (STLFilt.pl v2.66) Patched an obscure condition that drew a "Use of uninitialized value in multiplication (*)..." error during -break:D mode wrapping. Made sure that lines are never wrapped in the middle of pathnames, even if that means an output line length may exceed the /width setting (figuring it is more important for editors to be able to automatically locate the point of the error than it is to unconditionally honor the /width value). 11/11 (STLFilt.pl v2.65) Corrected possible problem recognizing "const pointers" (as opposed to pointers-to-const) in certain constructs. 10/20 (STLFilt.pl v2.64, CL.CPP v2.42) Added /with:x option to Perl script and Proxy CL: /with:x Set "with" clause substitution policy to x, where x is L[ong] or S[hort] (the default). In "Long" mode, "with" clauses are left intact (no substitution). THIS DISABLES MOST OTHER STL-RELATED DECRYPTION. The /with:L option was provided by request to facilitate certain MPL-related work in conjunction with the /meta-related options. 08/08 (STLFilt.pl v2.63a) Tuned some of the comments at the top of the script. 07/29 (STLFilt.pl v2.63) Just some minor tweaks of the internal error logging mechanism. 06/12 (STLFilt.pl v2.62) Cleaned up some unused variables, added $show_internal_err variable to allow verbose crash diagnostics to be muted. 06/11 (STLFilt.pl v2.61) Picked up some cases involving string::iterator for the Dinkum libs. 06/09 (STLFilt.pl v2.60) Added support for the Dinkum Unabridged Library (VC6, VC7, VC7.1) 06/06 (STLFilt.pl v2.52) Corrected Plain-mode wrapping logic to fix another off-by-1 error that had been emitting spurious blank lines. 06/05 (CL.CPP v2.41a) Wildcards (such as *.cpp) now work on the Proxy CL command line (just needed to be linked with SETARGV.OBJ). 05/31 (STLFilt.pl v2.51) A few /meta (/break:D) mode bugs fixed: - '(' character with spaces around it was not being recognized as in- creasing the nesting level, causing an internal error later on the line when the matching ')' was encountered - '>=' and '<=' operators were not excluded from '>' and '<' detection Dropped the $space_close_brackets option; it now always puts spaces between consecutive '>' characters (unless they're the >> operator, with any luck.) This was necessary to keep the /meta wrapping logic from getting out of control. /iter:L now forces $newiter to 'iterator', so the word 'iterator' is never shortened in /iter:L mode. Added platform configuration sections in STLTask.INI for MSVC 7 and 7.1. 05/14 (STLFilt.pl v2.50, CL.CPP v2.41) Major update of the Perl script, adding support for special intelligent line wrapping of long template-based typenames as typical of template metaprogramming applications. This is the same wrapping logic that has been in the gcc-specific script (gSTLFilt.pl) for several months, finally ported to the MSVC version (the /meta option is new to both platforms). New command-line options: /break:x Break algorithm: D[ave Abrahams] or P[lain] (the default). The "Dave" option employs the new wrapping algorithm. /cbreak:x Comma break: B = break before commas (default), A = after [applies only in /break:D mode] /closewrap:x Wrap before unmatched closing delimiters: Y (default) or N [applies only in /break:D mode] /meta:x Configure for metaprogramming [Y] or not [N] as follows: /meta:y (or just /meta) forces /break:D, and forces /cbreak and /closewrap options according to values specified in the $meta_y_cbreak and $meta_y_closewrap variable initiali- zations, respectively. /meta:n forces /break:P (/cbreak and /closewrap don't apply.) If no /meta option is present, the default values for /break, /cbreak and /closewrap are determined by the INI file (if using a Proxy compiler) or by the settings of $break_algorithm, $comma_wrap and $close_wrap in the user-configurable area of the Perl script. In either case, if the output width hasn't yet been set to a non-zero value, it is set to 80 (choosing a wrapping flavor makes no sense with wrapping disabled.) This may be overridden by a subsequent /width option. Note also that /meta may not be specified in the INI files, because it is intended as a command-line "override" mechanism. The individual settings of /break, /cbreak and /closewrap, however, may be (and apply only when the /meta option is not used.) A new Perl script user-configurable variable, $space_after_commas, forces a space after any comma appearing in messages. Default value is 0 (don't). Made some adjustments to start-of-line processing to smooth out MSVC's somewhat random tabbing behavior. Now the first line of each message (con- taining the primary error's filename/line number) is not indented, and subsequent lines (in "Plain" break algorithm mode) are indented exactly one tab stop. "Dave" mode has its own, more elaborate set of tabbing rules. The Proxy CL has been updated to recognize all the above options. 04/22 (STLFilt.pl v2.46) Shortened the primary regex ($t) a tad more. 04/12 (STLFilt.pl v2.45, updated README-VCTool.txt to support VC7) Turns out it wasn't all that trivial to adapt the new IDE "Tool" approach to VC7. I had to hack the Perl script a bit more, and new instructions have been added to the doc file (README-VCTool.txt) explaining how to set it up within VC7. 04/11 STLTask (.EXE and sources) have been updated with a fix to the wxWindows library that keeps the tray icon from disappearing as a result of the taskbar re-initializing itself (such as after a Windows Explorer crash). Many thanks to Graeme Prentice for solving this long-standing problem. 04/08 (STLFilt.pl v2.44) Adjusted handling of the phrase 'iterator' to avoid shortening it unless one of the standard iterator types is involved, and added some comments to the user-configurable section to show how to disable all iterator filtering. Restored the default value of $lognative to 'N', after it was inadvertently left at 'Y' for the v2.43 release (oops). 04/05 (STLFilt.pl v2.43, new files: README-VCTool.txt and MFiltTool.BAT) Thanks to Alex Pirseyedi, there is now a nice documented technique for allowing on-demand Decryption from within the MSVC IDE that does *not* require installation of the Proxy CL.EXE! The new README-VCTool.txt file describes the procedure, and MFiltTool.BAT is provided as a driver script. This technique uses facilities I'm not very familiar with, so if anybody finds issues please let me know ASAP and I'll do my best to iron them out. So far, though, this looks like a big win. Thanks, Alex! 03/19 (CL.CPP v2.40) The Proxy CL now accepts quotation marks around pathnames in Proxy-CL.INI, and detects faulty quotation. 03/18 Added simultaneous multi-platform support to STLTask via a new config- uration file, STLTask.INI, to be placed into the same directory as Proxy-CL.INI. The new version of STLTask is backwards-compatible with the old Proxy-CL.INI, so the new features don't show up unless you actually tailor and install STLTask.INI into the Windows directory. For more details, see the latest version of README-STLTask.txt in the package. 03/10 Had a report of C4786 warnings not being properly filtered, which ended up being an MSVC issue: The IDE occasionally streams stand-alone filenames (of the files being compiled) right into the middle of error/warning messages, creating a garbled mess I've found no reasonable way to filter. Rather than attempting to compensate for this, which might work 90% of the time but suppress important status information the rest of the time, I've decided to punt completely. If anyone knows how to correct or sanely adjust for MSVC's multithreading defects, please let me know... 02/05 (STLFilt.pl v2.42) Optimized the primary regex, $t, to avoid "regex too long" blowups under some older versions of Perl. This should also result in substantially faster execution under all Perl implementations. 01/30 (STLFilt.pl v2.41) Fixed obscure bug when "[]" sequence present in a "with" clause substitution. 01/18 (STLFilt.pl v2.40, CL.CPP v2.30) Thanks to careful detective work and some new defensive coding above and beyond the call of duty by Thomas Becker, the package is now compatible with ActivePerl 5.8. Two new variables in the user-configurable section of STLFilt.pl: $hide_generated_warns: optionally suppresses "has generated..." warnings $hide_deprecated_warns: optionally suppresses "..was declared deprecated" warnings Both default to 1 (suppress the warnings). ==== 2002 ==== 12/24 (STLFilt.pl v2.32) Fixed some remaining line-wrapping issues, esp. wrt MSVC7/STLport 12/22 (STLFilt.pl v2.31) Corrected the "off-by-1" error in /width:nn processing, so that the nn in /width:nn can be the actual width of the display (instead of one less) and things come out looking right. Finally got fed up with the screwy indentation of MSVC6 messages and decided to reformat them into something that does not induce dizziness. Tweaked the wrapping algorithm some more for MSVC7 so that a) the tabbing is more aesthetic, b) candidate signatures get a smidgen more indentation, pathnames always appear at the start of a line and d) semicolons always force a line break. 12/17 Discovered that ActivePerl 5.8 (the new release) does not work correctly with the Proxy CL. For now, please use only ActivePerl 5.6.1. 12/03 (STLFilt.pl v2.30) Tuned the Perl script for MSVC 7.1 beta ("Everett"): "Multiple candidate" errors get reformatted back to the way they'd come out if /WL weren't being used (more or less). Also, the new "stdext" namespace qualification is stripped. 9/07 (STLFilt.pl v2.21) Re-ordered the user-configurable settings section, so that all options corresponding to available command-line switches are together at the top, and other settings appear at the end of the list. 9/04 (STLFilt.pl v2.20) Fixed issues with direct initialized map/multimap and set/multiset iterators for VC6 (native and STLport); hash-based container iterators under VC7 w/STLport; list iterators just about everywhere; misc. other regex cleanup. 9/01 (STLFilt.pl v2.19, CL.CPP v2.29) Changed the default setting of the /banner flag in STLFilt.pl to 'Y', for consistency with the gcc distribution. Now the Proxy CL turns STLFilt.pl's banner *off* explicitly, and MFilt.bat no longer has to turn it on. 8/27 (STLFilt.pl v2.18) Fixed bug where some C4786 warnings were not being handled correctly. 8/24 (CL.CPP v2.28) Corrected bug where the explicit output width specification of 0 (/width:0) on the Proxy CL command line prevented *any* passing of the width parameter to STLFilt.pl. This only worked if the default value of $output_width in STLFilt.pl was 0. STLFilt.BAT: Comments were really out-of-date. Fixed them. 7/21 Corrected corrupt CL.CPP (source code only; executable CL.EXE was okay). 6/15 (STLFilt.pl v2.17) Corrected bug where substitution of the word "iterator" was being performed without proper word boundary detection. 4/13 (STLFilt.pl v2.16) Documented the fact that /alloc:L is *broken* under VC7. Not sure how many people ever really want undecrypted allocators, but it looks like the option to see them while still doing other decryption has been broken for quite a while without my realizing it. Tweaked the line-breaking algorithm a bit (when /width:nn is used) to include colons as line-break column candidates. 4/02 (CL.CPP v2.27) Enhanced the Proxy-CL.INI file format to support trailing comments, introduced by semicolon (;) characters, on configuration lines. This simplifies the presentation of the config file and its options; now, you just remove the *leading* comment on any line to activate the line, rather than copying and pasting the line as previously instructed. [Thanks to Ed Kaulakis for suggesting this approach] The MFilt.BAT batch file now appends the value of the environment variable FOPTS to the internal batch file variable FOPTIONS. Since Decryptor options cannot be supplied on the MFilt.BAT command line, this allows you to set such options in the FOPTS variable before running the batch file. 3/16 (STLFilt.pl v2.15) Added user-configurable variable $keep_space_pre_colon. If set to 1 (true), causes the space before the ":" on source line numbers to be preserved, for compatibility with certain 3rd-party IDE tools for MSVC such as RoseRT. There is no command-line option for this setting; STLFilt.pl needs to be edited to set $keep_space_pre_colon to 1 (it defaults to 0). 3/11 (STLFilt.pl v2.14) Improved handling of reverse iterators somewhat under Dinkumware / VC7. 3/10 (STLFilt.pl v2.13) Corrected several filtering bugs w/respect to map/multimap iterators under STLport, where these iterators were incorrectly transformed into *set* iterators and/or their const-ness was attributed incorrectly. 2/27 Added MFilt.BAT to the distribution. This batch file illustrates how to drive the compile/decryption process directly from the command line with the least amount of installation headaches, and also shows the options that are useful under such circumstances. 2/26 (STLFilt.pl v2.12) (CL.CPP v2.26) Fixed several archaic/buggy/subtly-hosed issues in the Perl script after finally remembering to run it with ActivePerl's -W option (shame on me, as I always teach Perl students to use -w...) Added "intelligent" line wrapping to the Perl script, after getting good results with that approach in the Comeau and g++ versions. By either setting OUTPUT_WIDTH in Proxy-CL.INI or using the new /width:nn option to the Proxy CL (the command-line option overrides the config file setting), output lines will be aesthetically wrapped at no farther than the selected column width. While the end result will be a greater number of lines of error diagnostic output, you may find the increased readability to be worth it. The default value of 0 means no wrapping is performed. 2/20 (STLFilt.pl v2.11) Added the /banner:x option to control display of the sign-on banner. By default, the banner is not displayed. Saying /banner:y or just /banner causes it to display (or you can change the default behavior by editing the user-configurable $banner variable in STLFilt.pl). This option is for the benefit of folks using the Perl script directly from the command line, rather than via the Proxy CL. 1/11 Fixed some minor documentation typos, and explained (in QUICKSTART.txt) why there isn't a SETUP utility for this package. ==== 2001 ==== 11/14 (STLFilt.pl v2.10) Added a new debugging feature available only via the Proxy-CL.INI configuration file: If the line LOG_NATIVE_MSGS=Y appears in the [proxy.cl] section of Proxy-CL.INI, then the Perl script writes a file named "NativeLog.txt" to the current directory, containing the full pre-filtered compiler output. (If running the Perl script directly, the option to the script is simply "/lognative"). STLFilt.pl now diagnoses illegal command line options, rather than ignoring them (this mainly assists folks who use the Perl script directly via pipes, rather than driving it via the Proxy CL). (CL.CPP v2.25) Now Supports the LOG_NATIVE_MSGS config file option as described above. 11/9 (STLFilt.pl v2.09) Fixed handling of the "class" keyword; it was being stripped uncon- ditionally, even when just part of the "prose" of a diagnostic rather than within a type name. Now, the word "class" is only stripped if it follows an odd-numbered single-quote. Added some information to CUSTOMIZE.TXT on how to configure a pair of Visual Studio IDE "Tools" to invoke STLFilt.BAT directly from within the IDE. This ability was mentioned previously but never elaborated on. Also added some additional clarifications and corrected a few errors in other parts of CUSTOMIZE.TXT. 11/1 (CL.CPP v2.24) The safeguards added for v2.23 now account for the ".EXE" not being explicitly present in the Proxy-CL.INI definition of PERL_EXE. Trailing spaces in Proxy-CL.INI options are now stripped explicitly (it would seem that, while Windows98 was already stripping them automatically, NT does not...) 10/30 (CL.CPP v2.23) Added safeguards to ensure that the Perl interpreter and filter script are both present at their configured locations if filtering is enabled. Improved the "usage:" message (when no args given on command line) (STLFilt.pl v2.08) Corrects bug in v2.07: "while compiling..." messages following stripped C4786 warnings were not being correctly suppressed. 10/28 (STLFilt.pl v2.07) Prevented filenames at the start of messages from getting filtered. In the various places where colons were being preceded by a gratuitous space, the spaces are now deleted. Tweaked QUICKSTART.txt to clarify some issues regarding the customization of Proxy-CL.INI and renaming of the native CL.EXE file. 10/7 (STLFilt.pl v2.06) Fixed support for unnamed namespaces; now the string `anonymous namespace' is changed into anon_ns so it has the semantics of a simple identifier, and is filtered accordingly in subsequent processing. Fixed bug in VC7 "with" clause identifier substitution when one entire placeholder name in a single clause is the same as the initial characters of a subsequent name in the same clause (wasn't properly honoring word boundaries when making substitutions). Fixed bug in list iterator detection for Dinkumware and VC7. A leading "const" was being accidentally stripped from certain VC6/Dinkumware map/multimap "pair" constructs. 10/6 (CL.CPP 2.22) Added "/NF" (No Filtering) command-line option to allow selective non- filtering via project configuration, and to keep from having to use a separate command name (e.g., CL2) to compile *quickly* without filtering. Due to some additional warnings generated by VC7 for __try/__finally blocks, the logic of the interprocess communication code was slightly reworked in order to prevent those warnings. (STLFilt.pl v2.05) The Perl script now detects VC7 messages where the /WL ("One Line") compile option was *not* used, and issues a warning to that effect at the end of the session. 10/4 Changed Proxy CL Sign-on message to include my company name, "BD Software" for obscure legal reasons. 10/2 (STLFilt.pl v2.04) Added support for namespace qualifiers (other than std::, which was already handled by being stripped). The fact it took *this* long for someone (thanks Wilka) to point out namespaces weren't supported has got to say something about how much they're actually used ;-) 10/2 (STLFilt.pl v2.03) Instead of skipping around iterator details for the more complex iterator types, STLFilt.pl now detects and processes all iterator type explicitly. The result is that more detailed information reaches the resulting error message. To do this I had to special-case many of the iterator types across the various libraries, but I think the result will be worth it. Since slist was the only extended container left to support, I added it (not that there was much to do; it already worked with Dinkumware, took only a tiny tweak for STLport, and VC7 doesn't seem to support it at all). 9/29 (STLFilt.pl v2.02) Due to a mistake during testing, I failed to actually run validation tests on the VC7/STLport combo before release. Thus, I missed a few constructs in that platform. Those omissions have been corrected. Also corrected a few other hashed container-related bugs. 9/28 (CL.CPP v2.21) Fixed bug causing a crash when CL is in debug mode and options flags for the Perl script are used on the CL command line Added /func:x command line and configuration option to convey "Function Policy" setting to the Perl script under VC7. (STLFilt.pl v2.01) Added hash-based container support. The containers hash_set, hash_multiset, hash_map and hash_multimap are now fully processed under all supported libraries which themselves contain these containers-- I.e., all libraries *except* native VC6. In general, VC7 support has been tightened up and normalized with the addition of the /func:x option to control the new "Functor Policy". See README-VC7.txt for more details. 9/24 (CL.CPP v2.20) Added general VC7/.NET support...but ONLY when the /WL compiler switch is specified during compilation! Added /alloc:x command line option to allow command line specification of allocator policy (applies under VC7 only; see the discussion in the STLFilt.pl v2.00 section below) Added three new config file options in [proxy.cl] section: ITERATOR_POLICY=x (S, M or L): supports config-file default iterator policy ALLOCATOR_POLICY=x (S or L): supports config-file allocator policy (effective under VC7 only) OUTPUT_WIDTH=nn wraps output lines at column nn (see more details in the STLFilt.pl section below.) Many thanks to Wilka for help getting the VC7 version checked out! (STLFilt.pl v2.00) Added VC7/.NET support. When the Message Decryptor sees messages in the VC7 "/WL" format, it processes the "with" clauses by substituting all the place-holder names with the types they represent. The net effect (no pun intended) is a return to VC6-style messages, with more-or-less Dinkumware 3.08 identifier names. There are a few changes from the Dinkumware 3.08 names, however; I've tried to account for most of them, but this is still a "work in progress". Added /alloc:x command line option to control VC7 allocator policy. Note that under VC6, allocators are still handled fully automatically. Due to the more complex message format of VC7, I can no longer use my former heuristic to determine when to filter allocator clauses; under VC7, it becomes the responsibility of the user to select an allocator policy of either 'S' (strip most allocator clauses) or 'L' (leave allocator clauses intact). Added /width:nn command line option to control output line wrapping. This option (fed to the script by the Proxy CL and controlled by the OUTPUT_WIDTH config option in the [proxy.cl] section of Proxy-CL.INI) causes output lines to be wrapped at the specified column. This may make it easier to read messages within the VC7 IDE's output window, but then you can no longer double-click on those messages and see them in their entirety in the status bar if they're wrapped. The default value is 0, to disable wrapping. 9/20 The README-STLport.txt file referred to in README.txt had been accidentally omitted from the distribution for the past several releases. It has now been restored. 9/12 (STLFilt.pl v.1.11) One of the two colons in "::" sequences preceding the keyword "iterator" was sometimes accidentally stripped. Added additional procedural processing for reverse_, bidirectional_, etc., iterators. In QUICKSTART.txt, added some information about taking advantage of the iterator policy options. 9/10 Excised last (I hope) few references to the obsolete INSTALL.txt file from CL.CPP and README.txt. 9/8 (CL.cpp v2.12) Fixed some debug-related logic to use conditional compilation rather than run-time conditional testing. 9/3 (CL.cpp v2.11) Added logic to strip trailing slashes/backslashes off all pathnames specified in the config file (and in the defaults set in the source code); that way, pathname option settings may be written with or without trailing slashes. Changed comment delimiters in Proxy-CL.INI from '#' to ';' [as the user who reported this to me pointed out, I must be using Perl too much ;-) ] Corrected the order of sections in the sample Proxy-CL.INI to match the order shown in the sample entries at the top of the file 9/2 Official Version 2 Release! (STLFilt.pl version 1.1) Changed approach to "long identifier" warnings and their detritus. Now a flag gets set when the "long identifier" warning is detected, and sub- sequent messages containing "see reference to class template" are only stripped when the immediately preceding message was a long identifier warning. My previous blanket disposal of all "see reference to..." messages was throwing the baby out with the bath water, since some of those messages refer to things *other* than long identifier warnings. 9/1 (STLFilt.pl version 1.09) ifstream / ofstream class support added to Perl script 9/1 Switched to new configuration file scheme, where Proxy-CL.INI resides in the system Windows directory. Changed the Proxy CL banner message text to say "Message Decryption" instead of "Err0r Decryption". *I* liked the "Err0r" message, but no one else seems to. I surrender. Added "SILENT" configuration option for Proxy CL. If true, always suppresses the Proxy CL banner message. Created GLOSSARY.txt, since several documents now refer to the glossary of terms. Renamed INSTALL.txt ==> CUSTOMIZE.txt. Basic installation instructions are now in QUICKSTART.txt, so CUSTOMIZE.txt just talks about rebuilding CL and STLTask from the source code, and about using STLFilt.BAT Added runtime debugging capability for the Proxy CL. New options: DEBUG=true or false: enables/disables debugging log DEBUG_DIR=directory: directory to write logging information to (The filenames used for logging are hard-wired as CL-dblog.txt and atfile.txt) 8/29 Added QUICKSTART.txt, a Quick Start guide to the entire package. Deleted CL-ALT.CPP, and all mentions of it, from the distribution. 8/28 (STLFilt.pl version 1.08) Removed all deprecated "depth_policy" logic from CL.cpp and STLFilt.pl 8/27 (CL.cpp version 2.1 pre-release) Added a runtime configuration file capability to CL.cpp. Now, if the Proxy CL.EXE detects the file Proxy-CL.INI in the Windows directory, it reads configuration information from it that overrides the various pathname settings wired into CL.cpp. A precompiled CL.EXE, along with a sample Proxy-CL.INI, are now included in the distribution package. Removed the requirement of adding "extra" quotes to the PERL_EXE and FILTER_SCRIPT symbols in the user-configurable part of CL.cpp (and the new configuration file). Now, all filenames consistently should NOT have extra quotations. I've added the extra quotes automatically when building the internal command lines used to invoke Perl. Updated installation instructions to describe the *new* Proxy CL location. Now, the Proxy CL should be placed into MSVC's bin directory (AFTER renaming the native CL.EXE to CL2.EXE!). Added /GX to command line options for compiling CL.cpp (to silence some warnings) 8/15 Added a glossary, plus some additional material explaining the operation of, and rationale behind, the Proxy CL program. 8/3 (CL.cpp version 2.03) Corrected problem with not properly quoting the command name in _spawnvp calls. Thanks to Matthew Douglass for bringing this to my attention. Corrected a horrendous dynamic memory bug: when building the new_argv array and detecting the "/nologo" option, the new_argv pointer was not allocated dynamically, yet later it was being delete[]'ed. I still don't understand why this didn't instantly bomb the memory allocator...good luck or bad!??? (STLFilt.pl version 1.07) The identifier 'iterator' used alone was being inappropriately filtered. In "/iter=s" mode, const iterators were not correctly filtered. 8/2 (STLFilt.pl version 1.06) Fixed support for STLport basic strings 8/1 (STLFilt.pl version 1.05) istringstream and ostringstream now recognized and filtered (CL.cpp version 2.02) Added a sleep call to correct a timing problem on multiprocessor systems (STLTask version 1.41) Reformatted some messages and buttons; it had looked OK to *me*, but I'd been running "large" fonts. Made it line up for "small" fonts. 7/19 (STLFilt.pl version 1.04) Fixed filtering of "struct" keyword so that it doesn't disappear when diagnosing errors referring to *anonymous* structures (thanks to John Penney for reporting this bug) 6/23 (CL.cpp 2.01) Removed literal "cl2.exe" references from messages; substituted STANDARD_CL 6/22 (CL.cpp) Official release of CL.cpp v2.0 6/21 (CL.cpp version 2 pre-release) Corrected comments referring to putting quotes around pathname symbolic constants in the user-configurable section of CL.cpp. Turns out, FILT_FILE does not need, and indeed *must not have* the extra double-quotes around it. Added note about driving STLFilt.BAT via the VC++ "Tools" menu. (Thanks to John Hattan for pointing out the previous two items) Added some folks to the acknowledgments section who were inadvertently omitted (sorry--I really try to acknowledge *everyone* who takes the trouble to email me with bug reports and suggestions!) The original declaration of my scratchpad loop variable "i" as a size_t, while being stylish, also caused a serious problem under Win2K when combined with a boundary condition bug in the command line processing code (I was looking at argv[0] as an argument). I turned "i" back into a vanilla "int", and also fixed the looping condition in question. The bug only manifested under Win2K because there, argv[0] doesn't necessarily have its .EXE extension showing... 6/20 (CL.cpp version 2 pre-release): Major re-write. Took out as much "C String" logic as possible, replacing it all with C++ strings. No more magic numbers for buffer sizes! CL.EXE is much bigger now, circa 190K vs. the previous 50K. However, it ought to be a lot more robust. Tackled that old MIDL .odl problem again; discovered that passing the original argv value directly to _spawnvp seems to have been the crux of the problem. Now I process all argv arguments the same, whether filtering is enabled or not, adding quotation marks to them. _spawnvp now gets my modified argv (named new_argv in the code) instead of the original argv. Beats me why this should be necessary for _spawnvp. MSVC works in myst... Changed erroneous reference to "STLFILE" in the CL.cpp comments. This symbol had long since been renamed to FILT_FILE. I should probably re- view my old comment lines more often. 6/14 (CL.cpp version 1.05): Back to "Err0r" for the sign-on. I forgot to test the backspace hack in the IDE, where it displays as a graphics character. Foo! Launched the stlfilter mailing list (see top of README.txt for subscription information) 6/13 (CL.cpp version 1.04): Fixed a bug with CL command-line propagation involving trailing '\' characters in parameters. This manifested when attempting to compile the STLport library, for example. Thanks for Andy Philpotts for help on this. I figured out a way to say "Error" instead of "Err0r" in the CL.EXE sign on message: I use a backspace sequence in the word, which ends up undetectable on a CRT. (STLFilt.pl version 1.03) Basically canned the entire "depth policy" idea. I had put it in originally just to deal with STLport's debug iterators. Turns out a procedural string scan works a lot more efficiently to reduce *all* STLport debug iterators no matter now complex, and the simple iteration I've always done takes care of complex STL types. So, I've reduced the default depth policy to 'S' and deprecated the depth policy feature altogether. It is possible someone might need the 'M' and 'L' settings for SOMEthing, though, so I left them in. However, so far I haven't found any need to use them. Seems there's a VC bug where messages related to that obnoxious 4786 warning are sometimes fragmentary, e.g., "foobar (100) : while referring to"... so now I delete those lines as well. 6/10 (STLFilt.pl version 1.02) Implemented several excellent suggestions by Michael Cook: 1. Instead of counting passes to reduce nested typenames and always performing a fixed number of passes, I now loop indefinitely until a pass has completed where there were no substitutions made. This is so obvious an improvement that I deserve a dunce cap for not having thought of it. 2. Added idiomatic '\b' word-boundary delimiters to many r.e.'s, both in place of the '(\W)' technique I'd been using earlier *and* in places I'd previously had no word-boundary checking at all (which would have triggered iterator substitution for non-STL identifiers such as 'foobariterator'... oops!) Added support for STLport's debug mode in STLFilt.pl. I special cased the STLport debug-mode iterators: they all now simply map to "dbg_iter". I just don't have the time to generalize the iterator policy for these constructs. Added /depth:x command-line option to CL.cpp and STLFilt.pl. The higher depth specifications allow detection of more complex nested typenames. The 'L' option sets the maximum depth, and slows down processing considerably. However, this level of complexity may be necessary to handle things like STLport in debug mode. The 'S' option is roughly equivalent to the old default complexity; The 'M' supports more complexity than the original default, and is the new default. The default may be customized in STLFilt.pl by setting the value of the $def_depth_policy variable in the user-configurable section. Added documentation in INSTALL.txt and README.txt (Bugs/Limitations) regarding VC's behavior when searching for a CL.EXE to spawn. Turns out that just saying the Proxy CL has to be "in the system PATH" is wrong; see README.txt for the gory details. 5/28 (STLFilt.pl version 1.01) Added $| = 1; to the Perl script to force output autoflush. Duh. 5/28 (CL.cpp version 1.02) CUJ article posted on CUJ website as the Web Feature for July, 2001 Enlarged the fixed-length buffers used within hasExt() from 100 to BUFSIZE (now #defined up top as 500). Long pathnames were overflowing the original buffer size (thanks to Jan Stette for first reporting this, and also for the output autoflush fix above.) Separated out the version number of STLFilt.pl from CL.cpp. 5/25/01 (CL.cpp version 1.01) Fixed bug: double quotes in CL command line not handled properly (thanks to Dominic Mathieu for first reporting this.) 5/22/01 (CL.cpp, STLFilt.pl version 1.0) Official Release. CUJ website distribution version frozen. 5/17/01 (STLFilt.pl version .992) Removed unnecessary leading underscore checks from STLFilt.pl that used to be needed when I *thought* the STLport namespace was "STL", not "_STL" (as it actually is). This was just a dumb benign bug. Clarified some stuff in README.txt; added the "Bugs / Limitations" section to README.txt. Clarified some stuff in INSTALL.txt. 5/16/01 (STLFilt.pl version .991) Added all those "(\W)"'s in the front of "annoyances" r.e.'s and modified the substitution text, just in case the names are actually the tail end of a longer identifier 5/14/01 (STLFilt.pl version .99): Added support for the STLport 4.x standard containers (finally!) 5/13/01 Fixed Crash problem when CL invoked with no args at all. Whoops! 5/8/01 Revved STLTask to 1.1 (see README in STLTask package for details) 5/4/01 fixed extension-detecting bugs in CL 5/2/01 (version .982): Modified CL to recognize indirect command line files (@filename). Looks at the LAST argument of the LAST line ONLY!!! to determine whether or not to filter. Created STLTask program to control installation/uninstallation and filter toggle from the tray. Uses wxWindows (since I still can't stomach programming with MFC...) 4/30/01 (version .981): Changed CL to only activate filtering when the source file extension matches one of the strings in the explicit extension list filterExt, which should contain only valid C++ source file extensions (thanks to Wilka for this suggestion) 4/24/01 (version .97): Made sure CL.cpp put double quotes around command line parameters when rebuilding the command line for propagation to CL2. 4/18/01 (version to .96): Added support for multi-word types (that had somehow been totally overlooked) such as "unsigned long", "const signed char *", etc. Added some intelligent handling for wide-character variations of string (wstring) and streams (wistream and wostream). 4/4/01 (version .95): Added command-line specification of iterator policy to CC*.cpp and STLFilt.pl. Command line options of the form: /iter:x are now supported, where x may be: small, medium or large (only first letter is examined, ignoring case, so all abbreviations OK): small: $iter_policy set to 'S' (always truncated) medium: $iter_policy set to 'M' ("intelligent" truncation) long: $iter_policy set to 'L' (never truncate) If supplied on the CL command line, the option is simply passed along to STLFilt.pl, where it is recognized. The initial assignment to $iter_policy in STLFilt.pl specifies the *default* iteratior policy; any supplied /iter:x option now overrides that default.