Commit Graph

135 Commits

Author SHA1 Message Date
Slava Zanko
981fe001d1 Base support of skins.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-18 11:49:44 +03:00
Slava Zanko
5c629cafda Ticket #1591: Master don't build with --disable-charset oprion.
* Fixed build on master.
 * Refactoring: avoid compiler warnings.
 * Remove unneeded code from mcviewer.c.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-18 11:40:30 +03:00
Slava Zanko
bd95f71a6b Some little bugfixies for xz and lzma archives:
* Increase number of reading butes by one for better analyzation of compression type.
* Add recognize lzma archive by extention.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-16 02:05:06 +03:00
Ilia Maslakov
0ce25dce74 Ticket #1591 (mcview segfault)
fix: segfault mcviev in case when the source_codepage is not equal to the display_codepage.
    refactoring: some code optimization.

Signed-off-by: Ilia Maslakov <il.smind@google.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-15 12:24:33 +03:00
Andrew Borodin
15354fdbb4 Call menu using mouse for all panel types.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-09-14 15:11:59 +04:00
Andrew Borodin
f9d6bb075c Ticket #1562: simplfication API of QuickDialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-09-03 11:39:57 +04:00
Slava Zanko
88b4ce4cbe Ticket #390: remove own 'libpopt' stuff.
We really not need for all libpopt features.
As fact, simple POSIX getopt() is enough.
But if we have glib - we must use glib for unification.

Created two files: src/args.c and src/args.h
Parce of command line options now processed in these files.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-02 14:32:32 +03:00
Ilia Maslakov
0ce827bb60 Ticket #1460 (shared search history)
fix: history for mcview (last search string geting from history)

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-08-31 14:48:54 +00:00
Denys Vlasenko
e064bd60df De-inline a few functions which are large
...or not-so-large but nevertheless
contain more than one function call,
or contain loops, or contain if's and at least one
function call, or contain largish objects on stack.

In my experience, in those cases the code size
growth is big enough to not inline stuff.

I guess some of the really big functions
are defined inline because they have, or had in the past,
just one callsite.

But for a few years gcc already does it automatically,
no need to do it by hand and risk code size explosion
when later during code evolution another callsite
is created. This optimization by hand is simply
no longer needed.

Anyway, here is the code size difference:

   text    data     bss     dec     hex filename
 572337   17944  177820  768101   bb865 mc.t5/.obj/src/mc
 567697   17944  177820  763461   ba645 mc.t6/.obj/src/mc

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-08-31 07:12:59 +03:00
Ilia Maslakov
d89306849c code clean up
* viewer/mcviewer.c: remove unused variable ‘enc’
    * viewer/actions_cmd.c: remove superfluous param
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-08-28 20:14:30 +00:00
Slava Zanko
8407f5fd9a Add forgotten '#include <stdio.h>' into src/viewer/internal.h for recognize FILE type.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-28 22:58:59 +03:00
Ilia Maslakov
b1546095ca Ticket #1530 (Tricky format in view.c not suitable for i18n)
fix: dialog label string

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-08-25 12:47:51 +00:00
Andrew Borodin
8b8f7defb7 Implemented interruptable long-distance movements.
There a lot of time required to move to the end of large
binary file. Now such movement can be interrupted by
Ctrl-C key.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-25 12:17:20 +04:00
Ilia Maslakov
a799ef4329 fix: <no translation> behaviour
Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-08-25 11:09:57 +03:00
Slava Zanko
459ef0665f Change prototype of mcview_get_byte() function (and al related functions)
from

int mcview_get_byte (mcview_t *, off_t)

into

gboolean mcview_get_byte (mcview_t, off_t, int *)

Now splitted return code(success/fail) and readed value from datasource value.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-25 11:09:42 +03:00
Ilia Maslakov
dc15da9572 fix: uninitialized variables
Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-08-25 05:33:18 +00:00
Ilia Maslakov
2a207ccabd fix: header paths
Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-08-25 05:22:19 +00:00
Andrew Borodin
a75161aed8 Added missed includes. Fixed OFFSETTYPE_MAX calculation.
Use CHAR_BIT constant instead of hardcoded 8 for char size.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-25 09:01:07 +04:00
Slava Zanko
ac11bedf24 Cleanup of code. Indentation.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-25 01:41:31 +03:00
David Martin
d41e57a673 Ticket #1530
build format string in runtime, not preprocessor

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-08-24 19:44:16 +00:00
Ilia Maslakov
7ff7368c5d * add 'Whole words' option into the viewer 'Search' dialog
related  Ticket #1487
    * fix: some warnings

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-08-24 19:31:31 +00:00
Slava Zanko
e9b1a18b96 Added functions for work with nroff'ed text. Added search across nroff'ed text
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-24 16:26:44 +00:00
Slava Zanko
1828ebd9a8 Fixies with search in HEX mode view:
* Fixed highlight area of searched text
 * Fixed cursor position after search

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-24 16:26:44 +00:00
Slava Zanko
74b94cd1f7 Search in plain text (not nroff'ed) now worked.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-24 16:26:43 +00:00
Slava Zanko
fe399ab039 Cleanup of code. Reidentation.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-24 16:26:43 +00:00
Slava Zanko
1442f34838 Ticket #1431 (Missing translation in view.c ButtonBar?)
Fixed bug.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-24 16:26:43 +00:00
Mikhail S. Pobolovets
a52ba95680 Avoid warning 'format not a string literal and no format arguments'.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-24 16:26:43 +00:00
Slava Zanko
682434b0db Fixed memory leak after geting list of search types.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-24 16:26:42 +00:00
Slava Zanko
10e5730255 Move search dialog from actions_cmd.c into dialogs.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-24 16:26:42 +00:00
Slava Zanko
0498a346b5 Changes for correctly work after rebase to master (master with HACK_tty).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-24 16:26:42 +00:00
Ilia Maslakov
bb7cbfe0db fix: draw nroff text 2009-08-24 16:26:41 +00:00
Slava Zanko
b119f489ab Move inline functions from internal.h into new file inlines.h
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-24 16:26:41 +00:00
Ilia Maslakov
c148f8e055 fix: draw text in utf mode
fix: right movement in HEX
2009-08-24 16:26:41 +00:00
Slava Zanko
b06ab0fe72 Split src/view.c into small files for better support of code
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-24 16:26:41 +00:00
Ilia Maslakov
eb9a251dcc add: some utf8 procedures:
* get_ptr_file (WView *view, offset_type byte_index)
    * get_ptr_string (WView *view, offset_type byte_index)
    * get_ptr_growing_buffer (WView *view, offset_type byte_index)
    * get_utf (WView *view, offset_type byte_index, int *char_width)

    add: property 'utf' in the struct Wview

    Signed-off-by: Slava Zanko <slavazanko@gmail.com>
    Added temlate for splitting src/view.c into lot of
    smalest files (for better development and supporting).
2009-08-24 16:20:52 +00:00