First, read the cautionary notes in Spellchecking Comments in the Linux Kernel to find out what not to do when fixing typos in comments.
Second, grab my custom dictionary of words peculiar to Wine's source tree, so your spell checker can skip those words and not flag them as errors.
Third, using that custom dictionary, spell-check the wine source file you're working on. For instance:
$ ispell -p stop.txt -l < ~/wine-git/dlls/shell32/autocomplete.cThis will output a list of the misspelt words in that file.
Optionally, you can use my lspell.pl script to run ispell on just the comments in that source file. For instance:
$ perl lspell.pl stop.txt ~/wine-git/dlls/shell32/*.cThis will output a list of misspelled words for each source file you pass it.
Fourth, go carefully fix the typos in the comments, being sure to only fix the glaringly annoying ones, and make sure the source still compiles and passes tests after your changes.
Finally, post a patch with your typo fixes (and nothing else) to wine-patches. Only do a small number of files per week; nobody likes sweeping changes.
First, I spellcheck the noncomment portion of the source, saving the list of apparant typos (really, variable names and the like) to the file stop1.txt, like this:
find wine-git -name '*.[ch]' | xargs perl lspell2.pl /dev/null | grep -v ':' | tr ' ' '\012' | sort -f | uniq > stop1.txtSecond, I spellcheck the comment part of wine's source, telling the spellchecker to ignore any of the variable names found in the previous step:
find wine-git -name '*.[ch]' | xargs perl lspell.pl stop1.txt | grep -v ':' | tr ' ' '\012' | sort -f | uniq > stop2.txtThird, I manually edit 'stop2.txt' and remove lines that are glaringly obvious spelling errors from everybody's point of view. This is a bit tedious, and requires some finesse. (Don't remove lines that are jokes or britishisms, for instance.)
Finally, I generate the custom dictionary by combining stop1.txt and stop2.txt:
sort -u stop[12].txt > stop.txtand manually removing obvious crap like blank lines etc. from stop.txt.
There! stop.txt is now a list of words that are probably not typos, and should be filtered out when spellchecking.
Now you're set to use a mass spellchecker on the wine source tree, e.g.
perl lspell.pl stop.txt `find wine-git -name '*.[ch]'`