/[svn]/libgig/trunk/src/helper.h
ViewVC logotype

Diff of /libgig/trunk/src/helper.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1179 by persson, Sat May 12 11:25:04 2007 UTC revision 1330 by persson, Sun Sep 9 10:36:23 2007 UTC
# Line 28  Line 28 
28  #include <string>  #include <string>
29  #include <sstream>  #include <sstream>
30    
31    #if defined(WIN32) && !HAVE_CONFIG_H
32    # include "../win32/libgig_private.h" // like config.h, automatically generated by Dev-C++
33    # define PACKAGE "libgig"
34    # define VERSION VER_STRING // VER_STRING defined in libgig_private.h
35    #endif // WIN32
36    
37  #include "RIFF.h"  #include "RIFF.h"
38    
39  // *************** Helper Functions **************  // *************** Helper Functions **************
# Line 168  inline void SaveString(uint32_t ChunkID, Line 174  inline void SaveString(uint32_t ChunkID,
174          ck->Resize(size);          ck->Resize(size);
175          char* pData = (char*) ck->LoadChunkData();          char* pData = (char*) ck->LoadChunkData();
176          strncpy(pData, s.c_str(), size);          strncpy(pData, s.c_str(), size);
177      } else if (s != "" || sDefault != "") { // create chunk      } else if (s != "" || sDefault != "" || bUseFixedLengthStrings) { // create chunk
178          const std::string& sToSave = (s != "") ? s : sDefault;          const std::string& sToSave = (s != "") ? s : sDefault;
179          if (!bUseFixedLengthStrings) size = sToSave.size() + 1;          if (!bUseFixedLengthStrings) size = sToSave.size() + 1;
180          ck = lstINFO->AddSubChunk(ChunkID, size);          ck = lstINFO->AddSubChunk(ChunkID, size);

Legend:
Removed from v.1179  
changed lines
  Added in v.1330

  ViewVC Help
Powered by ViewVC