Changeset 470 for branches


Ignore:
Timestamp:
Aug 31, 2007, 2:05:42 PM (16 years ago)
Author:
Peter Johansson
Message:

fixes #264

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.6-stable/lib/File.cc

    r456 r470  
    201201    string prefix;
    202202    while(getline(is, line)){
    203       if (after_copyright)
    204         tmp << line << "\n";
     203      if (after_copyright) {
     204        tmp << line;
     205        if (is.good()) // not end of file
     206          tmp << "\n";
     207        else { // check if file ends with newline character
     208          is.unget();
     209          char c = is.get();
     210          if (c=='\n')
     211            tmp << "\n";
     212        }
     213      }
    205214      else if (found_copyright){
    206215        // check if line is end of copyright statement, i.e. contains
Note: See TracChangeset for help on using the changeset viewer.