~ubuntu-branches/debian/experimental/eso-midas/experimental

« back to all changes in this revision

Viewing changes to monit/catal.c

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2015-03-17 15:17:38 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20150317151738-04qxxeqm36oful9i
Tags: 15.02pl1.1-1~exp1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
461
461
  ndim  = dimension of array ika for sorting
462
462
  but we pass the arrays with 1 element in front, so that the algorithm
463
463
  sorts from [1] -> [ndim]
464
 
  this is the Heapsort algorithm from "Numerical Recipes", page 231
465
 
 
 
464
  this is a version of the Heapsort algorithm 
 
465
  adapted for character based catalog entries. 
 
466
 
466
467
*/
467
468
  
468
469
char  *field;
474
475
 
475
476
m = ndim/2 + 1;
476
477
ir = ndim;
477
 
  
 
478
 
478
479
while (1)
479
480
   {
480
481
   if (m > 1)                   /* still hiring */
496
497
   i = m;       
497
498
   j = m << 1;                          /* in FORTRAN: j = m + m */
498
499
  
499
 
 
500
 
 
501
500
   while (j <= ir)      
502
501
      {
503
502
      if (j < ir)