URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
#include <stdio.h>
|
#include <stdio.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
#define test(ret, args...) \
|
#define test(ret, args...) \
|
fprintf (stdout, args); \
|
fprintf (stdout, args); \
|
if (fprintf (stdout, args) != ret) \
|
if (fprintf (stdout, args) != ret) \
|
abort ();
|
abort ();
|
test (5, "hello");
|
test (5, "hello");
|
test (6, "hello\n");
|
test (6, "hello\n");
|
test (1, "a");
|
test (1, "a");
|
test (0, "");
|
test (0, "");
|
test (5, "%s", "hello");
|
test (5, "%s", "hello");
|
test (6, "%s", "hello\n");
|
test (6, "%s", "hello\n");
|
test (1, "%s", "a");
|
test (1, "%s", "a");
|
test (0, "%s", "");
|
test (0, "%s", "");
|
test (1, "%c", 'x');
|
test (1, "%c", 'x');
|
test (7, "%s\n", "hello\n");
|
test (7, "%s\n", "hello\n");
|
test (2, "%d\n", 0);
|
test (2, "%d\n", 0);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.