Changeset c510a7 for pcp/src/ions.c


Ignore:
Timestamp:
Apr 29, 2008, 12:19:51 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
e936b3
Parents:
307fd1
Message:

char lengths of 255 and MAXDUMMYSTRING replaced with define MAXSTRINGSIZE in molecuilder and pcp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified pcp/src/ions.c

    r307fd1 rc510a7  
    293293  I->TotalMass = 0;
    294294  char *free_name, *name;
    295   name = free_name = Malloc(255*sizeof(char),"IonsInitRead: Name");
     295  name = free_name = Malloc(MAXSTRINGSIZE*sizeof(char),"IonsInitRead: Name");
    296296  for (i=0; i < I->Max_Types; i++) {
    297297        sprintf(name,"Ion_Type%i",i+1);
    298298    I->I[i].corecorr = NotCoreCorrected;
    299     I->I[i].Name = MallocString(255, "IonsInitRead: Name");
    300     I->I[i].Symbol = MallocString(255, "IonsInitRead: Symbol");
     299    I->I[i].Name = MallocString(MAXSTRINGSIZE, "IonsInitRead: Name");
     300    I->I[i].Symbol = MallocString(MAXSTRINGSIZE, "IonsInitRead: Symbol");
    301301                ParseForParameter(P->Call.out[ReadOut],source, name, 0, 1, 1, int_type, &I->I[i].Max_IonsOfType, 1, critical);
    302302                ParseForParameter(P->Call.out[ReadOut],source, name, 0, 2, 1, int_type, &I->I[i].Z, 1, critical);
     
    10141014  //struct RunStruct *R = &P->R;
    10151015  struct Ions *I = &P->Ion;
    1016   char filename[255];
     1016  char filename[MAXSTRINGSIZE];
    10171017  FILE *output;
    10181018  int is, ia, nr = 0;
Note: See TracChangeset for help on using the changeset viewer.