source: src/cor/common_cor.cc @ f924e4b

Last change on this file since f924e4b was 5f4d9c3, checked in by Maciej Prill <mprill@…>, 13 years ago

Rewritten the build system, added lem UTF-8 version.

  • Property mode set to 100644
File size: 733 bytes
RevLine 
[5f4d9c3]1#include <stdlib.h>
2#include <string.h>
3#include "common_cor.h"
4
5char dictionary[256];
6
7void process_cor_options(gengetopt_args_info* args)
8{
9  if(args->dictionary_given)
10    {
11      expand_path(args->dictionary_arg,dictionary);
12      if(file_accessible(dictionary)!=0)
13        {
14          fprintf(stderr,"Cannot open the dictionary file: %s\nAborting.\n",dictionary);
15          exit(1);
16        }
17    }
18  else if (args->dictionary_home_given && args->language_given)
19    {
20      char buf[255];
21      expand_path(args->dictionary_home_arg, buf);
22      sprintf(dictionary,"%s/%s/cor.bin",buf,args->language_arg);
23      if(file_accessible(dictionary)!=0)
24        {
25          fprintf(stderr,"Cannot open the dictionary file: %s\nAborting.\n",dictionary);
26          exit(1);
27        }
28    }
29}
Note: See TracBrowser for help on using the repository browser.