source: app/src/cor/common_cor.cc @ 40358d2

help
Last change on this file since 40358d2 was 40358d2, checked in by obrebski <obrebski@…>, 16 years ago

lem, gue, kor, cor sprawdzaja czy slownik istnieje i da sie otworzyc

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@47 e293616e-ec6a-49c2-aa92-f4a8b91c5d16

  • Property mode set to 100644
File size: 733 bytes
Line 
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.