Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1196 → Rev 1197

/uspace/trunk/init/init.c
57,6 → 57,7
;
}
 
/* test different parameters types and modifiers */
static void test_printf(void)
{
printf("Simple text.\n");
74,7 → 75,21
printf("Thats all, folks!\n");
}
 
/* test width and precision modifiers */
static void test_printf2(void)
{
printf(" text 10.8s %*.*s \n", 5, 3, "text");
printf(" very long text 10.8s %10.8s \n", "very long text");
printf(" text 8.10s %8.10s \n", "text");
printf(" very long text 8.10s %8.10s \n", "very long text");
 
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' );
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 );
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 );
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 );
 
}
 
extern char _heap;
static void test_mremap(void)
{
278,10 → 293,11
{
pstid_t ptid;
int tid;
 
version_print();
 
// test_printf();
// test_printf2();
// test_ping();
// test_async_ipc();
// test_advanced_ipc();
/uspace/trunk/libc/generic/io/print.c
68,11 → 68,9
* @param flags
* @return number of printed characters or EOF
*/
static int print_char(char c, int width, uint64_t flags)
{
int counter = 0;
char space = ' ';
if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) {
while (--width > 0) { /* one space is consumed by character itself hence predecrement */
256,7 → 254,7
} else {
putchar('b');
}
written == 2;
written += 2;
break;
case 8:
putchar('o');
/uspace/trunk/libc/generic/string.c
49,7 → 49,7
 
size_t strlen(const char *str)
{
int counter = 0;
size_t counter = 0;
 
while (str[counter] != 0) {
counter++;