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 ************** |
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); |