~ubuntu-branches/ubuntu/maverick/ncbi-tools6/maverick

« back to all changes in this revision

Viewing changes to algo/blast/api/blast_format.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2008-07-14 19:43:15 UTC
  • mfrom: (2.1.12 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080714194315-ed44u9ek7txva2rz
Tags: 6.1.20080302-3
tools/readdb.c: enable madvise()-based code on all glibc (hence all
Debian) systems, not just Linux.  (Closes: #490437.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: blast_format.c,v 1.112 2006/10/06 12:22:28 madden Exp $
 
1
/* $Id: blast_format.c,v 1.114 2007/01/19 14:32:31 madden Exp $
2
2
* ===========================================================================
3
3
*
4
4
*                            PUBLIC DOMAIN NOTICE
32
32
 */
33
33
 
34
34
#ifndef SKIP_DOXYGEN_PROCESSING
35
 
static char const rcsid[] = "$Id: blast_format.c,v 1.112 2006/10/06 12:22:28 madden Exp $";
 
35
static char const rcsid[] = "$Id: blast_format.c,v 1.114 2007/01/19 14:32:31 madden Exp $";
36
36
#endif /* SKIP_DOXYGEN_PROCESSING */
37
37
 
38
38
#include <algo/blast/api/blast_format.h>
483
483
   if (align_view != eAlignViewXml && align_view < eAlignViewAsnText) {
484
484
      FILE* outfp;
485
485
      if ((outfp = FileOpen(outfile_name, "w")) == NULL)
486
 
         return -1;
 
486
      {
 
487
          ErrPostEx(SEV_WARNING, 0, 0, "Unable to open output file %s:", outfile_name);
 
488
          return -1;
 
489
      }
487
490
      info->outfp = outfp;
488
491
   } else {
489
492
      char write_mode[3];
497
500
          strcpy(write_mode, "wb"); 
498
501
      
499
502
      if ((info->aip = AsnIoOpen(filename_copy, write_mode)) == NULL)
500
 
         return -1;
 
503
      {
 
504
          ErrPostEx(SEV_WARNING, 0, 0, "Unable to open output file %s:", filename_copy);
 
505
          return -1;
 
506
      }
501
507
      sfree(filename_copy);
502
508
   }
503
509
   info->is_seqalign_null = TRUE; /* will be updated in BLAST_FormatResults */
597
603
        align_type = 3;
598
604
        *db_is_na = FALSE;
599
605
        break;
600
 
    case eBlastTypeTblastn:
 
606
    case eBlastTypePsiTblastn: case eBlastTypeTblastn:
601
607
        align_type = 4;
602
608
        *db_is_na = TRUE;
603
609
        break;