test/checkkeys.c
changeset 7317 37b77749523b
parent 7312 b36811d7db33
child 7517 965d57022c01
     1.1 --- a/test/checkkeys.c	Sun Jun 23 22:19:38 2013 -0700
     1.2 +++ b/test/checkkeys.c	Mon Jun 24 22:06:50 2013 -0700
     1.3 @@ -117,7 +117,15 @@
     1.4  static void
     1.5  PrintText(char *text)
     1.6  {
     1.7 -    SDL_Log("Text: %s\n", text);
     1.8 +    unsigned char *spot, expanded[1024];
     1.9 +
    1.10 +    expanded[0] = '\0';
    1.11 +    for ( spot = text; *spot; ++spot )
    1.12 +    {
    1.13 +        size_t length = SDL_strlen(expanded);
    1.14 +        SDL_snprintf(expanded + length, sizeof(expanded) - length, "\\x%.2x", *spot);
    1.15 +    }
    1.16 +    SDL_Log("Text (%s): \"%s%s\"\n", expanded, *text == '"' ? "\\" : "", text);
    1.17  }
    1.18  
    1.19  int