Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: third_party/hunspell_new/src/parsers/testparser.cxx

Issue 1135173004: Rename third_party/hunspell_new back to third_party/hunspell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #include <cstring>
2 #include <cstdlib>
3 #include <cstdio>
4
5 #include "textparser.hxx"
6 #include "htmlparser.hxx"
7 #include "latexparser.hxx"
8
9 #ifndef W32
10 using namespace std;
11 #endif
12
13 int
14 main(int argc, char** argv)
15 {
16 FILE * f;
17 /* first parse the command line options */
18
19 if (argc < 2) {
20 fprintf(stderr,"correct syntax is:\n");
21 fprintf(stderr,"testparser file\n");
22 fprintf(stderr,"example: testparser /dev/stdin\n");
23 exit(1);
24 }
25
26 /* open the words to check list */
27 f = fopen(argv[1],"r");
28 if (!f) {
29 fprintf(stderr,"Error - could not open file of words to check\n");
30 exit(1);
31 }
32
33 TextParser * p = new LaTeXParser("qwertzuiopasdfghjklyxcvbnméáúõûóüöíQWERTZU IOPASDFGHJKLYXCVBNMÍÉÁÕÚÖÜÓÛ");
34
35 char buf[MAXLNLEN];
36 char * next;
37
38 while(fgets(buf,MAXLNLEN,f)) {
39 fprintf(stdout,"---------------------------------------\n");
40 p->put_line(buf);
41 fprintf(stderr, "x:%s\n", buf);
42 p->set_url_checking(1);
43 while ((next=p->next_token())) {
44 fprintf(stdout,"token: %s\n",next);
45 free(next);
46 }
47 }
48
49 delete p;
50 fclose(f);
51 return 0;
52 }
53
OLDNEW
« no previous file with comments | « third_party/hunspell_new/src/parsers/manparser.cxx ('k') | third_party/hunspell_new/src/parsers/textparser.hxx » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698