MINOR: action: replace match_pfx by a keyword flags field
Define a new keyword flag KWF_MATCH_PREFIX. This is used to replace the
match_pfx field of action struct.
This has the benefit to have more explicit action declaration, and now
it is possible to quickly implement experimental actions.
diff --git a/src/action.c b/src/action.c
index 98359ba..ed6cee5 100644
--- a/src/action.c
+++ b/src/action.c
@@ -277,8 +277,8 @@
* when they're known to exist (not from extra list).
*/
if (best_ptr &&
- (best_dist > (2 + (best_kw && best_kw->match_pfx)) * strlen(word) ||
- best_dist > (2 + (best_kw && best_kw->match_pfx)) * strlen(best_ptr)))
+ (best_dist > (2 + (best_kw && (best_kw->flags & KWF_MATCH_PREFIX))) * strlen(word) ||
+ best_dist > (2 + (best_kw && (best_kw->flags & KWF_MATCH_PREFIX))) * strlen(best_ptr)))
best_ptr = NULL;
return best_ptr;