- 12 Feb, 2022 7 commits
-
-
Rob Swindell authored
warning C4244: '=': conversion from 'double' to 'uint64_t', possible loss of data
-
Deucе authored
-
Deucе authored
-
Deucе authored
-
Deucе authored
This is a millisecond timer that tries to avoid floating-point operations.
-
Deucе authored
Now it should keep working after 24 days.
-
Deucе authored
than the int supports, it's set to 0x80000000 to indicate overflow. msclock() is *always* overflowing, and clock_t is only 32-bits on some platforms (specifically FreeBSD). To "avoid" problems, just keep subtracting UIN32_MAX from the value until it's less than INT_MAX then cast. This function is, of course, terrible and shouldn't actually be used, but it should at least sorta kinda workish.
-
- 03 Dec, 2021 1 commit
-
-
Rob Swindell authored
For some reason this deprecation warning is being treated as an error (and only with newer Windows platform SDKs). Just disable this warning for the GetVersionEx line. See https://stackoverflow.com/questions/22303824/warning-c4996-getversionexw-was-declared-deprecated for details.
-
- 06 Apr, 2021 1 commit
-
-
Deucе authored
Previously, these both used gettimeofday() which is both expensive to call, and not monotonic. This fixes system.clock_ticks in JS and various internal bits. for when the UTC wall clock jumps. While we're here, fix the documention of system.clock_ticks
-
- 04 Apr, 2021 1 commit
-
-
Rob Swindell authored
This macro has expanded to nothing for a while now and even before, the usage was misguided and unnecessary as explained in this video: https://www.youtube.com/watch?v=cjotPqQxxAY
-
- 10 Nov, 2020 1 commit
-
-
Stephen Hurd authored
not just for Borland.
-
- 06 Nov, 2020 1 commit
-
-
Rob Swindell authored
I'm fed-up with MSVC assertions in ctype functions (e.g. isdigit, isprint, isspace, etc.) when called with out-of-range (e.g. negative) values. This problem only affects MSVC debug builds, but if you run them (like I do), these things are like little time bombs that can drive you crazy (knocking your board out of service). The new macros names are bit more descriptive as well.
-
- 16 Aug, 2020 2 commits
-
-
Rob Swindell authored
-
Rob Swindell authored
-
- 10 Aug, 2020 1 commit
-
-
rswindell authored
that don't have strerror_s: Error: Unresolved external '_strerror_s' referenced from genwrap
-
- 09 Aug, 2020 1 commit
-
-
rswindell authored
-
- 08 Aug, 2020 2 commits
- 14 Apr, 2020 1 commit
-
-
rswindell authored
builds.
-
- 10 Sep, 2019 1 commit
-
-
deuce authored
Hopfully this doesn't break the Borland or Watcom (?!) builds.
-
- 24 Jul, 2019 1 commit
-
-
rswindell authored
-
- 16 Jul, 2019 1 commit
-
-
rswindell authored
-
- 06 May, 2019 1 commit
-
-
rswindell authored
heavy-handed (performs strdup/malloc's and modifications of the strings), so a temporary hack is to perform a case-sensitive search (using the standard strstr() function) first. The results won't exactly match the traditional strstr() and the performance improvement is only for positive matches (where the correct case was guessed in the passed 'needle' string arg). TODO: re-write or copy a good/fast strcasestr() implementation for Win32 builds.
-
- 23 Jul, 2018 1 commit
-
-
rswindell authored
the number of decimal places in the resulting string.
-
- 20 Jul, 2018 1 commit
-
-
rswindell authored
Created byte_estimate_to_str(), much like byte_count_to_str(), except the byte count is rounded to the nearest tera/giga/mega/kilo-byte (technically tebi/gibi/mebi/kibi-byte, but ugh, I'm old-sk00l!).
-
- 19 Jul, 2018 1 commit
-
-
rswindell authored
-
- 03 Feb, 2018 2 commits
-
-
deuce authored
With the supported compilers, we can't rely on the return value of snprintf() and historically have replaced it with safe_snprintf(). For macOS however, snprintf() is apparently a macro, not a function, so gendefs.h throws and error due to redefinition. Rather than hack around on that, just ensure that we never use the return value of snprintf() and use safe_snprintf() to ensure we know what the return value will be.
-
deuce authored
-
- 06 Nov, 2017 1 commit
-
-
rswindell authored
-
- 05 Nov, 2017 1 commit
-
-
rswindell authored
then a clarifying or modifying word (year[s], month[s], day[s], etc.). parse_byte_count() and parse_duration() now support a space between the numeric value (decimal digits) and the modifier. Hopefully this doesn't break anything, but it makes parse_duration() compatible with the strings generated with duration_to_vstr(). We might want a verbose version of byte_count_to_str() in the future, so I figured it made sense to go ahead and add the white-space skipping/parsing to prase_byte_count() now.
-
- 26 Aug, 2017 2 commits
-
-
rswindell authored
that have standard C mnemonics.
-
rswindell authored
ala Synchronet text.dat) by default and octal format only if C_UNESCAPE_OCTAL_SUPPORT is defined. \X## is no longer supported (must use the C-standard \x## Only 2 hex digits are now supported, longer streams of valid hex digits will not be parsed as a literal character (unlike the C standard)
-
- 13 Jul, 2016 1 commit
-
-
deuce authored
-
- 26 May, 2016 1 commit
-
-
rswindell authored
of parse_byte_count() and parse_duration()) and use them in ini_file.c
-
- 18 Jan, 2016 1 commit
-
-
rswindell authored
(or possibly intervals) in seconds or fractions of a second. Supports multipliers: (Y)ear, (W)eek, (D)ay, (H)our, and (M)inute.
-
- 28 Sep, 2015 1 commit
-
-
rswindell authored
rename to parse_byte_count(), so we can use it more places (e.g. jsexec).
-
- 28 Apr, 2014 1 commit
-
-
deuce authored
-
- 24 Apr, 2014 2 commits
- 23 Apr, 2014 1 commit
-
-
deuce authored
-