home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / tvme30.zip / HISTORY.DOC < prev    next >
Text File  |  1995-08-02  |  42KB  |  780 lines

  1. TVMEditor Library History
  2. =========================
  3.  ** Turbo Vision 1.03 Users:
  4.  ** ------------------------
  5.  ** Please see the notes on 03/07/94 regarding a bug fix to the Turbo
  6.  ** Vision file TGROUP.CPP.  The bug fix is required so that
  7.  ** TVMFileEditor::valid() can work properly.  Also look at TVBC4BUG.DOC.
  8.  ** These bugs have been fixed in Turbo Vision 2.0.
  9.  **
  10.  ** Turbo Vision 2.0 Users:
  11.  ** -----------------------
  12.  ** Please see the notes on 06/25/94 regarding a bug fix to the Turbo
  13.  ** Vision file TSTATUSL.CPP and on 07/29/94 for a bug fix to the Turbo
  14.  ** Vision file TEVENT.CPP.  The bug fixes are required so that TVMEditor
  15.  ** will work properly.  If you have access to CompuServe, download
  16.  ** TV2BUG.ZIP from library 11 of the BCPPDOS forum which contains a list
  17.  ** of known Turbo Vision 2.0 bugs and their patches.
  18.  **
  19.  ** BC++ 4.0/4.02 32-BIT COMPILER WARNING:
  20.  ** --------------------------------------
  21.  ** Be careful when using any optimization (-O type options) with the
  22.  ** BC++ 4.0/4.02 32-bit compiler.  It tends to generate some bad code
  23.  ** or take hours to compile under certain situations when those options are
  24.  ** used.  If you experience problems when compiling 32 bit applications,
  25.  ** insure that all optimizations are turned off (i.e. use -Od as the last
  26.  ** command line switch or turn them all off via the Optimizations section
  27.  ** of the Local Options dialog in the IDE) and try again.  The BC++ 4.5
  28.  ** release apparently fixes these problem.  Use -DOPT32 with the TVMEditor
  29.  ** make files to include the optimizations and generate optimized code.
  30.  
  31. Version 3.00
  32. ------------
  33.     Thanks to Marc Brouillette, Clifford Pecota, and David Bench for the
  34. bug reports.  Thanks to Marc Brouillette, Clifford Pecota, and Hycel
  35. Taylor for the suggestions on new features.  Special thanks to Mike
  36. Lucek and Collaborator Systems for their many suggestions for
  37. improvements to the editor and word wrapping code and also for helping
  38. me find the bugs in the new features.
  39.  
  40. 08/02/95 - Version 3.00 released.
  41.  
  42. 07/22/95 - Updated the documentation.  The information in this file has
  43.            been shortened and you should refer to the manual which is
  44.            current and contains complete details on all items prior to
  45.            this date.
  46.  
  47. 06/27/95 - Fixed cursor positioning problem when overwrite blocks was
  48.            enabled.  Altered cmTextStart and cmTextEnd to place the cursor
  49.            at the start of the line and end of the line respectively instead
  50.            of maintaining the column position.
  51.  
  52. 06/14/95 - Fixed auto wrap so that the indentation is properly retained
  53.            and the cursor is positioned correctly when there is an indent
  54.            on the wrapped portion containing the cursor.  Note that
  55.            Trailing Spaces may need to be enabled to retain the indent
  56.            when blank lines are encountered.
  57.  
  58. 06/09/95 - Added 'ushort TVMEditor::getSelectedText(char *buffer, ushort
  59.            len, char LineTerm, Boolean *NotDone)' to retrieve the
  60.            selected text block from an editor.  Also added 'ushort
  61.            TVMEditor::getSelectedTextSize(char LineTerm)' which returns
  62.            the size of the selected text block.
  63.  
  64. 05/27/95 - Added cmForceReformat event that can be broadcast to force a
  65.            reformat of the editors/memos.  The editors/memos do not clear
  66.            the event so it will be passed to all active editor objects.
  67.            Fixed TVMMemo to adjust right margin properly when left boundary
  68.            is not zero.
  69.  
  70. 05/24/95 - Fixed some more problems with the new auto wrap/hard return
  71.            features.  Fixed insertAtCursor() to recognize CR/LFs.  Renamed
  72.            the DIAGNOSTICS flag to TVME_DIAG to avoid naming conflicts.
  73.  
  74. 04/28/95 - Added 'static char EOLMarker' to the TVMEditor class.  Set
  75.            this character to the one you want wrapPara() to use when
  76.            determining if a line should not be lengthened.  By default
  77.            it is '\xFF'.  For a usage example and an idea of what this
  78.            does, compile the demo with the switch '-DAUTOEOL'.
  79.  
  80. 04/25/95 - Altered TVMMemo::LoadMemo() to use the default line terminator
  81.            as set in the constructor or via setLineTerminator() if one is
  82.            not found in the text.  This function now returns True under
  83.            all circumstances.
  84.  
  85. 04/12/95 - Altered the demo to allow use of CSH 1.00 (Color Syntax
  86.            Highlighter Library).  See DEMO.MAK for details on how
  87.            to include it in the build.
  88.  
  89.            Fixed cmPrintBlock and cmWriteBlock so that they respected the
  90.            block's column start and end positions.
  91.  
  92. 04/04/95 - Fixed a bug in TVMEditor::setState() that caused a failure to
  93.            track ownership of the buffer when two memo fields or a file
  94.            editor and a memo field were sharing a buffer.
  95.  
  96. 03/23/95 - Added two more new option bits.  efNonPersistentBlocks and
  97.            efAllowOverwrite which combine to form efOverwriteBlocks.
  98.            These options allow the editor to use non-persistent and, if
  99.            selected, overwriteable blocks.  If non-persistent blocks are
  100.            enabled and overwriteable blocks are disabled, inserting text,
  101.            deleting text, or moving the cursor will simply deselect any
  102.            currently highlighted block.  Alternately, efAllowOverwrite
  103.            can be enabled along with efNonPersistentBlocks to delete the
  104.            selected block under those conditions.  Overwriteable blocks
  105.            are not possible with persistent blocks because you can move
  106.            the cursor away from the block.  Inserting text in that case
  107.            would delete the block and insert the new text at the wrong
  108.            location (this behaviour conforms to the way the BC++ 3.1 IDE
  109.            uses these options).
  110.            **NOTE: This has caused another renumbering of the efXXXX
  111.                    constants.  Alter any option dialog box code you are
  112.                    using to reflect these changes (see BLDRSC.CPP).
  113.  
  114. 02/26/95 - Added Boolean TVMEditor::insertAtCursor(const char *text).
  115.            This can be used to insert characters at the cursor's current
  116.            location.  It returns True if the insertion was successful
  117.            or False if it failed.  Text is inserted one character at a time
  118.            so that wrapping can occur if necessary.
  119.  
  120. 02/25/95 - Added 'long getTextSize(void)' to the TVMEditor and
  121.            TVirtualMemory classes.  Each returns the total number of
  122.            characters in the editor buffer.  The difference between the
  123.            two is that TVMEditor::getTextSize() will account for the
  124.            extra carriage return on each line when the efUseLFOnly
  125.            option bit is not set.
  126.  
  127.            Added the cmResizeReformat broadcast event.  This event
  128.            should be broadcast after cmTile and cmCascade so that all
  129.            open editors can reformat themselves if they have their Wrap
  130.            on Resize option bit enabled.  Derived edit windows may also
  131.            need to issue this event to their editors when cmZoom is
  132.            seen.  TVMEditWindow does this automatically.  Examples:
  133.  
  134.              case cmTile:                //  Tile current windows
  135.                  deskTop->tile(deskTop->getExtent());
  136.  
  137.                  // Tell all editors to Reformat on Resize if they need to.
  138.                  message(deskTop, evBroadcast, cmResizeReformat, NULL);
  139.                  break;
  140.  
  141.              case cmCascade:             //  Cascade current windows
  142.                  deskTop->cascade(deskTop->getExtent());
  143.  
  144.                  // Tell all editors to Reformat on Resize if they need to.
  145.                  message(deskTop, evBroadcast, cmResizeReformat, NULL);
  146.                  break;
  147.  
  148.  
  149.              TVMEditWindow::handleEvent() code:
  150.  
  151.              // Tell the editor to Reformat on Resize if necessary.
  152.              if(event.what == evCommand && event.message.command == cmZoom)
  153.              {
  154.                  TWindow::handleEvent(event);
  155.                  message(editor, evBroadcast, cmResizeReformat, NULL);
  156.              }
  157.              else
  158.                  TWindow::handleEvent(event);
  159.  
  160. 02/18/95 - Fixed TVMMemo::LoadMemo() so that it refreshes the editor's
  161.            local line buffer and the display when new information is
  162.            loaded.
  163.  
  164. 01/07/95 - Received BC++ 4.5 and tested the updated 32-bit compiler with
  165.            the code optimizations.  I found out that EBX can by used
  166.            like EDI and ESI by the BC++ 4.xx compilers and should be
  167.            preserved by any 32-bit assembler modules that use it.
  168.            UNIQNAME.ASM, DPMIDESC.ASM, and SCANBKWD.ASM were altered to
  169.            save and restore the (E)BX register.  BC++ 4.5 tends to
  170.            favour EBX for the 'this' pointer whereas BC++ 4.0/4.02
  171.            tended to favour EDI.
  172.  
  173.            BLDRSC.CPP, TVEDIT1.CPP, TVMINDIC.CPP, TVMEDWIN.CPP, and
  174.            TVMEDSTR.CPP required the addition of #define
  175.            Uses_TStreamableClass prior to #include <tv.h>.  I think this
  176.            is because BC++ 4.5 has tightened up the language rules once
  177.            again and requires TStreamableClass to have its class
  178.            definition processed.
  179.  
  180.            Altered the make files to allow optimizations in the build
  181.            for 32-bit protected mode versions.  Use '-DOPT32' to enable
  182.            them.  So far, no problems have been experienced with BC++
  183.            4.5's use of the code optimizations in question.  This option
  184.            should *NOT* be used with BC++ 4.02 or less however..
  185.  
  186. 12/07/94 - Added the default TV 2.0 DPMI module definition file
  187.            (TV20DPMI.DEF) to the DEMO.MAK build.  See TV2BUGS.ZIP for
  188.            details on why this should be used for all TV 2.0 DPMI
  189.            applications.
  190.  
  191. 12/04/94 - Added Signs of Life calls in the wrapPara() function and altered
  192.            the demo handler to include it.  Also modified the terminating
  193.            slDone calls so that it sets sl_Type to slDone to prevent problems
  194.            if Signs of Life are subsequently disabled.  For wrapPara(), the
  195.            caller must start and end Signs of Life.  This is because
  196.            wrapPara() may return sooner than the caller wants due to the
  197.            wrapping rules.
  198.  
  199. 11/28/94 - Added cmAutoWrapMode (Default: ^OM) and cmWrapOnResize (Default:
  200.            ^OR) as commands to change the associated editor modes.  Note
  201.            that toggling Auto Wrap mode on and off via the keyboard will NOT
  202.            toggle normal wrap mode on and off.  It just defines slightly
  203.            different rules when performing word wrapping.  These options
  204.            turned out better than expected, so I have moved their option
  205.            bits into a position where they are also considered to be local
  206.            options.  Please note that this has resulted in a renumbering of
  207.            the efXXXX and cmXXXX constants.
  208.  
  209.            The 'W' flag on TVMIndicator was altered to display a lowercase
  210.            'w' when Auto Wrap Mode is disabled and an uppercase 'W' when
  211.            Auto Wrap Mode is enabled.
  212.  
  213.            efSetROonLoad is now one of the default global options and I have
  214.            set the default right margin to 72 as I've found that I use that
  215.            value more often than 76.
  216.  
  217.            Altered SWAPVMEM.CPP so that it can be compiled by users who
  218.            do not have TASM 4.0.  The #pragma inline is for my debugging
  219.            purposes only.
  220.  
  221. 11/27/94 - The minimum conventional memory buffer size has been reduced to
  222.            1K.  The TVMMemo constructor has been altered to use 1K as its
  223.            default for the bufSizeInK parameter.  This makes the memo fields
  224.            as memory efficient as possible.  Page size is set to the maximum
  225.            line length whenever a bufSizeInK value less than 4 is specified.
  226.            You can also use buffers smaller than 4K for editors at the cost
  227.            of performance.
  228.  
  229. 11/11/94 - Fixed a bug in wrapPara() that caused loss of spaces when hard
  230.            tabs where present in a line.  Also altered the code slightly to
  231.            prevent redundant putLineLRU() calls.  This greatly reduces its
  232.            use of virtual memory when no wrapping is really needed.  This is
  233.            most noticeable when using the Wrap On Resize feature.
  234.  
  235.            Fixed a bug in the auto wrap function that caused several
  236.            anomalies in cursor movement when auto wrapping was enabled.
  237.  
  238.            Changed TVMMemo::RetrieveMemo so that it insures the last edited
  239.            line is saved.  If TVMMemo::valid() was not used, it sometimes
  240.            missed the last edits if the cursor didn't leave the line.
  241.  
  242. 11/02/94 - Changed VMEMPAGESIZE in TVIRTMEM.H to 65537L for DPMI16 and
  243.            DPMI32.  65536L caused GlobalReAlloc() to GPF.  This is a bug in
  244.            the 16-bit RTM.EXE.  It worked fine in 32-bit protected mode.
  245.            Borland is aware of the problem.
  246.  
  247. 10/25/94 - Fixed incorrect usage of '||' instead of '&&' in
  248.            TVMMemo::setLineTerminator().
  249.  
  250.            Added support for BC++ 3.1 with Turbo Vision 2.0 in the make
  251.            files.  Download B31TV2.ZIP from library 11 of the BCPPDOS forum
  252.            on CompuServe for full information on how to compile the TV 2.0
  253.            library for use with the BC++ 3.1 compiler.
  254.  
  255. 10/03/94 - Support for automatic word wrapping has been added.  To use it,
  256.            the efAutoWrap bit must be enabled.  Auto wrapping may use a lot
  257.            of virtual memory if undo/redo is enabled.  If virtual memory is
  258.            at a premium, you might want to consider turning off undo/redo
  259.            when auto wrapping is enabled.
  260.  
  261.            To support the new efAutoWrap option bit, I have added the
  262.            function void TVMEditor::doAutoWrap(void).  It is called after
  263.            each of the cmDelXXXX commands and from the insertChar()
  264.            function.
  265.  
  266. 09/28/94 - The efReadOnly and efSetROonLoad bits are now considered "other
  267.            options" and appear after the global option bits.  These bits are
  268.            available for your use, but probably should not be user
  269.            modifiable via a dialog box.  They are in the demo program's
  270.            Default Editor Options dialog box so that you can see the effects
  271.            of having these bits turned on or off.  The most likely use of
  272.            these bits is to turn them on in the application's start-up code
  273.            and leave them on.  The editors will inherit and use them like
  274.            the other local options.
  275.  
  276.            Added void TVMEditor::reformatAll(void) as a means to support the
  277.            new efWrapOnResize option bit.  It performs an unconditional
  278.            reformat of the entire document.  Please be aware that unlike a
  279.            dedicated file viewer, TVMEditor is not designed to handle this
  280.            sort of thing by default.  As noted in the documentation, if
  281.            text is formatted in specific ways, it may reformat too much or
  282.            not enough.  It is generally best used on small Read Only files
  283.            or memos consisting of text formatted into paragraphs.  Refer to
  284.            the documentation on the auto wrapping, wrap on resize, and
  285.            EOLMarker options for information that will help you in the event
  286.            that you wish to use the Wrap On Resize feature.
  287.  
  288. 09/25/94 - Added a 'Boolean releaseMem' parameter to the doneBuffer()
  289.            functions.  By default, it is True.  This will allow the
  290.            deleteLineInfo() function to release all virtual memory back to
  291.            the system for use by other editors.  If you wish to retain the
  292.            purged information for undo/redo purposes, pass this new
  293.            parameter as False.
  294.  
  295.            Reassigned the MemoryCheck values and added a TVMAutoDetect
  296.            definition.  If set to TVMAutoDetect, the virtual memory system
  297.            will decide at runtime whether to use EMS or XMS based on which
  298.            is more abundant.  If both EMS and XMS are available in equal
  299.            amounts, XMS will be favoured.  The default value for MemoryCheck
  300.            is now TVMAutoDetect.
  301.  
  302.            The virtual memory system has been altered by moving the EMS/XMS
  303.            detection code into a separate function.  This made it easier to
  304.            implement TVMAutoDetect support and also the ability to query the
  305.            system as to how much of each type of memory is free.  New
  306.            functions (only present in the real mode library):
  307.  
  308.                 static void TVirtualMemory::detectMemory(void);
  309.                 static void TVirtualMemory::queryFree(long *EMS, long *XMS);
  310.  
  311.            The THeapViewer class for the demo has been updated so that the
  312.            real mode version displays free EMS and XMS memory amounts too.
  313.            E=EMS, X=XMS, C=Conventional memory.  All amounts are in K-bytes.
  314.  
  315. 09/24/94 - Fixed a bug in the TVirtualMemory class that resulted in a page
  316.            occasionally swapping out before it was supposed to due to
  317.            priority deadlocks when manipulating megabyte-sized blocks.
  318.  
  319.            Due to the abysmally slow speed when cutting and pasting
  320.            megabyte-sized blocks of text, I have optimized the virtual
  321.            memory system.  The bottleneck was in the way it handled line
  322.            information.  By optimizing those operations, shifting huge
  323.            blocks of text around is up to 30 to 40 times faster with this
  324.            release.  Performance may degrade slightly over time, especially
  325.            when undo/redo is enabled, but it never gets anywhere near as
  326.            slow as the prior versions.
  327.  
  328.            To prevent the editors from retaining virtual memory that they no
  329.            longer require when undo/redo is turned off, the function 'void
  330.            TVirtualMemory::resetVirtualMemory()' was added.  It is called by
  331.            deleteLineInfo() when the entire contents is deleted.  It simply
  332.            releases all allocated virtual memory, removes any swap file it
  333.            may be using, and resets all virtual memory variables to their
  334.            initial state.  This makes the editors more efficient because
  335.            they will return all unused memory to the system for re-use
  336.            instead of holding it indefinitely when it may never be re-used.
  337.            This is especially true when dealing with subsequent clipboard
  338.            operations or after a call to TVMEditor::doneBuffer().
  339.  
  340. 09/14/94 - Altered TVMFileEditor to make use of the new efSetROonLoad bit.
  341.            If set and a Read Only file is loaded into the editor, the Read
  342.            Only bit is automatically turned on so that it can't be edited.
  343.  
  344. Version 2.00
  345. ------------
  346.     Thanks to John Gilbert, Hycel Taylor, Ronnie Wulfsohn, Mark Pinnuck, and
  347. Christopher Pope for pointing out a couple of potential problems, bugs, and
  348. oversights.  Thanks to Borland for finally releasing an updated Turbo Vision
  349. and a protected mode compiler.
  350.  
  351.     Starting with this version I have decided to drop the library only
  352. registrations and go with a single, full source registration.  Over 90% of
  353. prior registrations were for the full source version.  Also, due to the two
  354. compiler and two Turbo Vision versions, attempting to manage and generate
  355. all the different registration types and library types became cumbersome.
  356. The source code can be used to generate a library for any compiler/Turbo
  357. Vision combination via conditional compilation.  I have also switched over
  358. to using make files to simplify the build process due to the various types
  359. of library that can now be generated.  Using make files allows the creation
  360. of various forms of the library by simply specifying some command line
  361. switches.  Read the header comments in the make files.  They will give you
  362. all the necessary details.
  363.  
  364. 07/31/93 - Version 2.00 released.
  365.  
  366. 07/29/94 - Updated the documentation.
  367.  
  368.            *** This bug fix pertains only to Turbo Vision 2.0 users ***
  369.            Tracked down a bug in TEVENT.CPP.  In 32-bit protected mode,
  370.            calls to the Win32 console functions fill in the
  371.            event.mouse.controlKeyState data member.  When using real mode or
  372.            16-bit protected mode, this data member is not filled in with any
  373.            value.  The garbage value in it causes unpredictable results if
  374.            you try to make use of it.  Here is the fix:
  375.  
  376.            In TEVENT.CPP, lines 105-107 in TEventQueue::getMouseEvent() are:
  377.  
  378.                    ev.mouse.eventFlags = 0;
  379.  
  380.                    if( ev.mouse.buttons == 0 && lastMouse.buttons != 0 )
  381.  
  382.            Change them to:
  383.  
  384.                    ev.mouse.eventFlags = 0;
  385.  
  386.            #if !defined(__FLAT__)              // BUG FIX
  387.                    ev.mouse.controlKeyState = THardwareInfo::getShiftState();
  388.            #endif
  389.  
  390.                    if( ev.mouse.buttons == 0 && lastMouse.buttons != 0 )
  391.  
  392.            ******************************************************************
  393.  
  394. 07/24/94 - Added 'Boolean TVMMemo::setLineTerminator(char lTerm)' to the
  395.            TVMMemo class.  Pass it '\x0', '\r' (for "\r\n"), or '\n' to set
  396.            the line terminator type.  This is useful for buffers that are
  397.            (or could be) blank when constructed and executed.  By default,
  398.            such memo fields default to using '\r' (CR+LF) as the line
  399.            terminator.
  400.  
  401.            Added code to create a low memory descriptor to access the BIOS
  402.            keyboard flags.  If you define your own descriptor to access the
  403.            BIOS keyboard flags directly as I just did, *DON'T* use TV's
  404.            kbXXXXX constants as bit masks for CAPS, NumLock, etc.  In the
  405.            flat memory model it uses the constants from WINCON.H which don't
  406.            match up to the real and 16 bit mode constants.  Either define
  407.            your own constants to match the others or use literal values
  408.            instead.  Don't ask how long it took me to figure that one out.
  409.  
  410.            Added the function 'void AllocateDescriptor(void)' to the
  411.            library.  The TVMEditor constructor calls it to allocate a
  412.            descriptor used in accessing the BIOS keyboard flags and to
  413.            register an exit function that will free it when the program
  414.            ends.  On subsequent calls, it will simply return.  To go with
  415.            this a new static data member was added:
  416.  
  417.                 static unsigned short TVMEditor::lowMemDesc;
  418.  
  419.            This is public and you are free to use it so that your own code
  420.            can access the BIOS etc.  If you use it prior to instantiating an
  421.            editor, call AllocateDescriptor() to establish its value.
  422.  
  423. 07/07/94 - Added a private data member 'static short MaxAllocatedPages' and
  424.            public access functions 'static void setMaxAllocation(long
  425.            maxBytes)' and 'static void getMaxAllocation(void)' to the
  426.            TVirtualMemory class.  These can be used to set or get the
  427.            maximum number of bytes (tracked internally as pages) that can be
  428.            allocated by an instance of the class before disk swapping is
  429.            forced.  This prevents one editor from consuming all available
  430.            memory.
  431.  
  432.            Got the 32 bit assembler versions of unique_name(), scanFwd(),
  433.            and scanBkwd() working.  Note that in scanBkwd(), the 'short
  434.            SearchLen' parameter was changed to 'int SearchLen' to make the
  435.            prototypes the same for the 16 and 32 bit versions.  The 32 bit
  436.            version pushes a 32 bit int on the stack instead of a 16 bit
  437.            short probably due to the return value of strlen() being used in
  438.            there somewhere (?).  Anyway, the type change keeps it working
  439.            properly in either version.
  440.  
  441.            Fixed up the heap viewer code a little so that it displays a more
  442.            accurate total of the free memory available in 32 bit protected
  443.            mode.
  444.  
  445. 07/05/94 - Added 'inline void setDefaultMessage(const char *msg)' to the
  446.            TVMEditor class to allow setting of the indicator message from a
  447.            source external to the TVMEditor class or one derived from it.
  448.  
  449. 06/30/94 - Scrapped the 16/32 bit DPMI virtual memory class that I wrote
  450.            earlier and started again.  Now the class works in a similar
  451.            fashion to the EMS/XMS version (SWAPVMEM.CPP is replaced by
  452.            SWAPDPMI.CPP) but uses the abundant supply of conventional memory
  453.            before swapping to disk.  My knowledge of protected mode memory
  454.            allocation is limited right now, so this may change again later
  455.            when I understand protected mode programming better.
  456.  
  457. 06/25/94 - *** This bug fix pertains only to Turbo Vision 2.0 users ***
  458.            Tracked down a bug in TSTATUSL.CPP when a status line object is
  459.            stored in a resource file using 32 bit protected mode.  The size
  460.            difference for 'int' (32 bits long) and 'short' (16 bits long)
  461.            causes the application to crash when reading it back in.  Here's
  462.            how to fix it:
  463.  
  464.            In TStatusLine::readItems(), line 267 is:  int key, cmd;
  465.                                        Change it to:  ushort key, cmd;
  466.  
  467.             In TStatusLine::readDefs(), line 287 is:  int min, max;
  468.                                        Change it to:  ushort min, max;
  469.            *****************************************************************
  470.  
  471.            XY block marking required changes to the hasSelection() function.
  472.            These changes are to insure proper detection of a marked block
  473.            but now prevent it from being an inline function.  Therefore, it
  474.            was moved to TVMEDIT1.CPP and only the prototype exists in
  475.            TVMEDIT.H.
  476.  
  477. 06/24/94 - Start Block (^KB) and End Block (^KK) can now be used to alter
  478.            the starting or ending point of a marked block.  This provides an
  479.            effective block extension method if you ever start or stop the
  480.            block in the wrong place (shift-clicking the mouse can also be
  481.            used (noted below) but it works in a slightly different manner).
  482.            Note that if you hit ^KB (start block) at a position after the
  483.            end point, the old block will be unselected and a new block
  484.            started.  If you hit ^KK (end block) at a position prior to the
  485.            start point, the request is ignored.
  486.  
  487.            The persistent marked block was a little too persistent in
  488.            nature.  Therefore, the TVMEditor::adjustBlock() function was
  489.            added and other necessary code was added to some existing
  490.            functions so that as text is edited, the block start and end
  491.            points are adjusted to maintain their proper position whenever
  492.            possible.
  493.  
  494. 06/21/94 - Added conditional compilation for 32 bit inline assembler code to
  495.            TVMEDIT1.CPP and TVMINDIC.CPP.  This caused the compiler to crash
  496.            or give odd errors when it recompiled via assembler.  The 32 bit
  497.            assembler code was then replaced with straight C code or
  498.            __emit()__ statements for when the library is compiled for the
  499.            flat memory model.  32 bit inline assembler does work in other
  500.            modules though.  Possible compiler bug?  Problems seems to be
  501.            related to the streamable stuff in the generated assembler
  502.            source.
  503.  
  504.            Added a cmReSynch command that the TVMFileEditor class will
  505.            recognize as an evBroadcast event.  When received, it will check
  506.            the date and time stamp of its associated file on disk (if one
  507.            exists).  If the date and/or time stamp is different, it will
  508.            call the editorDialog() function with a value of edReSynch and a
  509.            pointer to the filename.  You can make the editorDialog()
  510.            function query the user as to whether or not the file should be
  511.            reloaded or simply return cmYes to force a reload.  Not handling
  512.            the event or returning a value other than cmYes will prevent the
  513.            file from being reloaded.
  514.  
  515. 06/20/94 - Finally had some time to finish changing the line-only block
  516.            marking to XY (column + row) marking to mimic the original
  517.            TEditor classes.  To this end, 'short selStartC' and 'short
  518.            selEndC' (start line column and end line column) where added to
  519.            the TVMEditor class.  A 'Boolean isSelecting' parameter was also
  520.            added to the TVMEditor::moveChar() and TVMEditor::moveWord()
  521.            functions too. In those functions, and TVMEditor::moveLine() as
  522.            well, it is set to default to False if unspecified in the
  523.            function call.  Two extra smXXXXX constants (smMouse and smLine)
  524.            were added to TVMEDIT.H to signal that the mouse is being used to
  525.            mark a block of text.  smLine indicates that the starting point
  526.            was double clicked to select whole lines as the mouse is dragged.
  527.  
  528.            Note that this change significantly alters the way blocks of text
  529.            are selected.  The block selection now mimics that of the
  530.            original TEditor in that it can start and end on any column
  531.            within a line.  This includes the ability for a block of text to
  532.            start and end on the same line (i.e. to highlight a single word
  533.            or a few characters).  Clicking the mouse anywhere within the
  534.            text will move the cursor to the new location as before, but will
  535.            also cause any currently selected block of text to become
  536.            unselected and mark the new cursor location as the start of the
  537.            selected text.  Dragging the mouse will extend the block.  Double
  538.            clicking the starting point will allow you to select whole lines
  539.            as you drag the mouse up or down.  A block can also be extended
  540.            by shift-clicking (hold down either shift key and click the mouse
  541.            in the new location).
  542.  
  543.            Be aware that the commands that worked on whole lines before
  544.            such as Paragraph Reformat, Indent Lines, Unindent Lines, Center
  545.            Lines, and Align Text will still use only with whole lines
  546.            regardless of where the block starts or ends.
  547.  
  548. 05/29/94 - Added a new data member to the GlobalEditorOptions structure:
  549.            char PrintDevice[MAXPATH].  By default, it is set to LPT1, but it
  550.            can be changed to LPT2, COM1, COM2, a filename, etc.  This allows
  551.            the default TVMFileEditor::PrintBuffer() function to be a little
  552.            more flexible by allowing the user to specify the output device.
  553.            It was also altered to use low level, unbuffered, binary writes
  554.            so that it stops printing when there is an error and ESC is
  555.            pressed in the critical error handler.  fprintf() didn't always
  556.            do this properly because it buffered the output.
  557.  
  558. 05/26/94 - Changed all occurances of 'near' to _NEAR, 'far' to _FAR, and
  559.            'huge' to _HUGE so that the code is compatible with 32 bit DPMI
  560.            which uses a flat memory model (doesn't use or need near, far,
  561.            and huge).
  562.  
  563. 05/25/94 - Improved the performance of TVMFileEditor's read and write
  564.            functions by using an adjustable buffer.  It shouldn't be quite
  565.            so slow on large files now.  However, do note that unlike most
  566.            editors, the text is moved through a small conventional memory
  567.            buffer instead of being allowed to utilize all available memory
  568.            for storage.
  569.  
  570.            Started adding the necessary alterations to make the library TV
  571.            1.03, TV 2.0, and DPMI compatible.
  572.  
  573. 05/20/94 - Due to several requests and my own forgetfulness as to why I ever
  574.            made it protected in the first place, 'LocalEditorOptions Opts'
  575.            is now a public member of TVMEditor.  This makes it a whole lot
  576.            easier to directly alter the tab size, indent size, and right
  577.            margin value without going through a user dialog or derived
  578.            class.
  579.  
  580.            Combined the following functions:
  581.                void TVMEditor::forceUpLow(long from, long to, ushort cmnd);
  582.                void TVMEditor::toggleCase(long from, long to);
  583.                void TVMEditor::indentLines(long from, long to);
  584.                void TVMEditor::unindentLines(long from, long to);
  585.                void TVMEditor::centerLines(long from, long to);
  586.                void TVMEditor::alignText(long from, long to);
  587.  
  588.            into one function:
  589.                void TVMEditor::alterText(long from, long to, ushort cmnd);
  590.  
  591.            The basic logic flow of the above functions was identical and it
  592.            made more sense to combine them in light of the modifications for
  593.            "Signs Of Life" (see below) and impending changes to implement XY
  594.            block marking.  Otherwise there would have been a lot of
  595.            unnecessary code duplication.  It also allows for a user hook to
  596.            alter blocks of text in ways other than cmForceUpper,
  597.            cmForceLower, cmToggleCase, cmIndentBlock, cmUnindentBlock,
  598.            cmCenterLines, and cmAlignText.  If the 'cmnd' parameter is not
  599.            one of those, the editorDialog() function is called with a value
  600.            of edAlterText followed by the command, a pointer to the line's
  601.            text, and starting and ending columns values which denote what
  602.            part of the line should be affected by the command.  If the
  603.            editorDialog() function returns cmCancel, nothing is changed.  If
  604.            it returns cmOK, then the altered text is stored.  This makes the
  605.            editor more extensible.
  606.  
  607.            Signs Of Life
  608.            -------------
  609.            General additions for the "Signs of Life" modification:
  610.  
  611.     // These are the different states that the signsOfLife() function can be
  612.     // called to handle.
  613.     enum SignsOfLife { slInitiate, slReporting, slHide, slShow, slDone };
  614.  
  615.     // Signs of Life handler definitions
  616.     typedef void (*TVMSignsOfLife)(SignsOfLife, ushort, long, long);
  617.     void VMdefSignsOfLife(SignsOfLife, ushort, long, long);
  618.  
  619.            The GlobalEditorOptions structure contains these two extra
  620.            fields:
  621.  
  622.     // Signs of Life.
  623.     // These two values indicate when signs of life should be issued by
  624.     // the editor.  What this means is that after initThreshold lines,
  625.     // the editor will place a call to the signsOfLife() function to let
  626.     // the user know it is still working and hasn't locked up.  After that,
  627.     // it will place a call to it every reportInterval lines.
  628.     short initThreshold;
  629.     short reportInterval;
  630.  
  631.            The TVMEditor class now contains an additional static pointer
  632.            member (like it does for editorDialog).
  633.  
  634.     static TVMSignsOfLife _NEAR signsOfLife;       // Signs of Life function.
  635.  
  636.            For complete details on how this all works, read the manual
  637.            sections on Signs of Life and for the above items.  Also look at
  638.            the demo program in TVEDIT3.CPP.  It has a simple but functional
  639.            example.
  640.  
  641. 05/19/94 - Added to TVMEditor    : virtual void doneBuffer(void)
  642.            Added to TVMFileEditor: virtual void doneBuffer(Boolean reloadFile)
  643.            I missed this one from the original TEditor classes.  See the
  644.            manual for full details and also the reference to cmReSynch in
  645.            the 06/21/94 notes.
  646.  
  647. 05/09/94 - Added one new function to the library in general and added two
  648.            new functions to the TVMEditor class (see manual for details):
  649.  
  650.        char *unique_name(char *s);
  651.  
  652.        void TVMEditor::setSelect(short fromX, long fromY, short toX,
  653.             long toY, Boolean goTop = False);
  654.  
  655.        void TVMEditor::putCursorAt(short x, long y, Boolean center = False);
  656.  
  657.            Finally made TVirtualMemory::MemoryCheck's default value
  658.            TVMXMSFirst to look for XMS before EMS.  In most cases, it is
  659.            more readily available than EMS memory.
  660.  
  661. 05/06/94 - Fixed a bug in TVMMemo::LoadMemo() that caused a single line
  662.            terminated by a NULL to be ignored.  Please note that for single
  663.            lines like this, the LineTerminator setting used when retrieving
  664.            the text will be set to the NULL character.  If you want lines of
  665.            text to be terminated with a line feed or carriage return+line
  666.            feed upon retrieval and it is possible that only a single NULL
  667.            terminated line may be inserted to start with, be sure to append
  668.            such character(s) to the end of the text before loading the memo
  669.            field.
  670.  
  671. 04/08/94 - Made the TVMEditor::setXIndex() and TVMEditor::setScrIndex()
  672.            virtual.  These two functions are used to synchronize the screen
  673.            cursor and text insertion point.  They were made virtual to allow
  674.            the embedding of special codes in the text.  Overriding these
  675.            functions allows you to skip past them and maintain a proper
  676.            cursor position.
  677.  
  678. 04/06/94 - Made the TVMEditor::drawLines() function virtual.  This is the
  679.            function that does the real screen updates and will need to
  680.            be overridden in derived classes that alter the drawing mechanism.
  681.  
  682. 03/31/94 - Added a new private data member and an access function to the
  683.            TVMIndicator class: const char *DefaultMsg and
  684.            inline void TVMIndicator::setDefaultMessage(const char *msg);
  685.  
  686. 03/28/94 - Added preprocessor directives to TVIRTMEM.H so that string.h
  687.            got included if it hadn't been done already.  This is because
  688.            some inline functions in it use strcpy().
  689.  
  690.            Altered TVMIndicator::draw() slightly to suppress the display of
  691.            the modification indicator when in Read Only mode so that it
  692.            doesn't show up when text is being altered by an external source
  693.            on purpose (i.e. a terminal object with scrollback).
  694.  
  695. Version 1.10
  696. ------------
  697.     Thanks to Randy at Safari Software for the suggestion to merge the
  698. separate EMS and XMS versions into one library that would handle either type
  699. based on what was available at runtime.  Thanks to David Bench and Chris
  700. Abdelmalek for reporting a couple of bugs and other problems that are now
  701. fixed.
  702.  
  703. 03/10/94 - Version 1.10 released.
  704.  
  705. 03/07/94 - *** This bug fix now pertains only to Turbo Vision 1.03 users ***
  706.            After looking for a bug in the TVMFileEditor class, it was
  707.            discovered that a bug fix is needed in Turbo Vision's TGROUP.CPP.
  708.            As it stands, the call to messageBox() in the doEditDialog()
  709.            function prompting to save an altered or untitled file changes
  710.            the value of a static local variable in TGROUP.CPP because the
  711.            message dialog box calls its valid() function before closing.
  712.            Subsequent calls to any valid() function after that (i.e. other
  713.            modified or untitled editors) result in the "command" parameter
  714.            containing the value returned by the messageBox() function, not
  715.            the cmQuit command that should be there.  This causes the valid()
  716.            function of the other editors (or other objects) to perform
  717.            incorrectly.  Here's what to do:
  718.  
  719.            In TGROUP.CPP, lines 503 to 514 are:
  720.  
  721.            static ushort cmd;
  722.  
  723.            Boolean isInvalid( TView *p, void * )
  724.            {
  725.                return Boolean( !p->valid( cmd ) );
  726.            }
  727.  
  728.            Boolean TGroup::valid( ushort command )
  729.            {
  730.                cmd = command;
  731.                return Boolean( firstThat( isInvalid, 0 ) == 0 );
  732.            }
  733.  
  734.            Change them to:
  735.  
  736.            // !! static ushort cmd;     // COMMENT OUT OR DELETE THIS LINE.
  737.  
  738.            Boolean isInvalid( TView *p, void *commandP )
  739.            {
  740.                return Boolean( !p->valid( *(ushort *)commandP ) );
  741.            }
  742.  
  743.            Boolean TGroup::valid( ushort command )
  744.            {
  745.                // Pass a pointer to the command, DON'T use a static variable.
  746.                return Boolean( firstThat( isInvalid, &command ) == 0 );
  747.            }
  748.  
  749.            This fix and many others can be found in the files KVBUGS.ZIP,
  750.            TVBUGS.ZIP, and SYSFIX.ZIP in library 11 of the BCPPDOS forum.
  751.            One thing to note, I think there are two copies of TVBUGS.ZIP in
  752.            the library, one is 3K the other 13K in size.  You will want the
  753.            one that is 13K.  You may need to go in and retrieve it manually
  754.            instead of letting an automated navigator program go after it.
  755.            Once you apply the above patch to the TGROUP.CPP source file and
  756.            rebuild the TV.LIB library, a recompiled TVEDIT or other
  757.            application will work as advertised.  My library already
  758.            contained the above fix with the initial release so I was not
  759.            aware of the problem until a user reported it.
  760.            *****************************************************************
  761.  
  762.            Added a TVirtualMemory::Broadcast() member function to handle
  763.            events that should be broadcast to all owners of a shared buffer.
  764.  
  765. 02/28/94 - Added the TVirtualMemory::MemoryCheck data member to the
  766.            virtual memory class to allow the setting of a user
  767.            preference regarding EMS/XMS usage.  This is only accessible
  768.            from the registered version.  The supplied demo executable
  769.            does demonstrate this ability though (See Options | Start-Up
  770.            Options).
  771.  
  772.            Merged the low level XMS function code into the EMS functions to
  773.            form one library that uses either EMS or XMS based on what is
  774.            available and takes into account the user's preference for memory
  775.            type.
  776.  
  777. Version 1.00
  778. ------------
  779. 02/18/94 - Version 1.00 released.
  780.