Patrick Winnertz
a5e61d285e
Removed unused char*.
...
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-01-30 12:59:23 +01:00
Sergei Trofimovich
e48cb7c89f
mhl: added mhl_strmove() function (memmove semantics)
...
valgrind detected an error in completion path:
==2962== Source and destination overlap in strcpy(0x459F068, 0x459F06A)
==2962== at 0x4026056: strcpy (mc_replace_strmem.c:268)
==2962== by 0x808F70B: canonicalize_pathname (string3.h:106)
==2962== by 0x805ECBA: filename_completion_function (complete.c:125)
==2962== by 0x805FB35: command_completion_function (complete.c:448)
==2962== by 0x805EA34: completion_matches (complete.c:552)
==2962== by 0x8060454: complete (complete.c:735)
==2962== by 0x809AAC4: handle_char (widget.c:1545)
==2962== by 0x807867E: midnight_callback (dialog.h:201)
==2962== by 0x8061B27: dlg_process_event (dialog.c:664)
==2962== by 0x8061ECE: run_dlg (dialog.c:786)
==2962== by 0x807996C: main (main.c:1674)
Snippet of man strcpy:
DESCRIPTION
The strcpy() function copies the string pointed to by src, including the terminating
null byte ('\0'), to the buffer pointed to by dest. ___The strings may not overlap___,
and the destination string dest must be large enough to receive the copy.
We used strcpy to move data chunk in memory: "./foo" -> "foo", etc.
This patch introduces mhl_strmove and fixed canonicalize_pathname.
Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2009-01-30 09:31:28 +02:00
Sergei Trofimovich
17772239ff
completion: added escapes in command line on completion
...
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-01-29 23:38:59 +02:00
Sergei Trofimovich
455f2dbd66
complete: cleanup: #define to enum INPUT_COMPLETION_FLAGS
...
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-01-29 21:13:30 +02:00
Enrico Weigelt, metux IT service
7639b364af
added a new parameter for completion flags to input_new
2009-01-29 19:17:43 +01:00
Sergei Trofimovich
abc295cee2
Merge branch 'mc-4.6'
...
* mc-4.6:
Now a trailing slash will only be added in copy & move dialogs if the path itselfs
copy/move dialog: add trailing '/' to default destination path (fix #181 )
2009-01-29 01:12:09 +02:00
Patrick Winnertz
66c9fde141
Now a trailing slash will only be added in copy & move dialogs if the path itselfs
...
doesn't already have a trailing slash.
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-01-28 23:54:04 +01:00
Sergei Trofimovich
689164a6bc
copy/move dialog: add trailing '/' to default destination path ( fix #181 )
...
Problem:
When user tried to copy/move file (F5/F6) - he could run into trouble if
destination directory is removed (it can be removed by user from another mc session).
Operation is performed and(!) file is renamed.
So when when user issues 'cp /tmp/a.file /tmp/b' - he gets not expected /tmp/b/a.file,
but /tmp.b !
Solution:
Add trailing space for destination directory for non-local copy/move(F5/F6) operations.
So operation, given above will take form: 'cp /tmp/a.file /tmp/b/' disambiguating b
meaning.
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-01-28 23:31:39 +02:00
Patrick Winnertz
cad6ffd2bb
Merge branch 'mc-4.6'
2009-01-27 23:03:06 +01:00
Enrico Weigelt, metux IT service
90763ba82f
introduced new type SHELL_ESCAPED_STR for more type safety
2009-01-27 22:27:06 +01:00
Patrick Winnertz
8b593e8398
Removed unused variable
2009-01-27 21:33:04 +01:00
Slava Zanko
38537ddd04
Changes for use MHL.
...
mhl/escape.h:
add new function mhl_shell_is_char_escaped()
src/command.c; src/complete.c; src/file.c; src/util.c:
Changes for use MHL-functions.
src/util.h:
remove old escape-related declarations of functions
2009-01-27 10:20:35 +02:00
Patrick Winnertz
ea5cfade55
Add code snipplet by il.smind which should fix issues with putty and
...
mc (mc over ssh on a putty console)
- to reproduce try this:
1) run 'putty'; login to remote host
2) run mc
3) press key '/' on keypad. You will see menu that is called when you press the F2
4) Go to 'Learn keys' (simple call dialog)
5) just exit from 'learn keys' dialog (without any changes)
6) 3) press key '/' on keypad again. You will see '/' symbol in command line.
2009-01-26 16:21:06 +01:00
Slava Zanko
2cd08d0d84
Fixed bug with renamig/copying files with backshashes in names
...
* src/util.c: implementation of new function is_escaped_string
* src/util.h: declaration of new function is_escaped_string
* src/file.c: fix o bug :)
2009-01-26 16:16:43 +02:00
Slava Zanko
9e46faab7f
Remove some testing stuff
2009-01-26 16:16:42 +02:00
Slava Zanko
a419b71b6e
Temporarry commit. Fixed completion in browse by directoryes.
...
Not fixed completion by commands (fail if command in $PATH contain space)
2009-01-26 16:16:42 +02:00
Slava Zanko
26c9d6d107
Fixed some memory leaks.
...
Added DOXYGEN-like description to new functions.
2009-01-26 16:16:42 +02:00
Patrick Winnertz
416f7d69fc
Add $ and ` for escaping and reorder it according to the ascii values
2009-01-26 16:16:42 +02:00
Patrick Winnertz
7c64c2767b
Rewrite it to use g_string_append_c instead of some homebrew stuff
2009-01-26 16:16:42 +02:00
Patrick Winnertz
b48c30e337
Fix escaping functions to also escape the leading whitespace
2009-01-26 16:16:42 +02:00
Patrick Winnertz
985f73c374
Original patch as attached on the bugreport
2009-01-26 16:16:42 +02:00
Patrick Winnertz
4ab17b939f
Add $ and ` for escaping and reorder it according to the ascii values
2009-01-26 16:16:42 +02:00
Patrick Winnertz
3263509b9d
Rewrite it to use g_string_append_c instead of some homebrew stuff
2009-01-26 16:16:41 +02:00
Patrick Winnertz
2eb9472f99
Fix escaping functions to also escape the leading whitespace
2009-01-26 16:16:41 +02:00
Patrick Winnertz
bcac6584b2
Original patch as attached on the bugreport
2009-01-26 16:16:41 +02:00
Mikhail S. Pobolovets
e3a82ba1d8
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
...
Automatic new directory(Mkdir, F7) name filling.
Can be configured (on|off) in 'Configure options'.
2009-01-26 13:33:13 +02:00
Slava Zanko
cfba955399
add some 8bit codepages for correct display
2009-01-26 12:20:41 +02:00
Slava Zanko
8a7c7762f7
patches by Rostislav Beneš: mc-30-view
...
experimental patch, completely different reading file, new cache structure,
shall view text in every encodings (remaped ctrl + t, new dialog need
localization).
1. to avoid backward reading, viewer keeps four following characters from
file: next, actual and two previous. This is enough to handle new lines
and nroff fortmatin correctly.
2. cache_line structure, that presents one line in file. cache_line stores,
where line starts and ends in file,number of line and width of line. Width
is at most equal to screen width, so longer lines are cached in more
cache_lines. This makes wrapping text very easy. Cache_lines are stored
in a linked list. file is loaded into cache_lines sequential, not whole at once.
It only provides navigation in file.
I found two problems in this solution:
1. slow first move to end in large files, because can not read files
backward. (loading in background may help)
2. it is slow with multibyte characters. I tried to eliminate calling iconv
to two, but it did not help (iconv is called on every byte). I think
caching some parts of file will be needed.
2009-01-26 12:20:40 +02:00
Slava Zanko
8ffa3beeb8
patches by Rostislav Beneš: mc-29-vfs
...
add support for filesystem, that use others encodings than mc (vfs). Now can be
encoding set only manually, but automatic detection is possible. Filename is
converted in mc_readdir and other function translate it back by vfs_translate
added menu etries encodnig in left and rigth menu (localization will be neede)
modified subshell.c to put subshell correct working directoy,
modified ext.c and execute.c to translate filename before running command
there could be one problem, vfs_translate_path does not use something like
path_magic function
2009-01-26 12:18:16 +02:00
Slava Zanko
1eaadfae0b
patches by Rostislav Beneš: mc-28-fix
...
rest of fixes in files cmc.c, main.c (xterm title), panelize.c, subshell.c,
tree.c, tty.c, user.c, util.c, win.c
now, basic mc's function should work well, editor and view are still broken.
2009-01-26 12:17:45 +02:00
Slava Zanko
6f50ee1745
patches by Rostislav Beneš: mc-27-hint
...
similar problem like help, similiar solution
2009-01-26 12:13:09 +02:00
Slava Zanko
c7581effa3
patches by Rostislav Beneš: mc-26-help
...
Help was modified to convert help file into terminal encoding
changes in drawing and reading help file
2009-01-26 12:10:50 +02:00
Slava Zanko
722496dd9e
patches by Rostislav Beneš: mc-21-hotlist
...
replace name_trunc, strlen width str_trunc, str_term_width1, add growing string
from strutil.
2009-01-26 12:10:09 +02:00
Slava Zanko
77d6ba8a36
patches by Rostislav Beneš: mc-12-menu
...
like buttons use menu entries hotkey_t. But menus are staticly defined, so this
change is much bigger. All menu declaration must be edited. follow standard
changes in drawing and handling hotkeys.
now basic mc's functions works in utf-8, remain correct calculation of controls
width in dialogs, replace functions like tolower, toupper,isspace, ... width
functions from strutil or g_ascii variant.
2009-01-26 12:09:23 +02:00
Slava Zanko
d6d99fe6e5
patches by Rostislav Beneš: mc-11-panels
...
like in input, added multibytes characters buffer for search in panel (ctrl+s)
drawing is simplier, because alignment do directly str_fit_to_term function
from strutil, changed time functions in util to work correctly in utf-8
2009-01-26 12:07:27 +02:00
Slava Zanko
327e8ffe90
patches by Rostislav Beneš: mc-05-check
...
very similar to button, for text used hotkey_t and changed drawning and
handling hotkey
2009-01-26 12:06:41 +02:00
Slava Zanko
5d626982b0
patches by Rostislav Beneš: mc-40-ncursesw-old
...
Added support of old ncursesw library
2009-01-26 12:05:43 +02:00
Slava Zanko
8d94909d0f
patches by Rostislav Beneš: mc-40-ncurses
...
Extende support of ncurses
2009-01-26 12:05:43 +02:00
Slava Zanko
b7b74c2f03
patches by Rostislav Beneš: mc-30-view
...
experimental patch, completely different reading file, new cache structure,
shall view text in every encodings (remaped ctrl + t, new dialog need
localization).
1. to avoid backward reading, viewer keeps four following characters from
file: next, actual and two previous. This is enough to handle new lines
and nroff fortmatin correctly.
2. cache_line structure, that presents one line in file. cache_line stores,
where line starts and ends in file,number of line and width of line. Width
is at most equal to screen width, so longer lines are cached in more
cache_lines. This makes wrapping text very easy. Cache_lines are stored
in a linked list. file is loaded into cache_lines sequential, not whole at once.
It only provides navigation in file.
I found two problems in this solution:
1. slow first move to end in large files, because can not read files
backward. (loading in background may help)
2. it is slow with multibyte characters. I tried to eliminate calling iconv
to two, but it did not help (iconv is called on every byte). I think
caching some parts of file will be needed.
2009-01-26 12:05:43 +02:00
Slava Zanko
1efbe4a18a
patches by Rostislav Beneš: mc-29-vfs
...
add support for filesystem, that use others encodings than mc (vfs). Now can be
encoding set only manually, but automatic detection is possible. Filename is
converted in mc_readdir and other function translate it back by vfs_translate
added menu etries encodnig in left and rigth menu (localization will be neede)
modified subshell.c to put subshell correct working directoy,
modified ext.c and execute.c to translate filename before running command
there could be one problem, vfs_translate_path does not use something like
path_magic function
2009-01-26 12:04:07 +02:00
Slava Zanko
75cf62902d
patches by Rostislav Beneš: mc-28-fix
...
rest of fixes in files cmc.c, main.c (xterm title), panelize.c, subshell.c,
tree.c, tty.c, user.c, util.c, win.c
now, basic mc's function should work well, editor and view are still broken.
2009-01-26 12:04:07 +02:00
Slava Zanko
c121370f94
patches by Rostislav Beneš: mc-27-hint
...
similar problem like help, similiar solution
2009-01-26 11:54:54 +02:00
Slava Zanko
bd1bc71732
patches by Rostislav Beneš: mc-26-help
...
Help was modified to convert help file into terminal encoding
changes in drawing and reading help file
2009-01-26 11:49:00 +02:00
Slava Zanko
bc41b5e7fa
patches by Rostislav Beneš: mc-25-key
...
defensive edits, handle only ascii keys
2009-01-26 11:48:11 +02:00
Slava Zanko
1b34b52cb6
patches by Rostislav Beneš: mc-24-achown
...
added str_term_width1, str_trunc to all chmod / chown dialogs
2009-01-26 11:48:11 +02:00
Slava Zanko
87a8b257ae
patches by Rostislav Beneš: mc-23-profile
...
g_casecmp replaced width str_casecmp
2009-01-26 11:48:11 +02:00
Slava Zanko
018ead6651
patches by Rostislav Beneš: mc-22-info
...
changes in drawing panel info view
2009-01-26 11:48:11 +02:00
Slava Zanko
779e0e6d40
patches by Rostislav Beneš: mc-21-hotlist
...
replace name_trunc, strlen width str_trunc, str_term_width1, add growing string
from strutil.
2009-01-26 11:48:10 +02:00
Slava Zanko
26f6eeed8b
patches by Rostislav Beneš: mc-20-dir
...
changes in sorting strings (name, extension), for comparing are created keys
from strings and than their are compared instead of primary strings. (in
reality, keys are created only for case insensitive comparing, case
sensitive compare original strings). In utf-8 shall by keys faster than
compare strings directly. But this need ediding declaration of all sorts
functions.
2009-01-26 11:47:42 +02:00
Slava Zanko
e57e297ffe
patches by Rostislav Beneš: mc-19-find
...
case insensitive search function used from strutil, search only valid filenames
2009-01-26 11:47:42 +02:00
Slava Zanko
eaa2fd4e20
patches by Rostislav Beneš: mc-18-option
...
Correctly calculate length of utf-8 strings.
2009-01-26 11:47:42 +02:00
Slava Zanko
511fddabb9
patches by Rostislav Beneš: mc-17-layout
...
Change layout for correct display.
2009-01-26 11:47:42 +02:00
Slava Zanko
f79ea0e917
patches by Rostislav Beneš: mc-16-boxes
...
Some changes for correct display of boxes.
2009-01-26 11:47:42 +02:00
Slava Zanko
2423fabcf4
patches by Rostislav Beneš: mc-15-dialog
...
changes in handlig keys,
if key is ascii characters, is clear what to do. But when key is between 0x80 and
0xff, it is impossible say, if is valid, alpha, number, ...
I think, that will be better support multibytes characters directly in message
handler, but is not necessary and my patch do not do that.
2009-01-26 11:47:42 +02:00
Slava Zanko
6accfeae28
patches by Rostislav Beneš: mc-14-wtools
...
modified wtools.c
2009-01-26 11:47:41 +02:00
Slava Zanko
502b812f0a
patches by Rostislav Beneš: mc-13-file
...
modified move/copy/delete dialogs to work correctly with utf-8
2009-01-26 11:47:41 +02:00
Slava Zanko
4f00496233
patches by Rostislav Beneš: mc-12-menu
...
like buttons use menu entries hotkey_t. But menus are staticly defined, so this
change is much bigger. All menu declaration must be edited. follow standard
changes in drawing and handling hotkeys.
now basic mc's functions works in utf-8, remain correct calculation of controls
width in dialogs, replace functions like tolower, toupper,isspace, ... width
functions from strutil or g_ascii variant.
2009-01-26 11:47:41 +02:00
Slava Zanko
564c518415
patches by Rostislav Beneš: mc-11-panels
...
like in input, added multibytes characters buffer for search in panel (ctrl+s)
drawing is simplier, because alignment do directly str_fit_to_term function
from strutil, changed time functions in util to work correctly in utf-8
2009-01-26 11:47:41 +02:00
Slava Zanko
882826b446
patches by Rostislav Beneš: mc-10-buttonbar
...
change in drawing, buttons now better use whole width of screen
2009-01-26 11:46:32 +02:00
Slava Zanko
e68c648af9
patches by Rostislav Beneš: mc-09-groupbox
...
change drawing to be safer
2009-01-26 11:46:32 +02:00
Slava Zanko
8c673585ec
patches by Rostislav Beneš: mc-08-listbox
...
realy simple change in drawing
2009-01-26 11:46:31 +02:00
Slava Zanko
9c9ef5f3e8
patches by Rostislav Beneš: mc-07-label
...
change only in drawing
2009-01-26 11:46:31 +02:00
Slava Zanko
7f71be0d63
patches by Rostislav Beneš: mc-06-input
...
in input widget I made a lot of changes:
1. rename some members in WInput to reflect more their functions
(field_len -> field_width, ...)
2. buffer for reading multibytes characters - charbuf, (taken from UTF-8
patch)
3. modified insert_char to accept mulstibytes characters, drawing changed
4. works only with valid strings, str_fix_string used to assure that
input->buffer is valid
changes in complete.c:
- some iteration strings with ++/-- replaced with str_next_char,
str_prev_char, where was needed. ++ was offset oriented, but str_next_char
use directly referecne (char *), so result is not extra beatiful in every
cases
- other buffer for multibytes characters
- complete only valid filenames
2009-01-26 11:46:31 +02:00
Slava Zanko
9450950fd4
patches by Rostislav Beneš: mc-05-check
...
very similar to button, for text used hotkey_t and changed drawning and
handling hotkey
2009-01-26 11:46:31 +02:00
Slava Zanko
8d6efd4cd0
patches by Rostislav Beneš: mc-04-radio
...
all options of radio box are stored in an array of hotkey_t, so radio box has own
copy of options now (in original mc has only a reference to options), changed
drawing and handling hotkey
2009-01-26 11:46:31 +02:00
Slava Zanko
9810380e9a
patches by Rostislav Beneš: mc-03-button
...
text of button stored in hotkey_t instead of char*, modified achown.c, because
access directly button text, change in drawing button adn handling hotkey
2009-01-26 11:46:31 +02:00
Slava Zanko
55be4b67cb
patches by Rostislav Beneš: mc-02-hotkey
...
add new structure hotkey_t for storings caption with hotkey in buttons, menus,...
contains three strings - start, hotkey, end. So hotkey could be any characters,
but mc's message handles works correct only with ascii characters.
for me is working with hotkey_t easier than how are stored hotkeys in original
mc.
2009-01-26 11:46:31 +02:00
Slava Zanko
2678e889b1
patches by Rostislav Beneš: mc-01-api
...
add functions for working with strings
some functions are implemented directlu in strutil.c, others have ascii, 8bit
or utf-8 variant. (8bit means singlebyte encodings, where all characters have
width one). Mc autodetects terminal encoding at start and chooses right
variant. If does not know terminal encoding, chooses ascii variant.
contains functions:
1. for translation strings and growing strings
2. for working with characters (next char, prev char, length in
characters, isspace, isalnum, ...)
3. prepeare for display, replace invalid characters with questionmark,
unprintable with dot, left / right / center align
4. comparing strings
in future all string function from util should be moved into strutil, some
function from util have new variant in strutil.
2009-01-26 11:46:30 +02:00
Slava Zanko
1d3ffb0e29
patches by Rostislav Beneš: mc-00-slang.patch
...
Check if libslang support UTF-8
2009-01-26 11:46:30 +02:00
Patrick Winnertz
881ff40b3d
Merge branch 'mc-4.6'
2009-01-26 10:30:14 +01:00
Patrick Winnertz
74dadcc258
Added rev3 of the patch attached to the bugreport
2009-01-26 00:34:50 +01:00
Patrick Winnertz
481b0a34ea
Merge branch 'mc-4.6'
2009-01-25 16:23:43 +01:00
Patrick Winnertz
da74735548
Merge branch '35_view_dir_update' into mc-4.6
...
Conflicts:
ChangeLog
2009-01-25 16:23:26 +01:00
Enrico Weigelt, metux IT service
7cef5b112e
Merge commit 'origin/50_history_sections.metux'
2009-01-25 07:00:32 +01:00
Enrico Weigelt, metux IT service
9ac56b58ac
fixed missing history.h include
2009-01-24 21:59:58 +01:00
Enrico Weigelt, metux IT service
0dcb057459
separated out history section names to history.h
2009-01-24 21:51:29 +01:00
Enrico Weigelt, metux IT service
b9b09436c4
Merge commit 'origin/50_history_section_names' into 50_history_sections.metux
2009-01-24 21:26:41 +01:00
Enrico Weigelt, metux IT service
b1d848b786
fixed #35
2009-01-24 21:06:15 +01:00
Enrico Weigelt, metux IT service
7fae75c0d6
merged git 174_4.6_mandriva_pty_closeonexec
2009-01-24 20:26:40 +01:00
Enrico Weigelt, metux IT service
f072bf6d5c
merged 174_4.6_mandriva_pty_closeonexec
2009-01-24 20:24:14 +01:00
Patrick Winnertz
50afa35d28
Removed conflict markers which were not seen by metux
2009-01-24 10:48:26 +01:00
Enrico Weigelt, metux IT service
5d150562aa
merged 158_message_codes branch
2009-01-24 04:53:51 +01:00
Slava Zanko
22fada9ce0
History sections names:
...
Make names of sections with function name as prefix string.
for example:
[inp:mc_mkdir Enter directory name ]
0=...
2009-01-20 00:57:09 +02:00
Enrico Weigelt, metux IT service
c3a1d292fd
added patch from ticket 148
2009-01-19 22:09:54 +01:00
Patrick Winnertz
168526d242
Merge branch 'mc-4.6'
2009-01-18 23:13:25 +01:00
Enrico Weigelt, metux IT service
9f369abe25
added mandriva patch: subshell pty close-on-exec
2009-01-16 02:17:57 +01:00
Patrick Winnertz
a144f2e4f6
Apply patch to fix localised history headers to mc-4.6 branch.
...
This is bad as if the localised string changed or you start mc
in another language your history will be lost.
2009-01-14 01:01:18 +01:00
Patrick Winnertz
aed7edf0f6
Removed some unused vars and functions
2009-01-12 22:47:05 +01:00
Patrick Winnertz
bcab304c4b
Add the unused pointer again as this doesn't belong into this fix.
2009-01-12 21:47:58 +01:00
Enrico Weigelt, metux IT service
f516d1c1d1
merged in: 155_want_widgets_METUX
2009-01-12 00:35:21 +01:00
Enrico Weigelt, metux IT service
53627743b4
* main.c, main.h, main-widgets.h, filegui.c, layout.c, screen.c:
...
moved main widget declarations into main-widgets.h and
removed the WANT_WIDGETS symbol
2009-01-10 21:30:12 +01:00
Enrico Weigelt, metux IT service
ff9ff2058d
Reverted accidentially committed drop-slang change ;-o
2009-01-10 20:53:19 +01:00
Enrico Weigelt, metux IT service
154feb5160
2009-01-10 Enrico Weigelt, metux ITS <weigelt@metux.de>
...
* edit/editcmd.c:
* src/achown.c src/background.c src/boxes.c src/chmod.c:
* src/chown.c src/cmd.c src/command.c src/dir.c src/execute.c:
* src/ext.c src/file.c src/filegui.c src/find.c src/help.c:
* src/learn.c src/main.c src/panelize.c src/screen.c:
* src/selcodepage.c src/subshell.c src/tree.c src/user.c:
* src/utilunix.c src/view.c:
* vfs/cpio.c vfs/direntry.c vfs/extfs.c vfs/fish.c vfs/ftpfs.c:
* vfs/mcfs.c vfs/sfs.c vfs/smbfs.c vfs/tar.c vfs/undelfs.c:
* vfs/utilvfs.c vfs/vfs.c:
Changed message type codes on calls to message(), query_dialog(),
close_error_pipe() from numeric IDs to symbols D_ERROR, D_NORMAL
2009-01-10 14:13:56 +01:00
Patrick Winnertz
197973ccf2
Applied patch from metux on git - needed to fix some stuff manually.
...
This branch is based on mc-4.6
2009-01-10 11:53:20 +01:00
Enrico Weigelt, metux IT service
f30e0fe86e
removed bundled slang
2009-01-07 14:24:33 +01:00
Patrick Winnertz
5411b79dcf
Merge branch 'master' of ssh://midnight-commander.org:2222/git/mc
2009-01-05 16:59:23 +01:00
Patrick Winnertz
dcd57a34ef
Removed .cvsignore files as we don't need them any longer
2009-01-05 16:58:44 +01:00
Slava Zanko
5deebd49a8
remove compatibility_move_mc_files stuff
2009-01-05 00:37:59 +02:00
Slava Zanko
aad7c6c317
Added .svnignore files (same as .cvsignore)
2008-12-28 23:27:03 +02:00
Roland Illig
281ec8b875
* x11conn.c (x11_available): If the X11 shared library cannot be
...
found (maybe because there is neither an .la file nor a .so
symlink), try libX11.so.6 explicitly. Fixes Bug #24505 .
2008-12-19 11:36:48 +00:00
Roland Illig
bdf23438af
mcedit can be invoked with the common filename:lineno syntax.
2008-12-18 12:21:23 +00:00
Roland Illig
c1eb75a515
Fixed a crash because of an uninitialized variable.
2008-12-02 22:32:46 +00:00
Pavel Tsekov
b0f2d1654c
* edit/editlock.c (lock_build_name): Check the return value of getpwuid().
...
* src/cmd.c (save_setup_cmd): Remove redundant g_strconcat() call.
* src/hotlist.c (load_hotlist): Likewise.
* vfs/smbfs.c (smbfs_convert_path): Replaced NULL with (char *) NULL.
2007-11-02 14:02:23 +00:00
Pavel Tsekov
3efbdcb0f7
* src/myslang.h [HAS_ACS_AS_PCCHARS]: Remove all code ifdef-ed
...
HAS_ACS_AS_PCCHARS - it's unused.
* src/help.c [HAS_ACS_AS_PCCHARS]: Likewise.
* src/layout.c (init_curses) [HAS_ACS_AS_PCCHARS]: Remove redundant code.
2007-10-15 10:20:58 +00:00
Pavel Tsekov
7ad6feae42
* src/achown.c: Update copyright notice.
...
* src/chmod.c: Likewise.
* src/chown.c: Likewise.
* src/cmd.c: Likewise.
* src/color.c: Likewise.
* src/command.c: Likewise.
* src/cons.handler.c: Likewise.
* src/cons.saver.c: Likewise.
* src/dialog.c: Likewise.
* src/dir.c: Likewise.
* src/help.c: Likewise.
* src/info.c: Likewise.
* src/man2hlp.c: Likewise.
* src/menu.c: Likewise.
* src/mouse.c: Likewise.
* src/option.c: Likewise.
* src/profile.c: Likewise.
* src/screen.c: Likewise.
* src/setup.c: Likewise.
* src/subshell.c: Likewise.
* src/user.c: Likewise.
* src/win.c: Likewise.
* vfs/sfs.c: Likewise.
* vfs/tcputil.c: Likewise.
2007-09-26 10:22:25 +00:00
Pavel Tsekov
2f3df3af4e
* edit/bookmark.c: Update copyright notice.
...
* edit/edit.c: Likewise.
* edit/editcmd.c: Likewise.
* edit/editdraw.c: Likewise.
* edit/editkeys.c: Likewise.
* edit/editlock.c: Likewise.
* edit/editmenu.c: Likewise.
* edit/editoptions.c: Likewise.
* edit/editwidget.c: Likewise.
* edit/syntax.c: Likewise.
* src/background.c: Likewise.
* src/boxes.c: Likewise.
* src/complete.c: Likewise.
* src/execute.c: Likewise.
* src/ext.c: Likewise.
* src/file.c: Likewise.
* src/filegui.c: Likewise.
* src/fileopctx.c: Likewise.
* src/find.c: Likewise.
* src/hotlist.c: Likewise.
* src/key.c: Likewise.
* src/keyxdef.c: Likewise.
* src/layout.c: Likewise.
* src/learn.c: Likewise.
* src/listmode.c: Likewise.
* src/main.c: Likewise.
* src/panelize.c: Likewise.
* src/slint.c: Likewise.
* src/textconf.c: Likewise.
* src/tree.c: Likewise.
* src/treestore.c: Likewise.
* src/tty.c: Likewise.
* src/util.c: Likewise.
* src/utilunix.c: Likewise.
* src/view.c: Likewise.
* src/widget.c: Likewise.
* src/wtools.c: Likewise.
* src/x11conn.c: Likewise.
* vfs/cpio.c: Likewise.
* vfs/extfs.c: Likewise.
* vfs/fish.c: Likewise.
* vfs/ftpfs.c: Likewise.
* vfs/gc.c: Likewise.
* vfs/mcfs.c: Likewise.
* vfs/mcserv.c: Likewise.
* vfs/smbfs.c: Likewise.
* vfs/tar.c: Likewise.
2007-09-25 15:33:35 +00:00
Pavel Tsekov
f560dfaa77
* src/ChangeLog: Fix last commit.
2007-09-24 13:40:40 +00:00
Pavel Tsekov
9df32b5790
* src/widget.h: Define new mode for listbox insertion.
...
* src/widget.c (listbox_append_item): Implement LISTBOX_APPEND_SORTED
by insertsort.
* src/chown.c (init_chown): Use LISTBOX_APPEND_SORTED for user and
group list.
* src/achown.c (do_enter_key): Likewise.
2007-09-24 13:38:48 +00:00
Pavel Tsekov
23361694b6
* src/background.c: Use the correct form of FSF's name in the copyright
...
notice.
* src/boxes.c: Ditto.
* src/complete.c: Ditto.
* src/execute.c: Ditto.
* src/ext.c: Ditto.
* src/file.c: Ditto.
* src/filegui.c: Ditto.
* src/fileopctx.c: Ditto.
* src/fileopctx.h: Ditto.
* src/find.c: Ditto.
* src/hotlist.c: Ditto.
* src/key.c: Ditto.
* src/keyxdef.c: Ditto.
* src/layout.c: Ditto.
* src/learn.c: Ditto.
* src/listmode.c: Ditto.
* src/main.c: Ditto.
* src/panelize.c: Ditto.
* src/slint.c: Ditto.
* src/textconf.c: Ditto.
* src/tree.c: Ditto.
* src/treestore.c: Ditto.
* src/tty.c: Ditto.
* src/util.c: Ditto.
* src/utilunix.c: Ditto.
* src/view.c: Ditto.
* src/widget.c: Ditto.
* src/wtools.c: Ditto.
* src/x11conn.c: Ditto.
* vfs/cpio.c: Ditto.
* vfs/extfs.c: Ditto.
* vfs/fish.c: Ditto.
* vfs/ftpfs.c: Ditto.
* vfs/gc.c: Ditto.
* vfs/mcfs.c: Ditto.
* vfs/mcserv.c: Ditto.
* vfs/smbfs.c: Ditto.
* vfs/tar.c: Ditto.
* vfs/undelfs.c: Ditto.
* vfs/utilvfs.c: Ditto.
* vfs/vfs.c: Ditto.
* edit/bookmark.c: Ditto.
* edit/edit.c: Ditto.
* edit/edit.h: Ditto.
* edit/editcmd.c: Ditto.
* edit/editdraw.c: Ditto.
* edit/editkeys.c: Ditto.
* edit/editlock.c: Ditto.
* edit/editmenu.c: Ditto.
* edit/editoptions.c: Ditto.
* edit/editwidget.c: Ditto.
* edit/syntax.c: Ditto.
2007-09-24 09:28:32 +00:00
Pavel Tsekov
2362e00199
* src/cmd.c (menu_edit_cmd): Rename a button label from "Home"
...
to "User".
2007-09-19 14:34:33 +00:00
Pavel Tsekov
bdcbed43de
* src/widget.c (listbox_new): Remove redundant initialization of
...
WListbox fields.
2007-09-19 11:01:50 +00:00
Pavel Tsekov
2d297c4375
* src/util.c (file_date): Do not ignore the return value of localtime ().
...
Gentoo bug #184296 .
2007-09-17 19:42:31 +00:00
Pavel Tsekov
e1386414af
* src/find.c (find_parameters): Fix hotkey duplication.
2007-09-14 12:55:08 +00:00
Pavel Tsekov
adb84ceba8
* src/subshell.c (write_all): Do not use void pointer arithmetic.
2007-09-11 13:38:26 +00:00
Pavel Tsekov
20d32448f7
* src/mountlist.c: Fix a warning issued by gcc.
2007-09-11 08:37:51 +00:00
Pavel Tsekov
139e48183f
* src/color.h: Add a new color pair.
...
* src/color.c: Likewise.
* edit/editdraw.c (print_to_widget): Make tabs and trailing whitespace
characters visible.
(edit_draw_this_line): Likewise.
2007-08-27 12:06:02 +00:00
Pavel Tsekov
dd208753b6
* src/screen.c (show_dir): Surrond the current directory with spaces.
2007-08-24 12:22:29 +00:00
Pavel Tsekov
339a66dc2f
* src/screen.c (show_dir): Remove unneeded code.
2007-08-24 09:13:47 +00:00
Pavel Tsekov
e2424ae139
* src/filegui.c (rd_widgets) [_LARGE_FILES]: Use format string
...
capable of supporting 64 bit file sizes.
* vfs/fish.c (fish_linear_start) [_LARGE_FILES]: Use format string
capable of supporting 64 bit file sizes.
2007-08-23 13:16:39 +00:00
Pavel Tsekov
e6980eb09a
* src/mountlist.c (fstype_to_string): Define only when
...
`MOUNTED_GETMNTINFO' or `MOUNTED_VMOUNT' is defined.
2007-08-23 12:33:36 +00:00
Pavel Tsekov
6cb718c0a8
* src/cmd.c (dirsizes_cmd): Re-sort the panel when done.
2007-05-02 12:01:13 +00:00
Pavel Tsekov
eca5afad0f
* src/subshell.c (subshell_name_quote): Use the `printf' utility
...
instead of `echo' to quote the directory name.
2007-03-23 16:42:17 +00:00
Pavel Tsekov
64045fc8f0
* src/subshell.c (sigchld_handler) [__EMX__]: Remove unneeded code.
2007-03-08 17:53:56 +00:00
Pavel Tsekov
850542cebd
* src/subshell.c (subshell_pty_slave): New global variable.
...
(init_subshell): Do not close the pseudo-terminal slave -
store it in `subshell_pty_slave' for later use.
(init_subshell_child): Do not open the pseudo-terminal slave
in the child. It is inherited from the parent now.
Use `subshell_pty_slave' as the file descriptor of the
opened pseudo-terminal slave.
Rearrange the code a bit.
(synchronize): Discard all data from the pseudo-terminal
slave input queue.
2007-03-01 11:07:04 +00:00
Pavel Tsekov
888ab78a1e
* src/file.c (copy_file_file): chmod() the target file no matter whether
...
"preserve attributes" is checked or not, since the destination is
initially created with mode 0600.
2007-02-22 14:29:11 +00:00
Pavel Tsekov
8e04248ef9
* src/utilunix.c (mc_tmpdir): Do not accept relative path in TMPDIR. Use
...
a hardcoded value instead.
2007-02-22 11:49:01 +00:00
Pavel Roskin
d15f59038c
* mountlist.c: Fix misuse of HAVE_STRUCT_STATFS_F_FSTYPENAME.
2007-02-03 01:06:55 +00:00
Pavel Tsekov
56eba6ed17
* src/help.c: Document the newline following the node header.
...
Teach all code dealing with nodes that the actual node data
starts right after the first newline following the node
header. Thanks to Grigory Trenin <gtrenin@gmail.com> .
2007-01-20 11:40:45 +00:00
Pavel Tsekov
b4046cd029
* src/dir.c (sort_time): Default to sort_name() if the
...
arguments are equal.
(sort_ctime): Likewise.
(sort_atime): Likewise.
(sort_size): Likewise.
2007-01-13 22:48:07 +00:00
Pavel Tsekov
bc146822b0
* src/dir.h (sort_type): Remove function declaration.
...
(sort_links): Likewise.
(sort_nuid): Likewise.
(sort_ngid): Likewise.
(sort_owner): Likewise.
(sort_group): Likewise.
* src/dir.c (sort_type): Remove function definition.
(sort_links): Likewise.
(sort_nuid): Likewise.
(sort_ngid): Likewise.
(sort_owner): Likewise.
(sort_group): Likewise.
(sort_orders): Reflect the changes above.
* src/screen.c (formats): Remove references to sort_type(), sort_links(),
sort_nuid(), sort_ngid(), sort_owner() and sort_group().
2007-01-13 22:38:48 +00:00
Pavel Tsekov
cfdc950171
* src/utilunix.c (mc_tmpdir): Call mc_mkstemps() with an absolute
...
path to prevent stack overflows due to circular dependecy.
2007-01-02 15:55:01 +00:00
Pavel Tsekov
8113a37d37
* src/help.c (startpoint): Remove global variable and all references
...
to it.
(select_prev_link): Remove the first argument.
Keep searching until a link is found or end of node delimiter is
reached.
(help_handle_key): Reflect the changes above.
Remove an unneeded check.
2006-12-30 23:03:48 +00:00
Pavel Tsekov
370c1d2cb2
* src/view.c (view_file_load_data): Do not to attempt to seek
...
beyond the end of file. Patch by Andrzej Zaborowski.
(view_moveto_addr_cmd): Display a warning message if the
user specified an invalid offset.
2006-12-30 13:16:54 +00:00
Pavel Tsekov
493a107f8b
* src/fsusage.c: Remove references to HAVE_INFOMOUNT.
2006-12-21 18:47:06 +00:00
Pavel Tsekov
9ab2dde60c
* src/fsusage.h: Update from gnulib.
...
* src/fsusage.c: Likewise.
2006-12-21 14:09:30 +00:00
Pavel Tsekov
393d1f5b43
* src/fsusage.h: Resurrect.
...
* src/fsusage.h: Likewise.
2006-12-21 11:55:00 +00:00
Pavel Tsekov
498c6c0cf1
* src/view.c (regexp_search): Keep the search string in a global
...
variable so that it can be reused when viewing another file.
Do not use the same variable to hold the search string for
both the "Search" and "Regexp Search" functions.
(view_normal_search_cmd): Likewise.
2006-12-10 21:36:46 +00:00
Leonard den Ottolander
0ac1df7d4f
* src/subshell.c (subshell_name_quote): Bash < 2.05b (3-digit octals in
...
echo_e_cmd) no longer supported.
* NEWS: Comment reflecting above change.
2006-11-27 21:33:45 +00:00
Leonard den Ottolander
4c9ca90e8a
* key.c (get_event): Eliminate timeouts on window resize event.
...
* layout.c (change_screen_size): Set winch_flag to 0 on entrance not exit of
function.
2006-11-08 13:37:24 +00:00
Pavel Tsekov
43b82f1201
* src/layout.c (layout_do_change): Remove global variable.
...
(layout_cmd): Reflect the changes above.
(layout_change): Ditto.
2006-09-25 08:34:48 +00:00
Pavel Tsekov
5d4d2db3f3
* src/main.c (xtoolkit_panel_setup): Remove - it is a noop.
...
(setup_panels_and_run_mc): Eliminate references to
`xtoolkit_panel_setup'.
2006-09-22 15:14:58 +00:00
Pavel Tsekov
5978bcc196
* src/key.c (get_key_code): Do not blindly strip the eight bit of the
...
key code when the 'use_8th_bit_as_meta' flag is set. Only key codes
in the range 128 - 255 should be stripped, the rest must be left
intact.
2006-09-18 21:06:58 +00:00
Pavel Tsekov
3f81ef4f96
* src/wtools.c (fg_input_dialog_help) [ENABLE_NLS]: Translate the
...
"Ok" and "Cancel" buttons here.
Mark the QuickDialog as translated so that quick_dialog() won't
try translate it again.
2006-09-14 09:12:49 +00:00
Pavel Tsekov
d407b130f4
* m4/ls-mntd-fs.m4: Update to serial#22, which adds support
...
for getmntinfo() returning its result in struct statvfs.
* m4/fstypename.m4: Update to serial#6, which replaces
HAVE_F_FSTYPENAME_IN_STATFS with HAVE_STRUCT_STATFS_F_FSTYPENAME.
* src/mountlist.c: Sync with gnulib.
All uses of HAVE_F_FSTYPENAME replaced by HAVE_STRUCT_STATFS_F_FSTYPENAME.
[MOUNTED_GETMNTINFO2] Include sys/statvfs.h.
(read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
2006-09-07 15:12:47 +00:00
Pavel Tsekov
f588181dc6
* acinclude.m4 (AC_GET_FS_INFO): Revert a failed attempt to properly detect
...
getmntinfo() returning its result in struct statvfs.
* src/mountlist.c: Revert a failed attempt to properly detect and use
getmntinfo() returning its result in struct statvfs.
2006-09-07 14:20:57 +00:00
Leonard den Ottolander
7fb17b353c
* key.c (check_selects): Get rid of the now redundant else.
2006-08-12 18:22:44 +00:00
Leonard den Ottolander
01d80ec3c7
* key.c (check_selects): Initialize retry to FALSE every time we enter
...
the do/while loop (bug introduced when incorrectly rewriting the
backward goto used by the original submitter).
2006-08-12 10:06:22 +00:00
Leonard den Ottolander
fc061342f4
* key.c (check_selects): Fix possible crash on reference to select list
...
element removed in callback.
2006-08-11 22:57:09 +00:00
Leonard den Ottolander
b7db76f81f
* key.c: Make escape key timeout user configurable via the
...
environment variable KEYBOARD_KEY_TIMEOUT_US (in microseconds).
2006-08-09 21:19:18 +00:00
Andrew V. Samoilov
1868ddd520
* hotlist.c (update_path_name): Fix gcc4 warning.
2006-08-08 12:17:14 +00:00
Pavel Tsekov
bd24e2ea78
* src/hotlist.c (remove_from_hotlist): Fix erronous check of the return
...
value of query_dialog().
2006-08-06 11:43:34 +00:00
Roland Illig
ca988dd28e
Added correct handling of Mac line endings.
2006-08-03 05:51:23 +00:00
Pavel Tsekov
56067d3258
* src/vfsdummy.h [!USE_VFS] (mc_getlocalcopy): Implement.
2006-07-26 09:55:55 +00:00
Pavel Tsekov
7785aa544e
* src/mountlist.c (fstype_to_string): Update the code to match its
...
coreutils counterpart.
Guard the use of MOUNT_UFS and MOUNT_NFS with appropriate
ifdefs as the rest of the code does.
2006-06-17 18:27:40 +00:00
Pavel Tsekov
9e1dd4594d
* m4/fstypename.m4: New file.
...
* acinclude.m4 (AC_GET_FS_INFO): Add a check to determine whether
getmntinfo() takes struct statvfs instead of struct statfs as its
first argument. Define MOUNTED_GETMNTINFO_STATVFS if it does.
Add a check to determine whether struct statvfs has a field named
f_fstypename.
Use gl_FSTYPENAME tp determine whether struct statfs has a field
named f_fstypename.
* src/mountlist.c (HAVE_F_FSTYPENAME): Define when getmntinfo() is
used and the struct which it fills has a field named f_fstypename.
(read_filesystem_list) [MOUNTED_GETMNTINFO]: Use
MOUNTED_GETMNTINFO_STATVFS to determine the type of the first
argument to getmntinfo().
2006-06-17 15:39:07 +00:00
Leonard den Ottolander
7115ed2243
* src/dir.c (sort_orders): Substitute duplicate hotkey 'C' in sort
...
order dialog.
* po/*.po: Update changed string in sort order dialog.
2006-06-11 10:50:00 +00:00
Pavel Tsekov
5f21c0fa37
* src/mountlist.c: Revert last commit.
2006-06-07 12:11:38 +00:00
Pavel Tsekov
48f8e1dd69
* src/widget.c (disable_update): Remove redundant static variable.
...
(handle_char): Reflect the changes above.
2006-05-29 11:58:42 +00:00
Pavel Tsekov
5297c50278
* src/file.c (move_file_file): Do not collect progress information
...
when moving via copy/erase - copy_file_file() does that already.
Collect progress information when moving via rename ().
2006-05-23 09:35:06 +00:00
Pavel Tsekov
b535c4b08b
* src/tty.c (tty_tgetstr) [HAVE_SLANG]: str_unconst() the argument
...
passed to SLtt_tgetstr().
2006-05-23 07:38:59 +00:00
Pavel Tsekov
d2f0a2a5a7
* src/file.c (move_dir_dir): Remove Win32 specific code.
2006-05-23 07:22:36 +00:00
Roland Illig
d647096f53
Fixed detection of the filesystem information on NetBSD 3.0.
2006-05-21 10:06:39 +00:00
Pavel Tsekov
fe251e620a
* src/tty.h [USE_NCURSES]: Pull in term.h if WANT_TERM_H is defined.
...
(tty_tgetstr): Declare new function.
* src/tty.c [USE_NCURSES]: Request the inclusion of term.h.
(tty_tgetstr): Define new function
* src/main.c (init_xterm_support): Use tty_tgetstr().
2006-05-15 13:26:18 +00:00
Pavel Tsekov
d1b8ea7e7a
* src/user.c: Do not include subshell.h .
2006-05-10 12:14:28 +00:00
Pavel Tsekov
19b2b16ca5
* src/subshell.c (resize_subshell): Do not try to resize the subshell tty
...
if the subshell is not running.
2006-05-08 14:38:36 +00:00
Leonard den Ottolander
85e87b2cdf
* cons.handler.c (handle_console_linux): Remove redundant close() calls
...
before _exit().
2006-04-13 16:00:23 +00:00
Pavel Tsekov
d4c2af2154
* src/file.c (copy_file_file): When a hardlink is created successfully
...
report success (FILE_CONT) to the caller. Fixes debian bug #301537 .
2006-03-29 11:38:25 +00:00
Pavel Tsekov
dc50393a8f
* src/mouse.h (Mouse_Type): Add new enumerated values to describe
...
the xterm mouse reporting modes offered by various xterm-like
terminals.
* src/mouse.c: Adjust the code to reflect the changes above.
Send the proper terminal control codes when xterm normal mouse
tracking is requested.
* src/main.c (init_xterm_support): Try to fine-tune the mouse tracking
mode based on the terminal type.
2006-03-06 09:28:14 +00:00
Pavel Tsekov
049352e884
* src/widget.h (struct WRadio): Remove unused field
...
`upper_letter_is_hotkey'.
(radio_new): Remove the last argument from the function
declaration - it is unused.
* src/widget.c (radio_new): Remove the last argument from the
function declaration - it is unused.
* src/boxes.c: Adjust all callers to reflect the changes above.
* src/layout.c: Likewise.
* src/listmode.c: Likewise.
* src/option.c: Likewise.
* src/wtools.c: Likewise.
2006-02-28 16:15:21 +00:00
Pavel Tsekov
5d8f17a9c2
* src/boxes.c (configure_vfs) [!USE_NETCODE]: Fix off-by-one error.
2006-02-28 12:12:53 +00:00
Pavel Tsekov
389df305eb
* src/subshell.c (synchronize): Do not discard user input if the panels are
...
off.
2006-02-24 19:43:48 +00:00
Pavel Tsekov
264697b010
* vfs/fish.h: New file.
...
* vfs/fish.c (fish_directory_timeout): Define new global variable.
(FISH_DIRECTORY_TIMEOUT): Eliminate - this macro is not used
anywhere.
(fish_dir_load): Use `fish_directory_timeout' to calculate the
expiration time of a newly created directory entries.
* src/setup.c [USE_NETCODE]: Include fish.h .
(int_options) [USE_NETCODE]: Add support for user configurable
expiration timeout of FISH directory cache entries.
* doc/mc.1.in: Document `fish_directory_timeout'.
2006-02-23 15:32:18 +00:00
Pavel Tsekov
979282dc40
* src/cons.saver.c [HAVE_CONFIG_H]: Include config.h .
2006-02-21 14:02:11 +00:00
David Martin
68e68c79fc
Fix l18n macro N_() to _().
2006-02-14 09:15:16 +00:00
Pavel Tsekov
ac27ef7c32
* src/wtools.c (quick_dialog_skip): Do not set lines' and
cols' members
...
of the newly created dialog explicitly - create_dlg() does this.
2006-02-09 14:08:38 +00:00
Pavel Tsekov
84ba7897bb
* src/screen.c (panel_callback): Reset the `dirty' flag after the panel has
...
been repainted on focus.
2006-02-08 10:10:37 +00:00
Pavel Tsekov
3652302618
* src/widget.c (buttonbar_set_label): Fix `comparison of distinct pointer types
...
lacks a cast' gcc warning.
2006-02-06 15:42:30 +00:00
Pavel Tsekov
d39462622b
* hotlist.c (hotlist_has_dot_dot): Define new global variable.
...
(add_dotdot_to_list): Define new function.
(HotListType): Add HL_TYPE_DOTDOT.
(update_path_name): Handle HL_TYPE_DOTDOT entries the same way as
HL_TYPE_ENTRY entries.
(fill_listbox): Likewise.
(hotlist_button_callback): Go up one level when enter is pressed on
an entry of type HL_TYPE_DOTDOT.
(add2hotlist): Always attach a HL_TYPE_DOTDOT to each new HL_TYPE_GROUP
entry.
Make sure that the HL_TYPE_DOTDOT entry is the first one in the list.
(remove_from_hotlist): Do not remove HL_TYPE_DOTDOT entries.
(hot_save_group): Do nothing for HL_TYPE_DOTDOT entries.
2006-02-05 19:30:53 +00:00
Pavel Tsekov
ca2078a6ad
* src/key.c (xterm_key_defines): Add sequences for iTerm.
2006-02-05 15:27:49 +00:00
Roland Illig
c29b321563
* edit.h: Removed the leading PATH_SEP_STR from EDIT_DIR, as the
...
latter is not an absolute directory.
* edit.c: Adjusted the users of EDIT_DIR.
* editcmd.c: Likewise.
* syntax.c: Likewise.
* src/user.c: Likewise.
2006-02-04 14:41:41 +00:00
Roland Illig
249e1c43e7
* main.c (init_xterm_support): Eterm can handle mouse events, too.
2006-02-04 12:29:30 +00:00
Roland Illig
0983e2d256
Fixed a typo.
2006-02-04 11:14:04 +00:00
Roland Illig
eddbf0e2e1
* Makefile.am: ecs-test needs $(MCLIBS).
2006-02-04 11:13:30 +00:00
Roland Illig
350c958f5e
* cmd.c (mkdir_cmd): Fixed a memory leak. Instead of the
...
absolute path of the created directory, the input is passed to
update_panels().
2006-02-04 11:12:28 +00:00
Roland Illig
f84cc04e70
* find.c: Added make_fullname() to avoid code duplication.
2006-02-04 11:03:35 +00:00
Roland Illig
0780979cbc
Replaced the character comparison with string comparison, which
...
emphasizes the intention of the code. If the directory is either "." or
"./", the plain filename is chosen.
2006-02-04 00:00:47 +00:00
Roland Illig
2d6b472fb0
* find.c (find_do_view_edit): Only strip the leading "./" from a
...
directory name if the rest is not empty.
2006-02-03 23:17:45 +00:00
Roland Illig
3b1d56cb8a
Replaced the printf format with __printf__.
2006-02-03 17:07:39 +00:00
Roland Illig
f7f06c0202
* util.h (str_unconst): This function is never needed to be
...
inlined.
2006-02-03 17:04:17 +00:00
Roland Illig
9b8eb2ad78
* find.c: After the "panelize" command, always select the first
...
file from the panel, not.
2006-02-03 16:59:52 +00:00
Roland Illig
ba9bd33681
* view.c: s/attrset/tty_setcolor/g
2006-02-03 14:42:36 +00:00
Roland Illig
bb683b54d1
* view.c: s/attrset/tty_setcolor/g
2006-02-03 14:33:19 +00:00
Roland Illig
36e8fec66c
* widget.c: Added assertions to prevent bugs like the one from
...
view.c(view_labels) from hiding that long.
2006-02-03 14:28:54 +00:00
Pavel Tsekov
90bda57809
* src/view.c (view_labels): Use `buttonbar_clear_label' to make a
...
buttonbar button inactive.
2006-02-03 12:16:38 +00:00
Roland Illig
67f8cf661a
* tty.h (tty_setcolor): Added.
...
* tty.c (tty_setcolor): Likewise.
2006-02-03 03:55:37 +00:00
Pavel Tsekov
5c1638523e
* src/dir.c: (do_sort): Remove unused variable.
2006-02-02 22:10:58 +00:00
Pavel Tsekov
f4e0124cd2
* src/view.c (view_display_hex): Add missing bracket.
2006-02-01 15:59:21 +00:00
Roland Illig
250fd1ab8e
* view.c (view_display_hex): Prevented any screen overflow in
...
hex display mode. The number of bytes per line in hex mode is
always a multiple of four -- this makes the computation easier.
2006-01-31 14:39:30 +00:00
Roland Illig
008a1e3b7d
Shortened the code for selecting the ``boldflag'' in hex display mode.
2006-01-31 13:45:27 +00:00
Pavel Roskin
9b774d1b7d
* Makefile.am: Rename LIBDIR to SAVERDIR to avoid confusion.
...
Change its value to match the installation path of cons.saver.
* cons.handler.c: Adjust for the above.
2006-01-30 20:08:28 +00:00
Pavel Tsekov
b0ced33741
* edit/editcmd.c: Do not set the field histname' of
QuickWidget' unless
...
the widget is of type `quick_input'.
* src/boxes.c: Likewise.
* src/filegui.c: Likewise.
* src/hotlist.c: Likewise.
2006-01-30 09:22:33 +00:00
Roland Illig
3f581584d5
* view.c (view_display_hex): Bug fix: The list iterator from the
...
bytes that have been changed in the hex editor must be advanced
even if the cursor is currently on a changed byte.
2006-01-30 03:50:51 +00:00
Pavel Tsekov
04000dcf84
* doc/mc.1.in: Update the documentation to reflect the fact that
...
confirmation may be requested when deleting directory hotlist entries
based on a user configurable setting.
* src/file.h (safe_delete): Move declaration of `safe_delete'
* src/main.h: ... here.
(confirm_directory_hotlist_delete): Declare new global variable.
* src/file.c (safe_delete): Move definition of `safe_delete'
* src/main.c: ... here.
(confirm_directory_hotlist_delete): Define new global variable.
* src/hotlist.c (remove_from_hotlist): Based on a user configurable
setting, request confirmation when removing directory hotlist
entries. The confirmation dialog honours the `Safe delete'
setting.
Reorder the buttons in the hotlist group removal confirmation
dialog so that it becomes consistent with other confirmation
boxes.
* src/setup.c (int_options): Add support for user configurable
confirmation of directory hotlist entries removal.
* src/boxes.c (conf_widgets): Likewise.
(confirm_box): Likewise.
(my_directory_hotlist_delete): New module variable.
2006-01-29 20:26:05 +00:00
Pavel Tsekov
d05ad82ea6
* dir.c (do_sort): Do not try to reorder the entries so that ".." becomes
...
the first entry.
(do_load_dir): When filling the list of directory entriesmake sure that
".." occupies the first element.
(do_reload_dir): Likewise.
2006-01-29 11:23:36 +00:00
Pavel Tsekov
b3fa1f0a3e
* src/cmd.c: When invoking external viewer, probe VIEWER environment
...
variable first, then PAGER, then fall back to "view".
* lib/mc.hint: Mention VIEWER environment variable.
* doc/mc.1.in: Document support for VIEWER environment variable.
2006-01-29 10:41:47 +00:00
Roland Illig
28f0a4ab24
Patch provided in #10557 . Fixes #10557 .
2006-01-28 09:27:11 +00:00
Roland Illig
cbf2c616ff
* cmd.c (toggle_listing_cmd): Included the brief listing mode in
...
the list of listing modes that can be switched through using
Alt-t.
2006-01-28 09:21:55 +00:00
Roland Illig
8f683b9789
Oops, we're already in the year 2006.
2006-01-28 00:24:57 +00:00
Roland Illig
282371e33b
Rewrote the code so that it does what I intended it to do.
2006-01-28 00:23:55 +00:00
Roland Illig
e3fb94363e
* Makefile.am, logging.h, logging.c: Added a new logging module
...
to allow easy tracing of function calls and other events. It is
only intended for debugging.
2006-01-27 23:48:49 +00:00
Roland Illig
015ebfc2fe
* Makefile.am: cons.saver is installed in $(pkglibexecdir), not
...
in $(pkglibdir), to conform to the usual directory hierarchy
standards. Fixes #2796 .
2006-01-27 21:53:50 +00:00
Pavel Tsekov
78535f6b60
* file.c (copy_file_file): In 'Reget' mode take into account
...
the partially retrieved data when drawing the progress bar.
From Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
2006-01-24 14:07:07 +00:00
Andrew V. Samoilov
ee404fbebe
* subshell.c: restart write() calls interrupted by sigchld which lead
...
to some bytes being swallowed from the subshell's output.
2006-01-23 18:55:36 +00:00
Roland Illig
adc2d181c7
* view.c: Replaced calls to printw() with tty_printf() to get
...
rid of the str_unconst() function.
2006-01-07 18:17:27 +00:00
Roland Illig
58337baa8d
White-space and indentation fixes. Rewrote the expressions for the
...
*_PRESSED constants to emphasize they are in fact bit masks.
2006-01-07 12:49:08 +00:00
Roland Illig
63a504ffed
It was not Redhat who changed the SLang API of SLsmg_write_char, but
...
actually Debian. Redhat only copied that code.
2006-01-07 12:17:07 +00:00
Pavel Roskin
dd8b442df5
* global.h [!ENABLE_NLS]: Provide replacement for ngettext.
...
* screen.c (display_mini_info): Cast panel->total to unsigned
long before passing it to ngettext() to avoid warnings.
2005-11-11 03:32:39 +00:00
Pavel Roskin
7b3b03f9db
* glibcompat.c: Move Q_ back ...
...
* util.c: ... here. Q_ is not defined by just including glib.h.
The glib implementation doesn't strip prefix from translations,
so it's not suitable for us. Finally, it makes man2hlp depend
on libintl.
Reported by Leonard den Ottolander <leonard@den.ottolander.nl>
2005-11-03 02:18:38 +00:00
Leonard den Ottolander
894b343f90
* main.c (directory_history_add): Fix invalid directory preselection on cd.
2005-11-02 11:50:51 +00:00
Pavel Roskin
da6ee30252
* man2hlp.c (main): Fix using 0 instead of NULL.
2005-10-08 04:55:06 +00:00
Pavel Roskin
528e392458
* widget.c (listbox_fwd): Eliminate forward inline declaration.
2005-10-08 04:52:42 +00:00
Leonard den Ottolander
79567ed4a1
view.c (search): Fix backward regex search off by one.
2005-10-04 21:07:20 +00:00
Pavel Roskin
01f571f1d2
* util.c (gettext_ui): Rename to Q_() for glib compatibility,
...
move ...
* glibcompat.c: ... here. Adjust all callers.
2005-10-04 15:20:10 +00:00
Pavel Roskin
0f46bb2632
* screen.c (display_mini_info): Use ngettext().
2005-10-03 23:37:51 +00:00
Leonard den Ottolander
9ac5ed8d4e
* key.c (xmouse_get_event): Catch GPM_DRAG event.
...
* mouse.c (enable_mouse, disable_mouse): Update printed escape sequence.
2005-09-28 17:21:53 +00:00
Leonard den Ottolander
a621fb9b67
* execute.c (do_execute): Flush stdout after printing the command to be
...
executed.
2005-09-17 12:08:19 +00:00
Leonard den Ottolander
13d8512c37
* util.c: Indentation cleanup (function result types on different lines
...
then function names).
2005-09-17 12:01:04 +00:00
Leonard den Ottolander
2319ac0f7b
* file.c (make_symlink): Fix off by one in symlink creation.
2005-09-17 11:45:13 +00:00
Leonard den Ottolander
b2952be541
* util.c (diff_two_paths): Abort when second symlink can't be resolved
...
(fixes segfault).
2005-09-17 11:40:31 +00:00
Roland Illig
06f4ef50e6
option_backup_ext is only available when the internal editor is enabled.
2005-09-07 10:08:25 +00:00
Roland Illig
cd8cf54cbb
* setup.c: Replaced the editor_option_backup_ext_int hack with a
...
string configuration variable, which allows the backup extension
to have more than just four characters. Added generic support
for string options.
2005-09-07 08:55:31 +00:00
Roland Illig
4df8fde197
* util.h: Added get_config_string() and set_config_string(),
...
which are analogous to get_int() and set_int().
* util.c: Likewise.
2005-09-07 08:47:22 +00:00
Roland Illig
fa0d732112
* setup.c: Renamed options[] to int_options[].
2005-09-07 07:55:15 +00:00
Roland Illig
689ee9f8ae
* main.c (midnight_callback): Ctrl-space calculates the size of
...
the currently selected directory entry. This is mostly useful for
directories.
2005-09-06 11:38:45 +00:00
Roland Illig
0e218318da
* cmd.c: Added single_dirsize_cmd(), which computes the size of
...
the currently selected panel entry and moves down. Suggested by
ForestCreature on mc-devel.
* cmd.h: Likewise.
* main.c (midnight_callback): When the space key is pressed and
the command line is empty, single_dirsize_cmd() is called.
2005-09-06 06:41:35 +00:00
Roland Illig
2d64b1c884
Replaced const_cast with str_unconst. Removed unused mvaddstr.
2005-09-05 03:22:04 +00:00
Roland Illig
4486c5eec2
Replaced const_cast with str_unconst.
2005-09-05 03:20:53 +00:00
Roland Illig
500136d789
Removed unnecessary const_cast.
2005-09-05 03:20:27 +00:00
Roland Illig
16bb1e8eaa
* tty.c: Don't use SLsmg_write_char, because Redhat provides a
...
different API to that function when the preprocessor symbol UTF8
is defined.
2005-09-05 03:05:39 +00:00
Roland Illig
ad9acbde44
Moved printwstr() from src/slint.c to edit/editdraw.c.
2005-09-05 02:14:29 +00:00
Roland Illig
03759c8f34
* main.h: Added const qualifier to the global prompt variable.
...
* main.c: Likewise.
2005-09-05 02:10:48 +00:00
Roland Illig
1a0fad0d01
* main.h: Added const qualifier to the global prompt variable.
...
* main.c: Likewise.
2005-09-05 02:10:47 +00:00
Roland Illig
fed479813e
Added const qualifier.
2005-09-05 02:04:23 +00:00
Roland Illig
14e619d39e
Switched from printw() to tty_printf() to avoid gcc
...
warnings. st_ctime is not the creation time, but the status
change time.
2005-09-05 01:36:58 +00:00
Roland Illig
1c1f2f5210
Switched from printw() to tty_printf() to avoid gcc
...
warnings. st_ctime is not the creation time, but the status
change time.
2005-09-05 01:36:57 +00:00
Roland Illig
bb2feb9e7f
* info.c: Switched from printw() to tty_printf() to avoid gcc
...
warnings. st_ctime is not the creation time, but the status
change time.
2005-09-05 01:34:25 +00:00
Roland Illig
1efcbd27a7
* widget.c: Reduced the number of gcc warnings by using
...
tty_printf() instead of printw().
2005-09-04 22:04:32 +00:00
Roland Illig
612f1555eb
* tty.h: Added tty_printf().
...
* tty.c: Likewise.
2005-09-04 22:02:25 +00:00
Roland Illig
6bbcb8ef76
Added a comment to ecs_strbox concerning characters with other width
...
than 1.
2005-09-04 16:34:36 +00:00
Roland Illig
e7917badfa
* main.h: Removed unused variables acs_hline and acs_vline.
2005-09-04 16:32:09 +00:00
Roland Illig
26ffecfc09
* treestore.c (str_common): Don't require the arguments to be
...
different.
2005-09-01 20:56:10 +00:00
Roland Illig
49448bfa43
* view.c (view_fix_cursor_position): Renamed to
...
view_scroll_to_cursor.
2005-09-01 20:49:17 +00:00
Roland Illig
9fe9ad92a1
Reformatted the comments.
2005-09-01 17:06:38 +00:00
Roland Illig
7b95eee94a
Added a comment that the user is responsible for not overflowing the
...
screen.
2005-09-01 17:04:05 +00:00
Roland Illig
f901a3549c
Added line breaks before the function names.
2005-09-01 17:01:12 +00:00
Roland Illig
c3ba638d43
* myslang.h: Partly switched to the new tty functions.
2005-08-29 10:02:35 +00:00
Roland Illig
f85a7d8275
Removed unused variable.
2005-08-29 09:40:58 +00:00
Roland Illig
af781d96f8
Added tty.c.
2005-08-29 09:36:32 +00:00
Roland Illig
ab3005ff93
Added a type conversion to view_growbuf_read_until to suppress a gcc
...
warning. Instead of treating various expressions as booleans, compare
them with a 0 of appropriate type.
2005-08-29 09:34:43 +00:00
Roland Illig
0c4c461433
The got_interrupt function from tty.c is defined for ncurses, too.
2005-08-29 09:30:45 +00:00
Roland Illig
132ee7a361
Fixed indentation.
2005-08-29 09:05:24 +00:00
Roland Illig
e223667dc3
Removed trailing white-space.
2005-08-29 09:04:39 +00:00
Roland Illig
a1bf93f138
Changed the prototypes of tty_print_hline and tty_print_vline.
2005-08-29 09:03:10 +00:00
Roland Illig
2a0f1a1cd0
* view.c: Converted to use the new tty functions.
2005-08-29 08:53:28 +00:00
Roland Illig
66332a4fb1
* slint.c: The handling of user interrupts has been moved to ...
...
* tty.c: ... this newly created file, which contains a simple,
not yet complete interface to the terminal library. It should be
used instead of depending directly on ncurses or SLang features.
* tty.h: Added the new function prototypes from tty.c and some
legacy definitions.
2005-08-29 08:45:28 +00:00
Roland Illig
f1452c9580
* view.c (view_new): Separated the mode toggling functions from
...
updating the display. The non-updating functions are called on
initialization.
2005-08-28 20:38:53 +00:00
Roland Illig
1d7b05f8f2
* view.c (view_hexedit_save_changes): Added an assertion that
...
view->filename be not NULL.
* view.c (view_toggle_magic_mode): Check if filename != NULL
before dereferencing the pointer.
* view.c (view_change_nroff_mode_cmd): Renamed to
view_toggle_nroff_mode_cmd.
* view.c (view_new): Don't initialize the various view->mode
variables by now. This needs to be done correctly.
2005-08-28 19:10:00 +00:00
Leonard den Ottolander
1d1af1d099
view.c (view_normal_search_cmd): Initialize exp to avoid freeing of
...
uninitialized pointer on cancel.
2005-08-27 11:35:03 +00:00
Leonard den Ottolander
81d7ee4f51
* key.c (xmouse_get_event): Disable double-click tracking for mouse wheel
...
events.
2005-08-25 20:36:40 +00:00
Roland Illig
55da46b128
* view.c (view_moveto_top): Simplified the code.
2005-08-22 19:19:51 +00:00
Roland Illig
de058c5488
* view.c (view_display_status): In normal display mode (that is:
...
not search progress), calculate the percentage based on dpy_end
instead of dpy_start. This avoids a sudden break to 100 % when
approaching the end of file.
2005-08-22 18:36:51 +00:00
Roland Illig
21640f491d
* view.c (struct WView): Renamed dpy_topleft to dpy_start, as it
...
does not always represent the top-left corner of the screen.
Replaced dpy_complete with dpy_end, the offset of the first byte
after the displayed region.
2005-08-22 18:31:51 +00:00
Roland Illig
c0f14a906d
* view.c: The search string is managed by the WView, not as
...
static variable in some functions.
2005-08-21 12:33:21 +00:00
Roland Illig
7abfd54b97
* view.c (free_change_list): Renamed to
...
view_hexedit_free_change_list.
2005-08-21 12:04:20 +00:00
Roland Illig
135ce37fef
* view.c (view_done): Reordered the statements in the
...
destructor and added paragraph comments.
2005-08-21 11:57:45 +00:00
Roland Illig
2081f5f9fa
* fileloc.h: Newly added this file, which provides a place where
...
all names of user specific configuration files are listed.
2005-08-21 04:00:43 +00:00
Roland Illig
03bdc998ca
* view.h: Rewrote it. All functions are preceded by a describing
...
comment and the "extern" keyword.
2005-08-21 03:32:17 +00:00
Roland Illig
0d4be87ff8
* view.c: Added section headers. The functions are still
...
somewhat unordered. Renamed some functions to fit into the
view_*_cmd naming convention.
2005-08-19 19:32:02 +00:00
Roland Illig
6baf73cfd9
Removed the rant from my commit message to make Pavel Tsekov happy.
2005-08-19 13:42:59 +00:00
Roland Illig
99f3df1591
* screen.c (string_file_name): Increased the buffer size to
...
MC_MAXPATHLEN + 1 bytes to avoid filename truncation.
2005-08-18 04:40:45 +00:00
Roland Illig
541c12241f
* view.c (struct WView): Renamed found_len to search_length.
2005-08-18 04:11:52 +00:00
Roland Illig
0601d83324
* view.c (view_display_text): Removed the (almost) unused
...
variable boldflag.
2005-08-18 03:50:29 +00:00
Roland Illig
b7cba56d21
* view.c (view_display_hex): Completely rewritten. Now the code
...
distinguishes several phases (state selection, color selection,
printing) and does not mix them wildly, as the previous code
did.
2005-08-18 03:33:33 +00:00
Roland Illig
ba8ba542f0
* view.c (view_move_up): Don't scroll up if it is not necessary.
...
This fixes an inconsistency noted by Andrej Zebrowski on
mc-devel.
* view.c (view_move_down): Do nothing if we're already at the
end of the file. This makes the cursor movement more consistent
with the behavior of the <End> key.
* view.c (regexp_search_cmd): Moved the code to save the changes
of the hex editor out of this function. Whoever wrote that
should be blamed for it, but the code has been there since the
beginning.
2005-08-18 02:26:39 +00:00
Roland Illig
01432587b8
Changed the return type of view_toggle_ruler() to void.
2005-08-16 09:04:29 +00:00
Roland Illig
ad29def0c4
* view.c (view_init_growbuf): Mark the first page full instead
...
of empty. This saves one condition in view_growbuf_read_until().
2005-08-16 08:59:14 +00:00
Roland Illig
03d2e06c41
Layout change for better readability.
2005-08-16 08:51:55 +00:00
Roland Illig
0deeec756e
Added some white-space for better readability. The coordinates of the
...
status line are computed like the other ones (was implicit before).
2005-08-16 08:47:15 +00:00
Roland Illig
9758c34a82
Added some white-space for better readability.
2005-08-16 08:37:05 +00:00
Roland Illig
c2564e99f6
* view.c (view_place_cursor): Made the call to widget_move()
...
look like the other calls.
2005-08-16 08:22:07 +00:00
Roland Illig
7b35eaa34d
* view.c (view_percent): Fixed coordinate computation.
2005-08-16 08:16:12 +00:00
Roland Illig
d76dc9218b
Fixed a typo in a comment.
2005-08-16 08:00:15 +00:00
Roland Illig
ae3c8a324d
Don't mix enums with ints.
2005-08-15 22:59:20 +00:00
Roland Illig
08a40c8d17
* screen.c (use_display_format): Removed unused variable.
2005-08-15 22:40:58 +00:00
Roland Illig
5c7a219b36
Don't mix enums with ints.
2005-08-15 22:36:53 +00:00
Roland Illig
4e3e810973
* complete.c: Don't mix enums with ints.
2005-08-15 22:33:20 +00:00
Roland Illig
a94e34c698
* complete.c (fetch_hosts): Removed unused variable.
2005-08-15 22:30:36 +00:00
Roland Illig
b973c398dc
* view.c (view_toggle_ruler): Don't mix enums with ints.
2005-08-15 21:59:08 +00:00
Roland Illig
d36a6c6cdb
Replaced 0 with LISTBOX_APPEND_AT_END.
2005-08-15 21:46:34 +00:00
Roland Illig
66d059bcdf
Replaced 0 with LISTBOX_APPEND_AT_END.
2005-08-15 21:46:34 +00:00
Roland Illig
7152139ad6
* wtools.h: Replaced 0 with LISTBOX_APPEND_AT_END.
2005-08-15 21:44:41 +00:00
Roland Illig
32f6020a0f
* dialog.h (struct Dlg_head): Changed the bit fields of length one
...
from signed int to unsigned int.
2005-08-15 20:30:55 +00:00
Roland Illig
ae815922de
view_init: Made the initialization order the same as the order in which the
...
fields appear in struct WView. Explicitly initialize view->marks[], as they
are used without other initialization.
2005-08-15 18:58:18 +00:00
Roland Illig
6e0a3be319
* view.c (view_ccache_lookup): Rewrote the calculation of the
...
cache entry. Also don't put entries in the cache when the
current byte is '\r'.
* view.c (view_ccache_dump): Extended the output by the offset
of the next line.
2005-08-15 11:49:30 +00:00
Roland Illig
69e4d3f825
* view.c (toggle_hex_mode): Now the hex cursor is always visible
...
after switching to hex mode.
2005-08-15 10:22:18 +00:00
Roland Illig
3dd9ec536b
* view.c (view_growbuf_read_until): When using mc_read, recover
...
from interrupted system calls.
2005-08-15 10:04:49 +00:00
Roland Illig
c4da4aecf2
Made the search function interruptible.
2005-08-15 09:55:19 +00:00
Roland Illig
6b874e13aa
* view.c (view_growbuf_read_until): On short reads, try to read
...
one more byte to check whether we're already at the end of file.
This makes the ">=" disappear earlier.
2005-08-06 18:19:14 +00:00
Roland Illig
725c9f7b34
* textconf.c: Include ecs_char in the list of type
...
characteristics that are printed.
2005-08-06 16:33:54 +00:00
Roland Illig
070b0dccf2
Use hline() instead of addch() to clear the menubar widget area.
2005-08-05 12:01:47 +00:00
Roland Illig
922043282d
* view.h: Renamed view to mc_internal_viewer. This avoids
...
hundreds of shadowed names in view.c.
2005-07-31 20:29:35 +00:00
Roland Illig
ca0d773797
* view.c: Removed global variable have_fast_cpu. It is not used
...
anymore.
2005-07-31 20:16:12 +00:00
Roland Illig
1b18865579
* user.c (execute_menu_command): Allow execution on no-exec
...
filesystems. This fixes Savannah Bug #13832 .
2005-07-31 19:29:04 +00:00
Roland Illig
ae2ec0ec2e
Added missing #include.
2005-07-31 19:08:18 +00:00
Roland Illig
7bb3bea344
Removed redundant comment.
2005-07-31 18:57:20 +00:00
Roland Illig
16b7d7b60a
Added standard file header.
2005-07-31 18:47:12 +00:00
Roland Illig
35a8f2b2a2
* Makefile.am: Added support for extended character sets.
...
* ecs.h: Support for extended character sets.
* ecs.c: Likewise.
* ecs-test.c: Testsuite for ecs.c.
2005-07-31 18:30:43 +00:00
Leonard den Ottolander
772c2600b9
* utilunix.c (mc_tmpdir): Check that tmpdir is correctly initialized.
2005-07-27 15:03:24 +00:00
Leonard den Ottolander
ed1899d211
* src/ChangeLog, edit/ChangeLog: Fix wrong dates on latest entries.
2005-07-24 13:42:28 +00:00
Leonard den Ottolander
f21564b9e6
* edit/choosesyntax.c: Create file. Menu option to override syntax
...
highlighting.
* edit/Makefile.am: Add choosesyntax.c.
* edit/edit.c (edit_init): Set option_auto_syntax to 1 on every invokation
of the editor.
* edit/edit.h: Pass char*** to edit_load_syntax(). Add parameters for
syntax dialog and override.
* edit/editmenu.c (menu_options): Add menu option to override syntax
hightlighting.
* edit/editoptions.c (edit_options_dialog): Pass option_syntax_type to
edit_load_syntax().
* edit/syntax.c (edit_read_syntax_file): Dynamically allocate and fill
syntax list pnames.
* edit/syntax.c (edit_load_syntax): Use char*** for syntax list.
* src/wtools.h: #include "widget.h" and remove redundant declarations
of Dlg_head and WListbox.
2005-07-24 13:37:58 +00:00
Roland Illig
be3ab1a3e0
* view.c: When saving and loading the file position, use the
...
full pathname instead of the one passed as argument.
2005-07-23 08:20:58 +00:00
Roland Illig
2bf2f0c38d
* util.c (save_file_position): Only save the position if not
...
at the beginning of the file (1;0).
2005-07-23 08:20:03 +00:00
Roland Illig
df1477f1ec
Fixed wrong comparison of the result of iconv().
2005-07-22 23:21:45 +00:00
Roland Illig
c22e826761
Updated German translation.
2005-07-22 21:16:50 +00:00
Roland Illig
6e318ab041
* help.c: Fixed shadowing warnings from gcc.
2005-07-22 09:29:50 +00:00
Roland Illig
7b0f17ad6a
fixed a bug that had been introduced by
...
me, when replacing Dlg_head * with void *.
2005-07-22 09:01:04 +00:00
Roland Illig
390f69bc30
* help.c: Fixed an invalid memory access, which has been noted
...
by Vitja Makarov.
2005-07-22 08:41:45 +00:00
Roland Illig
37ffcf9ae7
* ext.c: Fixed a typo which has been noted by Arpad Biro.
2005-07-22 07:27:01 +00:00
Roland Illig
1c8c676c76
* key.c: When the command line option -x is given, enable
...
additional key sequences that are typical for xterms.
* main.c: First parse command line arguments, then initialize
key sequences.
2005-07-20 20:29:08 +00:00
Roland Illig
3abff48000
* util.c: Added gettext_ui(), which translates a string and
...
strips everything before the first '|' character. This function
is used to translate special elements of the user interface,
like ButtonBar labels.
* util.h: Likewise.
* view.c: Using the new gettext_ui() function.
2005-07-20 15:39:47 +00:00
Roland Illig
77b5978cf1
Removed unused macros mc_mmap and mc_munmap.
2005-07-18 13:21:50 +00:00
Roland Illig
6d3226c4e7
* util.c: Added ascii_alpha_to_cntrl(), which converts 'x' to
...
^X. Useful for entering control characters literally.
* util.h: Likewise.
* widget.c: Use that function after C-q.
2005-07-18 09:31:37 +00:00
Roland Illig
ace71736b8
* view.c: The viewer can remember the last file position and
...
restore it, like the editor. This fixes Savannah bug #13734 .
* view.h: Likewise.
* setup.c: Likewise.
2005-07-18 08:47:45 +00:00
Roland Illig
ecfbe13fa3
AC_CHECK_TYPES([mode_t off_t pid_t socklen_t uid_t nlink_t],,,
2005-07-14 06:31:29 +00:00
Roland Illig
de5d9b1d40
* view.c: Always call display() before close_error_pipe() to make
...
sure the screen looks nice.
http://mail.gnome.org/archives/mc-devel/2005-July/msg00194.html
2005-07-13 21:30:28 +00:00
Roland Illig
fae0cabfc6
* view.c (view_hexedit_save_changes): Use the VFS file functions
...
instead of the native ones. This makes it possible to edit
remote files using the hex editor.
2005-07-12 07:22:49 +00:00
Roland Illig
c61ea2f1c4
Removed leading underscores from variable names.
2005-07-12 07:01:47 +00:00
Roland Illig
8d475c4c35
* view.c: Added some paragraph comments. Changed some literal
...
expressions (e.g. 0 => '\0', 0 => NULL). Fixed indentation.
2005-07-12 06:04:38 +00:00
Roland Illig
9f62ed703a
Changed three one-line comments to one multi-line comment.
2005-07-11 08:17:38 +00:00
Roland Illig
5d5afede78
(view_display_ruler): Reduced code size by declaring a string literal as
...
"static". (view_display_hex): Added a FIXME concerning screen overflow.
2005-07-11 08:14:44 +00:00
Roland Illig
8bbf0d25fe
* view.c (view_update_bytes_per_line): Use a local variable to
...
do the computation. Update view->bytes_per_line only once, after
all computations have finished.
2005-07-11 07:39:04 +00:00
Roland Illig
35b218fc69
(view_move_down): Brought to cursor-normal-form.
2005-07-11 07:26:31 +00:00
Leonard den Ottolander
1bf69bc163
info.c (info_show_info): Properly calculate the length of the line drawn
...
by hline().
2005-07-10 08:46:54 +00:00
Roland Illig
b8969ae3df
* view.c (view_ccache_find): Replaced the linear search with a
...
binary search. This speeds up the viewer by a factor of 25 for
large files (> 100 MB).
2005-07-07 22:34:31 +00:00
Roland Illig
ca15b965d6
Added to result-equivalent functions for view_ccache_find_linear_down().
...
All three work, but view_ccache_find_binary() is the fastest of all. So
the other ones will be removed in the next revision. This revision is
mainly for the records.
2005-07-07 22:30:56 +00:00
Roland Illig
0072aeb2e5
Provided multiple versions of view_ccache_find(), which can be selected by
...
defining C preprocessor symbols.
2005-07-07 21:46:01 +00:00
Roland Illig
bc446f0cee
* dialog.h: Replaced object-like macros with implicit references
...
to an identifier ``h'' with function-like macros. Adjusted all
users.
* dialog.c: Likewise.
* find.c: Likewise.
* tree.c: Likewise.
* widget.c: Likewise.
* widget.c (widget_selectcolor): New function that selects a
color among DLG_{HOT_,}{FOCUS,NORMAL}C.
2005-07-07 19:34:55 +00:00
Roland Illig
0c2b595997
* view.c (view_display_text): Fixed handling of tabulators.
2005-07-07 18:38:12 +00:00
Roland Illig
4fc6e727e7
Fixed the special handling of nroff character sequences at the beginning of
...
the screen. Removed the wrong comment. Only advance behind the backspace
character and display the rest of the nroff sequence.
2005-07-07 18:06:57 +00:00
Roland Illig
4d7a3f6779
* view.c (view_compute_areas, view_percent, view_display_status,
...
view_display_ruler): Fixed screen overflow bugs.
2005-07-07 17:49:01 +00:00
Roland Illig
bcf9978ee8
* view.c (view_update_bytes_per_line): Fixed integer overflow
...
bug.
2005-07-07 17:09:59 +00:00
Roland Illig
00fcae9141
* view.c: view_display_status() is called inside display().
2005-07-07 17:03:25 +00:00
Roland Illig
c4d669162a
* view.c (view_status): Renamed to view_display_status().
2005-07-07 16:59:31 +00:00
Roland Illig
cecafaab0b
* view.c (view_compute_areas): Fixed a bug noted by Pavel
...
Tsekov. The coordinates are now relative to the Widget, as they
should be.
2005-07-07 16:48:55 +00:00
Roland Illig
338c32c400
Added an assertion to offset_rounddown to make sure that b != 0.
2005-07-06 22:35:17 +00:00
Roland Illig
e3176f640e
Use the correct coodinates for displaying the percentage in the status line.
2005-07-06 19:36:59 +00:00
Roland Illig
0785232a60
* view.c: Changed some variables from int to screen_dimen.
...
Instead of relying on each of the view_display_* functions to
compute the correct coordinates they are managed using the new
function view_compute_areas(). In the view_display_* functions,
all calculations are done 0-based; before, the calculation had
involved the relative position of the area. Removed "static"
variables from view_status(). Simplified view_display_clean().
2005-07-06 19:12:25 +00:00
Roland Illig
4150000223
Removed the #include directive for "ecs.h", as this file is not yet in HEAD.
2005-07-06 15:38:43 +00:00
Leonard den Ottolander
674dac483d
complete.c: Fix autocompletion for single possible path when "complete
...
show all" is set.
2005-07-06 11:16:08 +00:00
Roland Illig
148f56adcd
* textconf.c: mc --version prints the size of commonly used data
...
types.
2005-07-05 20:57:38 +00:00
Roland Illig
db1e5ef53c
Added an "inline" specifier to str_unconst_inlined.
2005-07-05 20:50:02 +00:00
Roland Illig
a041ed48a9
Removed unused local variable.
2005-07-05 20:31:18 +00:00
Roland Illig
a1db50305e
* chmod.c: Changed all references to umode_t into mode_t.
2005-07-05 20:14:15 +00:00
Roland Illig
9f55376746
* view.c (view_load): Don't try to use fcntl() with VFS file
...
handles. That cannot work.
2005-07-05 19:19:17 +00:00
Roland Illig
e3b7168498
* achown.c: Changed all references to umode_t into mode_t.
...
* file.c: Likewise.
2005-07-05 18:18:36 +00:00
Roland Illig
96223eace4
Replaced 8 space characters with one tab for indentation.
2005-07-03 15:31:55 +00:00
Roland Illig
aac7b35bfc
The value of b is unused in view_set_byte().
2005-07-03 14:01:25 +00:00
Roland Illig
c3f40d150f
* textconf.c: mc --version prints the number of bits of off_t.
2005-07-03 11:37:28 +00:00
Roland Illig
1ee7a7c31f
* view.c (view_fix_cursor_position): Fixed a division-by-zero
...
bug, which had been reported by Dirk Jagdmann and Pavel Tsekov.
Pavel also tracked down the bug.
2005-07-01 20:48:29 +00:00
Roland Illig
1440266805
Fixed a typo: DS_VFS_FILE => DS_FILE.
2005-06-30 23:16:14 +00:00
Roland Illig
6e5508ef14
* global.h: Don't use MC_ENABLE_DEBUGGING_CODE to decide whether
...
to enable or disable assertions. Just use the default value.
2005-06-30 23:12:08 +00:00
Roland Illig
7f25b3154b
Added some more assertions to check whether bytes_per_line is really != 0.
2005-06-30 22:58:52 +00:00
Roland Illig
1918157719
* view.c (view_growbuf_load_until): Check the datasource in the
...
right place. (get_byte_growing_buffer): Removed an unnecessary
assertion. (view_file_load_data): Make sure the right datasource
is selected. (view_set_byte): This function is only expected to
be called when datasource == DS_FILE. Removed unused code.
2005-06-30 22:50:30 +00:00
Roland Illig
b27499f6da
* ext.c (get_file_type_local): Redirect error messages from
...
file(1) to /dev/null.
2005-06-28 13:55:33 +00:00
Roland Illig
dfbc2522aa
* view.c (display): Splitted up into view_display_hex() and
...
view_display_text().
2005-06-28 13:21:42 +00:00
Roland Illig
868c55faa6
* view.c (display): Changed return type to void.
2005-06-28 13:02:09 +00:00
Roland Illig
a095bce5ee
(do_regexp_search): Removed unnecessary type cast.
...
(do_normal_search): Likewise.
2005-06-28 12:28:35 +00:00
Roland Illig
6fdbaf90a0
* view.c (normal_search): Replaced with normal_search_cmd().
2005-06-28 12:25:34 +00:00
Roland Illig
bb8946d3e2
Removed misleading comment for view_load_command_output().
2005-06-28 12:16:17 +00:00
Roland Illig
9c27d4c71f
Removed unused variable.
2005-06-28 12:15:05 +00:00
Roland Illig
48b81cf616
* view.c: Simplified error handling when loading files.
2005-06-28 12:13:37 +00:00
Roland Illig
cf9ca5b46b
* view.c: Eliminated the need for function pointer casts.
2005-06-27 23:19:32 +00:00
Roland Illig
00261c30de
* view.c: Renamed view_quit to want_to_quit and changed its type
...
to gboolean.
2005-06-27 22:38:03 +00:00
Roland Illig
fe50acadd4
Some more inline functions ...
2005-06-27 22:36:00 +00:00
Roland Illig
bb142400e1
* view.c: Massive speed-ups by reordering statements and declaring
...
functions as inline.
2005-06-27 22:11:55 +00:00
Roland Illig
d991a41c9f
(coord_cache_entry_less): Another speed-up by declaring the
...
function as inline.
2005-06-27 21:37:51 +00:00
Roland Illig
1300633147
* view.c (is_nroff_sequence): Reordered the statements to gain
...
a speed-off of 30 percent on a 10 MB file.
2005-06-27 21:34:36 +00:00
Leonard den Ottolander
f10fe35005
* main.[ch], user.c: Fixed a double free in mc_maybe_editor_or_viewer().
...
Restructured setup_dummy_mc() and expand_format() accordingly.
2005-06-22 21:38:52 +00:00
Pavel Roskin
d093a4024c
* view.c (view_percent): Remove unused variable.
2005-06-21 19:44:28 +00:00
Roland Illig
62d358bdc1
Took my "opinion" out of the ChangeLog message from Jun 14.
2005-06-16 21:19:37 +00:00
Roland Illig
9711666a53
* view.c (view_get_filesize_with_exact): Removed. I didn't like
...
the name. Replaced with a new function view_may_still_grow().
2005-06-14 14:13:11 +00:00
Roland Illig
c534a510c7
* view.c: Fixed an integer wraparound bug.
2005-06-14 13:34:41 +00:00
Roland Illig
0979ed9626
Changed the name of the multiple-inclusion guard.
2005-06-14 13:14:49 +00:00
Roland Illig
3bac3bdf53
Removed misleading comment.
2005-06-14 13:07:12 +00:00
Roland Illig
6bf747eccf
* widget.h (struct WButtonBar): Moved into widget.c.
...
* widget.c (struct WButtonBar): Moved from widget.h.
* boxes.c: Don't dereference WButtonBar.
* help.c: Likewise.
* layout.c: Likewise.
* view.c: Likewise.
2005-06-14 13:02:30 +00:00
Roland Illig
468ab7a3cd
* widget.c: Added code to handle multiple types of functions for
...
commands.
* widget.h: Likewise.
2005-06-14 12:11:38 +00:00
Roland Illig
27ef4ba453
* help.c: Use buttonbar_clear_label().
...
* tree.c: Likewise.
2005-06-14 11:34:28 +00:00
Roland Illig
160686b6a8
void
...
buttonbar_clear_label (Dlg_head *h, int idx)
{
WButtonBar *bb = find_buttonbar (h);
if (!bb)
return;
set_label_text (bb, idx, "");
bb->labels[idx - 1].tag = BBFUNC_NONE;
}
2005-06-14 11:30:26 +00:00
Roland Illig
9d8e5504e2
* achown.c (advanced_chown_callback): Swapped the arguments of a
...
recursive function call -- the types didn't match.
2005-06-14 10:26:06 +00:00
Roland Illig
c4c1c12432
* util.h (free_after): Moved to vfs/smbfs.c, as this is the only
...
place where it is used. This is necessary because the SunPro
compiler creates external references even for functions that are
only referred to in unused inline functions.
2005-06-08 00:23:44 +00:00
Leonard den Ottolander
f5dabea2a6
main.c: Also match tabs as empty command.
2005-06-07 20:55:13 +00:00
Roland Illig
6edc2743db
* command.c (command_callback): Fixed gcc warning about
...
incompatible pointer types.
2005-06-07 14:16:19 +00:00
Andrew V. Samoilov
7a0f4c45ef
* subshell.c (exit_subshell): Do not blindly perform cleanup.
2005-06-07 09:05:09 +00:00
Roland Illig
b2b0d33105
* view.c (view_move_up): In text wrap mode, don't display parts
...
of lines that only consist of the (invisible) newline character.
* view.c (view_move_down): Likewise.
2005-06-07 07:37:00 +00:00
Roland Illig
69879eab1e
* view.c (view_ccache_lookup): Replaced the min_nroff_column
...
variable with a state chart, which makes the code clearer and
fixes a bug in translating line/column pairs into offsets.
2005-06-07 07:06:48 +00:00
Roland Illig
bb23db86a7
Removed trailing whitespace.
2005-06-05 23:43:49 +00:00
David Martin
5c6b8862ba
Localize label.
2005-05-31 09:13:41 +00:00
Leonard den Ottolander
2bba061bf0
* src/boxes.c, vfs/ftpfs.[ch]: Add checkbox to allow passive FTP
...
over proxy to VFS dialog.
2005-05-29 12:10:08 +00:00
Leonard den Ottolander
3be17f6657
main.c: Fix blocking of panel cd-ing when there are only spaces on the
...
command line.
2005-05-29 11:54:22 +00:00
Pavel Roskin
1f60f44145
Update postal address of Free Software Foundation.
2005-05-27 03:35:10 +00:00
Roland Illig
ade85a1817
Moved the hexedit functions behind the display management.
2005-05-26 10:40:10 +00:00
Roland Illig
7ee9c2b956
Moved the data source constructors and the descructor into the data
...
sources section. Created a new section for the growing buffer.
2005-05-26 10:17:38 +00:00
Roland Illig
f4618b1731
Provided an introducing comment to the data sources section.
2005-05-26 10:04:26 +00:00
Roland Illig
745e81ab5f
Moved the view_growbuf_filesize(), view_get_filesize_with_exact() and
...
view_get_filesize() functions into the data sources section.
2005-05-26 09:51:03 +00:00
Roland Illig
a5abbdf9d6
Moved the prototypes of the data source functions into the data source
...
section. Same for the get_byte_indexed() function.
2005-05-26 09:46:48 +00:00
Roland Illig
01c1faa0f5
Moved view_growbuf_read_until() into the data source section.
2005-05-26 09:34:44 +00:00
Roland Illig
2c68774812
* view.c: Removed unnecessary prototype declarations for the cursor
...
movement functions.
2005-05-26 09:22:51 +00:00
Roland Illig
608e7b4970
* view.c: Completely rewrote the cursor movement code. Now all
...
cursor movement functions are based on two functions that
translate file offsets into line/column pairs and vice versa.
This change made it possible that the line/column is displayed
in the status line. The beginning-of-line and end-of-line
functions now work in text mode, too. Switching from non-wrap to
wrap mode does not cause the whole file to be loaded.
2005-05-26 09:08:54 +00:00
Roland Illig
d558ddd362
* python.syntax: Added chunk from Savannah bug #7872 . This
...
changes the color for """long strings""" from brown to green and
adds embedded highlighting for escape sequences.
* Syntax: Added a comment introducing the file format, based on
the current implementation in edit/syntax.c. Changed the
first-line regular expressions of sh, perl, python and ruby to
also match @SH@, @PERL@, @PYTHON@ and @RUBY@.
* Syntax: Extended the patterns for #! interpreters to match
almost everything that looks like the interpreter.
2005-05-26 09:08:54 +00:00
Roland Illig
45355775fe
Moved the view_hexview_move_to_eol() function some lines down to make the next patch apply more cleanly.
2005-05-26 09:07:40 +00:00
Roland Illig
0fea1df332
* widget.h: Fixed prototype of input_callback().
2005-05-24 11:50:12 +00:00
Roland Illig
87759863e3
* widget.c: Fixed all but one casts on function pointers.
2005-05-24 11:48:23 +00:00
Roland Illig
603d2f3dc5
* tree.c: Removed function casts and provided wrappers where
...
necessary.
2005-05-23 17:07:21 +00:00
Roland Illig
b4dd15e808
* screen.c: Removed function casts.
2005-05-23 16:44:24 +00:00
Roland Illig
a3e822b6ba
* menu.c: Removed function casts.
2005-05-23 16:39:52 +00:00
Roland Illig
2a21804cc2
* main.h: Changed the type of quiet_quit_cmd() from int to void.
...
* main.c: Likewise. Removed function cast.
2005-05-23 16:37:01 +00:00
Roland Illig
c1a5413eef
* info.c: Removed function casts.
2005-05-23 16:30:44 +00:00
Roland Illig
512aa8120d
* help.c: Removed function casts.
2005-05-23 16:27:33 +00:00
Roland Illig
cbcdeeefbf
* fileopctx.c: Removed unnecessary function casts.
2005-05-23 11:30:07 +00:00
Roland Illig
b8438197e1
* filegui.c: Removed unnecessary function casts.
2005-05-23 11:29:03 +00:00
Roland Illig
12641d520f
* find.c: Removed a function cast by using the wrapper function
...
cstrstr().
2005-05-23 11:28:10 +00:00
Roland Illig
caaf0730b6
* util.h: Added const-preserving version of strstr().
...
* util.c: Likewise.
2005-05-23 11:21:26 +00:00
Roland Illig
de1e263746
* command.c: Removed casts on function pointer types.
2005-05-23 11:17:25 +00:00
Roland Illig
d223460184
* help.c: Fixed the use of check_movement_keys(). This had been
...
really ugly code, involving casts on incompatible functions.
2005-05-23 10:15:45 +00:00
Pavel Roskin
6b494ddd63
* view.c: Better fix for the gcc 4.0.0 warnings. Fix callees
...
rather than callers.
2005-05-23 02:03:29 +00:00
Roland Illig
166e1d20de
* win.h: Removed a const qualifier from the type movefn, as these
...
functions typically modify their object.
* win.c: Likewise.
2005-05-21 10:51:15 +00:00
Roland Illig
9eadb2ada4
* view.c (view_labels): Simplified the code that decides whether
...
the user can switch to hexedit mode.
2005-05-21 10:34:16 +00:00
Roland Illig
0659621de4
Renamed edit_cursor to hex_cursor, as it is
...
used in hexview mode, too.
2005-05-21 10:23:57 +00:00
Roland Illig
48fd4667fd
Changed some comments.
2005-05-21 10:21:35 +00:00
Roland Illig
4138e2d88b
* view.c: Renamed dpy_text_start to dpy_topleft, as it does not
...
only apply to text mode. Renamed dpy_text_start_col to
dpy_text_column.
2005-05-21 10:17:35 +00:00
Roland Illig
8aadbba7d3
* view.c: Fixed comment above toggle_hexedit_mode().
2005-05-21 10:04:03 +00:00
Roland Illig
75691621a6
* view.c: Made the F2 key action much simpler---now it just
...
toggles between hexview and hexedit mode. Switching between text
and hex mode can be done with <tab>, as before.
2005-05-21 10:02:09 +00:00
Pavel Roskin
9d44b75ad5
* find.c: Fix warnings reported by gcc 4.0.0.
...
* mountlist.c: Likewise.
* screen.c: Likewise.
* view.c: Likewise.
2005-05-21 03:26:36 +00:00
Pavel Roskin
9260860bbf
* dialog.c (dlg_select_widget): Remove first argument, it's
...
redundant. Adjust all callers.
(dlg_replace_widget): Likewise.
2005-05-20 20:22:06 +00:00
Roland Illig
10c2c57663
* charsets.c (translate_character): Fixed checking of the return
...
value of iconv().
2005-05-11 21:50:36 +00:00
Pavel Roskin
c90d263d2c
* .c: Sanitize all calls to functions from ctype.h. Fix gcc 4.0
...
warnings.
2005-05-11 01:16:58 +00:00
Pavel Roskin
446c06ea0c
* file.c: Remove unneeded WANT_WIDGETS.
...
* layout.c: Likewise.
* setup.c: Likewise.
* view.c: Likewise.
2005-05-10 21:38:40 +00:00
Roland Illig
3bcac235f5
* find.c (find_parameters): Moved around and reordered dialog
...
items to make their meaning clearer.
2005-05-10 19:30:22 +00:00
Pavel Roskin
a6dd81352b
* screen.c (try_to_select): Don't call display_mini_info(), it
...
will be called later because select_item sets panel->dirty.
This fixes the mini status appearing first after Ctrl-O.
2005-05-03 15:16:57 +00:00
Roland Illig
70f77a1945
* view.c: Changed use of view->text_wrap_mode to reflect its
...
type, being gboolean. That is, only use boolean operators and
TRUE/FALSE for assignment. Bug reported by Jindrich Makovicka.
2005-04-27 18:39:21 +00:00
Roland Illig
413ed3236e
* global.h: Define NDEBUG (used by assert() depending on
...
MC_ENABLE_DEBUGGING_CODE).
2005-04-26 19:42:37 +00:00
Roland Illig
2404c633d0
struct view_coord coord;
...
coord.vc_line = line;
view_ccache_complete (view, &coord, CCACHE_OFFSET);
return coord.offset;
2005-04-26 15:06:38 +00:00
Roland Illig
ebbcf8d28a
* view.c: Removed inconsistent whitespace.
2005-04-25 08:50:59 +00:00
Roland Illig
b46af7bac6
* view.c (struct WView): Replaced view->last with
...
view->dpy_complete. The former variable's name didn't match its
value.
2005-04-25 08:47:22 +00:00
Roland Illig
a34e4b5dde
* view.c (offset_type): Adjusted the PRI[dX] constants to be
...
like the ISO C99 PRI* constants.
2005-04-25 00:26:46 +00:00
Roland Illig
eaa04d2269
* view.c (init_growing_view): Renamed to
...
view_load_command_output(). Removed dead code. Removed unused
parameter.
2005-04-24 23:47:27 +00:00
Roland Illig
fa7945759b
* view.c (view_move_forward2): Fixed a bug related to the return
...
value, which had made the down and page-down keys no-ops.
2005-04-24 23:21:05 +00:00
Roland Illig
bbdebd492c
* view.c (display): Fixed operator precedence with ?: in hex
...
display.
2005-04-22 15:26:25 +00:00
Roland Illig
94a7ad1a56
* view.c (view_move_forward2): Added more assertions. Rewrote
...
condition for breaking out of the loop when upto == 0.
2005-04-22 15:18:14 +00:00
Roland Illig
5b7339a2db
* view.c (view_move_forward2): Fixed a bug discovered by
...
Jindrich Makovicka. The return value did not take into account
the value of the `upto' parameter.
2005-04-22 15:01:11 +00:00
Roland Illig
92526f4b57
* view.c (display): Extracted the code for drawing the ruler into
...
its own function, view_display_ruler(). Rewrote it.
2005-04-19 22:33:21 +00:00
Roland Illig
2312d2ce97
* view.c: Replaced const_cast with str_unconst.
2005-04-19 22:16:25 +00:00
Roland Illig
2842c33f11
* view.c (view_move_forward2): Early return if get_byte() returns
...
-1.
2005-04-19 21:27:03 +00:00
Roland Illig
1c367fbab4
* view.c (view_free_growing_buffer): Renamed to
...
view_growbuf_free(). Simplified the code.
2005-04-19 20:54:53 +00:00
Roland Illig
f6e6c6e80d
* view.c (struct WView): Renamed nib_shift to hexedit_lownibble.
...
Replaced 0 literals with FALSE.
2005-04-19 20:33:51 +00:00
Roland Illig
008c9ef797
* view.c (view_file_load_data): Removed the requirement for
...
ds_file_datasize to be a power of two.
2005-04-19 18:36:23 +00:00
Roland Illig
0972491418
* view.c: Small formatting changes.
2005-04-18 21:02:55 +00:00
Roland Illig
25cf80294b
* view.c: Fixed a typo.
2005-04-18 20:18:12 +00:00
Roland Illig
26c2f7fc50
* view.c (save_edit_changes): Renamed to
...
view_hexedit_save_changes().
2005-04-18 20:12:18 +00:00
Roland Illig
f6f90ed34f
* view.c (struct WView): Moved the growing buffer variables
...
between the data source and the display section.
2005-04-18 20:06:16 +00:00
Roland Illig
aae5612581
* view.c (view_set_datasource_string): Removed call to
...
view_close_datasource() for consistency with the other
view_set_datasource_*() functions. Adjusted the callers.
2005-04-17 11:40:26 +00:00
Roland Illig
18325716b1
* view.c (display): Renamed frame_shift to left or top, whatever
...
is more appropriate.
2005-04-17 11:35:31 +00:00
Roland Illig
0dc31ebb6c
* view.c (display): Renamed width and height to right and bottom.
...
The values of the variables aren't really the width and height
of anything.
2005-04-17 11:21:54 +00:00
Roland Illig
56ea657694
* view.c (display): Simplified the ruler drawing code.
2005-04-17 11:05:42 +00:00
Roland Illig
093f7a679a
* ChangeLog: Added the rest of the log message.
2005-04-17 10:15:32 +00:00
Roland Illig
054e617e9b
* view.c: Added four functions view_get_top(), view_get_left(),
...
view_get_bottom(), view_get_right() to mark the bounds of the
rectangle that can be used for displaying data. Expressed
view_get_datalines() and view_get_datacolumns() in terms of
these four functions.
2005-04-17 10:14:18 +00:00
Roland Illig
46a8f2bdc5
* view.c: Corrected some typos and indentation.
2005-04-17 10:02:58 +00:00
Roland Illig
76c3ff06a5
* view.c: Eliminated some ?: operators.
2005-04-17 09:50:38 +00:00
Roland Illig
98240f77bd
* view.c (view_load): Changed return type to gboolean. Adjusted
...
returned values.
* view.c (view): Rewrote the code a little bit.
* view.h (view): Rewrote the comment.
2005-04-17 09:35:41 +00:00
Roland Illig
74318e44bb
* view.c (save_edit_changes): Changed return type to gboolean.
...
* view.c (view_ok_to_quit): Changed return type to gboolean.
Adjusted returned values.
2005-04-17 09:17:58 +00:00
Roland Illig
3c872a532c
* view.c (save_edit_changes): Completely rewritten to be robust
...
on errors. All changed bytes that could not be saved are kept
in the change list, so that the user can try to save them later.
* view.c (view_set_byte): Added for save_edit_changes().
* view.c (display): view_place_cursor() is called after displaying
in hex mode.
2005-04-17 09:05:42 +00:00
Roland Illig
3cdf8bf168
* view.c (free_change_list): Don't use view->change_list as
...
scratch variable.
2005-04-16 22:06:53 +00:00
Roland Illig
7456a7c035
* view.c (enqueue_change): Rewrote the function once more, this
...
time eliminating the redundant variable `curr'. Introduced
another variable, as it was inappropriate to reuse the `head'
variable as a list iterator.
2005-04-16 22:01:48 +00:00
Roland Illig
9e5c41008d
* view.c (enqueue_change): Combined the while loop with the break.
...
Fixed an off-by-one-error.
2005-04-16 21:49:48 +00:00
Roland Illig
d2f7ec86c4
* view.c (enqueue_change): Made the algorithm independent of the
...
memory layout (especially the order) of the fields in struct
hexedit_change_node.
2005-04-16 21:47:26 +00:00
Roland Illig
0453262b4b
* view.c (enqueue_change): Made the algorithm independent of the
...
memory layout (especially the order) of the fields in struct
hexedit_change_node.
2005-04-16 21:45:36 +00:00
Roland Illig
2d8721c745
* view.c (display): Removed the call to the empty macros
...
view_freeze() and view_thaw(). Deleted these macros, as they
are otherwise unused.
2005-04-16 18:56:58 +00:00
Roland Illig
021e1cb48e
* view.c (view_get_datacolumns): Added. Replaced equivalent
...
expressions to call this function.
* view.c (display): Fixed a bug introduced with the last change.
2005-04-16 18:53:51 +00:00
Roland Illig
d51fac0d75
* view.c (vwidth, vheight): Replaced these two macros with their
...
expansion. They looked like variables, which was irritating.
2005-04-16 18:32:09 +00:00
Roland Illig
0384ebe60c
* view.c: Added the `byte' type as an alias for unsigned char.
...
Converted some datasources to using byte as the base type.
Removed the superfluous type conversions.
2005-04-16 15:13:20 +00:00
Roland Illig
8ce21c781b
* view.c (struct WView): Renamed start_display to dpy_text_start.
...
Fixed one invalid use of bit arithmetics (line 1819).
2005-04-16 14:52:36 +00:00
Roland Illig
dc97c493c5
* view.c (struct WView): Removed start_col. Added
...
dpy_text_start_col, which has a similar function like start_col,
but does not have negative values. Added bounds checking for
dpy_text_start_col. Code cleanup, as usual.
2005-04-16 14:25:52 +00:00
Roland Illig
e4635efd2d
* view.c (struct WView): Renamed have_frame to dpy_frame_size.
...
* view.c (view_is_in_panel): Added.
* view.c (view_percent): Removed the last parameter, as it has
always the same value.
* view.c: Code cleanup.
2005-04-16 13:45:16 +00:00
Roland Illig
e7b7360f79
* view.c (struct WView): Aligned all datasource fields so that they
...
look more related than before.
2005-04-16 12:56:50 +00:00
Roland Illig
081dd56e8c
* layout.c: Followed the renaming of view_init() to view_load().
...
* view.h: Likewise.
2005-04-14 18:24:02 +00:00
Roland Illig
14a8919772
* util.h (str_unconst): Added a conditional INLINE_STR_UNCONST
...
that makes str_unconst() an inline function.
2005-04-14 18:16:04 +00:00
Roland Illig
3db06a9dd2
* view.c (struct WView): Renamed ds_file_size to ds_file_filesize,
...
to avoid confusion with ds_file_datasize.
2005-04-14 11:31:05 +00:00
Roland Illig
b3913aa39f
* view.c (struct WView): Renamed growing_buffer to growbuf_in_use,
...
blocks to growbuf_blocks, block_ptr to growbuf_blockptr.
2005-04-14 11:27:13 +00:00
Roland Illig
a44dbeab65
* view.c (struct WView): Renamed wrap_mode to text_wrap_mode, as
...
it only applies to the text viewer.
2005-04-14 11:14:42 +00:00
Roland Illig
c2c7cfe647
* view.c (struct WView): Renamed viewer_magic_flag to magic_mode.
2005-04-14 11:12:01 +00:00