diff options
| author | David M. Syzdek <david@syzdek.net> | 2023-01-10 13:38:54 -0900 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2023-01-10 13:38:54 -0900 |
| commit | 743392ea0aab4523b31d5944da112233dda39056 (patch) | |
| tree | 7b21c5d7987aa0534ea90440b967a6ba8886d095 | |
| parent | 3a894e610d041f0236b1199b57e602d634c025de (diff) | |
| download | otputils-743392ea0aab4523b31d5944da112233dda39056.tar.gz otputils-743392ea0aab4523b31d5944da112233dda39056.tar.bz2 otputils-743392ea0aab4523b31d5944da112233dda39056.tar.xz otputils-743392ea0aab4523b31d5944da112233dda39056.zip | |
otp-altdict: converting from bindle_bindex() to otputil_skey_dict_value()
| -rw-r--r-- | src/otp-altdict.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/otp-altdict.c b/src/otp-altdict.c index 89a8f41..d88bcc6 100644 --- a/src/otp-altdict.c +++ b/src/otp-altdict.c | |||
| @@ -221,12 +221,6 @@ my_verbose( | |||
| 221 | 221 | ||
| 222 | 222 | ||
| 223 | static int | 223 | static int |
| 224 | my_word_cmp_key( | ||
| 225 | const void * a, | ||
| 226 | const void * b ); | ||
| 227 | |||
| 228 | |||
| 229 | static int | ||
| 230 | my_word_cmp_obj( | 224 | my_word_cmp_obj( |
| 231 | const void * a, | 225 | const void * a, |
| 232 | const void * b ); | 226 | const void * b ); |
| @@ -588,7 +582,7 @@ my_buff_process_word( | |||
| 588 | // search for S/KEY dictionary word | 582 | // search for S/KEY dictionary word |
| 589 | if (!(cnf->allow_dups)) | 583 | if (!(cnf->allow_dups)) |
| 590 | { | 584 | { |
| 591 | if (bindle_bindex(word, otputil_skey_rfc1760_dict, 2048, sizeof(char *), 0, NULL, my_word_cmp_key) != -1) | 585 | if (otputil_skey_dict_value(word) != -1) |
| 592 | { | 586 | { |
| 593 | my_verbose(cnf, "word '%s': is contained in S/KEY dictionary\n", word); | 587 | my_verbose(cnf, "word '%s': is contained in S/KEY dictionary\n", word); |
| 594 | return(0); | 588 | return(0); |
| @@ -917,19 +911,6 @@ my_verbose( | |||
| 917 | 911 | ||
| 918 | 912 | ||
| 919 | int | 913 | int |
| 920 | my_word_cmp_key( | ||
| 921 | const void * a, | ||
| 922 | const void * b ) | ||
| 923 | { | ||
| 924 | const char * const * obj; | ||
| 925 | const char * key; | ||
| 926 | key = a; | ||
| 927 | obj = b; | ||
| 928 | return(strcasecmp(key, *obj)); | ||
| 929 | } | ||
| 930 | |||
| 931 | |||
| 932 | int | ||
| 933 | my_word_cmp_obj( | 914 | my_word_cmp_obj( |
| 934 | const void * a, | 915 | const void * a, |
| 935 | const void * b ) | 916 | const void * b ) |
