home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / vrac / ve2tv103.zip / HISTORY.DOC < prev    next >
Text File  |  1994-07-31  |  26KB  |  478 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 bugs in Turbo Vision 2.0.
  18.  **
  19.  ** 32 BIT COMPILER WARNING:
  20.  ** -----------------------
  21.  ** Be careful when using any optimization (-O type options) with the
  22.  ** BC++ 4.02 32 bit compiler just yet.  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.  Of course, if a
  28.  ** patch has been released to fix these problems and you have applied it,
  29.  ** ignore this warning.
  30.  
  31. Version 2.00
  32. ------------
  33.     Thanks to John Gilbert, Hycel Taylor, Ronnie Wulfsohn, Mark Pinnuck, and
  34. Christopher Pope for pointing out a couple of potential problems, bugs, and
  35. oversights.  Thanks to Borland for finally releasing an updated Turbo Vision
  36. and a protected mode compiler.
  37.  
  38.     Starting with this version I have decided to drop the library only
  39. registrations and go with a single, full source registration.  Over 90% of
  40. prior registrations were for the full source version.  Also, due to the two
  41. compiler and two Turbo Vision versions, attempting to manage and generate
  42. all the different registration types and library types became cumbersome.
  43. The source code can be used to generate a library for any compiler/Turbo
  44. Vision combination via conditional compilation.  I have also switched over
  45. to using make files to simplify the build process due to the various types
  46. of library that can now be generated.  Using make files allows the creation
  47. of various forms of the library by simply specifying some command line
  48. switches.  Read the header comments in the make files.  They will give you
  49. all the necessary details.
  50.     If you would like a library only version, please contact me via
  51. CompuServe E-Mail or regular postal mail for pricing and availability.  See
  52. the ORDER.DOC file for information on registering new versions or upgrading
  53. from a prior version.
  54.  
  55. 07/31/93 - Version 2.00 released.
  56.  
  57. 07/29/94 - Updated the documentation.  Some of the items from this file were
  58.            condensed and now refer you to the manual which is current and
  59.            contains information on all items prior to this date.
  60.  
  61.            *** This bug fix pertains only to Turbo Vision 2.0 users ***
  62.            Tracked down a bug in TEVENT.CPP.  In 32-bit protected mode,
  63.            calls to the Win32 console functions fill in the
  64.            event.mouse.controlKeyState data member.  When using real mode or
  65.            16-bit protected mode, this data member is not filled in with any
  66.            value.  The garbage value in it causes unpredictable results if
  67.            you try to make use of it.  Here is the fix:
  68.  
  69.            In TEVENT.CPP, lines 105-107 in TEventQueue::getMouseEvent() are:
  70.  
  71.                    ev.mouse.eventFlags = 0;
  72.  
  73.                    if( ev.mouse.buttons == 0 && lastMouse.buttons != 0 )
  74.  
  75.            Change them to:
  76.  
  77.                    ev.mouse.eventFlags = 0;
  78.  
  79.            #if !defined(__FLAT__)              // BUG FIX
  80.                    ev.mouse.controlKeyState = THardwareInfo::getShiftState();
  81.            #endif
  82.  
  83.                    if( ev.mouse.buttons == 0 && lastMouse.buttons != 0 )
  84.  
  85.            ******************************************************************
  86.  
  87. 07/24/94 - Added 'Boolean TVMMemo::setLineTerminator(char lTerm)' to the
  88.            TVMMemo class.  Pass it '\x0', '\r' (for "\r\n"), or '\n' to set
  89.            the line terminator type.  This is useful for buffers that are
  90.            (or could be) blank when constructed and executed.  By default,
  91.            such memo fields default to using '\r' (CR+LF) as the line
  92.            terminator.
  93.  
  94.            Added code to create a low memory descriptor to access the BIOS
  95.            keyboard flags.  If you define your own descriptor to access the
  96.            BIOS keyboard flags directly as I just did, *DON'T* use TV's
  97.            kbXXXXX constants as bit masks for CAPS, NumLock, etc.  In the
  98.            flat memory model it uses the constants from WINCON.H which don't
  99.            match up to the real and 16 bit mode constants.  Either define
  100.            your own constants to match the others or use literal values
  101.            instead.  Don't ask how long it took me to figure that one out.
  102.  
  103.            Added the function 'void AllocateDescriptor(void)' to the
  104.            library.  The TVMEditor constructor calls it to allocate a
  105.            descriptor used in accessing the BIOS keyboard flags and to
  106.            register an exit function that will free it when the program
  107.            ends.  On subsequent calls, it will simply return.  To go with
  108.            this a new static data member was added:
  109.  
  110.                 static unsigned short TVMEditor::lowMemDesc;
  111.  
  112.            This is public and you are free to use it so that your own code
  113.            can access the BIOS etc.  If you use it prior to instantiating an
  114.            editor, call AllocateDescriptor() to establish its value.
  115.  
  116. 07/07/94 - Added a private data member 'static short MaxAllocatedPages' and
  117.            public access functions 'static void setMaxAllocation(long
  118.            maxBytes)' and 'static void getMaxAllocation(void)' to the
  119.            TVirtualMemory class.  These can be used to set or get the
  120.            maximum number of bytes (tracked internally as pages) that can be
  121.            allocated by an instance of the class before disk swapping is
  122.            forced.  This prevents one editor from consuming all available
  123.            memory.
  124.  
  125.            Got the 32 bit assembler versions of unique_name(), scanFwd(),
  126.            and scanBkwd() working.  Note that in scanBkwd(), the 'short
  127.            SearchLen' parameter was changed to 'int SearchLen' to make the
  128.            prototypes the same for the 16 and 32 bit versions.  The 32 bit
  129.            version pushes a 32 bit int on the stack instead of a 16 bit
  130.            short probably due to the return value of strlen being used in
  131.            there somewhere (?).  Anyway, the type change keeps it working
  132.            properly in either version.
  133.  
  134.            Fixed up the heap viewer code a little so that it displays a more
  135.            accurate total of the free memory available in 32 bit protected
  136.            mode.
  137.  
  138. 07/05/94 - Added 'inline void setDefaultMessage(const char *msg)' to the
  139.            TVMEditor class to allow setting of the indicator message from a
  140.            source external to the TVMEditor class or one derived from it.
  141.  
  142. 06/30/94 - Scrapped the 16/32 bit DPMI virtual memory class that I wrote
  143.            earlier and started again.  Now the class works in a similar
  144.            fashion to the EMS/XMS version (SWAPVMEM.CPP is replaced by
  145.            SWAPDPMI.CPP) but uses the abundant supply conventional memory
  146.            before swapping to disk.  My knowledge of protected mode memory
  147.            allocation is limited right now, so this may change again later
  148.            when I understand protected mode programming better.
  149.  
  150. 06/25/94 - *** This bug fix pertains only to Turbo Vision 2.0 users ***
  151.            Tracked down a bug in TSTATUSL.CPP when a status line object is
  152.            stored in a resource file using 32 bit protected mode.  The size
  153.            difference for 'int' (32 bits long) and 'short' (16 bits long)
  154.            causes the application to crash when reading it back in.  Here's
  155.            how to fix it:
  156.  
  157.            In TStatusLine::readItems(), line 267 is:  int key, cmd;
  158.                                        Change it to:  ushort key, cmd;
  159.  
  160.             In TStatusLine::readDefs(), line 287 is:  int min, max;
  161.                                        Change it to:  ushort min, max;
  162.            *****************************************************************
  163.  
  164.            XY block marking required changes to the hasSelection() function.
  165.            These changes are to insure proper detection of a marked block
  166.            but now prevent it from being an inline function.  Therefore, it
  167.            was moved to TVMEDIT1.CPP and only the prototype exists in
  168.            TVMEDIT.H.
  169.  
  170. 06/24/94 - Start Block (^KB) and End Block (^KK) can now be used to alter
  171.            the starting or ending point of a marked block.  This provides an
  172.            effective block extension method if you ever start or stop the
  173.            block in the wrong place (shift-clicking the mouse can also be
  174.            used (noted below) but it works in a slightly different manner).
  175.            Note that if you hit ^KB (start block) at a position after the
  176.            end point, the old block will be unselected and a new block
  177.            started.  If you hit ^KK (end block) at a position prior to the
  178.            start point, the request is ignored.
  179.  
  180.            The persistent marked block was a little too persistent in
  181.            nature.  Therefore, the TVMEditor::adjustBlock() function was
  182.            added and other necessary code was added to some existing
  183.            functions so that as text is edited, the block start and end
  184.            points are adjusted to maintain their proper position whenever
  185.            possible.
  186.  
  187. 06/21/94 - Added conditional compilation for 32 bit inline assembler code to
  188.            TVMEDIT1.CPP and TVMINDIC.CPP.  This caused the compiler to crash
  189.            or give odd errors when it recompiled via assembler.  The 32 bit
  190.            assembler code was then replaced with straight C code or
  191.            __emit()__ statements for when the library is compiled for the
  192.            flat memory model.  32 bit inline assembler does work in other
  193.            modules though.  Possible compiler bug?  Problems seems to be
  194.            related to the streamable stuff in the generated assembler
  195.            source.
  196.  
  197.            Added a cmReSynch command that the TVMFileEditor class will
  198.            recognize as an evBroadcast event.  When received, it will check
  199.            the date and time stamp of its associated file on disk (if one
  200.            exists).  If the date and/or time stamp is different, it will
  201.            call the editorDialog() function with a value of edReSynch and a
  202.            pointer to the filename.  You can make the editorDialog()
  203.            function query the user as to whether or not the file should be
  204.            reloaded or simply return cmYes to force a reload.  Not handling
  205.            the event or returning a value other than cmYes will prevent the
  206.            file from being reloaded.
  207.  
  208. 06/20/94 - Finally had some time to finish changing the line-only block
  209.            marking to XY (column + row) marking to mimic the original
  210.            TEditor classes.  To this end, 'short selStartC' and 'short
  211.            selEndC' (start line column and end line column) where added to
  212.            the TVMEditor class.  A 'Boolean isSelecting' parameter was also
  213.            added to the TVMEditor::moveChar() and TVMEditor::moveWord()
  214.            functions too. In those functions, and TVMEditor::moveLine() as
  215.            well, it is set to default to False if unspecified in the
  216.            function call.  Two extra smXXXXX constants (smMouse and smLine)
  217.            were added to TVMEDIT.H to signal that the mouse is being used to
  218.            mark a block of text.  smLine indicates that the starting point
  219.            was double clicked to select whole lines as the mouse is dragged.
  220.  
  221.            Note that this change significantly alters the way blocks of text
  222.            are selected.  The block selection now mimics that of the
  223.            original TEditor in that it can start and end on any column
  224.            within a line.  This includes the ability for a block of text to
  225.            start and end on the same line (i.e. to highlight a single word
  226.            or a few characters).  Clicking the mouse anywhere within the
  227.            text will move the cursor to the new location as before, but will
  228.            also cause any currently selected block of text to become
  229.            unselected and mark the new cursor location as the start of the
  230.            selected text.  Dragging the mouse will extend the block.  Double
  231.            clicking the starting point will allow you to select whole lines
  232.            as you drag the mouse up or down.  A block can also be extended
  233.            by shift-clicking (hold down either shift key and click the mouse
  234.            in the new location).
  235.  
  236.            Be aware that the commands that worked on whole lines before
  237.            such as Paragraph Reformat, Indent Lines, Unindent Lines, Center
  238.            Lines, and Align Text will still use only with whole lines
  239.            regardless of where the block starts or ends.
  240.  
  241. 05/29/94 - Added a new data member to the GlobalEditorOptions structure:
  242.            char PrintDevice[MAXPATH].  By default, it is set to LPT1, but it
  243.            can be changed to LPT2, COM1, COM2, a filename, etc.  This allows
  244.            the default TVMFileEditor::PrintBuffer() function to be a little
  245.            more flexible by allowing the user to specify the output device.
  246.            It was also altered to use low level, unbuffered, binary writes
  247.            so that it stops printing when there is an error and ESC is
  248.            pressed in the critical error handler.  fprintf() didn't always
  249.            do this properly because it buffered the output.
  250.  
  251. 05/26/94 - Changed all occurances of 'near' to _NEAR, 'far' to _FAR, and
  252.            'huge' to _HUGE so that the code is compatible with 32 bit DPMI
  253.            which uses a flat memory model (doesn't use or need near, far,
  254.            and huge).
  255.  
  256. 05/25/94 - Improved the performance of TVMFileEditor's read and write
  257.            functions by using an adjustable buffer.  It shouldn't be quite
  258.            so slow on large files now.  However, do note that unlike most
  259.            editors, the text is moved through a small conventional memory
  260.            buffer instead of being allowed to utilize all available memory
  261.            for storage.
  262.  
  263.            Started adding the necessary alterations to make the library TV
  264.            1.03, TV 2.0, and DPMI compatible.
  265.  
  266. 05/20/94 - Due to several requests and my own forgetfulness as to why I ever
  267.            made it protected in the first place, 'LocalEditorOptions Opts'
  268.            is now a public member of TVMEditor.  This makes it a whole lot
  269.            easier to directly alter the tab size, indent size, and right
  270.            margin value without going through a user dialog or derived
  271.            class.
  272.  
  273.            Combined the following functions:
  274.                void TVMEditor::forceUpLow(long from, long to, ushort cmnd);
  275.                void TVMEditor::toggleCase(long from, long to);
  276.                void TVMEditor::indentLines(long from, long to);
  277.                void TVMEditor::unindentLines(long from, long to);
  278.                void TVMEditor::centerLines(long from, long to);
  279.                void TVMEditor::alignText(long from, long to);
  280.  
  281.            into one function:
  282.                void TVMEditor::alterText(long from, long to, ushort cmnd);
  283.  
  284.            The basic logic flow of the above functions was identical and it
  285.            made more sense to combine them in light of the modifications for
  286.            "Signs Of Life" (see below) and impending changes to implement XY
  287.            block marking.  Otherwise there would have been a lot of
  288.            unnecessary code duplication.  It also allows for a user hook to
  289.            alter blocks of text in ways other than cmForceUpper,
  290.            cmForceLower, cmToggleCase, cmIndentBlock, cmUnindentBlock,
  291.            cmCenterLines, and cmAlignText.  If the 'cmnd' parameter is not
  292.            one of those, the editorDialog() function is called with a value
  293.            of edAlterText followed by the command, a pointer to the line's
  294.            text, and starting and ending columns values which denote what
  295.            part of the line should be affected by the command.  If the
  296.            editorDialog() function returns cmCancel, nothing is changed.  If
  297.            it returns cmOK, then the altered text is stored.  This makes the
  298.            editor more extensible.
  299.  
  300.            Signs Of Life
  301.            -------------
  302.            General additions for the "Signs of Life" modification:
  303.  
  304.     // These are the different states that the signsOfLife() function can be
  305.     // called to handle.
  306.     enum SignsOfLife { slInitiate, slReporting, slHide, slShow, slDone };
  307.  
  308.     // Signs of Life handler definitions
  309.     typedef void (*TVMSignsOfLife)(SignsOfLife, ushort, long, long);
  310.     void VMdefSignsOfLife(SignsOfLife, ushort, long, long);
  311.  
  312.            The GlobalEditorOptions structure contains these two extra
  313.            fields:
  314.  
  315.     // Signs of Life.
  316.     // These two values indicate when signs of life should be issued by
  317.     // the editor.  What this means is that after initThreshold lines,
  318.     // the editor will place a call to the signsOfLife() function to let
  319.     // the user know it is still working and hasn't locked up.  After that,
  320.     // it will place a call to it every reportInterval lines.
  321.     short initThreshold;
  322.     short reportInterval;
  323.  
  324.            The TVMEditor class now contains an additional static pointer
  325.            member (like it does for editorDialog).
  326.  
  327.     static TVMSignsOfLife _NEAR signsOfLife;       // Signs of Life function.
  328.  
  329.            For complete details on how this all works, read the manual
  330.            sections on Signs of Life and for the above items.  Also look at
  331.            the demo program in TVEDIT3.CPP.  It has a simple but functional
  332.            example.
  333.  
  334. 05/19/94 - Added to TVMEditor    : virtual void doneBuffer(void)
  335.            Added to TVMFileEditor: virtual void doneBuffer(Boolean reloadFile)
  336.            I missed this one from the original TEditor classes.  See the
  337.            manual for full details and also the reference to cmReSynch in
  338.            the 06/21/94 notes.
  339.  
  340. 05/09/94 - Added one new function to the library in general and added two
  341.            new functions to the TVMEditor class (see manual for details):
  342.  
  343.        char *unique_name(char *s);
  344.  
  345.        void TVMEditor::setSelect(short fromX, long fromY, short toX,
  346.             long toY, Boolean goTop = False);
  347.  
  348.        void TVMEditor::putCursorAt(short x, long y, Boolean center = False);
  349.  
  350.            Finally made TVirtualMemory::MemoryCheck's default value
  351.            TVMXMSFirst to look for XMS before EMS.  In most cases, it is
  352.            more readily available than EMS memory.
  353.  
  354. 05/06/94 - Fixed a bug in TVMMemo::LoadMemo() that caused a single line
  355.            terminated by a NULL to be ignored.  Please note that for single
  356.            lines like this, the LineTerminator setting used when retrieving
  357.            the text will be set to the NULL character.  If you want lines of
  358.            text to be terminated with a line feed or carriage return+line
  359.            feed upon retrieval and it is possible that only a single NULL
  360.            terminated line may be inserted to start with, be sure to append
  361.            such character(s) to the end of the text before loading the memo
  362.            field.
  363.  
  364. 04/08/94 - Made the TVMEditor::setXIndex() and TVMEditor::setScrIndex()
  365.            virtual.  These two functions are used to synchronize the screen
  366.            cursor and text insertion point.  They were made virtual to allow
  367.            the embedding of special codes in the text.  Overriding these
  368.            functions allows you to skip past them and maintain a proper
  369.            cursor position.
  370.  
  371. 04/06/94 - Made the TVMEditor::drawLines() function virtual.  This is the
  372.            function that does the real screen updates and will need to
  373.            be overridden in derived classes that alter the drawing mechanism.
  374.  
  375. 03/31/94 - Added a new private data member and an access function to the
  376.            TVMIndicator class: const char *DefaultMsg and
  377.            inline void TVMIndicator::setDefaultMessage(const char *msg);
  378.  
  379. 03/28/94 - Added preprocessor directives to TVIRTMEM.H so that string.h
  380.            got included if it hadn't been done already.  This is because
  381.            some inline functions in it use strcpy().
  382.  
  383.            Altered TVMIndicator::draw() slightly to suppress the display of
  384.            the modification indicator when in Read Only mode so that it
  385.            doesn't show up when text is being altered by an external source
  386.            on purpose (i.e. a terminal object with scrollback).
  387.  
  388. Version 1.10
  389. ------------
  390.     Thanks to Randy at Safari Software for the suggestion to merge the
  391. separate EMS and XMS versions into one library that would handle either type
  392. based on what was available at runtime.  Thanks to David Bench and Chris
  393. Abdelmalek for reporting a couple of bugs and other problems that are now
  394. fixed.
  395.  
  396. 03/10/94 - Version 1.10 released.
  397.  
  398. 03/07/94 - *** This bug fix now pertains only to Turbo Vision 1.03 users ***
  399.            After looking for a bug in the TVMFileEditor class, it was
  400.            discovered that a bug fix is needed in Turbo Vision's TGROUP.CPP.
  401.            As it stands, the call to messageBox() in the doEditDialog()
  402.            function prompting to save an altered or untitled file changes
  403.            the value of a static local variable in TGROUP.CPP because the
  404.            message dialog box calls its valid() function before closing.
  405.            Subsequent calls to any valid() function after that (i.e. other
  406.            modified or untitled editors) result in the "command" parameter
  407.            containing the value returned by the messageBox() function, not
  408.            the cmQuit command that should be there.  This causes the valid()
  409.            function of the other editors (or other objects) to perform
  410.            incorrectly.  Here's what to do:
  411.  
  412.            In TGROUP.CPP, lines 503 to 514 are:
  413.  
  414.            static ushort cmd;
  415.  
  416.            Boolean isInvalid( TView *p, void * )
  417.            {
  418.                return Boolean( !p->valid( cmd ) );
  419.            }
  420.  
  421.            Boolean TGroup::valid( ushort command )
  422.            {
  423.                cmd = command;
  424.                return Boolean( firstThat( isInvalid, 0 ) == 0 );
  425.            }
  426.  
  427.            Change them to:
  428.  
  429.            // !! static ushort cmd;     // COMMENT OUT OR DELETE THIS LINE.
  430.  
  431.            Boolean isInvalid( TView *p, void *commandP )
  432.            {
  433.                return Boolean( !p->valid( *(ushort *)commandP ) );
  434.            }
  435.  
  436.            Boolean TGroup::valid( ushort command )
  437.            {
  438.                // Pass a pointer to the command, DON'T use a static variable.
  439.                return Boolean( firstThat( isInvalid, &command ) == 0 );
  440.            }
  441.  
  442.            This fix and many others can be found in the files KVBUGS.ZIP,
  443.            TVBUGS.ZIP, and SYSFIX.ZIP in library 11 of the BCPPDOS forum.
  444.            One thing to note, I think there are two copies of TVBUGS.ZIP in
  445.            the library, one is 3K the other 13K in size.  You will want the
  446.            one that is 13K.  You may need to go in and retrieve it manually
  447.            instead of letting an automated navigator program go after it.
  448.            Once you apply the above patch to the TGROUP.CPP source file and
  449.            rebuild the TV.LIB library, a recompiled TVEDIT or other
  450.            application will work as advertised.  My library already
  451.            contained the above fix with the initial release so I was not
  452.            aware of the problem until a user reported it.
  453.            *****************************************************************
  454.  
  455.            Added a TVirtualMemory::Broadcast() member function to handle
  456.            events that should be broadcast to all owners of a shared buffer.
  457.            This is currently only used for the cmUpdateTitle event.  Shared
  458.            edit buffers will now properly update all attached windows with
  459.            the new title when something like a File | Save As command is
  460.            issued.
  461.  
  462. 02/28/94 - Added the TVirtualMemory::MemoryCheck data member to the virtual
  463.            memory class to allow the setting of a user preference regarding
  464.            EMS/XMS usage.  By default, it will favor XMS over EMS when
  465.            looking for an available virtual memory source.  This is only
  466.            accessible from the registered version. The supplied demo
  467.            executable does demonstrate this ability though (See Options |
  468.            Start-Up Options).
  469.  
  470.            Merged the low level XMS function code into the EMS functions to
  471.            form one library that uses either EMS or XMS based on what is
  472.            available and takes into account the user's preference for memory
  473.            type.
  474.  
  475. Version 1.00
  476. ------------
  477. 02/18/94 - Version 1.00 released.
  478.