Subversion Repositories HelenOS

Rev

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

Rev 2188 Rev 3069
Line 42... Line 42...
42
        printf(" text 10.8s %*.*s \n", 5, 3, "text");
42
        printf(" text 10.8s %*.*s \n", 5, 3, "text");
43
        printf(" very long text 10.8s %10.8s \n", "very long text");
43
        printf(" very long text 10.8s %10.8s \n", "very long text");
44
        printf(" text 8.10s %8.10s \n", "text");
44
        printf(" text 8.10s %8.10s \n", "text");
45
        printf(" very long text 8.10s %8.10s \n", "very long text");
45
        printf(" very long text 8.10s %8.10s \n", "very long text");
46
       
46
       
47
        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' );
47
        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');
48
        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 );
48
        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);
49
        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 );
49
        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);
50
        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 );
50
        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);
51
       
51
       
52
        printf("'%#llx' 64bit, '%#x' 32bit, '%#hhx' 8bit, '%#hx' 16bit, unative_t '%#zx'. '%#llx' 64bit and '%s' string.\n", 0x1234567887654321ll, 0x12345678, 0x12, 0x1234, nat, 0x1234567887654321ull, "Lovely string" );
52
        printf("'%#llx' 64bit, '%#x' 32bit, '%#hhx' 8bit, '%#hx' 16bit, unative_t '%#" PRIxn "'. '%#llx' 64bit and '%s' string.\n", 0x1234567887654321ll, 0x12345678, 0x12, 0x1234, nat, 0x1234567887654321ull, "Lovely string" );
53
       
53
       
54
        printf(" Print to NULL '%s'\n", NULL);
54
        printf(" Print to NULL '%s'\n", NULL);
55
       
55
       
56
        retval = snprintf(buffer, BUFFER_SIZE, "Short text without parameters.");
56
        retval = snprintf(buffer, BUFFER_SIZE, "Short text without parameters.");
57
        printf("Result is: '%s', retval = %d\n", buffer, retval);
57
        printf("Result is: '%s', retval = %d\n", buffer, retval);