Changeset 529
- Timestamp:
- 07/18/16 04:15:22 (8 years ago)
- Location:
- cpp/frams/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/sstringutils.cpp
r523 r529 8 8 #include <common/nonstd.h> 9 9 10 int loadSString(const char* filename, SString& s, const char* framsgmodule, const char* error )10 int loadSString(const char* filename, SString& s, const char* framsgmodule, const char* error, bool remove_cr) 11 11 { 12 12 VirtFILE *f; … … 14 14 if (f = Vfopen(filename, FOPEN_READ_BINARY)) 15 15 { 16 loadSString(f, s );16 loadSString(f, s, remove_cr); 17 17 ret = 1; 18 18 delete f; … … 23 23 } 24 24 25 void loadSString(VirtFILE *f, SString& s )25 void loadSString(VirtFILE *f, SString& s, bool remove_cr) 26 26 { 27 27 char buf[1024]; … … 32 32 s.append(buf, len); 33 33 } 34 removeCR(s); 34 if (remove_cr) 35 removeCR(s); 35 36 } 36 37 -
cpp/frams/util/sstringutils.h
r512 r529 10 10 11 11 /// return: 1=ok 0=error 12 int loadSString(const char* filename, SString& s, const char* framsgmodule = 0, const char* error = 0 );13 void loadSString(VirtFILE *f, SString& s );12 int loadSString(const char* filename, SString& s, const char* framsgmodule = 0, const char* error = 0, bool remove_cr=true); 13 void loadSString(VirtFILE *f, SString& s, bool remove_cr=true); 14 14 bool loadSStringLine(VirtFILE* f, SString &s); 15 15
Note: See TracChangeset
for help on using the changeset viewer.