Skip to content

Commit

Permalink
Clicky: Set the locale, to ensure that dot gets something it understa…
Browse files Browse the repository at this point in the history
…nds.

Comment from Jonathan Kirchhoff.
  • Loading branch information
kohler committed May 6, 2010
1 parent 00723e7 commit 94e8f7b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/clicky/src/dwidget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "scopechain.hh"
#include <list>
#include <math.h>
#include <locale.h>
#include "crouter.hh"
#include "whandler.hh"
#include "transform.hh"
Expand Down Expand Up @@ -557,6 +558,7 @@ void delt::position_contents_dot(crouter *cr, ErrorHandler *errh)
double gysep = std::max(gdess->margin[0], gdess->margin[2]);

StringAccum sa;
char *old_locale = setlocale(LC_ALL, "C");
sa << "digraph {\n"
<< "nodesep=" << (gxsep / 100) << ";\n"
<< "ranksep=" << (gysep / 100) << ";\n"
Expand Down Expand Up @@ -617,6 +619,7 @@ void delt::position_contents_dot(crouter *cr, ErrorHandler *errh)
<< (ein->vertical() ? 'n' : 'w') << ";\n";
}
sa << "}\n";
setlocale(LC_ALL, old_locale);

//fprintf(stderr, "%s\n", sa.c_str());
String result;
Expand Down

0 comments on commit 94e8f7b

Please sign in to comment.