Subversion Repositories HelenOS-historic

Rev

Rev 1069 | Rev 1271 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1069 Rev 1196
Line 28... Line 28...
28
#include <print.h>
28
#include <print.h>
29
#include <test.h>
29
#include <test.h>
30
 
30
 
31
void test(void)
31
void test(void)
32
{
32
{
-
 
33
    __native nat = 0x12345678u;
33
    printf(" Printf test \n");
34
    printf(" Printf test \n");
-
 
35
   
34
    printf(" Q  %Q  %q \n",0x1111111111111111ull, 0x2222222222222222ull);
36
    printf(" text 10.8s %*.*s \n", 5, 3, "text");
35
    printf(" Q,l  %Q  %l \n", 0x3333333333333333ull, 0x01234567);
37
    printf(" very long text 10.8s %10.8s \n", "very long text");
36
    printf(" l,Q  %l  %Q \n", 0x01234567, 0x4444444444444444ull);
38
    printf(" text 8.10s %8.10s \n", "text");
37
    printf(" L  %L  %l \n",0x01234567 ,0x01234567);  
39
    printf(" very long text 8.10s %8.10s \n", "very long text");
-
 
40
 
-
 
41
    printf(" char: c '%c', 3.2c '%3.2c', -3.2c '%-3.2c', 2.3c '%2.3c', -2.3c '%-2.3c' \n",'a', 'b', 'c', 'd', 'e' );
38
    printf(" W  %W  %w \n",0x0123 ,0x0123);  
42
    printf(" int: d '%d', 3.2d '%3.2d', -3.2d '%-3.2d', 2.3d '%2.3d', -2.3d '%-2.3d' \n",1, 1, 1, 1, 1 );
39
    printf(" B  %B  %b \n",0x01 ,0x01);
43
    printf(" -int: d '%d', 3.2d '%3.2d', -3.2d '%-3.2d', 2.3d '%2.3d', -2.3d '%-2.3d' \n",-1, -1, -1, -1, -1 );
-
 
44
    printf(" 0xint: x '%#x', 5.3x '%#5.3x', -5.3x '%#-5.3x', 3.5x '%#3.5x', -3.5x '%#-3.5x' \n",17, 17, 17, 17, 17 );
-
 
45
 
-
 
46
    printf("'%#llx' 64bit, '%#x' 32bit, '%#hhx' 8bit, '%#hx' 16bit, __native '%#zX'. '%#llX' 64bit and '%s' string.\n", 0x1234567887654321ll, 0x12345678, 0x12, 0x1234, nat, 0x1234567887654321ull, "Lovely string" );
-
 
47
   
40
    printf(" Print to NULL '%s'\n",NULL);
48
    printf(" Print to NULL '%s'\n",NULL);
41
    return;
49
    return;
42
}
50
}