Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:05:30

0001 /*
0002  *  qp_cmd_hfill1_tmpl.h  --
0003  *
0004  *  Original: 24-Apr-1995 18:07
0005  *
0006  *  Author:   Maarten Ballintijn <Maarten.Ballintijn@cern.ch>
0007  *
0008  *  $Id$
0009  *
0010  *  $Log$
0011  *  Revision 1.5  1996/04/23 18:38:09  maartenb
0012  *  - Add RCS keywords
0013  *
0014  *
0015  */
0016 
0017 {
0018     register OP_TYPE        *o1;
0019     register Float32        *o2;
0020     register int            n, inc_o1, inc_o2;
0021 
0022     o1 = (OP_TYPE *) &stack[frame[framep]];
0023     n = frame_size[framep];
0024     if ( n != 1 ) {
0025         inc_o1 = 1;
0026     } else {
0027         inc_o1 = 0;
0028     }
0029 
0030     o2 = (Float32 *) &stack[frame[framep-1]];
0031     if ( frame_size[framep-1] != 1 ) {  /* allow 0 and > 1 */
0032         if ( n == 1 ) {
0033             n = frame_size[framep-1];
0034         } else {
0035             qp_assert( n == frame_size[framep-1] );
0036         }
0037         inc_o2 = 1;
0038     } else {
0039         inc_o2 = 0;
0040     }
0041 
0042     for ( ; n > 0 ; n-- ) {
0043         if ( *o2 != 0. ) {
0044             hfill_x[hfill_n] = *o1;
0045             hfill_w[hfill_n] = *o2;
0046             hfill_n += 1;
0047 
0048             if ( hfill_n == HFILL_BSIZE ) {
0049                 HF1N( qp_hfill_id, hfill_x, hfill_w,
0050                     HFILL_BSIZE );
0051                 hfill_n = 0;
0052             }
0053         }
0054         o1 += inc_o1;
0055         o2 += inc_o2;
0056     }
0057 }