#46 -D shows all loaded dicts

open
nobody
None
5
2010-10-26
2010-10-26
Ewald Arnold
No

I was a bit confused that hunspell -D showed only the first loaded dict. So after some investigation I added another line to display the alternatives as well:

Index: src/tools/hunspell.cxx

--- src/tools/hunspell.cxx (Revision 20750)
+++ src/tools/hunspell.cxx (Arbeitskopie)
@@ -1711,6 +1711,8 @@
pMS[dmax] = new Hunspell(aff, dic, key);
dic_enc[dmax] = pMS[dmax]->get_dic_encoding();
dmax++;
+ if (showpath)
+ fprintf(stderr, gettext("LOADED %d. DICTIONARY:\n%s\n%s\n"), dmax, aff, dic);
} else fprintf(stderr, gettext("error - %s exceeds dictionary limit.\n"), dicname2);
} else if (dic) pMS[dmax-1]->add_dic(dic);
}

BTW some lines to the top there is:

pMS[0] = new Hunspell(aff, dic, key);
dic_enc[0] = pMS[0]->get_dic_encoding();
dmax = 1;
if (pMS[0] && dicplus) while (dicplus) {

The check for pMS != 0 should be before pMS[0]-> otherwise the app crashes in the unlikely case of a 0 from new.

Discussion

  • Excellent post but I was wanting to know if you could write a litte more on this subject? I'd be very thankful if you could elaborate a little bit further. Kudos!
    north face osito http://zqidnzkqgs.newsvine.com/

     
  • I'm really enjoying the design and layout of your site. It's a very easy on the eyes which makes it much more pleasant for me to come here and visit more often. Did you hire out a designer to create your theme? Outstanding work!
    North Face Clearance http://fuwaf.corelim.com/