From 7705c3307669d51fb6fea5a0a75dbaf6e7147175 Mon Sep 17 00:00:00 2001 From: Olaf Seibert Date: Tue, 19 Jan 2021 10:42:59 +0100 Subject: [PATCH] Use standard type instead of ulong64 --- parse.c | 7 ++++--- util.h | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/parse.c b/parse.c index c8dc3b6..72a9c30 100644 --- a/parse.c +++ b/parse.c @@ -1,6 +1,7 @@ #define PARSE__C #include +#include #include #include #include @@ -386,7 +387,7 @@ int parse_float( { DOUBLE d; /* value */ DOUBLE frac; /* fractional value */ - ulong64 ufrac; /* fraction converted to 49 bit + uint64_t ufrac; /* fraction converted to 49 bit unsigned integer */ int i; /* Number of fields converted by sscanf */ int n; /* Number of characters converted by sscanf */ @@ -443,7 +444,7 @@ int parse_float( /* The following big literal is 2 to the 56th power: */ - ufrac = (ulong64) (frac * 72057594037927936.0); /* Align fraction bits */ + ufrac = (uint64_t) (frac * 72057594037927936.0); /* Align fraction bits */ /* ufrac is now >= 2**55 and < 2**56 */ @@ -470,7 +471,7 @@ int parse_float( * As long as we really don't look at those chopped off bits any more. */ int bits_chopped_off = 16 * (4 - size); - ulong64 msb_chopped_off = 1ULL << (bits_chopped_off - 1); + uint64_t msb_chopped_off = 1ULL << (bits_chopped_off - 1); ufrac += msb_chopped_off; if ((ufrac >> 56) > 0) { /* Overflow? */ diff --git a/util.h b/util.h index 74d3888..46e44ff 100644 --- a/util.h +++ b/util.h @@ -55,13 +55,11 @@ void my_searchenv( /* Cover a few platform-dependencies */ #ifdef WIN32 -typedef unsigned __int64 ulong64; #define strdup _strdup #define putenv _putenv #define PATHSEP ";" #else -typedef unsigned long long ulong64; #define PATHSEP ":" #endif