diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-05-18 16:52:18 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-05-18 16:52:18 +0300 |
commit | 5eba6247772a4b1086000ce377481fd16128dd16 (patch) | |
tree | 948f02c51db59c58cfb88a6ed1514042c53d4402 | |
parent | 792a3772cdcf0b05ddb18c99611cb2a11a6b04f0 (diff) | |
download | meson-5eba6247772a4b1086000ce377481fd16128dd16.zip meson-5eba6247772a4b1086000ce377481fd16128dd16.tar.gz meson-5eba6247772a4b1086000ce377481fd16128dd16.tar.bz2 |
More MSVC test fixing.
-rw-r--r-- | test cases/common/30 pipeline/srcgen.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/test cases/common/30 pipeline/srcgen.c b/test cases/common/30 pipeline/srcgen.c index c4e412b..c4f4b87 100644 --- a/test cases/common/30 pipeline/srcgen.c +++ b/test cases/common/30 pipeline/srcgen.c @@ -1,27 +1,33 @@ #include<stdio.h> #include<assert.h> +#define ARRSIZE 80 + int main(int argc, char **argv) { - const int ARRSIZE = 80; char arr[ARRSIZE]; + char *ifilename; + char *ofilename; + FILE *ifile; + FILE *ofile; + size_t bytes; + if(argc != 3) { fprintf(stderr, "%s <input file> <output file>\n", argv[0]); return 1; } - char *ifilename = argv[1]; - char *ofilename = argv[2]; + ifilename = argv[1]; + ofilename = argv[2]; printf("%s\n", ifilename); - FILE *ifile = fopen(ifilename, "r"); + ifile = fopen(ifilename, "r"); if(!ifile) { fprintf(stderr, "Could not open source file %s.\n", ifilename); return 1; } - FILE *ofile = fopen(ofilename, "w"); + ofile = fopen(ofilename, "w"); if(!ofile) { fprintf(stderr, "Could not open target file %s\n", ofilename); return 1; } - size_t bytes; bytes = fread(arr, 1, ARRSIZE, ifile); assert(bytes < 80); assert(bytes > 0); |