sam.c
/***************************************************************************
 *  Library:
 *      #include <biolibc/sam.h>
 *      -lbiolibc -lxtend
 *
 *  Description:
 *      Copy SAM header from one FILE stream to another.  This is meant to
 *      be used in conjunction with bl_sam_skip_header(), which stores the
 *      header in a temporary file.
 *
 *  Arguments:
 *      header_stream   Open FILE stream of SAM header
 *      sam_stream      FILE stream to which header is copied
 *
 *  Returns:
 *      BL_WRITE_OK upon success, BL_WRITE_FAILURE or BL_READ_* on failure
 *
 *  See also:
 *      bl_sam_skip_header(3)
 *
 *  History: 
 *  Date        Name        Modification
 *  2022-02-03  Jason Bacon Begin
 ***************************************************************************/
#include 
-lbiolibc -lxtend

Copy SAM header from one FILE stream to another.  This is meant to
be used in conjunction with bl_sam_skip_header(), which stores the
header in a temporary file.

header_stream   Open FILE stream of SAM header
sam_stream      FILE stream to which header is copied





Date        Name        Modification
2022-02-03  Jason Bacon Begin
#include - lbiolibc - lxtend Copy SAM header from one FILE stream to another . This is meant to be used in conjunction with bl_sam_skip_header () which stores the header in a temporary file . header_stream Open FILE stream of SAM header sam_stream FILE stream to which header is copied Date Name Modification 2022 - 02 - 03 Jason Bacon Begin
int     bl_sam_copy_header(FILE *header_stream, FILE *sam_stream)
{
    int     ch;
    rewind(header_stream);
    while ( (ch = getc(header_stream)) != EOF )
	if ( putc(ch, sam_stream) == EOF )
	    return BL_WRITE_FAILURE;
    rewind(header_stream);
    return BL_WRITE_OK;
}
int bl_sam_copy_header ( FILE * header_stream , FILE * sam_stream ) { int ch ; rewind ( header_stream ) ; while ( ( ch = getc ( header_stream ) ) != EOF ) if ( putc ( ch , sam_stream ) == EOF ) return BL_WRITE_FAILURE ; rewind ( header_stream ) ; return BL_WRITE_OK ; }
Library:
      #include <biolibc/sam.h>
      -lbiolibc -lxtend
Library : #include <biolibc / sam . h > - lbiolibc - lxtend