@@ -65,7 +65,7 @@ void OwnedRowArray::replace(const void * row, aindex_t pos)
6565CRHRollingCacheElem::CRHRollingCacheElem ()
6666{
6767 row = NULL ;
68- cmp = INT_MIN;
68+ cmp = INT_MIN;
6969}
7070CRHRollingCacheElem::~CRHRollingCacheElem ()
7171{
@@ -84,10 +84,10 @@ void CRHRollingCacheElem::set(const void *_row)
8484CRHRollingCache::~CRHRollingCache ()
8585{
8686 while (cache.ordinality ())
87- {
88- CRHRollingCacheElem *e = cache.dequeue ();
89- delete e;
90- }
87+ {
88+ CRHRollingCacheElem *e = cache.dequeue ();
89+ delete e;
90+ }
9191}
9292
9393void CRHRollingCache::init (IRowStream *_in, unsigned _max)
@@ -164,7 +164,7 @@ void CRHRollingCache::advance()
164164
165165// =========================================================================================
166166
167- // CRHDualCache copied from THOR, and modified to get input from IInputBase instead
167+ // CRHDualCache copied from THOR, and modified to get input from IInputBase instead
168168// of IReadSeqVar and to manage rows as OwnedRoxieRow types
169169CRHDualCache::CRHDualCache ()
170170{
@@ -177,12 +177,12 @@ CRHDualCache::~CRHDualCache()
177177 ::Release (strm1);
178178 ::Release (strm2);
179179 for (;;)
180- {
181- CRHRollingCacheElem *e = cache.dequeue ();
182- if (!e)
183- break ;
184- delete e;
185- }
180+ {
181+ CRHRollingCacheElem *e = cache.dequeue ();
182+ if (!e)
183+ break ;
184+ delete e;
185+ }
186186}
187187
188188void CRHDualCache::init (IRowStream * _in)
@@ -206,7 +206,7 @@ void CRHDualCache::PrintCache()
206206 {
207207 DBGLOG (" DC=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-BASE:%d,posL=%d,posR=%d %s" , base, posL,posR, eos?" EOS" :" " );
208208 }
209-
209+
210210 DBGLOG (" %c%d: %s" ,(i==cache.ordinality ()/2 )?' >' :' ' ,i,e?(const char *)e->row :" -----" );
211211 if (i == cache.ordinality ()-1 )
212212 DBGLOG (" DC=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-" );
@@ -251,7 +251,7 @@ bool CRHDualCache::get(unsigned n, CRHRollingCacheElem *&out)
251251 return true ;
252252}
253253
254- CRHDualCache::cOut::cOut (CRHDualCache *_parent, unsigned &_pos)
254+ CRHDualCache::cOut::cOut (CRHDualCache *_parent, unsigned &_pos)
255255: pos(_pos)
256256{
257257 parent = _parent;
@@ -297,22 +297,22 @@ void CRHLimitedCompareHelper::init( unsigned _atmost,
297297bool CRHLimitedCompareHelper::getGroup (OwnedRowArray &group, const void *left)
298298{
299299 // this could be improved!
300-
300+
301301 // first move 'mid' forwards until mid>=left
302302 int low = 0 ;
303303 for (;;)
304304 {
305305 CRHRollingCacheElem * r = cache->mid (0 );
306306 if (!r)
307- break ; // hit eos
307+ break ; // hit eos
308308 int c = cmp->docompare (left,r->row );
309- if (c == 0 )
309+ if (c == 0 )
310310 {
311311 r->cmp = limitedcmp->docompare (left,r->row );
312- if (r->cmp <= 0 )
312+ if (r->cmp <= 0 )
313313 break ;
314314 }
315- else if (c < 0 )
315+ else if (c < 0 )
316316 {
317317 r->cmp = -1 ;
318318 break ;
@@ -328,51 +328,51 @@ bool CRHLimitedCompareHelper::getGroup(OwnedRowArray &group, const void *left)
328328 {
329329 CRHRollingCacheElem * pr = cache->mid (low-1 );
330330 if (!pr)
331- break ; // hit start
331+ break ; // hit start
332332 int c = cmp->docompare (left,pr->row );
333- if (c == 0 )
333+ if (c == 0 )
334334 {
335335 pr->cmp = limitedcmp->docompare (left,pr->row );
336- if (pr->cmp ==1 )
336+ if (pr->cmp ==1 )
337337 break ;
338338 }
339- else
339+ else
340340 {
341- pr->cmp = 1 ;
341+ pr->cmp = 1 ;
342342 break ;
343343 }
344344 low--;
345345 }
346346 int high = 0 ;
347347 if (cache->mid (0 )) // check haven't already hit end
348- {
348+ {
349349 // now scan fwd
350350 for (;;)
351351 {
352352 high++;
353353 CRHRollingCacheElem * nr = cache->mid (high);
354- if (!nr)
354+ if (!nr)
355355 break ;
356356 int c = cmp->docompare (left,nr->row );
357- if (c==0 )
357+ if (c==0 )
358358 {
359359 nr->cmp = limitedcmp->docompare (left,nr->row );
360- if (nr->cmp ==-1 )
360+ if (nr->cmp ==-1 )
361361 break ;
362362 }
363- else
363+ else
364364 {
365365 nr->cmp = -1 ;
366366 break ;
367367 }
368368 }
369369 }
370- while (high-low>(int )atmost)
370+ while (high-low>(int )atmost)
371371 {
372372 int vl = iabs (cache->mid (low)->cmp );
373373 int vh = iabs (cache->mid (high-1 )->cmp );
374374 int v;
375- if (vl==0 )
375+ if (vl==0 )
376376 {
377377 if (vh==0 ) // both ends equal
378378 return false ;
@@ -387,14 +387,14 @@ bool CRHLimitedCompareHelper::getGroup(OwnedRowArray &group, const void *left)
387387 low++;
388388 while ((low<high)&&(iabs (cache->mid (high-1 )->cmp )==v))
389389 high--;
390- if (low>=high)
390+ if (low>=high)
391391 return true ; // couldn't make group;
392392 }
393- for (int i=low;i<high;i++)
393+ for (int i=low;i<high;i++)
394394 {
395395 CRHRollingCacheElem *r = cache->mid (i);
396396 LinkRoxieRow (r->row );
397- group.append (r->row );
397+ group.append (r->row );
398398 }
399399 return group.ordinality ()>0 ;
400400}
@@ -609,7 +609,7 @@ extern IEngineRowStream *createSortedGroupedInputReader(IEngineRowStream *_input
609609 return new SortedGroupedInputReader (_input, _groupCompare, _sorter);
610610}
611611
612- // =========================================================================================
612+ // =========================================================================================
613613
614614class CSortAlgorithm : implements CInterfaceOf<ISortAlgorithm>
615615{
@@ -1196,7 +1196,7 @@ class CSpillingSortAlgorithm : public CSortAlgorithm, implements roxiemem::IBuff
11961196 {
11971197 unsigned __int64 seq = (memsize_t )this ^ get_cycles_now ();
11981198 StringBuffer spillBasename;
1199- spillBasename.append (tempDirectory).appendf (" spill_sort_%" I64F " u" , seq);
1199+ spillBasename.append (tempDirectory).append (PATHSEPCHAR). appendf (" spill_sort_%" I64F " u" , seq);
12001200 Owned<IRowLinkCounter> linker = new RoxieRowLinkCounter ();
12011201 unsigned heapFlags = 0 ;
12021202 Owned<IRowInterfaces> rowInterfaces = createRowInterfaces (rowMeta, activityId, heapFlags, ctx);
@@ -1350,8 +1350,8 @@ extern ISortAlgorithm *createSortAlgorithm(RoxieSortAlgorithm _algorithm, ICompa
13501350CSafeSocket::CSafeSocket (ISocket *_sock)
13511351{
13521352 httpMode = false ;
1353- sent = 0 ;
1354- heartbeat = false ;
1353+ sent = 0 ;
1354+ heartbeat = false ;
13551355 sock.setown (_sock);
13561356}
13571357
@@ -1779,7 +1779,7 @@ bool CSafeSocket::sendHeartBeat(const IContextLogger &logctx)
17791779 rev = (unsigned ) time (NULL );
17801780 _WINREV (rev);
17811781 s.append (sizeof (rev), (char *) &rev);
1782-
1782+
17831783 try
17841784 {
17851785 CriticalBlock c (crit);
@@ -1979,7 +1979,7 @@ interface IXmlStreamFlusher;
19791979
19801980bool FlushingStringBuffer::needsFlush (bool closing)
19811981{
1982- if (isBlocked || closing) // can't flush unblocked. MORE - may need to break it up though....
1982+ if (isBlocked || closing) // can't flush unblocked. MORE - may need to break it up though....
19831983 {
19841984 size32_t len = s.length () - emptyLength;
19851985 return len > (closing ? 0 : RESULT_FLUSH_THRESHOLD);
@@ -2582,17 +2582,17 @@ void ClusterWriteHandler::setDescriptorParts(IFileDescriptor * desc, char const
25822582 ClusterPartDiskMapSpec partmap; // will get this from group at some point
25832583 desc->setNumParts (1 );
25842584 desc->setPartMask (basename);
2585- if (localCluster)
2585+ if (localCluster)
25862586 desc->addCluster (localClusterName,localCluster, partmap);
2587- ForEachItemIn (idx,remoteNodes)
2587+ ForEachItemIn (idx,remoteNodes)
25882588 desc->addCluster (remoteClusters.item (idx),&remoteNodes.item (idx), partmap);
25892589 if (attrs) {
25902590 // need to set part attr
25912591 IPartDescriptor *partdesc = desc->queryPart (0 );
25922592 IPropertyTree &pprop = partdesc->queryProperties ();
25932593 // bit of a kludge (should really set properties *after* creating part rather than passing prop tree in)
25942594 Owned<IAttributeIterator> ai = attrs->getAttributes ();
2595- ForEach (*ai)
2595+ ForEach (*ai)
25962596 pprop.setProp (ai->queryName (),ai->queryValue ());
25972597 }
25982598}
@@ -2702,16 +2702,16 @@ class COrderedOutputSerializer : implements IOrderedOutputSerializer, public CIn
27022702 }
27032703
27042704 // IOrderedOutputSerializer
2705- size32_t fwrite (int seq, const void * data, size32_t size, size32_t count)
2706- {
2705+ size32_t fwrite (int seq, const void * data, size32_t size, size32_t count)
2706+ {
27072707 CriticalBlock c (crit);
27082708 size32_t ret = getResult (seq)->fwrite (data,size, count);
27092709 if (seq == (lastSeqFlushed + 1 ))
27102710 flushCurrent ();
27112711 return ret;
27122712 }
27132713 size32_t printf (int seq, const char *format, ...) __attribute__((format(printf, 3 , 4 )))
2714- {
2714+ {
27152715 CriticalBlock c (crit);
27162716 va_list args;
27172717 va_start (args, format);
0 commit comments