Subversion Repositories HelenOS-historic

Rev

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

Rev 1175 Rev 1197
Line 55... Line 55...
55
   
55
   
56
    for (;;)
56
    for (;;)
57
        ;
57
        ;
58
}
58
}
59
 
59
 
-
 
60
/* test different parameters types and modifiers */
60
static void test_printf(void)
61
static void test_printf(void)
61
{
62
{
62
    printf("Simple text.\n");
63
    printf("Simple text.\n");
63
    printf("Now insert '%s' string.\n","this");
64
    printf("Now insert '%s' string.\n","this");
64
    printf("Signed formats on uns. numbers: '%d', '%+d', '% d', '%u' (,+, ,u)\n", 321, 321, 321, 321);
65
    printf("Signed formats on uns. numbers: '%d', '%+d', '% d', '%u' (,+, ,u)\n", 321, 321, 321, 321);
Line 72... Line 73...
72
    printf("'%llx' 64bit, '%x' 32bit, '%hhx' 8bit, '%hx' 16bit, '%llX' 64bit and '%s' string.\n", 0x1234567887654321ll, 0x12345678, 0x12, 0x1234, 0x1234567887654321ull, "Lovely string" );
73
    printf("'%llx' 64bit, '%x' 32bit, '%hhx' 8bit, '%hx' 16bit, '%llX' 64bit and '%s' string.\n", 0x1234567887654321ll, 0x12345678, 0x12, 0x1234, 0x1234567887654321ull, "Lovely string" );
73
   
74
   
74
    printf("Thats all, folks!\n");
75
    printf("Thats all, folks!\n");
75
}
76
}
76
 
77
 
-
 
78
/* test width and precision modifiers */
-
 
79
static void test_printf2(void)
-
 
80
{
-
 
81
    printf(" text 10.8s %*.*s \n", 5, 3, "text");
-
 
82
    printf(" very long text 10.8s %10.8s \n", "very long text");
-
 
83
    printf(" text 8.10s %8.10s \n", "text");
-
 
84
    printf(" very long text 8.10s %8.10s \n", "very long text");
-
 
85
 
-
 
86
    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' );
-
 
87
    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 );
-
 
88
    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 );
-
 
89
    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 );
-
 
90
 
-
 
91
}
77
 
92
 
78
extern char _heap;
93
extern char _heap;
79
static void test_mremap(void)
94
static void test_mremap(void)
80
{
95
{
81
    printf("Writing to good memory\n");
96
    printf("Writing to good memory\n");
Line 276... Line 291...
276
 
291
 
277
int main(int argc, char *argv[])
292
int main(int argc, char *argv[])
278
{
293
{
279
    pstid_t ptid;
294
    pstid_t ptid;
280
    int tid;
295
    int tid;
281
 
296
   
282
    version_print();
297
    version_print();
283
 
298
 
284
//  test_printf();
299
//  test_printf();
-
 
300
//  test_printf2();
285
//  test_ping();
301
//  test_ping();
286
//  test_async_ipc();
302
//  test_async_ipc();
287
//  test_advanced_ipc();
303
//  test_advanced_ipc();
288
//  test_connection_ipc();
304
//  test_connection_ipc();
289
//  test_hangup();
305
//  test_hangup();