Clone
ixen <ixen@copyhandler.com>
committed
on 20 Oct 16
Moved overlapped file position management to reader/writer object. Simplified buffer ordering by using file position as the ordering key (in… Show more
Moved overlapped file position management to reader/writer object. Simplified buffer ordering by using file position as the ordering key (instead of artificial order id). Isolated overlapped memory management to a separate class. Simplified code responsible for retrying reads and writes. (CH-270)

Show less

ParallelizeReaderWriter + 4 more
src/ch/MiniViewDlg.cpp (+1 -0)
3 3 *   ixen@copyhandler.com                                                  *
4 4 *                                                                         *
5 5 *   This program is free software; you can redistribute it and/or modify  *
6 6 *   it under the terms of the GNU Library General Public License          *
7 7 *   (version 2) as published by the Free Software Foundation;             *
8 8 *                                                                         *
9 9 *   This program is distributed in the hope that it will be useful,       *
10 10 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11 11 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12 12 *   GNU General Public License for more details.                          *
13 13 *                                                                         *
14 14 *   You should have received a copy of the GNU Library General Public     *
15 15 *   License along with this program; if not, write to the                 *
16 16 *   Free Software Foundation, Inc.,                                       *
17 17 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18 18 ***************************************************************************/
19 19 #include "stdafx.h"
20 20 #include "MiniViewDlg.h"
21 21 #include "ch.h"
22 22 #include <assert.h>
  23 #include "MemDC.h"
23 24
24 25 #ifdef _DEBUG
25 26 #define new DEBUG_NEW
26 27 #undef THIS_FILE
27 28 static char THIS_FILE[] = __FILE__;
28 29 #endif
29 30
30 31 #define WM_INITDATA                             WM_USER+5
31 32
32 33 static const int sg_iMargin=7;
33 34
34 35 #define ROUND(val) ( ( (val)-static_cast<int>(val) > 0.5 ) ? static_cast<int>(val)+1 : static_cast<int>(val) )
35 36 #undef ROUNDUP  // from other module
36 37 #define ROUNDUP(val, to) ( (static_cast<int>((val)/(to))+1 )*(to) )
37 38
38 39 bool CMiniViewDlg::m_bLock=false;
39 40
40 41 /////////////////////////////////////////////////////////////////////////////
41 42 // CMiniViewDlg dialog
42 43