File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -23,17 +23,20 @@ static char *
23
23
print_wchar_str (const pg_wchar * s )
24
24
{
25
25
#define BUF_DIGITS 50
26
- static char buf [BUF_DIGITS * 2 + 1 ];
26
+ static char buf [BUF_DIGITS * 11 + 1 ];
27
27
int i ;
28
+ char * p ;
28
29
29
30
i = 0 ;
31
+ p = buf ;
30
32
while (* s && i < BUF_DIGITS )
31
33
{
32
- snprintf ( & buf [ i * 2 ], 3 , " %04X" , * s );
34
+ p += sprintf ( p , "U+ %04X " , * s );
33
35
i ++ ;
34
36
s ++ ;
35
37
}
36
- buf [i * 2 ] = '\0' ;
38
+ * p = '\0' ;
39
+
37
40
return buf ;
38
41
}
39
42
@@ -67,9 +70,9 @@ main(int argc, char **argv)
67
70
if (pg_wcscmp (test -> output , result ) != 0 )
68
71
{
69
72
printf ("FAILURE (NormalizationTest.txt line %d):\n" , test -> linenum );
70
- printf ("input:\t %s\n" , print_wchar_str (test -> input ));
71
- printf ("expected:\t %s\n" , print_wchar_str (test -> output ));
72
- printf ("got\t %s\n" , print_wchar_str (result ));
73
+ printf ("input: %s\n" , print_wchar_str (test -> input ));
74
+ printf ("expected: %s\n" , print_wchar_str (test -> output ));
75
+ printf ("got: %s\n" , print_wchar_str (result ));
73
76
printf ("\n" );
74
77
exit (1 );
75
78
}
You can’t perform that action at this time.
0 commit comments