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/parse_commands.cpp

    r1864 r1891  
    117117 
    118118        /* say this is a beta version if we are talking and it is the truth */ 
    119         if( version.nBetaVer > 0 && called.lgTalk ) 
     119        if( version::Inst().nBetaVer > 0 && called.lgTalk ) 
    120120        { 
    121121                fprintf( ioQQQ,  
    122122                        "\n                             This is %s (beta %ld) of Cloudy, and is intended for testing only.\n\n",  
    123                         version.chVersion, version.nBetaVer ); 
     123                        version::Inst().chVersion, version::Inst().nBetaVer ); 
    124124        } 
    125125 
     
    127127        { 
    128128                /* this code prints pretty lines at top of output box */ 
    129                 for( i=0; i<57; i++ )  
    130                 { 
    131                         fprintf(ioQQQ,"%c",' '); 
    132                 } 
    133                 fprintf( ioQQQ, "Cloudy %s\n", version.chVersion); 
    134  
    135                 for( i=0; i<57; i++ )  
    136                 { 
    137                         fprintf(ioQQQ,"%c",' '); 
    138                 } 
    139                 fprintf( ioQQQ, "www.nublado.org\n\n"); 
    140  
    141                 for( i=0; i<23; i++ )  
    142                 { 
    143                         fprintf(ioQQQ,"%c",' '); 
    144                 } 
     129                int indent = (122 - strlen(version::Inst().chVersion))/2; 
     130                fprintf( ioQQQ, "%*cCloudy %s\n", indent, ' ', version::Inst().chVersion ); 
     131 
     132                fprintf( ioQQQ, "%57cwww.nublado.org\n\n", ' ' ); 
    145133 
    146134                /* now print box and date of version, before printing commands */ 
     135                fprintf( ioQQQ, "%23c", ' ' ); 
    147136                fprintf( ioQQQ, "**************************************"); 
    148                 fprintf( ioQQQ, "%8.8s", version.chDate); 
    149                 fprintf( ioQQQ, "*************************************\n"); 
    150  
    151                 for( i=0; i<23; i++ )  
    152                 { 
    153                         fprintf(ioQQQ,"%c",' '); 
    154                 } 
    155                 fprintf( ioQQQ, "*"); 
    156  
    157                 for( i=0; i<81; i++ )  
    158                 { 
    159                         fprintf(ioQQQ,"%c",' '); 
    160                 } 
    161                 fprintf( ioQQQ, "*\n"); 
     137                fprintf( ioQQQ, "%7.7s", version::Inst().chDate); 
     138                fprintf( ioQQQ, "**************************************\n"); 
     139 
     140                fprintf( ioQQQ, "%23c*%81c*\n", ' ', ' ' ); 
    162141        } 
    163142 
     
    194173                /* >>chng 04 jan 21, add HIDE option, mostly for print quiet command */ 
    195174                if( called.lgTalk && !nMatch("HIDE",input.chCARDCAPS) ) 
    196                 { 
    197                         fprintf( ioQQQ, "                       * "); 
    198                         i=0; 
    199                         while( chCard[i]!='\0' ) 
    200                         { 
    201                                 fprintf(ioQQQ,"%c",chCard[i]); 
    202                                 ++i; 
    203                         } 
    204  
    205                         while( i<80 ) 
    206                         { 
    207                                 fprintf(ioQQQ,"%c",' '); 
    208                                 ++i; 
    209                         } 
    210                         fprintf(ioQQQ,"*\n"); 
    211                 } 
     175                        fprintf( ioQQQ, "%23c* %-80s*\n", ' ', chCard ); 
    212176 
    213177                /* change chCard to all caps */ 
     
    18631827        if( called.lgTalk ) 
    18641828        { 
    1865                 fprintf( ioQQQ, "                       * %80.80s*\n",  
    1866                   chCard ); 
    1867                 fprintf( ioQQQ, "                       ***********************************************************************************\n\n\n\n" ); 
     1829                fprintf( ioQQQ, "%23c*%81c*\n", ' ', ' ' ); 
     1830                fprintf( ioQQQ, "%23c***********************************************************************************\n\n\n\n", ' ' ); 
    18681831        } 
    18691832