~ubuntu-branches/ubuntu/natty/spring/natty

« back to all changes in this revision

Viewing changes to AI/Wrappers/CUtils/SimpleLog.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Ritchie
  • Date: 2010-09-23 18:56:03 UTC
  • mfrom: (3.1.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100923185603-st97s5chplo42y7w
Tags: 0.82.5.1+dfsg1-1ubuntu1
* Latest upstream version for online play
* debian/control: Replace (rather than conflict) spring-engine
  - spring-engine will be a dummy package (LP: #612905)
  - also set maintainer to MOTU

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
}
99
99
 
100
100
void simpleLog_init(const char* _logFileName, bool _useTimeStamps,
101
 
                int _logLevel) {
 
101
                int _logLevel, bool append) {
102
102
 
103
103
        if (_logFileName != NULL) {
104
104
                // NOTE: this causes a memory leack, as it is never freed.
109
109
                // delete the logFile, and try writing to it
110
110
                FILE* file = NULL;
111
111
                if (logFileName != NULL) {
112
 
                        file = FOPEN(logFileName, "w");
 
112
                        if (append) {
 
113
                                file = FOPEN(logFileName, "a");
 
114
                        } else {
 
115
                                file = FOPEN(logFileName, "w");
 
116
                        }
113
117
                }
114
118
                if (file != NULL) {
115
119
                        // make the file empty