| 1 |
/* This file is part of GNU Dico. |
| 2 |
Copyright (C) 2008-2024 Sergey Poznyakoff |
| 3 |
|
| 4 |
GNU Dico is free software; you can redistribute it and/or modify |
| 5 |
it under the terms of the GNU General Public License as published by |
| 6 |
the Free Software Foundation; either version 3, or (at your option) |
| 7 |
any later version. |
| 8 |
|
| 9 |
GNU Dico is distributed in the hope that it will be useful, |
| 10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
GNU General Public License for more details. |
| 13 |
|
| 14 |
You should have received a copy of the GNU General Public License |
| 15 |
along with GNU Dico. If not, see <http://www.gnu.org/licenses/>. */ |
| 16 |
|
| 17 |
#include <config.h> |
| 18 |
#include <dico.h> |
| 19 |
#include <string.h> |
| 20 |
#include <stdlib.h> |
| 21 |
#include <stdio.h> |
| 22 |
#include <ctype.h> |
| 23 |
#include <errno.h> |
| 24 |
#include <appi18n.h> |
| 25 |
|
| 26 |
static int |
| 27 |
all_sel(int cmd, struct dico_key *key, const char *dict_word) |
| 28 |
{ |
| 29 |
switch (cmd) { |
| 30 |
case DICO_SELECT_BEGIN: |
| 31 |
break; |
| 32 |
|
| 33 |
case DICO_SELECT_RUN: |
| 34 |
return 1; |
| 35 |
|
| 36 |
case DICO_SELECT_END: |
| 37 |
break; |
| 38 |
} |
| 39 |
return 0; |
| 40 |
} |
| 41 |
|
| 42 |
static struct dico_strategy all_strat = { |
| 43 |
"all", |
| 44 |
"Match everything (experimental)", |
| 45 |
all_sel |
| 46 |
}; |
| 47 |
|
| 48 |
static int |
| 49 |
stratall_init(int argc, char **argv) |
| 50 |
{ |
| 51 |
dico_strategy_add(&all_strat); |
| 52 |
return 0; |
| 53 |
} |
| 54 |
|
| 55 |
struct dico_database_module DICO_EXPORT(stratall, module) = { |
| 56 |
DICO_MODULE_VERSION, |
| 57 |
DICO_CAPA_NODB, |
| 58 |
stratall_init, |
| 59 |
}; |