src/GamIO/XWinSer.cc
/* Regardless of the FID size, a Bruker serial file (ser) enforces the rule     
   that each FID must begin on a 1024 byte block boundary (256 points).  So,
   when writing serial files we will pad the output file with zeros until the
   boundary is reached. Similarly, we will check that all FIDs are all written
   written into the file beginning at such a boundary.                       */
Regardless of the FID size, a Bruker serial file (ser) enforces the rule
that each FID must begin on a 1024 byte block boundary (256 points).  So,
when writing serial files we will pad the output file with zeros until the
boundary is reached. Similarly, we will check that all FIDs are all written
written into the file beginning at such a boundary.
Regardless of the FID size a Bruker serial file ( ser ) enforces the rule that each FID must begin on a 1024 byte block boundary ( 256 points ) . So when writing serial files we will pad the output file with zeros until the boundary is reached . Similarly we will check that all FIDs are all written written into the file beginning at such a boundary .
void XWinSer::SetPadding()
  {
  fpadding = 0;				
  if(ftotpts == 0) return;		
  fpadding = ftotpts; 			
  while(fpadding >= 256) fpadding-=256;	
  if(fpadding < 0) XWinSerfatality(30);	
  if(fpadding > 0)			
    fpadding = 4*(256-fpadding);	
  }
void XWinSer :: SetPadding ( ) { fpadding = 0 ; if ( ftotpts == 0 ) return ; fpadding = ftotpts ; while ( fpadding >= 256 ) fpadding -= 256 ; if ( fpadding < 0 ) XWinSerfatality ( 30 ) ; if ( fpadding > 0 ) fpadding = 4 * ( 256 - fpadding ) ; }
Regardless of the FID size, a Bruker serial file (ser) enforces the rule
that each FID must begin on a 1024 byte block boundary (256 points).
Regardless of the FID size a Bruker serial file ( ser ) enforces the rule that each FID must begin on a 1024 byte block boundary ( 256 points ) .
// Assume there is no padding // No padding if no points // Begin will points per FID  // Clip chunks of 256 points // Quit if can't find boundary // If padding needed, set it to number // of bytes to reach 256 point boundary