… | |
… | |
30 | |
30 | |
31 | /* psiconv_verbosity = PSICONV_VERB_DEBUG; */ |
31 | /* psiconv_verbosity = PSICONV_VERB_DEBUG; */ |
32 | |
32 | |
33 | if (argc < 3) { |
33 | if (argc < 3) { |
34 | fprintf(stderr,"Not enough arguments\n"); |
34 | fprintf(stderr,"Not enough arguments\n"); |
|
|
35 | fprintf(stderr,"Syntax: INFILE OUTFILE\n"); |
35 | exit(1); |
36 | exit(1); |
36 | } |
37 | } |
37 | if (!(fp = fopen(argv[1],"r"))) { |
38 | if (!(fp = fopen(argv[1],"r"))) { |
38 | perror("Can't open file"); |
39 | perror("Can't open file"); |
39 | exit(1); |
40 | exit(1); |
… | |
… | |
65 | } |
66 | } |
66 | if ((psiconv_buffer_fwrite_all(buf,fp))) { |
67 | if ((psiconv_buffer_fwrite_all(buf,fp))) { |
67 | perror("Can't fwrite file"); |
68 | perror("Can't fwrite file"); |
68 | exit(1); |
69 | exit(1); |
69 | } |
70 | } |
|
|
71 | fclose(fp); |
70 | psiconv_buffer_free(buf); |
72 | psiconv_buffer_free(buf); |
71 | exit(0); |
73 | exit(0); |
72 | } |
74 | } |