Show
Ignore:
Timestamp:
03/27/08 12:40:50 (8 months ago)
Author:
peter
Message:

source/service.cpp
source/punch_fits.cpp
source/init_coreload.cpp
source/grains_mie.cpp
source/assert_results.cpp
source/parse_punch.cpp
source/optimize_phymir.cpp
source/version.h
source/parse_commands.cpp
source/prt_final.cpp
source/grid_do.cpp
source/parse_print.cpp
source/cddrive.cpp
source/prt_comment.cpp
tsuite/programs/mpi/mpi.cpp

  • Bug-fix for PR59 - cdVersion, cdDate could cause segfault.
  • Start preparing for the change of the release numbering scheme for the next release.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/prt_final.cpp

    r1787 r1891  
    136136 
    137137        /* print name and version number */ 
    138         /*lint -e666 expression with side effects */ 
    139138        fprintf( ioQQQ, "\f\n"); 
    140         REPEAT_16( fprintf( ioQQQ, " "); ) 
    141         REPEAT_4( fprintf( ioQQQ, " "); ) 
    142         REPEAT_2( fprintf( ioQQQ, " ");) 
    143         fprintf( ioQQQ, " ");  
    144         for(i=0; i<31; ++i ) 
    145                 fprintf( ioQQQ, "*"); 
    146         fprintf( ioQQQ, "*");  
    147         fprintf( ioQQQ, "> Cloudy %s <", version.chVersion); 
    148         for(i=0; i<32; ++i ) 
    149                 fprintf( ioQQQ, "*"); 
     139        fprintf( ioQQQ, "%23c", ' ' ); 
     140        int len = strlen(version::Inst().chVersion); 
     141        int repeat = (72-len)/2; 
     142        for( i=0; i < repeat; ++i ) 
     143                fprintf( ioQQQ, "*" ); 
     144        fprintf( ioQQQ, "> Cloudy %s <", version::Inst().chVersion ); 
     145        for( i=0; i < 72-repeat-len; ++i ) 
     146                fprintf( ioQQQ, "*" ); 
    150147        fprintf( ioQQQ, "\n" ); 
    151         /*lint +e666 */ 
    152148 
    153149        for( i=0; i <= input.nSave; i++ ) 
     
    165161                /* >>chng 04 jan 21, add hide option */ 
    166162                if( (strcmp(chCKey,"CONT")!= 0) && !nMatch( "HIDE" , input.chCARDCAPS) ) 
    167                 { 
    168                         /* print leading space and first * */ 
    169                         fprintf( ioQQQ, "                       * "); 
    170  
    171                         j = 0; 
    172                         /* print actual command */ 
    173                         while( input.chCardSav[i][j] !='\0' ) 
    174                         { 
    175                                 fprintf( ioQQQ, "%c", input.chCardSav[i][j] ); 
    176                                 ++j; 
    177                         } 
    178  
    179                         /* flush out rest of space then * */ 
    180                         while( j<80 ) 
    181                         { 
    182                                 fprintf( ioQQQ, "%c", ' ' ); 
    183                                 ++j; 
    184                         } 
    185                         /* end the line */ 
    186                         fprintf( ioQQQ, "*\n" ); 
    187                 } 
     163                        fprintf( ioQQQ, "%23c* %-80s*\n", ' ', input.chCardSav[i] ); 
    188164        } 
    189165 
     
    202178          a ); 
    203179 
    204         if( version.nBetaVer > 0 ) 
     180        if( version::Inst().nBetaVer > 0 ) 
    205181        { 
    206182                fprintf( ioQQQ,