Procházet zdrojové kódy

[debug] Use a delimiter to break up DBG_HD() output

Reading sixteen columns of hex digits can be difficult; include a "-"
character to split the output into two groups of eight columns.
tags/v0.9.8
Michael Brown před 16 roky
rodič
revize
51172783e2
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2
    1
      src/core/debug.c

+ 2
- 1
src/core/debug.c Zobrazit soubor

36
 			printf ( "   " );
36
 			printf ( "   " );
37
 			continue;
37
 			continue;
38
 		}
38
 		}
39
-		printf ( " %02x", bytes[i] );
39
+		printf ( "%c%02x",
40
+			 ( ( ( i % 16 ) == 8 ) ? '-' : ' ' ), bytes[i] );
40
 	}
41
 	}
41
 	printf ( " : " );
42
 	printf ( " : " );
42
 	for ( i = offset ; i < ( offset + 16 ) ; i++ ) {
43
 	for ( i = offset ; i < ( offset + 16 ) ; i++ ) {

Načítá se…
Zrušit
Uložit