/***/
/* rrii.M: convert Sun-console Chemagnetics 2D data to hypercomplex form.
/***/

if (yLoc != specnum)
   {
    exit( 0 );
   };

float buff[size*specnum*2];

(void) dReadB( inUnit, buff, wordLen*size*specnum*2 );

rrOff = 0;
irOff = size*specnum;

riOff = size;
iiOff = size*specnum + size;
 
for( i = 0; i < specnum/2; i++ )
   {
    (void) vvCopyOff( rdata, buff, size, 0, rrOff );
    (void) vvCopyOff( idata, buff, size, 0, irOff );

    (void) dWriteB( outUnit, rdata, wordLen*size );
    (void) dWriteB( outUnit, idata, wordLen*size );

    (void) vvCopyOff( rdata, buff, size, 0, riOff );
    (void) vvCopyOff( idata, buff, size, 0, iiOff );

    (void) dWriteB( outUnit, rdata, wordLen*size );
    (void) dWriteB( outUnit, idata, wordLen*size );

    rrOff += size*2; irOff += size*2;
    riOff += size*2; iiOff += size*2;
   }
