diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:36 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:36 +0000 |
commit | ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f (patch) | |
tree | 27916256fdeeb57d10d2f3d6948be5d71a703215 /packages/Python/lldbsuite/test/settings/quoting/main.c | |
parent | 76e0736e7fcfeb179779e49c05604464b1ccd704 (diff) |
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/settings/quoting/main.c')
-rw-r--r-- | packages/Python/lldbsuite/test/settings/quoting/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/Python/lldbsuite/test/settings/quoting/main.c b/packages/Python/lldbsuite/test/settings/quoting/main.c index 6e01c2d1cd87..5e3e34f84a67 100644 --- a/packages/Python/lldbsuite/test/settings/quoting/main.c +++ b/packages/Python/lldbsuite/test/settings/quoting/main.c @@ -1,13 +1,21 @@ #include <stdio.h> #include <string.h> +#include <stdlib.h> /* This program writes its arguments (separated by '\0') to stdout. */ int main(int argc, char const *argv[]) { int i; + + FILE *output = fopen ("output.txt", "w"); + if (output == NULL) + exit (1); + for (i = 1; i < argc; ++i) - fwrite(argv[i], strlen(argv[i])+1, 1, stdout); + fwrite(argv[i], strlen(argv[i])+1, 1, output); + + fclose (output); return 0; } |