… | |
… | |
36 | if (argc < 3) { |
36 | if (argc < 3) { |
37 | fprintf(stderr,"Not enough arguments\n"); |
37 | fprintf(stderr,"Not enough arguments\n"); |
38 | fprintf(stderr,"Syntax: INFILE OUTFILE\n"); |
38 | fprintf(stderr,"Syntax: INFILE OUTFILE\n"); |
39 | exit(1); |
39 | exit(1); |
40 | } |
40 | } |
41 | if (!(config = psiconv_config_read(NULL))) { |
41 | |
42 | fprintf(stderr,"Can't get config\n"); |
42 | config = psiconv_config_default(); |
43 | exit(1); |
43 | psiconv_config_read(NULL,&config); |
44 | } |
44 | |
45 | if (!(fp = fopen(argv[1],"r"))) { |
45 | if (!(fp = fopen(argv[1],"r"))) { |
46 | perror("Can't open file"); |
46 | perror("Can't open file"); |
47 | exit(1); |
47 | exit(1); |
48 | } |
48 | } |
49 | if (!(buf=psiconv_buffer_new())) { |
49 | if (!(buf=psiconv_buffer_new())) { |