Skip to content

Commit

Permalink
Version 1.1.5
Browse files Browse the repository at this point in the history
Allow 'k' as SI suffix for 1000.
  • Loading branch information
d-m-bailey committed May 8, 2023
1 parent df85a63 commit 8a6ce53
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Requirements:
- python 2.7.10

The following are only required if making changes to the parser or compiling from github
- bison 3.3
- automake 1.14.1
- bison 3.3.2
- automake 1.16.1

GUI requirements:
- kivy 1.10.0
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT(CVC_RV, [1.1.4], [[email protected]])
AC_INIT(CVC_RV, [1.1.5], [[email protected]])
AC_CONFIG_SRCDIR(src)
AC_CONFIG_HEADERS([config.h])
AC_USE_SYSTEM_EXTENSIONS
Expand Down
1 change: 1 addition & 0 deletions src/CNormalValue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ CNormalValue::CNormalValue(string theStringValue) {
case 'G': { myRealValue *= pow(10, 9); break; }
case 'M': { myRealValue *= pow(10, 6); break; }
case 'K': { myRealValue *= pow(10, 3); break; }
case 'k': { myRealValue *= pow(10, 3); break; }
case 'm': { myRealValue *= pow(10, -3); break; }
case 'u': { myRealValue *= pow(10, -6); break; }
case 'n': { myRealValue *= pow(10, -9); break; }
Expand Down
2 changes: 1 addition & 1 deletion src/Cvc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef CVC_H_
#define CVC_H_

#define CVC_VERSION "1.1.4"
#define CVC_VERSION "1.1.5"

extern bool gDebug_cvc;
extern bool gSetup_cvc;
Expand Down
1 change: 1 addition & 0 deletions src/CvcTypes.hh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ template <typename T> T from_string(std::string const & s) {
{"n", 1e-9},
{"u", 1e-6},
{"m", 1e-3},
{"k", 1e3},
{"K", 1e3},
{"M", 1e6},
{"G", 1e9},
Expand Down
2 changes: 1 addition & 1 deletion src/utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ std::string PrintToleranceParameter(std::string definition, int parameter, int s

std::string AddSiSuffix(float theValue) {
char myFormattedString[64];
const string myBigSuffix = "KMGTPE";
const string myBigSuffix = "kMGTPE";
const string mySmallSuffix = "munpfa";
int myIndex = 0;
while ( abs(theValue) > 1000 && myIndex < 6 ) {
Expand Down
8 changes: 4 additions & 4 deletions src/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ std::string int_to_hex( T i )
|| sscanf((string).c_str(), "%[-+]%d%1s", &vv_sign, &vv_integer, vv_trailer) == 2 \
|| sscanf((string).c_str(), "%d.%d%1s", &vv_integer, &vv_fraction, vv_trailer) == 2 \
|| sscanf((string).c_str(), "%d%1s", &vv_integer, vv_trailer) == 1 \
|| sscanf((string).c_str(), "%[-+]%d.%d%1[afpnumKMGTPE]%1s", &vv_sign, &vv_integer, &vv_fraction, vv_suffix, vv_trailer) == 4 \
|| sscanf((string).c_str(), "%[-+]%d%1[afpnumKMGTPE]%1s", &vv_sign, &vv_integer, vv_suffix, vv_trailer) == 3 \
|| sscanf((string).c_str(), "%d.%d%1[afpnumKMGTPE]%1s", &vv_integer, &vv_fraction, vv_suffix, vv_trailer) == 3 \
|| sscanf((string).c_str(), "%d%1[afpnumKMGTPE]%1s", &vv_integer, vv_suffix, vv_trailer) == 2 \
|| sscanf((string).c_str(), "%[-+]%d.%d%1[afpnumkKMGTPE]%1s", &vv_sign, &vv_integer, &vv_fraction, vv_suffix, vv_trailer) == 4 \
|| sscanf((string).c_str(), "%[-+]%d%1[afpnumkKMGTPE]%1s", &vv_sign, &vv_integer, vv_suffix, vv_trailer) == 3 \
|| sscanf((string).c_str(), "%d.%d%1[afpnumkKMGTPE]%1s", &vv_integer, &vv_fraction, vv_suffix, vv_trailer) == 3 \
|| sscanf((string).c_str(), "%d%1[afpnumkKMGTPE]%1s", &vv_integer, vv_suffix, vv_trailer) == 2 \
)

char * CurrentTime();
Expand Down

0 comments on commit 8a6ce53

Please sign in to comment.