diff options
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 6e01c2d1cd878..5e3e34f84a672 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; } |