[Dancer-changes] CVS: dancer/script speller.awk,1.1.1.1,1.2
Brought to you by:
bagder
|
From: Elmar H. <el...@us...> - 2003-02-14 12:13:19
|
Update of /cvsroot/dancer/dancer/script
In directory sc8-pr-cvs1:/tmp/cvs-serv27415
Modified Files:
speller.awk
Log Message:
support + and - response of newer ispell, take leading space in unres into account
Index: speller.awk
===================================================================
RCS file: /cvsroot/dancer/dancer/script/speller.awk,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- speller.awk 13 Nov 2000 02:42:37 -0000 1.1.1.1
+++ speller.awk 14 Feb 2003 12:13:15 -0000 1.2
@@ -1,7 +1,8 @@
#!/usr/bin/awk -f
BEGIN {
- good = bad = bad2 = 0;
+ good = good2 = bad = bad2 = 0;
unres = "";
+ root = "";
}
{
if ($1 == "&") {
@@ -15,10 +16,20 @@
}
else if ($1 == "*")
good++;
+ else if ($1 == "+") {
+ root = sprintf("%s %s", root, $2);
+ good2++;
+ }
+ else if ($1 == "-")
+ good++;
}
END {
if (bad2 != 0)
- printf("Unresolved: %s\n", unres);
- else if ((good != 0) && ((bad+bad2) == 0))
- print "Spelling is correct";
+ printf("Unresolved:%s\n", unres);
+ else if ((bad+bad2) == 0) {
+ if (good2 != 0)
+ printf("Spelling is correct, from:%s\n", root);
+ else if (good != 0)
+ print "Spelling is correct";
+ }
}
|