Line | |
---|
1 | /* |
---|
2 | * swift_context.c |
---|
3 | * |
---|
4 | * (c) 2009 Ionut Rosoiu <ionut.rosoiu@gmail.com> |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include <stdlib.h> |
---|
9 | #include <stdio.h> |
---|
10 | |
---|
11 | extern void write_array(char *filename, int N); |
---|
12 | |
---|
13 | int main(int argc, char **argv) { |
---|
14 | int n; |
---|
15 | |
---|
16 | if (argc != 3) { |
---|
17 | fprintf(stderr, "usage: %s <input_file> <N>\n", argv[0]); |
---|
18 | abort(); |
---|
19 | } |
---|
20 | |
---|
21 | n = strtol(argv[2], NULL, 10); |
---|
22 | write_array(argv[1], n); |
---|
23 | |
---|
24 | printf("wrote file %s with %d numbers\n", argv[1], n); |
---|
25 | |
---|
26 | return 0; |
---|
27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.