Commit Graph

76 Commits

Author SHA1 Message Date
Jeff Doozan
88af1a077c Use binary search for synonyms, fixes #31 2020-12-19 15:10:39 -05:00
Evgeniy A. Dushistov
824764ab50 handle possibly invalid data: origin_data == nullptr 2020-08-14 12:46:42 +03:00
Evgeniy A. Dushistov
431a5774ba fix warning 2020-08-14 12:37:21 +03:00
Evgeniy A. Dushistov
7facbe215e refactoring: run clang-format against code 2020-08-14 12:36:02 +03:00
Guido Cella
2fd47ba0d0 Keep searching in $HOME 2020-05-10 12:48:32 +02:00
Guido Cella
3413d847c5 Comply with the XDG Base Directory Specification 2020-05-10 07:01:31 +02:00
alcah
021e467b37 return exit code 2 if search term not found 2020-03-17 22:15:16 +10:30
nickeb96
7341675088 Moved history file path code to helper function 2018-05-07 20:08:47 -04:00
nickeb96
7719111c57 Added support for 2018-05-07 17:45:07 -04:00
Michal Čihař
0f83f0aa0b Store integer magic in cache file
This allows to detect different endianity of machines to avoid
loading caches created with different endianity.

Fixes #36

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-14 16:39:57 +01:00
Evgeniy A. Dushistov
0cd29823cf ready for 0.5.2 release 2017-08-16 10:14:23 +03:00
Evgeniy A. Dushistov
8f16ceae59 refactoring: apply clang-format rules 2017-08-09 07:46:27 +03:00
Evgeniy A. Dushistov
d0c0a0837f fix: do not give interactive menu via pager
fixes #28
2017-08-09 07:41:33 +03:00
Peter
e85927e562 Add -e for exact searches (no fuzzy matches).
Only exact matches (or synonyms) are returned for simple searches.
2017-07-28 11:39:34 +02:00
Peter
835dffcaf8 Add additional type identifiers h,w,k
Like for xdxf, no processing is done, the raw content is shown.
2017-07-27 08:15:45 +02:00
Evgeniy Dushistov
af6362f5df Merge pull request #23 from sleep-walker/master
fix FSF address in LICENSE
2017-07-27 00:30:30 +03:00
Evgeniy Dushistov
25dd4c8264 Merge pull request #22 from ecraven/json
Add json output, fix #6
2017-07-26 23:55:59 +03:00
Tomáš Čech
98e98d0746 fix FSF address 2017-07-26 22:39:28 +02:00
Peter
3105823e8b Add option --json-output (-j)
If given -j, format the output of -l and of searches as JSON.
2017-07-26 22:07:23 +02:00
Peter
5f0f6e036f Add option --only-data-dir (-x)
Only use the dictionaries in data-dir, do not search in user and system directories

This makes testing much easier
2017-07-07 08:39:26 +02:00
Evgeniy A. Dushistov
214fbbf91e fix portability issue in PR #20 , plus simplify code 2017-07-07 00:19:50 +03:00
Evgeniy Dushistov
f510300f59 Merge pull request #20 from ecraven/master
Add support for .syn synonym files.
2017-07-06 23:57:19 +03:00
Peter
4b52181898 Add support for .syn synonym files.
Fixes #8.
2017-07-06 19:46:15 +02:00
Evgeniy A. Dushistov
72a15b70a7 simplify parsing of integers in ifo file 2017-07-06 13:11:02 +03:00
Evgeniy A. Dushistov
4c367fc12c fix build with clang 3.4.1 #19 2017-07-06 11:41:58 +03:00
Evgeniy A. Dushistov
b2ced870ab fix potential undefined behaviour
fix #19
2017-07-04 22:33:14 +03:00
Evgeniy A. Dushistov
5c1357840c Merge branch 'order_dist_list' 2017-04-22 21:25:58 +03:00
Evgeniy A. Dushistov
1667de0650 cleanups for specify "dictionary order by" 2017-04-22 21:23:00 +03:00
Evgeniy A. Dushistov
97b13e6702 remove not used code 2017-04-22 20:52:18 +03:00
Anton Yuzhaninov
84367a5744 Fix using SDCV_PAGER
Stream opened with popen() should be closed with pclose() as documented
in popen(3) man.
2017-03-07 18:37:52 -05:00
Evgeniy A. Dushistov
7df514e117 fix build without readline 2017-02-17 17:38:57 +03:00
Cong Gu
2d95bd0b12 specify dictionary order by -u switches or ~/.sdcv_ordering 2016-09-25 01:13:43 -05:00
Evgeniy A. Dushistov
aa0c5ff051 add clang-format and apply to sdcv.cpp 2016-06-02 14:52:58 +03:00
Evgeniy Dushistov
c78d59de5f fixes for last commit 2014-10-24 18:03:30 +00:00
Evgeniy Dushistov
73664c078a add tiny support of KingSoft PowerWord's data 2014-10-23 23:23:48 +00:00
Evgeniy Dushistov
624208793e fix missed unescaped for &apos;, thanks to Svyatoslav Mishyn 2014-10-23 22:43:04 +00:00
Evgeniy Dushistov
ab8d6ec74e if search return more then one result
save choice to readline history
2014-05-11 02:20:03 +00:00
Evgeniy Dushistov
4f80442ece fix build with clang's scan-build 2013-07-10 10:27:20 +00:00
Evgeniy Dushistov
8298a578b0 check fread calls 2013-07-07 23:29:09 +00:00
Evgeniy Dushistov
5f8d2cb174 remove not used code, use glib wrappers where possible 2013-07-07 20:12:03 +00:00
Evgeniy Dushistov
d05de97521 remove file module, move code to utils 2013-07-07 19:52:02 +00:00
Evgeniy Dushistov
e39f7eed9a Simplify file structure 2013-07-07 19:48:44 +00:00
Evgeniy Dushistov
a4f441aa32 rename lib module to more specific name stardict_lib 2013-07-07 19:45:37 +00:00
Evgeniy Dushistov
c3d733b1fc use glib wrappers where possible for safe memory freeing 2013-07-07 17:07:02 +00:00
Evgeniy Dushistov
9034e792b6 code cleanups + use where possible get_uint32 instead of not safe cast 2013-07-07 17:05:55 +00:00
Evgeniy Dushistov
fae4b432e1 - not requeire exact version number for stardict ifo file
- ignore utf-8 BOM during magic string check
2013-07-07 17:04:51 +00:00
Evgeniy Dushistov
1a8b24dced rename distance header 2013-07-07 15:25:58 +00:00
Evgeniy Dushistov
a1f5ebeee2 remove typedef to simplify code 2013-07-07 15:24:28 +00:00
Evgeniy Dushistov
f5c62baeb9 support of usage colors in sdcv output 2013-07-07 14:43:53 +00:00
Evgeniy Dushistov
7ddc3e2ea9 - update russiang translation and po template
- remove not used file
2013-07-07 13:11:54 +00:00