-1:000000000000 | 0:059a1a093b47 |
---|---|
1 #include <stdio.h> | |
2 #include "prenv.h" | |
3 | |
4 int main(int argc, char* argv[]) | |
5 { | |
6 if (argc != 2) | |
7 return 1; | |
8 | |
9 const char* value = PR_GetEnv("WRITE_ARGUMENT_FILE"); | |
10 | |
11 if (!value) | |
12 return 2; | |
13 | |
14 FILE* outfile = fopen(value, "w"); | |
15 if (!outfile) | |
16 return 3; | |
17 | |
18 // We only need to write out the first argument (no newline). | |
19 fputs(argv[argc -1], outfile); | |
20 | |
21 fclose(outfile); | |
22 | |
23 return 0; | |
24 } |