diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-08 18:34:07 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-08 18:34:07 +0100 |
| commit | 62c22e55e704edd4cd5fdb0b95eb9f9f79bc37fe (patch) | |
| tree | 3b8aa89489eec843737a8942b5e3c20109fc8f76 /tests | |
| parent | 23eef578f76ef2bd1bf03726e227129fdcc7ec6e (diff) | |
| download | box64-62c22e55e704edd4cd5fdb0b95eb9f9f79bc37fe.tar.gz box64-62c22e55e704edd4cd5fdb0b95eb9f9f79bc37fe.zip | |
Attempts at conversion of va_list
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref15.txt | 1 | ||||
| -rwxr-xr-x | tests/test15 | bin | 0 -> 19664 bytes | |||
| -rw-r--r-- | tests/test15.c | 24 |
3 files changed, 25 insertions, 0 deletions
diff --git a/tests/ref15.txt b/tests/ref15.txt new file mode 100644 index 00000000..b2bb8503 --- /dev/null +++ b/tests/ref15.txt @@ -0,0 +1 @@ +Hello x86_64 World, pi=3.14159! diff --git a/tests/test15 b/tests/test15 new file mode 100755 index 00000000..b2bd8836 --- /dev/null +++ b/tests/test15 Binary files differdiff --git a/tests/test15.c b/tests/test15.c new file mode 100644 index 00000000..b00c7171 --- /dev/null +++ b/tests/test15.c @@ -0,0 +1,24 @@ +#include <stdio.h> +#include <stdarg.h> + +int my_func(const char* fmt, va_list a) +{ + return vprintf(fmt, a); +} + +int my_func1(const char* fmt, ...) +{ + va_list args; + va_start(args, fmt); + int ret = my_func(fmt, args); + va_end(args); + return ret; +} + +int main(int argc, char **argv) +{ + int ret = my_func1("Hello %s World, pi=%g!\n", "x86_64", 3.14159265); + return 0; +} + + |