python maint/checkver.py defaults.h primes.h winvn.h wvdlg.h wvglob.h  wvmapi.h wvstates.h wvclass.h headarry.cpp ini_news.cpp shellsor.c winvn.c wvart.c  wvblock.c wvcncm.c wvcodewn.c wvcoding.c wvcompos.c  wvcrypt.c wvfile.c wvfiler.c wvfilter.c wvgroup.cpp wvheader.c  wvlist.c wvmail.c wvmapi.c wvpath.c wvprint.c  wvsckgen.c wvscreen.c wvsend.c wvstbar.c wvtxtblk.c wvusenet.cpp wvutil.cpp wvaction.cpp wvhdedit.c winvn.rc winvn16.def winvn32.def
checking for changes...
defaults.h
primes.h
winvn.h
wvdlg.h
wvglob.h
wvmapi.h
wvstates.h
wvclass.h
headarry.cpp
ini_news.cpp
shellsor.c
winvn.c
wvart.c
wvblock.c
wvcncm.c
wvcodewn.c
wvcoding.c
wvcompos.c
wvcrypt.c
wvfile.c
wvfiler.c
wvfilter.c
wvgroup.cpp
172a173,175
> 
> #define myisspace(c) (((char)(c) == ' ' ) || (((char)(c) >= (char)0x09) && ((char)(c) <= (char)0x0d)))
> 
182a186
>   int len;
185c189
<   	while (ExtractTextLine (Doc, LinePtr, Buf, BufLen)) {
---
>         while (ExtractTextLine (Doc, LinePtr, Buf, BufLen-3)) {
191a196,210
> 
> // for continuous lines by shimomai
>                   while (BufLen-3 > 0 && NextLine (&BlockPtr, &LinePtr)) {
> 			BufLen -= (len = strlen(Buf) + 2);
> 			Buf += len;
>                     if (!ExtractTextLine (Doc, LinePtr, Buf, BufLen-3) ||
> 				!myisspace(*Buf) || IsBlankStr (Buf)) {
> //                        *(Buf-2) = '\0';
> 			  break;
> 			}
>                         else {
>                           *(Buf-2) = '\r';
>                           *(Buf-1) = '\n';
>                         }
> 		  }
269c288
< ParseAddress (char *headerline, char *addressout, long addressoutlen, char *nameout, long nameoutlen)
---
> ParseAddress(const char *headerline, char *addressout, long addressoutlen, char *nameout, long nameoutlen)
271c290,291
<   char *ptra = headerline, *ptrb, *ptrc;
---
>   const char *ptra = headerline;
>   char *ptrb, *ptrc;
293a314,315
>       if (*(ptrb + l) != ' ') l++;  //shimomai
> 
316a339
> 	if (l < 0) l = 0;					// JD 8/3/96
317a341
> 		if (*(ptrb + l) != ' ') l++;    // JD 8/3/96
614c638,641
< 	  strncpy (buf, ptr, len);
---
> // shimomai
>           while(tokenLen > 0 && ptr[tokenLen-1] != '>') tokenLen--;
> //
>           strncpy (buf, ptr, tokenLen);
622c649,662
< 	  strncat (buf, ptr, lenToGo);
---
> // shimomai
>           if((tokenLen=strlen(ptr)) >= lenToGo) {
>                 char *p, *q;
>                 p = &(buf[tokenLen-lenToGo]);
>                 if(p = strchr(p+1,'<')) {
>                         for(q = buf ; *p != '\0' ; p++,q++) *q = *p;
>                         *q= '\0';
>                 }
>                 else {
>                         buf[0] = '\0';
>                 }
>                 lenToGo = len - strlen(buf);
>           }
>           strncat (buf, ptr, tokenLen);
684a725,765
> #ifdef WIN32
>   TIME_ZONE_INFORMATION tzinfo;
>   SYSTEMTIME local_time;
>   DWORD dstflag;
>   DWORD errorcode;
>   long timezonebias;
> 
>   dstflag = GetTimeZoneInformation(&tzinfo);
>   switch (dstflag) {
> 	case 0xfffffff:
> 	  errorcode = GetLastError();
> 	  wsprintf(str, "Failed to retrieve system timezone information\nError code:%d", errorcode);
> 	  MessageBox (NULL, str, "Timezone info retrieve failure", MB_OK | MB_ICONHAND);
> 	  return FALSE;
> 	  break;
> 
> 	case TIME_ZONE_ID_UNKNOWN:
> 	case TIME_ZONE_ID_STANDARD:
> 	  timezonebias = (tzinfo.Bias/60) * 100 + (tzinfo.Bias%60);
> 	  break;
> 
> 	case TIME_ZONE_ID_DAYLIGHT:
> 	  timezonebias = ((tzinfo.Bias + tzinfo.DaylightBias)/60) * 100 + ((tzinfo.Bias + tzinfo.DaylightBias)%60);
> 	  break;
>   }
> 
>   GetLocalTime(&local_time);
> 
>   /* rfc1036&rfc822 acceptable format */
>   /* Mon, 29 Jun 93 02:15:23 -0800 */
>   _snprintf (buf, len, "%s, %.2d %s %.2d %.2d:%.2d:%.2d %+05d",
> 			 days[local_time.wDayOfWeek],
> 			 local_time.wDay,
> 			 months[local_time.wMonth-1],
> 			 local_time.wYear,
> 			 local_time.wHour,
> 			 local_time.wMinute,
> 			 local_time.wSecond,
> 			 -timezonebias);
> 
> #else
686a768,769
>   long TimezoneBias;
>   char TimeZoneBuf[MAXTZONESIZE+5];
689,693c772,773
< #ifdef WIN32
<   _tzset ();					/* get values from NT control panel */
< #else
<   if (!getenv ("TZ")) {
< 	MessageBox (NetDoc.hDocWnd,
---
> 	if (!getenv ("TZ")) {
> 	  MessageBox (NetDoc.hDocWnd,
702a783
>     }
704,706c785,789
< #endif
<    }
<    
---
> 
>   strcpy(TimeZoneBuf,"TZ=");
>   strcat(TimeZoneBuf,TimeZone);
>   _putenv(TimeZoneBuf);
>   _tzset();
708a792
>   TimezoneBias = (_timezone/3600) * 100 + ((_timezone/60)%60);
711,712c795,796
<   /* Mon, 29 Jun 93 02:15:23 GMT */
<   _snprintf (buf, len, "%s, %.2d %s %.2d %.2d:%.2d:%.2d %s",
---
>   /* Mon, 29 Jun 93 02:15:23 -0800 */
>   _snprintf (buf, len, "%s, %.2d %s %.2d %.2d:%.2d:%.2d %+05d",
720,721c804,805
< 			 tzname[0]);
< 
---
> 			 -TimezoneBias);
> #endif
wvheader.c
wvlist.c
wvmail.c
wvmapi.c
wvpath.c
wvprint.c
wvsckgen.c
397c397,405
< 	ScreenDown (Document->ScYLines - 1, Document->ScYLines,
---
> // shimomai
> 	if (Document->NextTopLine > 0 && Document->NextTopLine < Document->TotalLines) {
> 	  LinesGone = Document->NextTopLine - Document->TopLineOrd;
> 	  while (LinesGone--) 
> 	  	NextLine (&BlockPtr, &LinePtr);
> 	  Document->TopLineOrd = Document->NextTopLine;
> 	}
> 	else {
> 		ScreenDown (Document->ScYLines - 1, Document->ScYLines,
399c407,408
< 	Document->TopLineOrd += LinesGone;
---
> 		Document->TopLineOrd += LinesGone;
> 	}
496c505,506
< 	  Rect.right = -Rect.left;
---
> //shimomai	  Rect.right = -Rect.left;
> 	  Rect.right = -Rect.left + 1;
519,520c529,532
< 	  Rect.right = Rect.left;
< 	  Rect.left = 0;
---
> //shiomai	  Rect.right = Rect.left;
> //	  Rect.left = 0;
> 	  Rect.right = Document->ScXWidth;
> 	  Rect.left = Rect.right - Rect.left -1;
wvscreen.c
12c12
<  * Author: John S. Cooper (jcooper@netcom.com)                      *
---
>  * Author: John S. Cooper (jcooper@planetz.com)                     *
49d48
< BOOL SendOneLine (char *str);
1406c1405
< #if OLD_HEADER
---
> #ifdef OLD_HEADER
1518c1517
<  * tab-width: 4
---
>  * tab-width: 2
wvsend.c
wvstbar.c
wvtxtblk.c
16,17d15
< extern "C"
< {
20c18,19
< }
---
> #include <errno.h>
> 
21a21
> #include "wvclass.h"
45a46,57
> /* added by shimomai */
> extern "C" {
> HCURSOR hArrowCursor;
> HCURSOR hSizeArrow;
> }
> static BOOL WidthCursor = FALSE;
> static int orgPos;
> #define DRAG_ON		5
> 
> void DrawDragingCursor(HWND hWnd, long oldPosition, long newPosition, BYTE flag);
> 
> 
86a99
>   static long DragCursorPosition = 0;
104a118,121
>     /* load cursor for dragging */
> 	hArrowCursor = LoadCursor (NULL, IDC_ARROW);
> 	hSizeArrow = LoadCursor (hInst, MAKEINTRESOURCE (IDC_SIZECURSOR));
> 
108a126,130
> 
> 	/* Group List Separator (shimomai)*/
> 	if (!GroupListSeparator)
> 	  GroupListSeparator = CharWidth * 10;
> 
200a223,233
> 	case VK_ESCAPE:
> 	  if (DragMouseAction == DRAG_ON) {
> 		DrawDragingCursor(hWnd, DragCursorPosition, 0, 1);
> 		ReleaseCapture ();
> 		DragMouseAction = DRAG_NONE;
> 		WidthCursor = FALSE;
> 		SetCursor (hArrowCursor);
> 		InvalidateRect(hWnd, NULL, FALSE);
> 	  }
> 	  break;
> 
230c263,272
<     if (!Initializing) {
---
> //shimomai
> 	if (WidthCursor) {
> 	  orgPos = LOWORD (lParam);
> 	  DragCursorPosition = orgPos;
> 	  DrawDragingCursor(hWnd, DragCursorPosition, 0, 1);
> 		SetCapture (hWnd);		// release capture on button up
> 	  DragMouseAction = DRAG_ON;
> 	}
>     else if (!Initializing) {
> //    if (!Initializing) {
282c324,335
<     ReleaseCapture ();
---
> //shimomai
> 	if (DragMouseAction == DRAG_ON) {
> 	  DrawDragingCursor(hWnd, DragCursorPosition, 0, 1);
> 	  ReleaseCapture ();
>       GroupListSeparator += LOWORD (lParam) - orgPos;
> 	  if (GroupListSeparator < CharWidth)
> 		GroupListSeparator = CharWidth * 10;
>       InvalidateRect (hWnd, NULL, FALSE);
> 	}
> 	else {
> 	    ReleaseCapture ();
> 	}
285a339,347
>   case WM_SETCURSOR:
> 	if (!Initializing && WidthCursor)
> 	  SetCursor (hSizeArrow);
> 	else if (Initializing && Initializing != INIT_NOT_CONNECTED)
> 	  SetCursor (hHourGlass);
> 	else
> 	  SetCursor (hArrowCursor);
>     break;
> 
289c351,353
<     if ((!Initializing) && (DragMouseAction != DRAG_NONE)) {
---
> // edited by shimomai
>     if (!Initializing) {
> //    if ((!Initializing) && (DragMouseAction != DRAG_NONE)) {
293,302c357,391
<       GetClientRect (hWnd, &myRect);
<       if (CursorToTextLine (X, Y, &NetDoc, &BlockPtr, &LinePtr)) {
<         if (GroupListMultiSelect) {
<           NetDoc.ActiveLineID = LinePtr->LineID;
<           ForAllLinesOnScreen (&NetDoc, SetExLineFlag, LINE_FLAG_SET, FALSE);
<           GlobalUnlock (BlockPtr->hCurBlock);
<         }
<         else {
<           SelectGroup (&NetDoc, GetGroup(LinePtr),(DragMouseAction == DRAG_SELECT) ? TRUE : FALSE);
<           GlobalUnlock (BlockPtr->hCurBlock);
---
> 	  switch (DragMouseAction) {
> 	  case DRAG_NONE:
>         X -= SideSpace - NetDoc.ScXOffset * (CharWidth + 1);
> 	    if (Y < LineHeight
> 		    && X >= GroupListSeparator && X < GroupListSeparator + CharWidth) {
> 		  WidthCursor = TRUE;
> 		}
> 		else {
> 		  WidthCursor = FALSE;
> 		}
> 		break;
> 
> 	  case DRAG_ON:
> 		if (!(wParam && MK_LBUTTON)) {
> 		    DragMouseAction = DRAG_NONE;
> 			DrawDragingCursor(hWnd, DragCursorPosition, 0, 1);
> 		ReleaseCapture ();
> 		  } else {
> 			DrawDragingCursor(hWnd, DragCursorPosition, X, 2);
> 			DragCursorPosition = X;
> 		  }
> 		  break;
> 	    
> 	  default:
>         GetClientRect (hWnd, &myRect);
>         if (CursorToTextLine (X, Y, &NetDoc, &BlockPtr, &LinePtr)) {
>           if (GroupListMultiSelect) {
>             NetDoc.ActiveLineID = LinePtr->LineID;
>             ForAllLinesOnScreen (&NetDoc, SetExLineFlag, LINE_FLAG_SET, FALSE);
>             GlobalUnlock (BlockPtr->hCurBlock);
>           }
>           else {
>             SelectGroup (&NetDoc, GetGroup(LinePtr),(DragMouseAction == DRAG_SELECT) ? TRUE : FALSE);
>             GlobalUnlock (BlockPtr->hCurBlock);
>           }
303a393
>         InvalidateRect (hWnd, NULL, FALSE);
305,306c395
<       InvalidateRect (hWnd, NULL, FALSE);
<     }
---
> 	}
384a474,475
>           if (!LineIDtoLinePtr(NetDoc.ActiveLineID, &NetDoc, &GroupBlockPtr, &GroupLinePtr))
> 			break;
512c603
<       char indcptr[128];
---
> //shimomai      char indcptr[128];
522,523c613,614
< #define SUBSCR_MASK 1
< #define SELECT_MASK 2
---
> //#define SUBSCR_MASK 1
> //#define SELECT_MASK 2
582a674
>         SetCursor (hArrowCursor);	//shimomai
722c814
<                   /* check if there are unread articles */
---
>                   /* check if there are unseen articles */
736c828
<               sprintf (indcptr, "%c %5s %s ", indicator, str, group_name);
---
> //shimomai              sprintf (indcptr, "%c %5s %s ", indicator, str, group_name);
738,739c830,845
<               /* Now write out the line.                            */
<               MyLen = strlen (indcptr);
---
> //              /* Now write out the line.                            */
> //              MyLen = strlen (indcptr);
> //              SetRect (&aRect, 0, Y, myRect.right, Y + LineHeight);
> //              ExtTextOut (hDC, X, Y, ETO_OPAQUE | ETO_CLIPPED, &aRect,
> //                          indcptr, MyLen, (LPINT) NULL);
> 
>               SetRect (&aRect, 0, Y, X + GroupListSeparator, Y + LineHeight);
> 			  SetTextAlign (hDC, TA_TOP | TA_RIGHT);
>               ExtTextOut (hDC, X + GroupListSeparator, Y, ETO_OPAQUE | ETO_CLIPPED, &aRect,
>                           str, strlen(str), (LPINT) NULL);
> 			  SetTextAlign (hDC, TA_TOP | TA_LEFT);
>               TextOut (hDC, X, Y, &indicator, 1);
>               SetRect (&aRect, X + GroupListSeparator, Y, myRect.right, Y + LineHeight);
>               ExtTextOut (hDC, X + GroupListSeparator+CharWidth, Y, 
>               			  ETO_OPAQUE | ETO_CLIPPED, &aRect,
>                           group_name, strlen(group_name), (LPINT) NULL);
741,742d846
<               ExtTextOut (hDC, X, Y, ETO_OPAQUE | ETO_CLIPPED, &aRect,
<                           indcptr, MyLen, (LPINT) NULL);
906c1010,1011
<     sprintf (str, "This color is the same as the %s color.\nSome displays may become unreadable.", warnMsg);
---
>     sprintf (str, "This color is the same as the %s color.\n"
>                   "Some displays may become unreadable.", warnMsg);
942c1047
< CrackGroupLine (char *buf, TypLine *lineptr)
---
> CrackGroupLine (char *buf, TypLine *lineptr, void*pEndLine)
947a1053
>   BOOL bMoreRanges;
952a1059
> /* group->Threaded skipped */
959,960d1065
<   group->nRanges = 0;
<   group->nSpareRanges = 0;
961a1067,1068
> /* group->thread_handle skipped */
> /* group->total_headers skipped */
962a1070,1071
>   group->nRanges = 0;
>   group->nSpareRanges = 0;
972a1082
>  //   DEBUG_BREAK; // new group on server
991,992c1101,1102
<   /* Look for the highest article number previously seen, in an
<    * entry of form "s" followed by a number. */
---
>   /* Look for the highest article number previously available on the server,
>    * in an entry of form "s" followed by a number. */
997c1107
<     GetNum (&buf, (long*) &(group->HighestPrevSeen));
---
>     GetNum (&buf, &(group->HighestPrevSeen));
1003a1114
>   bMoreRanges = TRUE;
1010a1122,1123
>     if(RangePtr < (TypRange *)(char*)pEndLine - sizeof(TypRange))
>     {
1013c1126,1127
<       (group->nRanges)++;
---
>       if(bMoreRanges)
>         (group->nRanges)++;
1017a1132
>         if(bMoreRanges)   
1029c1144,1145
<         RangePtr++;
---
>         if(bMoreRanges)
>           RangePtr++;
1038a1155,1161
>     }
>     else
>     {
>       while(*buf && (*buf) != '\n')
>         buf++;
>       MoreNums = FALSE;
>     }
1124a1248
>   int iRet = 0;
1133c1257
<     return FALSE;
---
>     iRet = 0;
1143c1267,1272
<       if (CrackGroupLine (mybuf, LinePtr)) {
---
>       if(returned >= TEMPBUFSIZE)
>       {
>        DEBUG_BREAK;
>       }
>       mybuf[TEMPBUFSIZE-1] = '\0';
>       if (CrackGroupLine (mybuf, LinePtr, (char far*)LinePtr + (TEMPBUFSIZE-1))) {
1146c1275
<       AddLine (LinePtr, &BlockPtr, &GroupPtr);
---
>        AddLine (LinePtr, &BlockPtr, &GroupPtr);
1150d1278
<   }
1161a1290
> 
1164,1165d1292
<   /* we'll check this during WriteNewsrc(). SMR 930224 */
<   started_with_no_dolist = !DoList;
1166a1294,1296
>   started_with_no_dolist = !DoList;
>   iRet = 1;
>   }
1170c1300
<   return (TRUE);
---
>   return iRet;
1195c1325
< WriteNewsrc (/* BOOL bDispProg */)
---
> WriteNewsrc()
1207c1337
<   int nranges,percent,opercent;
---
>   int nranges,percent,opercent,errcode;
1337,1338c1467,1470
< 
<     if (rename (newsrc_temp, szNewsSrc)) {
---
>     
>     errcode = rename (newsrc_temp,szNewsSrc);
> //	errcode = EXDEV;  /* force fail for debug */
>     if (errcode != 0) {
1340,1341c1472,1496
<       sprintf (error_string, "Could not rename temporary newsrc file '%s'", newsrc_temp);
<       MessageBox (NetDoc.hDocWnd, error_string, "Save Newsrc Failure", MB_OK | MB_ICONSTOP);
---
> 
>       switch (errcode) {
>       case EACCES:
>       	sprintf (error_string, "Could not rename temporary newsrc file '%s'.\n File specified by '%s' still exists after being deleted or could not be created", newsrc_temp,szNewsSrc);
>       	MessageBox (NetDoc.hDocWnd, error_string, "Save Newsrc Failure", MB_OK | MB_ICONSTOP);
>       	break;
>       case ENOENT:
>       	sprintf (error_string, "Could not rename temporary newsrc file '%s'. \n File Not Found", newsrc_temp);
>       	MessageBox (NetDoc.hDocWnd, error_string, "Save Newsrc Failure", MB_OK | MB_ICONSTOP);
>         break;
>       case EXDEV:
>         /* Failed because Rename doesn't work across some networks or file systems
>            try a slower block by block copy instead   JD 4/16/96  */
>         sprintf(szString,"Making temporary NewsRC File %s permanent",szNewsSrc); 
>         SetStatbarText(NetDoc.hWndFrame,szString,&NetDoc, TRUE, TRUE);
>         errcode = CopyFile(newsrc_temp,szNewsSrc,FALSE);
>         if (errcode = 0) {
>         	sprintf (error_string, "Could not rename temporary newsrc file '%s'.\n Error Code = '%n'", newsrc_temp,errcode);
>       		MessageBox (NetDoc.hDocWnd, error_string, "Save Newsrc Failure", MB_OK | MB_ICONSTOP);
>       		}
>       	else
>       		unlink (newsrc_temp);
>       		SetStatbarText(NetDoc.hWndFrame,"",&NetDoc, TRUE, TRUE);
>       	break;
>       }
1449c1604,1605
<                                (unsigned)(GetGroup(*LinePtr))->NameLen + GROUP_NAME_OFFSET);
---
> //shimomai        (unsigned)(GetGroup(*LinePtr))->NameLen + GROUP_NAME_OFFSET);
>                   (unsigned)(GetGroup(*LinePtr))->NameLen + GroupListSeparator / CharWidth);
1959a2116,2122
> 	for (i = 0 ; i < MAXGROUPWNDS ; i++) {
> 	  if (GroupDocs[i].InUse && GroupDocs[i].hDocWnd && (!CommBusy || &GroupDocs[i] != CommDoc)) {
> 		UpdateSeenArts(&GroupDocs[i]);
> 	  }
> 	}
> 
> 
2132,2136c2295,2300
< #ifdef WIN32  // TODO: fixme...            
<                  (int(__cdecl *)(const void*,const void*)) GroupCompare);
< #else
<                  (int (__far __cdecl *)(const void huge *,const void huge *)) GroupCompare);
< #endif                 
---
>                  (int (*)(const void huge *,const void huge *)) GroupCompare);
> // #ifdef WIN32  // TODO: fixme...            
> //                 (int(__cdecl *)(const void*,const void*)) GroupCompare);
> // #else
> //                 (int (__far __cdecl *)(const void huge *,const void huge *)) GroupCompare);
> // #endif                 
2328a2493,2499
>     case IDM_COLOR_KILLED:
>       if (AskForColor (NetDoc.hDocWnd, &ArticleKilledColor))
>         break;
>       WarnColors (ArticleKilledColor, ListBackgroundColor, "List Background");
>       RefreshGroupWnds ();
>       break;
> 
2351a2523
>         WarnColors (ArticleKilledColor, ListBackgroundColor, "Killed Article") ||
2638c2810
<  * tab-width: 4
---
>  * tab-width: 2
2643d2814
< 
wvusenet.cpp
40c40
< // This will now be either 4 or 6, depending on whether threading
---
> // This will now be either 5 or 7, depending on whether threading
42c42
< unsigned int total_xhdrs = 4;
---
> unsigned int total_xhdrs = 5;
146a147,242
> /* String to Timezone */
> time_t
> dTimeZone(char *s)
> {
> #define SIZEOF(array)	((int)(sizeof array / sizeof array[0]))
> #define ENDOF(array)	(&array[SIZEOF(array)])
> #define HOUR(x)		(x * 60)
> 
> typedef struct _TABLE {
>   char   *name;
>   time_t value;
> } TABLE;
> 
> /* Timezone table. */
> static TABLE	TimezoneTable[] = {
>     { "gmt",    HOUR( 0) },	/* Greenwich Mean */
>     { "ut",     HOUR( 0) },	/* Universal */
>     { "utc",    HOUR( 0) },	/* Universal Coordinated */
>     { "cut",    HOUR( 0) },	/* Coordinated Universal */
>     { "z",      HOUR( 0) },	/* Greenwich Mean */
>     { "wet",    HOUR( 0) },	/* Western European */
>     { "bst",    HOUR( 0)-60 },	/* British Summer */
>     { "nst",	HOUR( 3)+30 }, /* Newfoundland Standard */
>     { "ndt",	HOUR( 3)+30-60 }, /* Newfoundland Daylight */
>     { "ast",	HOUR( 4) },	/* Atlantic Standard */
>     { "adt",	HOUR( 4)-60 },	/* Atlantic Daylight */
>     { "est",	HOUR( 5) },	/* Eastern Standard */
>     { "edt",	HOUR( 5)-60 },	/* Eastern Daylight */
>     { "cst",	HOUR( 6) },	/* Central Standard */
>     { "cdt",	HOUR( 6)-60 },	/* Central Daylight */
>     { "mst",	HOUR( 7) },	/* Mountain Standard */
>     { "mdt",	HOUR( 7)-60 },	/* Mountain Daylight */
>     { "pst",	HOUR( 8) },	/* Pacific Standard */
>     { "pdt",	HOUR( 8)-60 },	/* Pacific Daylight */
>     { "yst",	HOUR( 9) },	/* Yukon Standard */
>     { "ydt",	HOUR( 9)-60 },	/* Yukon Daylight */
>     { "akst",	HOUR( 9) },	/* Alaska Standard */
>     { "akdt",	HOUR( 9)-60 },	/* Alaska Daylight */
>     { "hst",	HOUR(10) },	/* Hawaii Standard */
>     { "hast",	HOUR(10) },	/* Hawaii-Aleutian Standard */
>     { "hadt",	HOUR(10)-60 },	/* Hawaii-Aleutian Daylight */
>     { "ces",	-HOUR(1)-60 },	/* Central European Summer */
>     { "cest",	-HOUR(1)-60 },	/* Central European Summer */
>     { "mez",	-HOUR(1) },	/* Middle European */
>     { "mezt",	-HOUR(1)-60 },	/* Middle European Summer */
>     { "cet",	-HOUR(1) },	/* Central European */
>     { "met",	-HOUR(1) },	/* Middle European */
>     { "eet",	-HOUR(2) },	/* Eastern Europe */
>     { "msk",	-HOUR(3) },	/* Moscow Winter */
>     { "msd",	-HOUR(3)-60 },	/* Moscow Summer */
>     { "wast",	-HOUR(8) },	/* West Australian Standard */
>     { "wadt",	-HOUR(8)-60 },	/* West Australian Daylight */
>     { "hkt",	-HOUR(8) },	/* Hong Kong */
>     { "cct",	-HOUR(8) },	/* China Coast */
>     { "jst",	-HOUR(9) },	/* Japan Standard */
>     { "kst",	-HOUR(9) },	/* Korean Standard */
>     { "kdt",	-HOUR(9)-60 },	/* Korean Daylight */
>     { "cast",	-(HOUR(9)+30) }, /* Central Australian Standard */
>     { "cadt",	-(HOUR(9)+30)-60 }, /* Central Australian Daylight */
>     { "east",	-HOUR(10) },	/* Eastern Australian Standard */
>     { "eadt",	-HOUR(10)-60 },	/* Eastern Australian Daylight */
>     { "nzst",	-HOUR(12) },	/* New Zealand Standard */
>     { "nzdt",	-HOUR(12)-60 },	/* New Zealand Daylight */
> 	{ "", 0 }
> };
>   char *p;
>   int tz;
>   
>   for (p = s; isalpha(*p); p++)
> 	*p = tolower (*p);
> 
>   if (isalpha(*s)) {
> 	char cbak;
> 	TABLE *tp;
> 
> 	cbak = *p;
> 	*p = '\0';
>     /* Try for a timezone. */
>     for (tp = TimezoneTable; tp < ENDOF(TimezoneTable); tp++)	{
> 	  if (s[0] == tp->name[0] && s[1] == tp->name[1] && strcmp(s, tp->name) == 0)
> 	    return (tp->value * (-60));
> 	}
> 	*p = cbak;
> 	s = p;
>   }
> 
>   tz = atoi(s);
>   if (tz >= 12 || tz <= -12) {
> 	int hour, min;
> 	hour = tz / 100;
> 	min = tz % 100;
> 	return ((size_t)(hour * 3600 + min * 60));
>   }
>   return ((size_t)tz * 3600);
> }
> 
153c249
<   char *cp, mon[80];
---
>   char *cp, mon[80], tzone[80];
165c261
< 	sscanf (s, "%d %s %d %d:%d:%d", &dom, mon, &yr, &hr, &mn, &sc);
---
> 	sscanf (s, "%d %s %d %d:%d:%d %s", &dom, mon, &yr, &hr, &mn, &sc, tzone);
204c300
<   return (mktime (&datetime));
---
>   return (mktime (&datetime) - dTimeZone(tzone) - _timezone);
216c312,314
< 	  sprintf (s, "%02d%s%02d", datetime->tm_mday, fmtDateDelim, datetime->tm_mon + 1);
---
>           sprintf (s, "%02d%s%02d %02d:%02d",
>                        datetime->tm_mday, fmtDateDelim, datetime->tm_mon + 1,
>                        datetime->tm_hour, datetime->tm_min);
219c317,319
< 	  sprintf (s, "%02d%s%02d", datetime->tm_mon + 1, fmtDateDelim, datetime->tm_mday);
---
>           sprintf (s, "%02d%s%02d %02d:%02d",
>                        datetime->tm_mon + 1, fmtDateDelim, datetime->tm_mday,
>                        datetime->tm_hour, datetime->tm_min);
267c367
< 	newPercent = (int) (line_number / total_lines);
---
> 	  newPercent = (total_lines > 0) ? (int) (line_number / total_lines) : 0;
329,330c429,430
< sync_artnum (unsigned long artnum,
< 			 unsigned long activenum,
---
> sync_artnum (long artnum,
> 			 long activenum,
369c469
< 	  *(end+1) = (char)0;
---
> 	  *end = 0; // was: *(end+1) = (char)0;  HAB 19951229
374a475
> 
379c480
< // mid's longer than HEADER_REFERENCES_LENGTH with a 4-char hex hash value
---
> // mid's longer than HEADER_MESSAGE_ID_LENGTH with a 4-char hex hash value
388c489
< copy_message_id_with_frob (char * dest, char * source)
---
> copy_message_id_with_frob (char * dest, const char * source)
390c491,500
<   strncpy (dest, source, HEADER_REFERENCES_LENGTH);
---
>   int pos;
> 
>   if(source && ('<' == *source)) // chop leading '<'
>     source++;
>   strncpy(dest, source, HEADER_MESSAGE_ID_LENGTH-1);
>   pos = strcspn(dest, "> \t" );  // chop trailing whitespace and '>'
>   if(pos)
>   {
>     dest[pos] = 0;
>   }
393c503
<   if (strlen(source) >= HEADER_REFERENCES_LENGTH - 1) {
---
>   if (strlen(dest) >= HEADER_MESSAGE_ID_LENGTH - 2) {
395c505
< 	char * p;
---
> 	const char * p;
399c509,582
< 	sprintf (dest+HEADER_REFERENCES_LENGTH-9, "%08x", sum);
---
> 	sprintf (dest+HEADER_MESSAGE_ID_LENGTH-9, "%08x", sum);
>   }
> }
> 
> 
> // clear out the latest header info
> void ClearLatestInfo()
> {
>   memset(&Latest, 0, sizeof(Latest));
> //  AddressString[0] = 0;
> //  NameString[0] = 0;
> }
> 
> 
> // store detailed info on the latest header read
> void StoreHeaderInfo(const char* line)
> {
>   const char* sTmp = line;
> 
>   if(!sTmp) return;
>   while(*sTmp && !isspace(*sTmp)) // find first whitespace
>     sTmp++;
>   while(*sTmp && isspace(*sTmp)) // find first char following whitespace
>     sTmp++;
> 
>   if(!_strnicmp ("subject:", line, 8))
>   {
> //    if(!_strnicmp("Re: ", sTmp, 4))
> //      sTmp += 4;
>     mylstrncpy(Latest.subject, sTmp, sizeof(Latest.subject));
>   }
>   else if(!_strnicmp ("from:", line, 5))
>   {
> 	  ParseAddress(sTmp,
> 	               Latest.email, sizeof(Latest.email),
> 	               Latest.from, sizeof(Latest.from));
>   }
>   else if(!_strnicmp ("lines:", line, 6))
>   {
>     Latest.lines = atoi(sTmp);
>   }
> 
>   else if(!_strnicmp ("newsgroups:", line, 11))
>   {
>     mylstrncpy(Latest.newsgroups, sTmp, sizeof(Latest.newsgroups));
>   }
> 
>   else if(!_strnicmp ("message-id:", line, 11))
>   {
>     copy_message_id_with_frob(Latest.message_id, sTmp);
>   }
> }
> 
> 
> //   Build a list of frobbed references
> void build_ref_list(char*dest, const char*src)
> {
>   char sRetval[HEADER_FROBREFLIST_LENGTH + HEADER_MESSAGE_ID_LENGTH + 2];
>   char sTmpMsgId[HEADER_MESSAGE_ID_LENGTH];
>   char*start;
> 
>   dest[0] = 0;
>   if(src[0])
>   {
>     sRetval[0] = 0;
>     start = strchr(src, '<');
>     while(start && strlen(sRetval) < HEADER_FROBREFLIST_LENGTH)
>     {
>       copy_message_id_with_frob(sTmpMsgId, start);
>       strcat(sRetval, sTmpMsgId);
>       strcat(sRetval, " ");
>       start = strchr(++start, '<');
>     }
>     mylstrncpy(dest, sRetval, HEADER_FROBREFLIST_LENGTH);
423,424c606,607
<   static unsigned long first, last;
<   unsigned long estnum, artnum;
---
>   static long first, last;
>   long estnum, artnum;
442a626
>   WVArticleAction aa;
499,500d682
< 		/*      MRRCloseComm (); */
< 		/*        PostQuitMessage (0); */
658a841
> #if 0	// TANAKA Goh (newsrc patch)
660a844,849
> #else	// TANAKA Goh (newsrc patch)
> 	  if (estnum) {
> 		GroupDoc->ServerLast = last;
> 		GroupDoc->ServerFirst = first;
> 	  }
> #endif	// TANAKA Goh (newsrc patch)
693c882
< 		else if ((DlgStatus == ID_THRESHOLD_UNREAD)		/* they clicked 'unread' */
---
> 		else if ((DlgStatus == ID_THRESHOLD_UNREAD)		/* they clicked 'unseen' */
696c885,888
< 			first = max (first, (unsigned long) RangePtr[0].Last + 1);
---
> 
>       if (RangePtr[GroupDoc->nRanges - 1].Last <= last)
>         first = max (first, (long) RangePtr[0].Last + 1);
> 
726c918,920
< 		  GroupDoc->ServerFirst = GroupDoc->ServerLast;
---
> 		  if (GroupDoc->ServerLast) {
> 			GroupDoc->ServerFirst = GroupDoc->ServerLast;
> 		  }
775a970,971
> 	  ClearLatestInfo();
> 		
778,779c974,981
< 		CommState = ST_XOVER_DATA;
< 		CommDoc->ActiveLines = 0;
---
> 			CommState = ST_XOVER_DATA;
> 			CommDoc->ActiveLines = 0;
> 			if (bEnableArticleAction) {
> 				aa.ReadActions(CurrentGroup);      /* Get article action list */
> 				if (aa.NeedNgroupHeader()) {       /* Find out if we need newsgroups */
> 				total_xhdrs = 2;
> 		    }
> 	   }
782,784c984,986
< 		mylen = sprintf (mybuf, "XHDR from %ld-%ld", first, last);
< 		CommState = ST_XHDR_FROM_START;
< 		PutCommLine (mybuf);
---
> 			mylen = sprintf (mybuf, "XHDR from %ld-%ld", first, last);
> 			CommState = ST_XHDR_FROM_START;
> 			PutCommLine (mybuf);
787a990
> 
789,796c992,1027
< 	  if (strcmp (CommLineIn, ".") == 0) {
< 		/* this is a yuck way to do this */
< 		CommState = ST_IN_GROUP;
< 		CommBusy = FALSE;
< 		finish_header_retrieval();
< 		SetStatbarText (CommDoc->hWndFrame, "", CommDoc, TRUE, TRUE);
< 	  }
< 	  else if (*CommLineIn) {	/* avoid blank XOVER lines (peterk@borland.com) */
---
>     if((strcmp(CommLineIn, ".") == 0) &&
>        (LockLine(CommDoc->hParentBlock, CommDoc->ParentOffset,
>                  CommDoc->ParentLineID, &BlockPtr, &LinePtr)))
>     {
>       GroupDoc = GetGroup(LinePtr);
>       GroupDoc->total_headers = CommDoc->ActiveLines;
>       first = GroupDoc->ServerFirst;      
>       last = GroupDoc->ServerLast;
>       GlobalUnlock (BlockPtr->hCurBlock);
>       
> 
>      if (bEnableArticleAction){
>          aa.ReadActions(CurrentGroup);            /* Get article action list */
>          if (aa.NeedNgroupHeader()) {             /* Find out if we need newsgroups */
> 			/* Now ask for the newsgroups */
> 		    CommDoc->ActiveLines = 0;
> 			mylen = sprintf (mybuf, "XHDR newsgroups %ld-%ld", first, last);
> 			CommState = ST_XHDR_NEWSGROUPS_START;
> 			PutCommLine (mybuf);
>     	    }
> 		 else
> 			{
> 			  CommState = ST_IN_GROUP;
> 			  CommBusy = FALSE;
> 			  finish_header_retrieval();
> 		      SetStatbarText (CommDoc->hWndFrame,  "", CommDoc, TRUE, TRUE);
> 			}
> 		}
> 	 else {
> 		 CommState = ST_IN_GROUP;
> 		 CommBusy = FALSE;
> 		 finish_header_retrieval();
> 		 SetStatbarText (CommDoc->hWndFrame,  "", CommDoc, TRUE, TRUE);
> 	     }
>     }
> 	else if (*CommLineIn) {	/* avoid blank XOVER lines (peterk@borland.com) */
798c1029
< 		char *reference;
---
> 		char *best_reference;
822a1054,1056
> //		CommDoc->LongestLine = max (CommDoc->LongestLine,
> //									ARTICLE_SUBJECT_OFFSET +
> //									(unsigned) lstrlen (header->subject));
824c1058
< 									ARTICLE_SUBJECT_OFFSET +
---
> 									ArtListSeparator3 / CharWidth +
825a1060
> 
839a1075,1076
>         mylstrncpy(header->email, AddressString, HEADER_EMAIL_LENGTH);
> 
859,861c1096,1099
< 		reference = get_best_reference (this_hop);
< 		if (reference) {
< 		  copy_message_id_with_frob (header->references, reference);
---
> 		build_ref_list(header->frob_ref_list, this_hop);
> 		best_reference = get_best_reference (this_hop);
> 		if (best_reference) {
> 		  copy_message_id_with_frob (header->best_ref, best_reference);
884c1122
< 							 CommDoc->TotalLines);
---
> 							 CommDoc->TotalLines * total_xhdrs);
895,896c1133,1135
< 	  /* the current flow is FROM -> DATE -> LINES -> SUBJECT */
< 	  /* (threadp) FROM -> DATE -> LINES -> REF -> ID -> SUBJECT */
---
> 	  /* the current flow is FROM -> DATE -> LINES -> SUBJECT -> NEWSGROUPS */
> 	  /* (threadp) FROM -> DATE -> LINES -> REF -> ID -> SUBJECT -> NEWSGROUPS */
> 	  /* The NEWSGROUPS state is skipped if there are no NEWSGROUPS kill filters
904,905c1143,1151
< 	  total_xhdrs = threadp ? 6 : 4;	/* we do this here to allow */
< 	  /* mid-session change-of-mind  */
---
> 	  /* we do this here to allow mid-session change-of-mind */
>        total_xhdrs = threadp ? 6 : 4;
> 	   if (bEnableArticleAction) {
> 		   aa.ReadActions(CurrentGroup);            /* Get article action list */
>            if (aa.NeedNgroupHeader()) {             /* Find out if we need newsgroups */
> 	          total_xhdrs++;
> 		   }
> 	   }
> 
924a1171
> 		ClearLatestInfo();
946a1194,1196
> 		header->Selected=FALSE;
> 		header->ArtDoc = (TypDoc *) NULL;
> 		header->Seen = WasArtSeen (artnum, GetGroup(LinePtr));
958a1209,1210
>         mylstrncpy(header->email, AddressString, HEADER_FROM_LENGTH);
> 
1011a1264
> 		  {
1013,1016c1266,1267
< 			  = parse_usenet_date (get_xhdr_line (CommLineIn));
< 
< 		  unlock_headers (header_handle, thread_handle);
< 
---
> 			  = parse_usenet_date (get_xhdr_line (CommLineIn));          
> 		  }
1017a1269,1270
> 		  unlock_headers (header_handle, thread_handle);
> 		  
1121,1122c1374,1376
< 		char far *refer;		/* , far * end,far * bracket1,far *bracket2; */
< 		/*      int bracket_len; */
---
> 		header_p header;
> 		char temp_frob_ref_list[HEADER_FROBREFLIST_LENGTH];
> 		char far *refer;
1133a1388
> 			header = header_elt (headers, CommDoc->ActiveLines);
1137c1392
< 
---
> 			build_ref_list(temp_frob_ref_list, refer);
1143,1144c1398
< 									 (header_elt (headers,
< 											  	CommDoc->ActiveLines))->number,
---
> 									 (header_elt (headers, CommDoc->ActiveLines))->number,
1147c1401,1403
< 				copy_message_id_with_frob ((header_elt (headers, syncnum))->references, refer);
---
>         header = header_elt (headers, syncnum);
>         strcpy(header->frob_ref_list, temp_frob_ref_list);
> 				copy_message_id_with_frob (header->best_ref, refer);
1183d1438
< 		CommDoc->ActiveLines = 0;
1185a1441
> 		CommDoc->ActiveLines = 0;
1232,1237c1488,1518
< 
< 	  if (strcmp (CommLineIn, ".") == 0) {
< 		CommState = ST_IN_GROUP;
< 		CommBusy = FALSE;
< 		finish_header_retrieval();
< 		SetStatbarText (CommDoc->hWndFrame, "", CommDoc, TRUE, TRUE);
---
>     if((strcmp(CommLineIn, ".") == 0) &&
>        (LockLine(CommDoc->hParentBlock, CommDoc->ParentOffset,
>                  CommDoc->ParentLineID, &BlockPtr, &LinePtr)))
>     {
>       GroupDoc = GetGroup(LinePtr);
>       GroupDoc->total_headers = CommDoc->ActiveLines;
>       first = GroupDoc->ServerFirst;
>       last = GroupDoc->ServerLast;
>       GlobalUnlock (BlockPtr->hCurBlock);  
> 
> 	  if (bEnableArticleAction){
>          aa.ReadActions(CurrentGroup);            /* Get article action list */
>          if (aa.NeedNgroupHeader()) {             /* Find out if we need newsgroups */
> 			/* Now ask for the newsgroups */
> 			CommDoc->ActiveLines = 0;
> 			mylen = sprintf (mybuf, "XHDR newsgroups %ld-%ld", first, last);
> 			CommState = ST_XHDR_NEWSGROUPS_START;
> 			PutCommLine (mybuf);
> 		    }
> 		     else {
> 				CommState = ST_IN_GROUP;
> 				CommBusy = FALSE;
> 				finish_header_retrieval();
> 				SetStatbarText (CommDoc->hWndFrame, "", CommDoc, TRUE, TRUE);
>  		    }
>       }
>       else {
> 			CommState = ST_IN_GROUP;
> 			CommBusy = FALSE;
> 			finish_header_retrieval();
> 			SetStatbarText (CommDoc->hWndFrame, "", CommDoc, TRUE, TRUE);
1238a1520
>     }
1249a1532,1534
> 			GlobalUnlock (BlockPtr->hCurBlock);
> 
> 		/* Lock the header data */
1257,1264c1542,1554
< 		  if (syncnum >= 0)
< 			header = header_elt (headers, syncnum);
< 		  else
< 			header = header_elt (headers, CommDoc->ActiveLines);
< 
< 		  header->Selected = FALSE;
< 		  header->ArtDoc = (TypDoc *) NULL;
< 		  header->Seen = WasArtSeen (artnum, GetGroup(LinePtr));
---
>       if(syncnum >= 0)
>       {
>         header = header_elt (headers, syncnum);
>         mylstrncpy (header->subject,
>                     get_xhdr_line (CommLineIn), HEADER_SUBJECT_LENGTH);
> //        CommDoc->LongestLine = max (CommDoc->LongestLine,
> //                                    ARTICLE_SUBJECT_OFFSET +
> //                                    (unsigned) lstrlen (header->subject));
>    		    CommDoc->LongestLine = max (CommDoc->LongestLine,
>                     									ArtListSeparator3 / CharWidth +
>                   									  (unsigned) lstrlen (header->subject));
>         CommDoc->ActiveLines++;
>       }
1267,1271d1556
< 		  mylstrncpy (header->subject,
< 					  get_xhdr_line (CommLineIn), HEADER_SUBJECT_LENGTH);
< 		  CommDoc->LongestLine = max (CommDoc->LongestLine,
< 									  ARTICLE_SUBJECT_OFFSET +
< 									  (unsigned) lstrlen (header->subject));
1274d1558
< 		  CommDoc->ActiveLines++;
1283a1568,1615
> 	case ST_XHDR_NEWSGROUPS_START:
>     retcode = 0;
>     sscanf(CommLineIn, "%d", &retcode);
>     if(check_server_code(retcode))
>       break;
>     CommState = ST_XHDR_NEWSGROUPS_DATA;
>     CommDoc->ActiveLines = 0;
>     break;
> 
> 	case ST_XHDR_NEWSGROUPS_DATA:
>     if (strcmp (CommLineIn, ".") == 0)
>     {
>       CommState = ST_IN_GROUP;
>       CommBusy = FALSE;
>       finish_header_retrieval();
>       SetStatbarText (CommDoc->hWndFrame, "", CommDoc, TRUE, TRUE);
>     }
>     else
>     {
>       /* Access the Group struct, get HANDLE for header data */
>       if(LockLine(CommDoc->hParentBlock, CommDoc->ParentOffset,
>          CommDoc->ParentLineID, &BlockPtr, &LinePtr))
>       {
>         GroupDoc = GetGroup(LinePtr);
>         header_handle = GroupDoc->header_handle;
>         thread_handle = GroupDoc->thread_handle;
>         GlobalUnlock(BlockPtr->hCurBlock);
> 
>         /* Lock the header data */
>         headers = lock_headers(header_handle, thread_handle);
>         syncnum = sync_artnum(atol(CommLineIn),
>                               (header_elt(headers, CommDoc->ActiveLines))->number,
>                               headers, GroupDoc);
>         if(syncnum >= 0)
>         {
>           header = header_elt (headers, syncnum);
>           mylstrncpy(header->newsgroups,
>                      get_xhdr_line(CommLineIn), HEADER_NEWSGROUPS_LENGTH);
>           CommDoc->ActiveLines++;
>         }
>         unlock_headers(header_handle, thread_handle);
> 
>         update_window_title(CommDoc->hWndFrame, group,
>                             RcvLineCount++, CommDoc->TotalLines * total_xhdrs);
>       }
>     }
>     break;
> 
1294a1627
> 	  ClearLatestInfo();
1300,1302d1632
< 	  if (strcmp (CommLineIn, ".") == 0) {
< 		;						/* error: empty article (end in middle of header) */
< 	  }
1304a1635
> 		CommDoc->HeaderLines = CommDoc->ActiveLines;  //Heirich 19960728
1306,1307c1637,1640
< 	  if (!TrimHeader (CommLineIn)) {
< 		WrapAddCommLineToDoc (CommLineIn);
---
> 	  if (!TrimHeader (CommLineIn))
> 	  {
>   		WrapAddCommLineToDoc (CommLineIn);
>         StoreHeaderInfo(CommLineIn);
1611c1944,1945
< 		_strnicmp ("message-id", line, 10) &&	/* need this for article replies */
---
> 		_strnicmp ("message-id:", line, 11) &&	/* need this for article replies */
> 		_strnicmp ("followup-to:", line, 12) &&
1624c1958
<  *  Returns TRUE iff the article has been seen.
---
>  *  Returns ART_SEEN iff the article has been seen.
1626c1960
< BOOL
---
> char
1635c1969
< 	  return (TRUE);
---
> 	  return (ART_SEEN);
1641c1975
<   return (FALSE);
---
>   return (ART_UNSEEN);
1646c1980
<  *  Determines number of unread articles in a group
---
>  *  Determines number of unseen articles in a group
1659c1993
< 		(unsigned long)(RangePtr[GroupPtr->nRanges - 1].Last) < GroupPtr->ServerFirst) {
---
> 		(long)(RangePtr[GroupPtr->nRanges - 1].Last) < GroupPtr->ServerFirst) {
1661a1996
> #if 0	// TANAKA Goh (newsrc patch)
1664a2000
> #endif	// TANAKA Goh (newsrc patch)
1680,1681c2016,2017
< 	if (GroupPtr->ServerLast > (unsigned long)RangePtr->Last) {
< 		numUnseen += (GroupPtr->ServerLast - (unsigned long)RangePtr->Last);
---
> 	if (GroupPtr->ServerLast > (long)RangePtr->Last) {
> 		numUnseen += (GroupPtr->ServerLast - (long)RangePtr->Last);
1708c2044
< char far * mylstrncpy(char far *ptr1, char far *ptr2, int len)
---
> char far * mylstrncpy(char far *ptr1, const char far *ptr2, int len)
1763a2100
>   char *sSortDef;
1770,1771c2107,2108
<   header_p headers;
<   char szTmp[MAXGROUPNAME+4];
---
>   header_p headers, hp;
>   uint32 i;
1779c2116
<    * change it so that ActiveLines will count only unread articles
---
>    * change it so that ActiveLines will count only unseen articles
1793a2131,2139
>     
>     GroupDoc->total_headers = CommDoc->TotalLines;  // needed in ActOnArticles()
> 
>     if(bEnableArticleAction)
>     {
>       WVArticleAction aa;
>       aa.ReadActions(CurrentGroup);  /* Get article action list */
>       aa.ActOnArticles(GroupDoc, headers);  /* Perform article actions */
>     }
1795,1797c2141,2150
<   	/* clear thread_depth info */
< 	/*  for (i = 0; i < group->total_headers; i++)
<    	 headers[i].thread_depth = 0; */
---
>     if (CommDoc->TotalLines > 0)
>     {
>       CommDoc->SelectedLines = 0;
>       for(i = 0; i < CommDoc->TotalLines; i++)
>       {
>         hp = header_elt(headers, i);
>         if(ART_SELECTED & hp->Selected)
>           CommDoc->SelectedLines++;
>       }
>     }
1799c2152,2153
<   	iSortOption = IDM_SORT_ARTNUM;
---
> //  	iSortOption = IDM_SORT_ARTNUM;
>     sSortDef = STR_SORT_ARTNUM;
1802,1803c2156,2157
<     	iSortOption = IDM_SORT_THREADSUB; // we're testing this as the default.
< 	/*	sort_by_threads (header_handle, thread_handle, CommDoc->TotalLines); */
---
> //    	iSortOption = IDM_SORT_THREADSUB; // we're testing this as the default.
>       sSortDef = STR_SORT_THREADSUB;
1806,1810c2160,2163
< /*  iSortOption = threadp ? IDM_SORT_THREADS : IDM_SORT_ARTNUM; */
< 
<   	lstrcpy(szTmp,"G: ");
<   	lstrcat(szTmp, CurrentGroup);
<   	iSortOption = GetPrivateProfileInt(szTmp, "SortOption", iSortOption, szAppProFile);
---
> //  	lstrcpy(szTmp,"G: ");
> //  	lstrcat(szTmp, CurrentGroup);
> //  	iSortOption = GetPrivateProfileInt(szTmp, "SortOption", iSortOption, szAppProFile);
>     iSortOption = ReadSortOption(sSortDef, CurrentGroup);
1819d2171
<   GroupDoc->total_headers = CommDoc->TotalLines;
1839,1860d2190
<   #if 0
<       /* Get article action list */
<       if(GroupDoc->pAction == NULL)
<      {
<           WVArticleAction *aa = new WVArticleAction;
<           aa->ReadActions(CurrentGroup);
<           GroupDoc->pAction = (void*) aa;
<       }
<       else
<         DEBUG_BREAK;  // pointer unexpectedly non-NULL
< 
<       /* Perform article actions */
<       ActOnArticles(GroupDoc, headers);
<  #endif
< 
<       /* Get article action list */
<       WVArticleAction aa;
<       aa.ReadActions(CurrentGroup);
< 
<       /* Perform article actions */
<       aa.ActOnArticles(GroupDoc, headers);
< 
2634a2965,2990
> void
> DrawDragingCursor(HWND hWnd, long oldPosition, long newPosition, BYTE flag)
> {
>   HDC hDc;
>   HPEN hOrigPen;
>   int nOrigDrawMode;
>   RECT clientRect;
> 
>   hDc = GetDC(hWnd);
>   hOrigPen = (HPEN)SelectObject(hDc, CreatePen(PS_SOLID, 1, ListBackgroundColor));
>   nOrigDrawMode = GetROP2(hDc);
>   SetROP2(hDc, R2_XORPEN);
>   GetClientRect(hWnd, &clientRect);
>   if ((flag == 1) || (flag == 2)) {
> 	MoveToEx(hDc, oldPosition, 0, NULL);
> 	LineTo(hDc, oldPosition, clientRect.bottom);
>   }
>   if (flag == 2) {
> 	MoveToEx(hDc, newPosition, 0, NULL);
> 	LineTo(hDc, newPosition, clientRect.bottom);
>   }
>   SetROP2(hDc, nOrigDrawMode);
>   DeleteObject(SelectObject(hDc,hOrigPen));
>   ReleaseDC(hWnd, hDc);
> }
> 
2637c2993
< // tab-width: 4
---
> // tab-width: 2
wvutil.cpp
206,229c206,229
< 
< // Determine if we need to fetch the Newsgroups line of the header.  We
< // only need to do this if the user has selected a Killfile options
< // that depends on having data from the newsgroups header line.  Since
< // this isn't typically in the XOVER database on the server, it is an 
< // expensive operation to perform. (JD 8/1/96)
< 
< BOOL WVArticleAction::NeedNgroupHeader()
< {
<   Node* cur;
<   g_action.ResetCurrent();
<       while(cur = g_action.GetCurrent())
<       {
<         if(cur->ad.iAction == MARK_SEEN_NGROUP_CONTAINS) return (TRUE);
<         g_action.GoToNext();
<       }
< 
<   ResetCurrent();  
<   while(cur = GetCurrent())
< 	{
< 	  if(cur->ad.iAction == MARK_SEEN_NGROUP_CONTAINS) return (TRUE);
< 	  GoToNext();
< 	}
<   return (FALSE);
---
> 
> // Determine if we need to fetch the Newsgroups line of the header.  We
> // only need to do this if the user has selected a Killfile options
> // that depends on having data from the newsgroups header line.  Since
> // this isn't typically in the XOVER database on the server, it is an 
> // expensive operation to perform. (JD 8/1/96)
> 
> BOOL WVArticleAction::NeedNgroupHeader()
> {
>   Node* cur;
>   g_action.ResetCurrent();
>       while(cur = g_action.GetCurrent())
>       {
>         if(cur->ad.iAction == MARK_SEEN_NGROUP_CONTAINS) return (TRUE);
>         g_action.GoToNext();
>       }
> 
>   ResetCurrent();  
>   while(cur = GetCurrent())
> 	{
> 	  if(cur->ad.iAction == MARK_SEEN_NGROUP_CONTAINS) return (TRUE);
> 	  GoToNext();
> 	}
>   return (FALSE);
wvaction.cpp
wvhdedit.c
winvn.rc
winvn16.def
winvn32.def
---------------------------------------------------------------------------
the following files have changed (* means an rcsmerge is necessary):
wvheader.c
wvscreen.c
wvsend.c
wvusenet.cpp
wvutil.cpp
no version string found in wvaction.cpp
