Skip to content
Snippets Groups Projects
  1. Nov 10, 2020
  2. Nov 06, 2020
    • Rob Swindell's avatar
      Replace ctype.h function calls with new MSVC-safe XPDEV macros · ec20d959
      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.
      ec20d959
  3. Aug 16, 2020
  4. Aug 10, 2020
  5. Aug 09, 2020
  6. Aug 08, 2020
  7. Apr 14, 2020
  8. Sep 10, 2019
  9. Jul 24, 2019
  10. Jul 16, 2019
  11. May 06, 2019
    • rswindell's avatar
      The Win32 implementation of strcasestr() defined here is currently very · a0067415
      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.
      a0067415
  12. Jul 23, 2018
  13. Jul 20, 2018
    • rswindell's avatar
      Fixed strcasestr() for Windows - oops. · 491b9fa1
      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!).
      491b9fa1
  14. Jul 19, 2018
  15. Feb 03, 2018
    • deuce's avatar
      Switch to using safe_snprintf() where the return value is used. · 254e7234
      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.
      254e7234
    • deuce's avatar
      Make safe_snprintf() safer. · 732221fd
      deuce authored
      732221fd
  16. Nov 06, 2017
  17. Nov 05, 2017
    • rswindell's avatar
      Created duration_to_vstr() - like duration_to_str(), but it appends a space · 5d2f6c7c
      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.
      5d2f6c7c
  18. Aug 26, 2017
  19. Jul 13, 2016
  20. May 26, 2016
  21. Jan 18, 2016
  22. Sep 28, 2015
  23. Apr 28, 2014
  24. Apr 24, 2014
  25. Apr 23, 2014
  26. Mar 12, 2014
  27. Feb 05, 2014
  28. Apr 30, 2012
  29. Apr 27, 2012
  30. Nov 04, 2011
  31. Oct 24, 2011
  32. May 12, 2011
  33. May 11, 2011
Loading