56a01cf
diff -ru hunspell-1.2.7.orig/src/tools/hunspell.cxx hunspell-1.2.7/src/tools/hunspell.cxx
56a01cf
--- hunspell-1.2.7.orig/src/tools/hunspell.cxx	2008-08-15 11:06:33.000000000 +0100
56a01cf
+++ hunspell-1.2.7/src/tools/hunspell.cxx	2008-11-19 09:13:31.000000000 +0000
56a01cf
@@ -1468,9 +1468,21 @@
56a01cf
 			fprintf(stdout,gettext(HUNSPELL_PIPE_HEADING));
56a01cf
 			fflush(stdout);
56a01cf
 		} else if ((strcmp(argv[i],"-m")==0)) {
56a01cf
-			filter_mode = ANALYZE;
56a01cf
+            /*
56a01cf
+             if -a was used, don't override, i.e. keep ispell compatability
56a01cf
+             ispell:   Make possible root/affix combinations that aren't in the dictionary.
56a01cf
+             hunspell: Analyze the words of the input text
56a01cf
+            */
56a01cf
+			if (filter_mode != PIPE)
56a01cf
+			    filter_mode = ANALYZE;
56a01cf
 		} else if ((strcmp(argv[i],"-s")==0)) {
56a01cf
-			filter_mode = STEM;
56a01cf
+            /*
56a01cf
+             if -a was used, don't override, i.e. keep ispell compatability
56a01cf
+             ispell:   Stop itself with a SIGTSTP signal after each line of input.
56a01cf
+             hunspell: Stem the words of the input text
56a01cf
+            */
56a01cf
+			if (filter_mode != PIPE)
56a01cf
+			    filter_mode = STEM;
56a01cf
 		} else if ((strcmp(argv[i],"-t")==0)) {
56a01cf
 			format = FMT_LATEX;
56a01cf
 		} else if ((strcmp(argv[i],"-n")==0)) {
56a01cf
@@ -1480,15 +1492,45 @@
56a01cf
 		} else if ((strcmp(argv[i],"-l")==0)) {
56a01cf
 			filter_mode = BADWORD;
56a01cf
 		} else if ((strcmp(argv[i],"-w")==0)) {
56a01cf
-			filter_mode = WORDFILTER;
56a01cf
+            /*
56a01cf
+             if -a was used, don't override, i.e. keep ispell compatability
56a01cf
+             ispell:   Specify additional characters that can be part of a word.
56a01cf
+             hunspell: Print mispelled words (= lines) from one word/line input
56a01cf
+            */
56a01cf
+			if (filter_mode != PIPE)
56a01cf
+			    filter_mode = WORDFILTER;
56a01cf
 		} else if ((strcmp(argv[i],"-L")==0)) {
56a01cf
-			filter_mode = BADLINE;
56a01cf
+            /*
56a01cf
+             if -a was used, don't override, i.e. keep ispell compatability
56a01cf
+             ispell:   Number of lines of context to be shown at the bottom of the screen
56a01cf
+             hunspell: Print lines with mispelled words
56a01cf
+            */
56a01cf
+			if (filter_mode != PIPE)
56a01cf
+			    filter_mode = BADLINE;
56a01cf
 		} else if ((strcmp(argv[i],"-u")==0)) {
56a01cf
-			filter_mode = AUTO0;
56a01cf
+            /*
56a01cf
+             if -a was used, don't override, i.e. keep ispell compatability
56a01cf
+             ispell: None
56a01cf
+             hunspell: Show typical misspellings
56a01cf
+            */
56a01cf
+			if (filter_mode != PIPE)
56a01cf
+			    filter_mode = AUTO0;
56a01cf
 		} else if ((strcmp(argv[i],"-U")==0)) {
56a01cf
-			filter_mode = AUTO;
56a01cf
+            /*
56a01cf
+             if -a was used, don't override, i.e. keep ispell compatability
56a01cf
+             ispell: None
56a01cf
+             hunspell: Automatic correction of typical misspellings to stdout
56a01cf
+            */
56a01cf
+			if (filter_mode != PIPE)
56a01cf
+			    filter_mode = AUTO;
56a01cf
 		} else if ((strcmp(argv[i],"-u2")==0)) {
56a01cf
-			filter_mode = AUTO2;
56a01cf
+            /*
56a01cf
+             if -a was used, don't override, i.e. keep ispell compatability
56a01cf
+             ispell: None
56a01cf
+             hunspell: Print typical misspellings in sed format
56a01cf
+            */
56a01cf
+			if (filter_mode != PIPE)
56a01cf
+			    filter_mode = AUTO2;
56a01cf
 		} else if ((strcmp(argv[i],"-G")==0)) {
56a01cf
 			printgood = 1;
56a01cf
 		} else if ((strcmp(argv[i],"-1")==0)) {