~ubuntu-branches/ubuntu/hardy/ncbi-tools6/hardy

« back to all changes in this revision

Viewing changes to desktop/salogif.c

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2005-09-27 15:38:20 UTC
  • mfrom: (1.1.3 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050927153820-1t1sta0qirjpxaar
Tags: 6.1.20050429-1ubuntu1
GL/GLU Transition

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  $RCSfile: salogif.c,v $  $Revision: 6.7 $  $Date: 2004/02/02 23:40:25 $
 
1
/*  $RCSfile: salogif.c,v $  $Revision: 6.8 $  $Date: 2005/03/11 22:07:56 $
2
2
* ==========================================================================
3
3
*
4
4
*                            PUBLIC DOMAIN NOTICE
25
25
*
26
26
* Author:       Jinghui Zhang
27
27
*
28
 
* $Revision: 6.7 $
 
28
* $Revision: 6.8 $
29
29
*
30
30
* File Description:
31
31
*        The Blast Search result visualization utilities  
32
32
*
33
33
* --------------------------------------------------------------------------
34
34
* $Log: salogif.c,v $
 
35
* Revision 6.8  2005/03/11 22:07:56  merezhuk
 
36
* GIFTMP_BASE environment variable introduced to changed TmpGifs directory location.
 
37
*
35
38
* Revision 6.7  2004/02/02 23:40:25  dondosha
36
39
* Modify query bioseq id so it is a gi id, if possible, because this is the rule in seqaligns coming from BLAST
37
40
*
723
726
  SeqIdPtr sip;
724
727
  FILE *gif_fp;
725
728
  Int4 align_num;
726
 
  Char title_buf[201], tmpbuf[64];
 
729
  Char title_buf[201], tmpbuf[1024];
727
730
  SeqIdPtr idtemp, idtail;
 
731
  char *tmp_base_ptr = NULL;
 
732
  char tmp_base[1024];
728
733
 
729
734
  if(h_annot == NULL || fp == NULL)
730
735
    return FALSE;
810
815
    /*print out the title*/
811
816
    MuskSeqIdWrite (bsp->id, label, 100, PRINTID_FASTA_LONG, TRUE, TRUE);
812
817
 
813
 
    /* These temporary gifs will be stored in the TmpGif directory */
814
 
    sprintf(tmpbuf, "%s/%s", TMP_GIF_DIR, gif_name);
815
 
 
 
818
    /* These temporary gifs will be stored in the {TMP_BASE} + TmpGif directory */
 
819
    tmp_base_ptr = getenv("GIFTMP_BASE");
 
820
    if( tmp_base_ptr ){
 
821
       strcpy(tmp_base,tmp_base_ptr);
 
822
       if( tmp_base[ strlen(tmp_base) -1 ] != '/') strcat(tmp_base,"/");
 
823
       sprintf(tmpbuf, "%s%s/%s",tmp_base, TMP_GIF_DIR, gif_name);
 
824
    }
 
825
    else {  
 
826
       sprintf(tmpbuf, "%s/%s", TMP_GIF_DIR, gif_name);
 
827
    }
816
828
    gif_fp = FileOpen(tmpbuf, "wb");
817
829
 
818
830
    if ( !gif_fp ) {