Changeset 1133


Ignore:
Timestamp:
Oct 15, 2009, 5:33:42 PM (15 years ago)
Author:
garnier
Message:

in some case, change LC_NUMERIC from , to .

Location:
trunk/source/visualization/OpenGL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/OpenGL/History

    r1132 r1133  
    1 $Id: History,v 1.153 2009/10/14 15:04:09 lgarnier Exp $
     1$Id: History,v 1.154 2009/10/15 15:33:30 lgarnier Exp $
    22-------------------------------------------------------------------
    33
     
    1717     * Reverse chronological order (last date on top), please *
    1818     ----------------------------------------------------------
     1915 October 2009 Laurent Garnier
     20 - G4OpenGLViewer.cc : Fix a problem with printing. On mac OSX version
     21   > 10.5.7? or Ubuntu > 9.04? AND with user account configure in french
     22   (or canadian I believe), the decimal point character was defined by
     23   "," (see LC_NUMERIC). This cause a problem on reading eps files.
     24   Changed "," to "."
     25
    192613 October 2009 Laurent Garnier
    2027 - G4OpenGLImmediateQtViewer/StoredQtViewer : some cleaning
  • trunk/source/visualization/OpenGL/src/G4OpenGLViewer.cc

    r1125 r1133  
    2525//
    2626//
    27 // $Id: G4OpenGLViewer.cc,v 1.57 2009/08/19 13:28:10 lgarnier Exp $
     27// $Id: G4OpenGLViewer.cc,v 1.58 2009/10/15 15:33:30 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    496496  printf("G4OpenGLViewer::printEPS file:%s Vec:%d Name:%s\n",getRealPrintFilename().c_str(),fVectoredPs,GetName().c_str());
    497497#endif
     498
     499  // Change the LC_NUMERIC value in order to have "." separtor and not ","
     500  // This case is only useful for French, Canadien...
     501  char *oldLocale = strdup(setlocale(LC_NUMERIC,NULL));
     502  setlocale(LC_NUMERIC,"C");
     503
    498504  if (fVectoredPs) {
    499505    res = printVectoredEPS();
     
    501507    res = printNonVectoredEPS();
    502508  }
     509
     510  // restore the local
     511  if (oldLocale) {
     512    setlocale(LC_NUMERIC,oldLocale);
     513    free(oldLocale);
     514  }
     515
    503516  if (res == false) {
    504517    G4cerr << "Error while saving file... "<<getRealPrintFilename().c_str()<< G4endl;
Note: See TracChangeset for help on using the changeset viewer.