Menu

#216 LANG environment and --translate

v1.0 (example)
closed-fixed
nobody
None
5
2017-02-19
2017-01-19
Uwe Bonnes
No

Hello,

in an LANG environment with ',' as decimal point, sscanf(optarg, "%f,%f",...) leads to trouble. Appended patch uses "%f:%f" and allows me to enter number with and without post decimal digits.

1 Attachments

Discussion

  • Sergey Alyoshin

    Sergey Alyoshin - 2017-01-19

    How about use ';' instead of ':' for delimiter (';' is used as delimiter for
    xy-coordinates in Russian)? Or, to use 'x' (as with other gerbv parameters)
    it is possible to count 'x' quantity in parameter string, and if it is only
    one, separate parameter string in two by 'x' and sscanf each of two part
    separately. I doubt someone will want hexadecimals in coordinate. What do
    you think?

     
    • Uwe Bonnes

      Uwe Bonnes - 2017-01-19

      "Sergey" == Sergey Alyoshin asvl@users.sf.net writes:

      Sergey> How about use ';' instead of ':' for delimiter (';' is used as
      Sergey> delimiter for xy-coordinates in Russian)? Or, to use 'x' (as
      Sergey> with other gerbv parameters) it is possible to count 'x'
      Sergey> quantity in parameter string, and if it is only one, separate
      Sergey> parameter string in two by 'x' and sscanf each of two part
      Sergey> separately. I doubt someone will want hexadecimals in
      Sergey> coordinate. What do you think?
      

      ';' is also good. Did not think about it when writing the patch...
      'x' needs more care not to be missinterpreted as hex and so should
      be deprecated.

      Cheers

      Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de

      Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
      --------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------

       
  • Uwe Bonnes

    Uwe Bonnes - 2017-02-10

    Hello,

    appended patch used 'x' as delimiter for translation coordinate input, as other input does. To care for sscanf missinterpreting "0x1", internally 'x' is replaced by ';'

     
  • Sergey Alyoshin

    Sergey Alyoshin - 2017-02-19
    • status: open --> closed-fixed
     
  • Sergey Alyoshin

    Sergey Alyoshin - 2017-02-19

    Applied with changes as git 5fdbcf847c56b85929b47c370543016afd96c486

     

Log in to post a comment.