Skip to content
This repository was archived by the owner on May 10, 2023. It is now read-only.

Commit dc85846

Browse files
committed
[trunk] Replace author white spaces with underscore in IMS 1.0 output
1 parent 3814ce9 commit dc85846

File tree

1 file changed

+4
-0
lines changed
  • src/trunk/libs/seiscomp3/datamodel/exchange

1 file changed

+4
-0
lines changed

src/trunk/libs/seiscomp3/datamodel/exchange/ims10.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#include <seiscomp3/logging/log.h>
2929
#include <seiscomp3/math/geo.h>
3030

31+
#include <algorithm>
32+
3133

3234
using namespace Seiscomp::Core;
3335

@@ -209,6 +211,7 @@ bool ExporterIMS10::put(std::streambuf* buf, BaseObject* obj) {
209211
dMax = " ";
210212

211213
std::string author = stringify("%-9s", o->creationInfo().agencyID().substr(0, 9).c_str());
214+
std::replace(author.begin(), author.end(), ' ', '_');
212215

213216
// ** Event Title Block **
214217
os << "Event " << e->publicID() << " ";
@@ -361,6 +364,7 @@ bool ExporterIMS10::put(std::streambuf* buf, BaseObject* obj) {
361364
NmagSta = " ";
362365

363366
std::string author = stringify("%-9s", m->creationInfo().agencyID().substr(0, 9).c_str());
367+
std::replace(author.begin(), author.end(), ' ', '_');
364368

365369
// Magnitude code col 1-5
366370
os << magType;

0 commit comments

Comments
 (0)