コード例 #1
0
ファイル: snplocus.c プロジェクト: birney/wise3
/* Function:  GenoVarSet_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [GenoVarSet *]
 *
 */
GenoVarSet * GenoVarSet_alloc_len(int len) 
{
    GenoVarSet * out;   /* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = GenoVarSet_alloc()) == NULL)   
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->chr = (GenoVarChr ** ) ckcalloc (len,sizeof(GenoVarChr *))) == NULL)    {  
      warn("Warning, ckcalloc failed in GenoVarSet_alloc_len");  
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    if((out->ind = (Individual ** ) ckcalloc (len,sizeof(Individual *))) == NULL)    {  
      warn("Warning, ckcalloc failed in GenoVarSet_alloc_len");  
      return NULL;   
      }  
    out->ind_len = 0;    
    out->ind_maxlen = len;   


    return out;  
}    
コード例 #2
0
ファイル: transcript.c プロジェクト: mrmckain/RefTrans
/* Function:  Transcript_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [Transcript *]
 *
 */
Transcript * Transcript_alloc_len(int len) 
{
    Transcript * out;   /* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = Transcript_alloc()) == NULL)   
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->exon = (Exon ** ) ckcalloc (len,sizeof(Exon *))) == NULL)   {  
      warn("Warning, ckcalloc failed in Transcript_alloc_len");  
      return NULL;   
      }  
    out->ex_len = 0; 
    out->ex_maxlen = len;    


    if((out->translation = (Translation ** ) ckcalloc (len,sizeof(Translation *))) == NULL)  {  
      warn("Warning, ckcalloc failed in Transcript_alloc_len");  
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    return out;  
}    
コード例 #3
0
/* Function:  EstEvidence_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [EstEvidence *]
 *
 */
EstEvidence * EstEvidence_alloc_len(int len) 
{
    EstEvidence * out;  /* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = EstEvidence_alloc()) == NULL)  
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->exon = (EstExon    ** ) ckcalloc (len,sizeof(EstExon    *))) == NULL)   {  
      warn("Warning, ckcalloc failed in EstEvidence_alloc_len"); 
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    if((out->indel = (EstIndel   ** ) ckcalloc (len,sizeof(EstIndel   *))) == NULL)  {  
      warn("Warning, ckcalloc failed in EstEvidence_alloc_len"); 
      return NULL;   
      }  
    out->indel_len = 0;  
    out->indel_maxlen = len; 


    return out;  
}    
コード例 #4
0
/* Function:  DebugMatrix_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [DebugMatrix *]
 *
 */
DebugMatrix * DebugMatrix_alloc_len(int len) 
{
    DebugMatrix * out;  /* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = DebugMatrix_alloc()) == NULL)  
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->state = (DebugState ** ) ckcalloc (len,sizeof(DebugState *))) == NULL)  {  
      warn("Warning, ckcalloc failed in DebugMatrix_alloc_len"); 
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    if((out->point = (DebugBreakPoint ** ) ckcalloc (len,sizeof(DebugBreakPoint *))) == NULL)    {  
      warn("Warning, ckcalloc failed in DebugMatrix_alloc_len"); 
      return NULL;   
      }  
    out->bp_len = 0; 
    out->bp_maxlen = len;    


    return out;  
}    
コード例 #5
0
ファイル: funcinfo.c プロジェクト: mrmckain/RefTrans
/* Function:  FuncInfo_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [FuncInfo *]
 *
 */
FuncInfo * FuncInfo_alloc_len(int len) 
{
    FuncInfo * out; /* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = FuncInfo_alloc()) == NULL) 
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->arg = (ArgInfo   ** ) ckcalloc (len,sizeof(ArgInfo   *))) == NULL)  {  
      warn("Warning, ckcalloc failed in FuncInfo_alloc_len");    
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    if((out->err = (ErrorInfo ** ) ckcalloc (len,sizeof(ErrorInfo *))) == NULL)  {  
      warn("Warning, ckcalloc failed in FuncInfo_alloc_len");    
      return NULL;   
      }  
    out->err_len = 0;    
    out->err_maxlen = len;   


    return out;  
}    
コード例 #6
0
ファイル: numbering.c プロジェクト: tjordanchat/eag
/*
   Allocate storage to hold pointers to all rules, alternatives,
   members, meta rules and meta alternatives.
*/
static void allocate_rule_storage ()
	{ all_rules = (rule *) ckcalloc (nr_of_rules, sizeof (rule));
	  all_alts = (alt *) ckcalloc (nr_of_alts, sizeof (alt));
	  all_members = (member *) ckcalloc (nr_of_members, sizeof (member));
	  all_meta_rules = (meta_rule *) ckcalloc
				(nr_of_meta_rules, sizeof (meta_rule));
	  all_meta_alts = (meta_alt *) ckcalloc
				(nr_of_meta_alts, sizeof (meta_alt));
	};
コード例 #7
0
ファイル: leftcorner.c プロジェクト: tjordanchat/eag
static void allocate_space_for_relations ()
	{ int i,j;
	  member_leftcorner = (char *) ckcalloc
			(nr_of_members * nr_of_rules, sizeof (char));
	  member_leftcorner_closure = (char *) ckcalloc
			(nr_of_members * nr_of_rules, sizeof (char));
	  for (i=0; i < nr_of_members; i++)
	     for (j=0; j < nr_of_rules; j++)
		{ member_leftcorner [i*nr_of_rules + j] = 0;
		  member_leftcorner_closure [i*nr_of_rules + j] = 0;
		};
	};
コード例 #8
0
ファイル: eag_c_interface.c プロジェクト: tjordanchat/eag
/* Collect output vector */
static void check_for_space ()
{   if (nrofparses < allocated) return;
    if (allocated == room)
    {   int i;
        value **ocvals = my_cvals;
        my_cvals = (value **) ckcalloc (room * 2, sizeof (value *));
        for (i=0; i < room - 1; i++) my_cvals[i] = ocvals[i];
        room *= 2;
        ckfree (ocvals);
    };
    my_cvals[allocated] = (value *) ckcalloc (my_nrps, sizeof (value));
    allocated++;
};
コード例 #9
0
/* Function:  MotifConsMatrix_alloc_matrix(leni,lenj)
 *
 * Descrip:    Allocates structure and matrix
 *
 *
 * Arg:        leni [UNKN ] Length of first dimension of matrix [int]
 * Arg:        lenj [UNKN ] Length of second dimension of matrix [int]
 *
 * Return [UNKN ]  Undocumented return value [MotifConsMatrix *]
 *
 */
MotifConsMatrix * MotifConsMatrix_alloc_matrix(int leni,int lenj) 
{
    MotifConsMatrix * out;  /* out is exported          */ 
    register int i; /* for stepping down matrix */ 
    register int j; /* for stepping across matrix */ 


    /* Call alloc function, return NULL if NULL */ 
    if((out = MotifConsMatrix_alloc()) == NULL)  
      return NULL;   


    /* Allocate memory for mat  */ 
    if((out->mat = (char **) ckcalloc (leni,sizeof(char *))) == NULL)    {  
      warn("Memory allocation problem in matrix for MotifConsMatrix mat, first pointer set");    
      ckfree(out);   
      return NULL;   
      }  


    /* Add NULL to all matrix pointers so free can be called */ 
    for(i=0;i<leni;i++)  
      out->mat[i] = NULL;    


    /* Allocate each matrix row */ 
    for(i=0;i<leni;i++)  {  
      out->mat[i] = (char *) ckcalloc (lenj,sizeof(char ));  
      if( out->mat[i] == NULL)   {  
        warn("Failed alloc on %d, calling free and returning NULL",i);   
        free_MotifConsMatrix(out);   
        return NULL;     
        }  
      }  


    for(i=0;i<leni;i++)  {  
      for(j=0;j<lenj;j++)    
        out->mat[i][j] = NULL;   
      }  


    out->leni=out->maxleni=leni;     
    out->lenj=out->maxlenj=lenj;     


    return out;  
}    
コード例 #10
0
Sequence * translate_Sequence(Sequence * dna,CodonTable * ct)
{
  Sequence * out;
  int i;
  int j;
  int len;
  char * seq;
  char * name;
  char buffer[512];

  if( is_dna_Sequence(dna) == FALSE) {
    warn("Trying to make a translation from a non DNA sequence... type is [%s]",Sequence_type_to_string(dna->type));
    return NULL;
  }

  len = dna->len/3 + 1;
  
  seq = ckcalloc(len,sizeof(char));

  sprintf(buffer,"%s.tr",dna->name == NULL ? "NoNameDNASeq" : dna->name);

  name = stringalloc(buffer);

  out  = Sequence_from_dynamic_memory(name,seq);

  for(i=0,j=0;i<dna->len-3;i+=3,j++) {
    out->seq[j] = aminoacid_from_seq(ct,dna->seq+i);
  }
  out->seq[j] = '\0';

  out->type  = SEQUENCE_PROTEIN;
  out->len   = strlen(out->seq);

  return out;
}
コード例 #11
0
ファイル: histogram.c プロジェクト: LilaJansen/bioperl-ext
Histogram * new_Histogram(int min, int max, int lumpsize)
{
  Histogram *h;
  int            newsize;
  int            i;

  newsize = max - min + 1;

  h = Histogram_alloc(); /* ewan changed */
  if( h == NULL ) {
    return NULL;
  }

  h->min       = min;
  h->max       = max;
  h->total     = 0;
  h->lowscore  = INT_MAX;
  h->highscore = INT_MIN;
  h->lumpsize  = lumpsize;
  h->histogram = (int *) ckcalloc (newsize,sizeof(int)); /* ewan changed */
  for (i = 0; i < newsize; i++) h->histogram[i] = 0;

  h->expect    = NULL;
  h->fit_type  = HISTFIT_NONE;

  h->param[EVD_WONKA] = 1.0;	/* just in case, make sure this initializes */

  return h;
}
コード例 #12
0
ファイル: leftcorner.c プロジェクト: tjordanchat/eag
static void allocate_goal_relation ()
	{ int i,j;
	  goal_relation = ckcalloc (goalnr * goalnr, sizeof (char));
	  for (i = 0; i < goalnr; i++)
	     for (j = 0; j < goalnr; j++)
		goal_relation [i * goalnr + j] = 0;
	};
コード例 #13
0
ファイル: ebs_value.c プロジェクト: tjordanchat/eag
/* Allocate a new value list */
value_list new_value_list (int room)
{ value_list nvl = (value_list) ckmalloc (sizeof (struct value_list_rec));
  int mroom = (room <= 0)?1:room;
  nvl -> size = 0;
  nvl -> room = mroom;
  nvl -> array = (value *) ckcalloc (mroom, sizeof (value));
  return (nvl);
};
コード例 #14
0
ファイル: eag_c_interface.c プロジェクト: tjordanchat/eag
/*
   Reserve space to collect output affixes
*/
void reserve_collection_space ()
{   my_nrps = popi ();
    my_cvals = (value **) ckcalloc (1, sizeof (value *));
    room = 1;
    allocated = 0;
    callq ();
    pushi (my_nrps);
    pushq (reserve_collection_space);
};
コード例 #15
0
ファイル: leftcorner.c プロジェクト: tjordanchat/eag
static void build_reflexive_leftcorner_relation ()
	{ int i,j;
	  refl_leftc_relation = (char *) ckcalloc (nr_of_rules * nr_of_rules, sizeof (char));
	  for (i=0; i < nr_of_rules; i++)
	     for (j=0; j < nr_of_rules; j++)
		refl_leftc_relation [i * nr_of_rules + j] = leftc_relation [i * nr_of_rules + j];
	  /* add reflexivety */
	  for (i=0; i < nr_of_rules; i++)
	     refl_leftc_relation [i * nr_of_rules + i] = 1;
	};
コード例 #16
0
ファイル: method.c プロジェクト: mrmckain/RefTrans
/* Function:  MethodTypeSet_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [MethodTypeSet *]
 *
 */
MethodTypeSet * MethodTypeSet_alloc_len(int len) 
{
    MethodTypeSet * out;/* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = MethodTypeSet_alloc()) == NULL)    
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->me = (Method ** ) ckcalloc (len,sizeof(Method *))) == NULL) {  
      warn("Warning, ckcalloc failed in MethodTypeSet_alloc_len");   
      return NULL;   
      }  
    out->me_len = 0; 
    out->me_maxlen = len;    


    if((out->ty = (Type   ** ) ckcalloc (len,sizeof(Type   *))) == NULL) {  
      warn("Warning, ckcalloc failed in MethodTypeSet_alloc_len");   
      return NULL;   
      }  
    out->ty_len = 0; 
    out->ty_maxlen = len;    


    if((out->in = (Input  ** ) ckcalloc (len,sizeof(Input  *))) == NULL) {  
      warn("Warning, ckcalloc failed in MethodTypeSet_alloc_len");   
      return NULL;   
      }  
    out->in_len = 0; 
    out->in_maxlen = len;    


    return out;  
}    
コード例 #17
0
Ascii_btc_Data * new_Ascii_btc_Data(FILE * ofp,int left,int main,int right,int height)
{
  Ascii_btc_Data * out;
  int tot;
  int i;

  tot = left + main + right +2;

  out = Ascii_btc_Data_alloc();

  out->ofp = ofp;
  out->res_left = left;
  out->main = main;
  out->res_right = right;
  out->current_x= left;
  out->paint_x = left;

  
  out->scratch = (char **) ckcalloc(height,sizeof(char *));
  for(i=0;i<height;i++) {
    out->scratch[i] = (char *) ckcalloc(tot,sizeof(char));
    memset(out->scratch[i],' ',tot-2);
    out->scratch[i][tot-1] = '\0';
    out->scratch[i][tot-2] = '\n';
  }
  
  out->depth_scratch = height;
  out->in_use = FALSE;
  out->bpa = btPasteArea_alloc();
  out->bpa->height = height;
  out->bpa->canvas_data = (void *) out;
  out->bpa->decons = free_Ascii_btpa;
  out->bpa->paste_char = paste_char_bt_Ascii;

  
  
  return out;
}
コード例 #18
0
ファイル: basematrix.c プロジェクト: mrmckain/RefTrans
BaseMatrix * BaseMatrix_alloc_matrix_and_specials(int len_point,int len_array,int len_spec_point,int len_spec_array)
{
  register int i;
  BaseMatrix *  out;

  /* use dy matrix for main stuff */

  if( (out = BaseMatrix_alloc_matrix(len_point,len_array)) == NULL ) {
    warn("Unable to allocate %d by %d [%d] int positions in basematrix main matrix",len_point,len_array,len_point*len_array);
    return NULL;
  }

  out->spec_len = 0;

  if( (out->specmatrix = (int **) ckcalloc(len_spec_point,sizeof(int *))) == NULL ) {
    warn("Unable to allocate %d special matrix pointers in basematrix",len_spec_point);
    free_BaseMatrix(out);
    return NULL;
  }

  for(i=0;i<len_spec_point;i++) {
    if( (out->specmatrix[i] = (int *) ckcalloc(len_spec_array,sizeof(int))) == NULL ) {
      warn("Unable to allocate the %d'th special array in basematrix for [length: %d]",i,len_spec_array);
   
      /*** sneaky. Put spec_len = i so that deconstructor will clear-up memory ***/

      out->spec_len = i;
      free_BaseMatrix(out);
      return NULL;
    }
  }

  out->spec_len = len_spec_point;
  

  return out;
}
コード例 #19
0
ファイル: packaln.c プロジェクト: mrmckain/RefTrans
void invert_PackAln(PackAln * pal) 
{
  PackAlnUnit ** temp;
  register int i;

  /*** there are better ways to do this! ***/

  temp = (PackAlnUnit **) ckcalloc(pal->len,sizeof(PackAlnUnit *));
  
  for(i=0;i<pal->len;i++) 
    temp[i] = pal->pau[pal->len-1-i];
  for(i=0;i<pal->len;i++)
    pal->pau[i] = temp[i];

  ckfree(temp);
}
コード例 #20
0
ファイル: dnahmm.c プロジェクト: PlantandFoodResearch/wise2
/* Function:  DnaHmmScore_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [DnaHmmScore *]
 *
 */
DnaHmmScore * DnaHmmScore_alloc_len(int len) 
{
    DnaHmmScore * out;  /* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = DnaHmmScore_alloc()) == NULL)  
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->unit = (DnaHmmScoreUnit ** ) ckcalloc (len,sizeof(DnaHmmScoreUnit *))) == NULL) {  
      warn("Warning, ckcalloc failed in DnaHmmScore_alloc_len"); 
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    return out;  
}    
コード例 #21
0
/* Function:  GeneConsensus_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [GeneConsensus *]
 *
 */
GeneConsensus * GeneConsensus_alloc_len(int len) 
{
    GeneConsensus * out;/* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = GeneConsensus_alloc()) == NULL)    
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->gsc = (GeneSingleCons ** ) ckcalloc (len,sizeof(GeneSingleCons *))) == NULL)    {  
      warn("Warning, ckcalloc failed in GeneConsensus_alloc_len");   
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    return out;  
}    
コード例 #22
0
ファイル: genome_evidence.c プロジェクト: mrmckain/RefTrans
/* Function:  GenomeEvidenceSet_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [GenomeEvidenceSet *]
 *
 */
GenomeEvidenceSet * GenomeEvidenceSet_alloc_len(int len) 
{
    GenomeEvidenceSet * out;/* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = GenomeEvidenceSet_alloc()) == NULL)    
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->geu = (GenomeEvidenceUnit ** ) ckcalloc (len,sizeof(GenomeEvidenceUnit *))) == NULL)    {  
      warn("Warning, ckcalloc failed in GenomeEvidenceSet_alloc_len");   
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    return out;  
}    
コード例 #23
0
/* Function:  SimpleBufferedServer_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [SimpleBufferedServer *]
 *
 */
SimpleBufferedServer * SimpleBufferedServer_alloc_len(int len) 
{
    SimpleBufferedServer * out; /* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = SimpleBufferedServer_alloc()) == NULL) 
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->buffer = (BufferedString ** ) ckcalloc (len,sizeof(BufferedString *))) == NULL) {  
      warn("Warning, ckcalloc failed in SimpleBufferedServer_alloc_len");    
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    return out;  
}    
コード例 #24
0
ファイル: modulefunc.c プロジェクト: birney/wise3
/* Function:  ModuleFunctionList_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [ModuleFunctionList *]
 *
 */
ModuleFunctionList * ModuleFunctionList_alloc_len(int len) 
{
    ModuleFunctionList * out;   /* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = ModuleFunctionList_alloc()) == NULL)   
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->mf = (ModuleFunction ** ) ckcalloc (len,sizeof(ModuleFunction *))) == NULL) {  
      warn("Warning, ckcalloc failed in ModuleFunctionList_alloc_len");  
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    return out;  
}    
コード例 #25
0
/* Function:  ShatterMatrix_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [ShatterMatrix *]
 *
 */
ShatterMatrix * ShatterMatrix_alloc_len(int len) 
{
    ShatterMatrix * out;/* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = ShatterMatrix_alloc()) == NULL)    
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->smc = (ShatterMatrixComponent ** ) ckcalloc (len,sizeof(ShatterMatrixComponent *))) == NULL)    {  
      warn("Warning, ckcalloc failed in ShatterMatrix_alloc_len");   
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    return out;  
}    
コード例 #26
0
/* Function:  TransferedFunctionCall_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [TransferedFunctionCall *]
 *
 */
TransferedFunctionCall * TransferedFunctionCall_alloc_len(int len) 
{
    TransferedFunctionCall * out;   /* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = TransferedFunctionCall_alloc()) == NULL)   
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->input = (TransferedObjectMarshaller ** ) ckcalloc (len,sizeof(TransferedObjectMarshaller *))) == NULL)  {  
      warn("Warning, ckcalloc failed in TransferedFunctionCall_alloc_len");  
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    return out;  
}    
コード例 #27
0
/* Function:  PfamHmmer1DB_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [PfamHmmer1DB *]
 *
 */
PfamHmmer1DB * PfamHmmer1DB_alloc_len(int len) 
{
    PfamHmmer1DB * out; /* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = PfamHmmer1DB_alloc()) == NULL) 
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->en = (PfamHmmer1Entry ** ) ckcalloc (len,sizeof(PfamHmmer1Entry *))) == NULL)   {  
      warn("Warning, ckcalloc failed in PfamHmmer1DB_alloc_len");    
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    return out;  
}    
コード例 #28
0
ファイル: dnaprofileengine.c プロジェクト: obbila/CustomWise
    /* Function:  DnaProfileMatchPairSet_alloc_len(len)
     *
     * Descrip:    Allocates len length to all lists
     *
     *
     * Arg:        len [UNKN ] Length of lists to allocate [int]
     *
     * Return [UNKN ]  Undocumented return value [DnaProfileMatchPairSet *]
     *
     */
    DnaProfileMatchPairSet * DnaProfileMatchPairSet_alloc_len(int len)
    {
        DnaProfileMatchPairSet * out;   /* out is exported at the end of function */


        /* Call alloc function: return NULL if NULL */
        /* Warning message alread in alloc function */
        if((out = DnaProfileMatchPairSet_alloc()) == NULL)
            return NULL;


        /* Calling ckcalloc for list elements */
        if((out->pair = (DnaProfileMatchPair ** ) ckcalloc (len,sizeof(DnaProfileMatchPair *))) == NULL) {
            warn("Warning, ckcalloc failed in DnaProfileMatchPairSet_alloc_len");
            return NULL;
        }
        out->len = 0;
        out->maxlen = len;


        return out;
    }
コード例 #29
0
ファイル: seqerror.c プロジェクト: PlantandFoodResearch/wise2
/* Function:  SequenceErrorSet_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [SequenceErrorSet *]
 *
 */
SequenceErrorSet * SequenceErrorSet_alloc_len(int len) 
{
    SequenceErrorSet * out; /* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = SequenceErrorSet_alloc()) == NULL) 
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->error = (SequenceError ** ) ckcalloc (len,sizeof(SequenceError *))) == NULL)    {  
      warn("Warning, ckcalloc failed in SequenceErrorSet_alloc_len");    
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    return out;  
}    
コード例 #30
0
/* Function:  SingleNumberSpace_alloc_len(len)
 *
 * Descrip:    Allocates len length to all lists
 *
 *
 * Arg:        len [UNKN ] Length of lists to allocate [int]
 *
 * Return [UNKN ]  Undocumented return value [SingleNumberSpace *]
 *
 */
SingleNumberSpace * SingleNumberSpace_alloc_len(int len) 
{
    SingleNumberSpace * out;/* out is exported at the end of function */ 


    /* Call alloc function: return NULL if NULL */ 
    /* Warning message alread in alloc function */ 
    if((out = SingleNumberSpace_alloc()) == NULL)    
      return NULL;   


    /* Calling ckcalloc for list elements */ 
    if((out->sns = (SingleNumberSequence ** ) ckcalloc (len,sizeof(SingleNumberSequence *))) == NULL)    {  
      warn("Warning, ckcalloc failed in SingleNumberSpace_alloc_len");   
      return NULL;   
      }  
    out->len = 0;    
    out->maxlen = len;   


    return out;  
}