Message-Id: <1.5.4.16.19960728035051.3d97c7c8@mail.heirich.in-berlin.de>
X-Mailer: Windows Eudora Light Version 1.5.4 (16)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sun, 28 Jul 1996 05:50:51 +0200
To: winvn@news.ksc.nasa.gov
From: Peter Heirich <peter@heirich.in-berlin.de>
Subject: Bug in WinVN 0.99.8 beta 3 ( GPF in View ROT13 )
Sender: owner-winvn@news.ksc.nasa.gov
Precedence: bulk

First a important note:

if you got some bugreports about a 

WinVN x.xx.x (german)

this is compiled by me and can be a little different to the original WinVN.
Please forward bugs for these programs to

winvn@heirich.in-berlin.de

I hope, that i'm able to have a german language version of the source in a
month or two.

----------------------------------------------------------------------------
---------------------------------------------------------------

Hi,

I have compiled WinVN 0.99.8 beta 3 successful in 16 Bit with Watcom C++ 10.5a.
During this i found the cause for the bug i reported some days ago.

The bug is a GPF if you want to view a article in ROT13 mode.  The second
condition is that the option "scroll past headers after retrive" must disabled.

Because CommDoc->HeaderLines is set to 0 in this condition, WinVN tries to
modify headers to view in Rot13.

To fix the bug, add a statement  in file wvutil.cpp function

void
DoCommState ()
{

[... stuff deleted ...]

        case ST_REC_ARTICLE_HEADER:
//        if (strcmp (CommLineIn, ".") == 0) {
//              ;                                               /* error:
empty article (end in middle of header) */
//        }
          if (IsBlankStr (CommLineIn)) {        /* headers end in blank line */
                CommState = ST_REC_ARTICLE;
                CommDoc->HeaderLines = CommDoc->ActiveLines; //Heirich 19960728
          }
          if (!TrimHeader (CommLineIn))
          {
                WrapAddCommLineToDoc (CommLineIn);
                StoreHeaderInfo(CommLineIn);
          }
          break;
[... stuff deleted ...]

}

which setup CommDoc->HeaderLines if "scroll past headers" is disabled.

The other problem i found was, that the source isn't portable to Watcom because

in file wvart.cpp in function

long WINAPI
WinVnArtFrameWndProc (HWND hWnd, unsigned message, WPARAM wParam, LPARAM lParam)
{
[... stuff deleted ...]

case WM_MYINITMENU:
case WM_INITMENU:
[... stuf deleted ...]

#ifdef __WATCOMC__
#else
    if (message == WM_ACTIVATE) // kludgeville
      return (DefWindowProc (hWnd, message, wParam, lParam));
#endif
    break;
[... stuff deleted ...]
}

the return causes a GPF in the Watcom runtime system AFTER the program has
ended. It modifies values in a  __OpenStreams memory array. This variables
are used by Watcom to close open streams.

You should add a comment to do so for people which want to compile with
Watcom, because this bug uses some days hard work to find.

Regards Peter.


