1. 11 Dec, 2017 4 commits
    • Kenton Varda's avatar
      Get Win32 error messages with FormatMessageW instead of FormatMessageA. · 418e0ad4
      Kenton Varda authored
      Also include the error number in the string even if there is a message, because otherwise looking them up is hard.
      
      Also remove the trailing newline from the message.
      418e0ad4
    • Kenton Varda's avatar
      Support encoding to and from wchar_t arrays. · ff9c3321
      Kenton Varda authored
      Different platforms have different sizes for wchar_t. For example:
      
      * Linux: 32-bit (originally intended as UCS-4, rarely used in practice)
      * Windows: 16-bit (originally intended as UCS-2, but now probably treated as UTF-16)
      * BeOS: 8-bit (strictly intended to be UTF-8)
      
      For KJ purposes, we'll assume wchar_t arrays use the UTF encoding appropriate to their size, whatever that may be on the target platform.
      
      This is mainly being added because the Win32 API uses wchar_t heavily.
      ff9c3321
    • Kenton Varda's avatar
      Extend Unicode encoders to support 'WTF-8'. · 5483d8f7
      Kenton Varda authored
      This allows arbitrary char16 arrays to round-trip through UTF-8 without losing information, even if the char16 arrays are not valid UTF-16.
      
      This is necessary e.g. for filesystem manipulation on Windows, where filenames contain 16-bit characters but valid UTF-16 is not enforced.
      
      Invalid UTF-16 represented in UTF-8 is affectionately known as WTF-8: http://simonsapin.github.io/wtf-8/
      5483d8f7
    • Kenton Varda's avatar
      Split time.h into time.h and timer.h. · d3278477
      Kenton Varda authored
      timer.h takes the place of the old time.h, while time.h itself has been pared down to only non-async-related stuff.
      
      Since async-io.h includes timer.h, I suspect no one will be broken by this change.
      
      I could have instead moved the non-async parts of time.h into a new header to avoid any possibility of breakage, but time.h is the correct name for the core header, and timer.h is the correct name for the async parts (the Timer class)... so I'm risking it.
      d3278477
  2. 15 Nov, 2017 1 commit
  3. 14 Nov, 2017 2 commits
  4. 10 Nov, 2017 1 commit
  5. 07 Nov, 2017 1 commit
  6. 06 Nov, 2017 3 commits
  7. 27 Oct, 2017 1 commit
  8. 25 Oct, 2017 2 commits
  9. 24 Oct, 2017 1 commit
  10. 23 Oct, 2017 3 commits
  11. 14 Oct, 2017 1 commit
  12. 12 Oct, 2017 10 commits
  13. 03 Oct, 2017 2 commits
  14. 30 Sep, 2017 3 commits
  15. 26 Sep, 2017 2 commits
  16. 24 Sep, 2017 3 commits