test/checkkeys.c
changeset 7317 37b77749523b
parent 7312 b36811d7db33
child 7517 965d57022c01
equal deleted inserted replaced
7316:c3052ed2c310 7317:37b77749523b
   115 }
   115 }
   116 
   116 
   117 static void
   117 static void
   118 PrintText(char *text)
   118 PrintText(char *text)
   119 {
   119 {
   120     SDL_Log("Text: %s\n", text);
   120     unsigned char *spot, expanded[1024];
       
   121 
       
   122     expanded[0] = '\0';
       
   123     for ( spot = text; *spot; ++spot )
       
   124     {
       
   125         size_t length = SDL_strlen(expanded);
       
   126         SDL_snprintf(expanded + length, sizeof(expanded) - length, "\\x%.2x", *spot);
       
   127     }
       
   128     SDL_Log("Text (%s): \"%s%s\"\n", expanded, *text == '"' ? "\\" : "", text);
   121 }
   129 }
   122 
   130 
   123 int
   131 int
   124 main(int argc, char *argv[])
   132 main(int argc, char *argv[])
   125 {
   133 {