Commit Graph

2612 Commits

Author SHA1 Message Date
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
Roland Illig
fe6cf255d2 * view.c (struct WView): Moved hexedit_mode into the "Editor
modes" section.
2005-04-14 11:08:25 +00:00
Roland Illig
4dcd4b8da2 * view.c (struct WView): Renamed viewer_nroff_flag to
text_nroff_mode.
2005-04-14 11:06:12 +00:00
Roland Illig
2b41552c06 * view.c (struct WView): Changed the type of hex_mode to gboolean.
Fixed one non-boolean operation in toggle_wrap_mode().
2005-04-14 11:02:21 +00:00
Roland Illig
f468578ff7 * view.c (struct WView): Renamed hexedit_text to hexview_in_text. 2005-04-14 10:59:02 +00:00
Roland Illig
c1860072d7 * view.c (struct WView): Removed the "first" field, as it was
always 0.
2005-04-14 09:18:28 +00:00
Roland Illig
366dc2ce75 * view.c: Removed the "file monitor" feature (tail -f). It has
not been working since at least mc-4.6.0.
2005-04-14 09:09:34 +00:00
Roland Illig
bea9efb0f2 * view.c (view_new): Don't use view_init_growbuf, as this function
also activates it. Rather set view->growing_buffer = FALSE.
2005-04-14 08:35:56 +00:00
Roland Illig
d994002e5f * view.c (struct WView): Removed the view_active field. It was
practically equivalent to view->datasource != DS_NONE.
	* view.c (do_view_init): Renamed to view_load().
	* view.c (view_new): Every field of the WView is initialized
	explicitly.
2005-04-14 08:00:14 +00:00
Roland Illig
502309b4fa * view.c (view_get_datalines): Using the STATUS_LINE constant.
* view.c (display): Using the OFFSETTYPE_PRIX constant to print
	an offset_type in uppercase hex letters.
2005-04-14 00:59:33 +00:00
Roland Illig
d3bf9a489f * view.c (display): Fixed a bug that I introduced some hours ago.
* view.c (view_move_forward2): Rewrote the hexmode algorithm to
	get rid of the ?: operators. Introduced some variables with names
	that better fit their actual use. Fixed a bug that appeared when
	scrolling down by single lines in framed (panel) mode.
2005-04-14 00:43:34 +00:00
Roland Illig
9eff3cef04 * view.c (view_move_forward2): Backed out my last changes. The old
code worked better. :)
2005-04-14 00:18:35 +00:00
Roland Illig
ac03019408 * view.c (view_move_forward2): Added missing declaration. 2005-04-13 22:21:13 +00:00
Roland Illig
e65531ce4e * view.c: Reformatted the header comment. 2005-04-13 22:19:52 +00:00
Roland Illig
0b2f50aad4 * view.c (view_move_forward2): Simplified the code.
* view.c (get_byte_growing_buffer): Added bounds checking.
2005-04-13 22:18:04 +00:00
Roland Illig
ca1fc0467d * view.c (view_handle_editkey): Simplified the code. 2005-04-13 21:34:57 +00:00
Roland Illig
1a26500862 * view.c (struct WView): Removed the last_byte field, because it
got too complex maintaining it together with the new datasource
	framework. The function view_get_filesize() now takes its place.
	Corrected the type of the growing buffer to unsigned char. Added
	a field growbuf_finished to indicate when all data has been read.
	* view.c (view_move_cursor_to_eol): Renamed to
	view_hexview_move_to_eol().
	* view.c (view_get_filesize): Added.
	* view.c (view_get_filesize_with_exact): Added.
	* view.c (get_byte_indexed): get_byte with bounds checking.
	* view.c (view_growbuf_read_until): Closes the datasource after
	reading has finished.
	* view.c (view_percent): The percentage is only shown when its
	exact value can be computed.
	* view.c (view_status): The [grow] field has been removed from
	the status line. Instead, the filesize is reported as ">= n"
	bytes.
	* view.c (count_backspaces): Added a bounds check.
	* view.c (display): Using get_byte_indexed instead of get_byte.
	* view.c (move_forward2): Renamed to view_move_forward2 because
	of the equally-named function in src/help.c. Replaced the
	algorithm for the hexview mode by a much simpler version. Now
	we have 5 ?: operators less than before.
	* view.c (get_bottom_first): Added bounds checking.
	* view.c (move_right): Simplified the code.
	* view.c (goto_addr): Fixed an off-by-one error.
	* view.c (view_close_datasource): For the growing buffer cases,
	check if the datasource has already been closed before.
2005-04-13 21:09:00 +00:00
Roland Illig
a3a1e26210 * util.h (str_unconst): Provide a replacement for the const_cast
macro from global.h.
	* util.c (str_unconst): Likewise.
2005-04-13 18:47:12 +00:00
Roland Illig
293d35daf0 * view.c: Removed mmap(2) support. Now regular files are
accessed using mc_read(). Added a framework for datasources.
	Introduced assertions. Removed some variables (e.g. view->data)
	that were used for many things simultaneously.
2005-04-07 11:23:53 +00:00
Roland Illig
5185abce21 * dialog.h: Removed a comma at the end of an enumeration, because
ANSI does not permit it.
2005-04-07 07:39:09 +00:00
Roland Illig
e64958776a * x11conn.c (x_io_error_handler): Close the X11 connection when
a protocol error occurs. Otherwise the X11 connection is held
	open, which may keep ssh from closing the connection.
2005-04-06 18:04:43 +00:00
Andrew V. Samoilov
28c940b71e Typo fix. 2005-03-29 15:22:33 +00:00
Pavel Roskin
417ca2ab1f * screen.c (chdir_other_panel): When used on a file entry, move
selection on the inactive panel to select the entry for the
current directory on the active panel.
2005-03-29 04:47:16 +00:00
Andrew V. Samoilov
1bee4012b1 * keyxdef.c: Constify struct qnx_key_define_s typedef.
* key.c (get_modifier): Fixed dynamic loading of the Photon library for
        shift keys, only current version of libph used now.
        (qansi_key_defines): Swapped Gray '-' and '+' codes definitions, due to
        fixed bugs in the QNX6's console driver.
2005-03-25 09:38:24 +00:00
Andrew V. Samoilov
a75d81b3c2 * util.c (load_file_position): Fix mcedit position save bug. Read a
number after ';'.
2005-03-23 05:29:06 +00:00
Pavel Roskin
504faf19d4 * key.c (init_key): Load xterm_key_defines for terminals with
names starting with "rxvt".
2005-03-21 20:27:55 +00:00
Pavel Roskin
21cc7b340f * slint.c: Don't use private S-Lang functions if they are
unavailable.
2005-03-19 19:31:23 +00:00
Pavel Roskin
0074c885f2 * acinclude.m4 (MC_WITH_SLANG): Define HAVE_SYSTEM_SLANG after
all fallbacks so it shows whether we are using system S-Lang.
* configure.ac: Remove USE_INCLUDED_SLANG, since it's now fully
dependent on HAVE_SLANG and HAVE_SYSTEM_SLANG.
* src/myslang.h: Likewise.
2005-03-19 17:27:36 +00:00
Pavel Roskin
9bdae2ff7c * screen.c (chdir_other_panel): Prevent changing current
directory.  Remove incorrect comment.
2005-03-17 22:40:11 +00:00
Pavel Roskin
bf653ed2a1 * achown.c (update_permissions): Partly revert recent changes
because they cause infinite recusion.
2005-03-17 22:03:31 +00:00
Roland Illig
13a63f21c9 * x11conn.c: Separated X11 connection handling from key.c. Added
error handling for X11 errors and connection errors.
	* x11conn.h: The interface for x11conn.h.
	* key.c: Now using the x11conn code.
	* Makefile.am: Added x11conn.{h,c}.
2005-03-10 09:44:36 +00:00
Miguel de Icaza
6b14153361 2005-02-26 Miguel de Icaza <miguel@novell.com>
* screen.c (chdir_other_panel): Restored original functionality.

	(sync_other_panel): This is now bound to the key Alt-i, and is the
	functionality that was lost.
2005-02-26 16:39:31 +00:00
Roland Illig
f0f4721309 * unixcompat.h: Only include <sys/sysmacros.h> if we're on AIX,
as Solaris defines the macros twice---once in <sys/mkdev.h>,
	and once in <sys/sysmacros.h>.
2005-02-23 23:49:30 +00:00
Roland Illig
a89e9cce8b * tty.h: Moved the function printwstr to slint.c, because the
SunPro compiler does not eliminate unused inline functions.
	* slint.c: printwstr has been moved to here.
2005-02-23 19:55:06 +00:00
Roland Illig
476927920b * screen.c: Changed the return type of ilog10 to unsigned int
and adjusted some variables in format_device_number.
2005-02-23 19:37:43 +00:00
Roland Illig
da66509191 * unixcompat.h: Added missing parenthesis to the minor() macro. 2005-02-22 03:47:01 +00:00
Roland Illig
ffc41c1faa * treestore.c (str_common): Added a comment that str_common shall
not be called with two equal strings.
2005-02-15 22:16:18 +00:00
Roland Illig
42d2ab10be * info.c (info_show_info): Casted st_mode to unsigned to avoid
compiler warning on Solaris 9 (st_mode is unsigned long there).
2005-02-12 22:28:09 +00:00
Roland Illig
7d1b02caad * unixcompat.h: Typo (show => shown). 2005-02-12 22:16:25 +00:00
Roland Illig
5d55e9b92f * vfs.c (vfs_translate_url): Add support for smb://, sh://,
ssh:// and mc:// filesystem requests. Introduced separate table
	for vfs aliases.
	* util.c (strip_password): Modifications to take the aliases into
	account while eliminating passwords.

	The original patch was extended by Roland Illig.
2005-02-12 14:30:48 +00:00
Roland Illig
0a545794da * screen.c: Reverted my changes from 2005-02-08 (except the
maybe_cd calls) to not confuse the upcoming UTF-8 patches.
2005-02-12 05:14:54 +00:00
Andrew V. Samoilov
663792b91a * glibcompat.c: Add g_strlcat() declaration for glib 1.2.x 2005-02-11 23:38:26 +00:00
Roland Illig
256cce9bb5 * screen.c (string_file_name): Fixed the displaying of long file
names. The bug had been introduced by me on 2005-02-08.
	* screen.c (string_file_nlinks): Likewise.
2005-02-11 19:43:30 +00:00
Roland Illig
6407873f69 * cons.handler.c: Marked unused parameters.
* dir.c: Likewise.
	* find.c: Likewise.
	* help.c: Likewise.
	* layout.c: Likewise.
	* mountlist.c: Likewise.
	* popt.c: Likewise.
	* poptconfig.c: Likewise.
	* popthelp.c: Likewise.
	* regex.c: Likewise.
	* subshell.c: Likewise.
	* tree.c: Likewise.
	* util.c: Likewise.
	* utilunix.c: Likewise.
	* widget.c: Likewise.
	* wtools.c: Likewise.
2005-02-08 22:33:52 +00:00
Roland Illig
f8a7930a1a * screen.c: Marked unused parameters. Updated use of maybe_cd. 2005-02-08 20:12:30 +00:00
Roland Illig
5356ac60d5 * main.c (maybe_cd): Removed unused parameter.
* main.h: Likewise.
2005-02-08 20:09:36 +00:00
Roland Illig
f9d9f92370 * Removed my own experiments. 2005-02-08 19:59:45 +00:00
Roland Illig
d2ee0985fc * dialog.c: Marked unused parameters. Now dlg_broadcast_msg_to
does what the comment above it says.
2005-02-08 18:25:31 +00:00
Roland Illig
c6a72952ac * screen.c (string_file_*): Don't use static buffers.
* screen.c (format_file): Provide a buffer for the string_file_*
	functions.
2005-02-08 12:28:17 +00:00
Roland Illig
f629c91ded * util.h: Added macro str_cmp to allow syntactically nice string
comparison.
2005-02-08 10:46:01 +00:00
Roland Illig
a580664255 * Removed transition support macros. 2005-02-08 09:58:40 +00:00
Roland Illig
0d08e8308f * Renamed define_label to buttonbar_set_label.
* Renamed define_label_data to buttonbar_set_label_data.
	* Renamed redraw_labels to buttonbar_redraw.
2005-02-08 09:53:51 +00:00
Roland Illig
77391f3981 * widget.h: Renamed define_label to buttonbar_set_label. Renamed
define_label_data to buttonbar_set_label_data. Renamed
	redraw_labels to buttonbar_redraw. Provided compatibility macros
	to enable a smooth transition between the old and the new names.
	* widget.c: Likewise.
2005-02-08 09:40:52 +00:00
Roland Illig
fc85bdba7e * *.c: Reordered header inclusion. 2005-02-08 09:04:03 +00:00
Andrew V. Samoilov
28fed14a03 * ext.c (regex_command): Eliminate g_string_*(). 2005-02-08 07:31:11 +00:00
Roland Illig
10451e0109 * dialog.h: Moved and reformatted #definitions.
* execute.h: Likewise.
	* mouse.h: Likewise.
2005-02-08 06:57:14 +00:00
Roland Illig
d8e27971ae * widget.h: Moved constants to the appropriate places (just
before the variable they will be used with).
	* widget.c: HISTORY_FILE_NAME was not needed in widget.h,
	so it has been made private to this file.
2005-02-08 06:28:34 +00:00
Roland Illig
2dbdf6d200 * unixcompat.h: Emit warnings for the fallback case of the
major/minor/makedev macros.
2005-02-07 22:59:51 +00:00
Roland Illig
b4b0f1dbfc * view.c: Reordered #include files. 2005-02-07 22:31:30 +00:00
Roland Illig
3e7e53b1af * view.c: Changed type of view->blocks from int to size_t.
* view.c: Removed unused parameters from local functions.
2005-02-07 22:09:44 +00:00
Roland Illig
51156030fb * ChangeLog: Applied trim_changelog. 2005-02-07 07:33:47 +00:00
Roland Illig
7733f432a4 * ext.c: Improved message formatting. 2005-02-07 00:01:15 +00:00
Roland Illig
e6a4ffaba1 * widget.h: Added a new function button_get_text.
* widget.c: Likewise.
2005-02-06 23:08:02 +00:00
Roland Illig
ce99a5fc53 * achown.c: Call update_ownership instead of get_ownership. 2005-02-06 22:59:00 +00:00
Roland Illig
57c9733937 * achown.c (get_ownership): Renamed to update_ownership.
* achown.c (update_permissions): Update the permission widgets
	without accessing WButton->text directly.
	* achown.c (print_flags): Use update_permissions.
	* achown.c (chown_info_update): Likewise.
2005-02-06 22:55:37 +00:00
Roland Illig
c893d6e029 * achown.c (get_ownership): Simplified the code. Now it is
more independent of the WButton internals.
2005-02-06 21:26:05 +00:00
Roland Illig
3a40734373 * util.h (msglen): Converted from a function to a procedure.
* util.c (msglen): Changed variable names and did a speedup.
	* hotlist.c (add_new_entry_input): Using new msglen function.
	* hotlist.c (add_new_group_input): Likewise.
	* wtools.c (query_dialog): Likewise.
	* wtools.c (fg_input_dialog_help): Likewise.
2005-02-05 13:03:11 +00:00
Andrew V. Samoilov
711f268786 * utilunix.c (mc_realpath) [USE_SYSTEM_REALPATH]: Use realpath(). 2005-02-02 18:28:49 +00:00
Andrew V. Samoilov
2080aad45a * find.c: Implement non-recursive 'Find file' feature.
Original patch by Andrew Borodin <aborodin@vmail.ru> .
2005-02-02 18:27:05 +00:00
Andrew V. Samoilov
eef0551cec Add missing entry
* utilunix.c (init_groups) [HAVE_GETGROUPLIST]: Use getgrouplist().
2005-02-01 12:30:40 +00:00
Andrew V. Samoilov
172cead7fb * utilunix.c (init_groups): Use glib memory allocation functions. 2005-02-01 12:04:05 +00:00
Roland Illig
3973e33cc2 * view.c: Eliminated two global variables and put them into the
WView structure.
2005-01-31 22:01:53 +00:00
Roland Illig
71ace6eaaf * view.c: Removed trailing whitespace and fixed a typo in a comment. 2005-01-30 21:17:29 +00:00
Miguel de Icaza
324f4c5644 2005-01-29 Miguel de Icaza <miguel@novell.com>
* utilunix.c (init_groups): Added support for getgrouplist patch
	from Stefan Gohmann <gohmann@univention.de>.

2005-01-29  Miguel de Icaza  <miguel@novell.com>

	* configure.ac: Check for getgrouplist API call.
2005-01-30 05:06:13 +00:00
Roland Illig
9558c7178f * src/info.c (info_show_info): Enabled display of the device number,
for the case that the column in the directory listing is too
	short. This had been disabled since 1994, for no obvious reason
	and without any comment.
	* src/screen.c (format_device_number): Added. Converts a device number
	into a bounded string.
	* screen.c (string_file_size): Support for larger device numbers
	(and for non-Linux systems).
	* vfs/cpio.c (cpio_read_crc_head): Fixed device number handling for
	non-Linux systems.
	* vfs/fish.c (fish_dir_load): Likewise.
	* vfs/utilvfs.c (vfs_parse_ls_lga): Likewise.
2005-01-27 23:32:13 +00:00
Roland Illig
7a60de0618 * unixcompat.h: Added makedev macro. 2005-01-27 23:02:24 +00:00
Roland Illig
728951fd34 * unixcompat.h (major/minor): Added support for AIX. 2005-01-27 22:19:48 +00:00
Roland Illig
ff3ca5ecb2 * tty.h (printwstr): If LEN is not positive, ignore the request. 2005-01-27 22:01:52 +00:00
Roland Illig
ff6e206b42 * tty.h (printwstr): Added a function to print a string
left-aligned in a bounded box.
2005-01-27 21:44:00 +00:00
Roland Illig
0e1609c2f9 * unixcompat.h: Provides macros and functions that are missing in
some Unix variants.
	* Makefile.am: Added unixcompat.h.
2005-01-25 22:54:41 +00:00
Roland Illig
ccc1b17f7d * dialog.h (widget_msg_t): Added WIDGET_RESIZED to inform widgets
that they had been resized.
	* dialog.c (widget_set_size): Send a WIDGET_RESIZED message after
	setting the size.
	* layout.c (panel_do_cols): Don't explicitly update the
	bytes_per_line of a hexview WView.
	* view.h (view_update_bytes_per_line): Removed from the interface
	to WView.
	* view.c (view_update_bytes_per_line): Declared as `static'.
	* view.c (view_callback): Call update_bytes_per_line when the
	WView is initialized and whenever a WIDGET_RESIZED message is
	received.
2005-01-25 22:40:50 +00:00
Andrew V. Samoilov
0464629b20 * main.c (_do_panel_cd): Delete leading spaces from URL
before vfs_translate_url() call.
2005-01-19 06:14:44 +00:00
Andrew V. Samoilov
50a2118525 * subshell.c (subshell_name_quote): Eliminate sprintf(d, "%c", ...).
(do_subshell_chdir): Eliminate strlcpy() and optimize.
2005-01-14 10:00:29 +00:00
Andrew V. Samoilov
d332606fd5 * subshell.c (do_subshell_chdir): Use mc_realpath() to fix tcsh's
problem with symlink.
        * utilunix.c: Add function mc_realpath(). Is the BSD version of
        realpath(3).
        * util.h: Add mc_realpath() declaration.
2005-01-13 19:37:46 +00:00
Roland Illig
205523301f * dialog.h: Fixed a typo. 2005-01-09 16:15:24 +00:00
Andrew V. Samoilov
d339190071 * find.c (find_parameters): Use translated string. 2004-12-13 18:04:37 +00:00
Andrew V. Samoilov
c3b5df605c * command.c (enter): Speed up and simplify. 2004-12-10 07:29:57 +00:00
Andrew V. Samoilov
d7355ea381 Typo fixes 2004-12-10 07:27:20 +00:00
Andrew V. Samoilov
3fff2ff3c9 * subshell.c (init_subshell_child): Does not g_strdup() constant string
in putenv() calls.
2004-12-08 13:07:53 +00:00
Roland Illig
137ea291fe * view.c: Removed unused macro. 2004-12-03 19:19:19 +00:00
Roland Illig
e792cffb8d * *.h: Renamed multiple inclusion guards that started with a
double underscore. Added #includes for dependent files.
	* popt.c: Likewise.
	* popthelp.c: Likewise.
	* tree.c: Moved a macro from tree.h to here, as it is useless
	outside tree.c.
2004-12-03 19:17:46 +00:00
Roland Illig
1438faeaca * view.c (view_handle_editkey): Code cleanup.
* view.c (view_percent): Likewise.
2004-12-02 20:36:31 +00:00
Roland Illig
2a9f3b6ce3 * util.c (cstrcasestr): Added a function to search for a
substring ignoring case.
	* util.h: Added cstrcasestr.
	* find.c: Added plaintext search mode.
2004-12-02 20:08:06 +00:00
Roland Illig
639e150164 * util.c (extension): Simplified the code. 2004-12-02 19:39:21 +00:00
Roland Illig
91a4d7e764 * view.c (struct WView): Renamed some variables to reflect the
actual use. (view_growbuf_read_until): Moved the growing buffer
	handling out of get_byte.
	* view.c: Cleaned up the code. Added error handling for the
	growing buffer case.
2004-12-02 17:13:39 +00:00
Andrew V. Samoilov
557dfdc7a1 * file.c (make_symlink): Constify r. 2004-12-02 10:46:21 +00:00
Andrew V. Samoilov
b5a5f9f5f1 * file.c (copy_dir_dir): Code cleanup (removal of unnecessary goto,
redundant comment, indentation).

* filegui.c (init_replace): Use off_t instead of int for file
sizes. Use proper format string parameter for size.
2004-12-02 06:25:57 +00:00
Andrew V. Samoilov
d48d44dabd * widget.c (listbox_drawscroll): Fix declaration of `slow_terminal'.
(listbox_new): Likewise.
2004-11-30 05:54:36 +00:00
Andrew V. Samoilov
bc3b3e9d29 Add comment to last changelog entry 2004-11-30 04:37:09 +00:00
Andrew V. Samoilov
d50dc18be0 * main.c (midnight_callback): Make the the keystrokes the invoke
select_cmd(), unselect_cmd() and reverse_selection_cmd () work
even if the command prompt is turned off.
2004-11-29 20:11:07 +00:00
Andrew V. Samoilov
5f926f02a6 * ext.c (regex_check_type): Optimize memory usage. 2004-11-26 15:47:31 +00:00
Andrew V. Samoilov
fd1fbef2dd * execute.c (shell_execute): Optimize memory usage. 2004-11-26 11:14:07 +00:00
Roland Illig
2a80bd15a2 * Makefile.am: Removed unused occurence of man_MANS. 2004-11-23 23:04:18 +00:00
Roland Illig
09fcf5903c * pipethrough.3: Fixed use of mandoc macros according to a
suggestion of Eric S. Raymond.
2004-11-21 21:13:43 +00:00
Andrew V. Samoilov
4ccc6e511c * help.c (help_event): Fix offset of event area for mouse click. 2004-11-19 21:04:04 +00:00
Roland Illig
2d3fef18e5 * Makefile.am: Excluded pipethough.3 from the distribution
as it is currently unused.
2004-11-19 14:17:19 +00:00
Andrew V. Samoilov
17ec1c5476 * user.c (execute_menu_command): Revert last changes. Execute
shell_execute() with flag EXECUTE_HIDE to prevent recording
        in ~/.bash_history.
        * execute.h: Add EXECUTE_HIDE flag. It's used to prefix the command
        with a space.
        * execute.c (shell_execute): Prefix the command with a space, if define
        EXECUTE_HIDE flag.
2004-11-18 17:47:55 +00:00
Roland Illig
1eab2f63b7 * screen.c (do_search): Ignore the backspace key on empty
quick-search.

	From Egmont Koblinger <egmont * uhulinux hu>
2004-11-16 23:54:15 +00:00
Roland Illig
57708c91cc * user.c (execute_menu_command): Prefix the command with a space
to prevent recording in ~/.bash_history.
2004-11-16 22:41:00 +00:00
Roland Illig
8d41d94d44 * file.c: Code cleanup (mostly indentation). 2004-11-15 23:32:02 +00:00
Andrew V. Samoilov
f7cacb883f * user.c (expand_format): Return % with followed character if it
without special meaning.
2004-11-12 11:56:21 +00:00
Roland Illig
d3204db4e0 * popthelp.c (showHelpIntro): The basename of argv[0] starts after
the last slash in argv[0], not after the first.
2004-11-11 17:37:20 +00:00
Andrew V. Samoilov
8d4cf30242 * regex.c: Define HAVE_WCTYPE_H to 0 if not defined to fix compilation. 2004-11-11 10:02:18 +00:00
Roland Illig
830f64d719 * Makefile.am: Excluded pipethough.{c,h} from the distribution
as they are currently unused.
2004-11-10 17:42:42 +00:00
Andrew V. Samoilov
042017791e If not defined macros HAVE_WCTYPE_H, define it for clean compilation. 2004-11-10 13:48:23 +00:00
Andrew V. Samoilov
852cdfb00b * hotlist.c (unlink_entry): Add missed brackets.
(add_new_entry_cmd): Fix memory leaks and double free()s.
       (add2hotlist_cmd): Eliminate static label_string.
2004-11-10 11:02:23 +00:00
Andrew V. Samoilov
dd2bc78a60 * hotlist.c (add_new_entry_cmd): Filter out a possible password
dialogs.
        (add2hotlist_cmd): Likewise.
2004-11-09 19:08:10 +00:00
Andrew V. Samoilov
9bf6911b00 * util.c (strip_password): Fix bug - don't delete path from url. 2004-11-09 12:30:29 +00:00
Andrew V. Samoilov
a309faa45c * filegui.c (file_mask_dialog): Fix memory leak. 2004-11-08 20:10:33 +00:00
Roland Illig
a5fefdbd71 * slint.c (slang_init): Allow upto 512 lines and cols if the
SLang library can handle it.
2004-11-07 12:48:48 +00:00
Roland Illig
d5da4d6b94 * key.c (use_8th_bit_as_meta): Use 8bit input as default.
From Vladimir Nadvornik <nadvornik * suse cz>
2004-11-07 12:37:24 +00:00
Andrew V. Samoilov
5ea26d084d * dir.c (file_type_to_num): Added initial support for the Special Named
Files. They are displayed as block devices, but with '#' prefix in it's
        names. Needed on QNX Neutrino.
        * file.c (copy_file_file): Likewise.
        * fs.h: Likewise.
        * screen.c (string_file_type): Likewise.
        (file_compute_color): Likewise.
        * util.c (string_perm): Likewise.

        * pipethrough.c: Added sys/select.h if found according to config.h.
2004-11-03 20:31:59 +00:00
Andrew V. Samoilov
358f13f13d * screen.c (show_dir): A small fix to avoid a crash in show_dir() with
a panel of more than 200 columns.
2004-11-03 19:56:36 +00:00
Andrew V. Samoilov
611114d735 * file.c (make_symlink): Use g_strlcpy() instead of strcpy(). 2004-11-03 19:49:24 +00:00
Andrew V. Samoilov
cee8133838 * subshell.c (do_subshell_chdir): Filter out a possible password from
warning dialog.

        * command.c (do_cd_command): Likewise.

        * screen.c (panel_callback): Likewise.

        * util.c (path_trunc): Add function. path_trunc() is the same as
        name_trunc(), but it deletes possible password from path for security
        reasons.

        * util.h: Add functions path_trunc().

        * filegui.c (file_progress_show_target): Filter out a possible password
        from dialog.
        (file_progress_show_deleting): Likewise.
        (file_mask_dialog): Likewise.

        * file.c (move_file_file): Likewise.
        (move_dir_dir): Likewise.
        (file_error): Likewise.
        (files_error): Likewise.
        (real_query_recursive): Likewise.

        * hotlist.c (add2hotlist): Typo fix.
2004-11-03 19:43:17 +00:00
Andrew V. Samoilov
42f676fd5f * dialog.c (do_select_widget): Walk the whole widgets list looking
for a widget accepting the focus.
2004-11-02 11:49:56 +00:00
Roland Illig
612e8238c9 * utilunix.c (mc_tmpdir): Use putenv(3) instead of setenv(3) if
the latter is not available. Needed for Solaris.
2004-11-01 12:03:45 +00:00
Andrew V. Samoilov
28c1c01c53 * complete.c (completion_matches): Fix duplicate completion matches
if there are more than two matches available.
2004-10-28 19:39:46 +00:00
Andrew V. Samoilov
bcaf2b272b * cmd.c (select_unselect_cmd): Collect repeated code from
(un)?select_cmd here.  Fix rare off-by-one and memory leak if
        empty pattern passed.

        (select_cmd): Use select_unselect_cmd().
        (unselect_cmd): Likewise.
2004-10-25 09:38:59 +00:00
Roland Illig
11f8d4e2ea * utilunix.c (mc_tmpdir): Convert uid to unsigned long for
pathname of the temporary directory.
2004-10-23 12:55:35 +00:00
Roland Illig
3716da314b * utilunix.c (mc_tmpdir): Convert uid to int for pathname
of the temporary directory.

	From Pavel Tsekov <ptsekov gmx net>.
2004-10-23 07:18:48 +00:00
Roland Illig
b5a38517cd * complete.c (environ): Don't declare environ on Cygwin.
From Pavel Tsekov <ptsekov gmx net>.
2004-10-23 07:12:39 +00:00
Roland Illig
fa72520d74 * regex.c (regerror): Never use the __memcpy function, as it
breaks the build on Cygwin.
2004-10-22 22:53:37 +00:00
Andrew V. Samoilov
849d95373b Fix typos 2004-10-22 08:44:20 +00:00
Roland Illig
80aa91ede7 * view.c (display): Fixed bug that displayed an empty file in
hexview mode with growing buffers.
2004-10-22 08:18:55 +00:00
Roland Illig
10256f6e35 * regex.c: Fix the C preprocessor feature tests. They produced
warnings before.
2004-10-22 07:55:56 +00:00
Andrew V. Samoilov
b1b4aadcd7 * main.c (print_color_usage): Update list of keywords for global,
menu and help.
	Change my email in ChangeLogs
2004-10-22 05:47:25 +00:00
Roland Illig
fe6f6ab57e * cons.saver.c (die): Declare as "static" to avoid gcc warning.
(send_contents): Likewise.
2004-10-21 23:08:28 +00:00
Andrew V. Samoilov
3c8833159f * user.c (user_menu_cmd): Fix error. test_line() doesn't handle
consecutive '+'s and '='s correctly. Pass a line starting with
        a single '+' or '=' instead.
2004-10-20 12:29:55 +00:00
Andrew V. Samoilov
959955939d * hotlist.c (add_new_entry_cmd): Fix memory leaks. 2004-10-16 19:17:19 +00:00
Roland Illig
441701fc13 * view.c (get_bottom_first): Renamed another EOF_offset to INVALID_OFFSET. 2004-10-16 17:30:00 +00:00
Roland Illig
f6300b882b * view.c: Rename EOF_offset to INVALID_OFFSET, as it is mostly
used to mark an invalid cache.
2004-10-16 15:52:48 +00:00
Roland Illig
a02c4b593f * file.c (do_file_error): Add const qualifier. (query_recursive):
Likewise. (query_replace): Likewise.
2004-10-16 15:38:47 +00:00
Andrew V. Samoilov
d79d618c6d * util.c (strip_password): Add "/#sh:". 2004-10-13 12:23:56 +00:00
Andrew V. Samoilov
ebc4dc8e77 * myslang.h: Check USE_INCLUDED_SLANG properly. 2004-10-12 04:32:04 +00:00
Roland Illig
d3774b9d94 * utilunix.c (close_error_pipe): Fixed possible invalid memory access
(three lines below).
2004-10-11 21:53:30 +00:00
Andrew V. Samoilov
4cde691aac * file.c (copy_dir_dir): Small text fix. 2004-10-11 05:27:58 +00:00
Andrew V. Samoilov
eae25a2eff Partially revert my changes 2004-10-07 10:50:00 +00:00
Andrew V. Samoilov
df27244006 * fileopctx.h (struct FileOpContext): Use off_t for offset. 2004-10-06 18:06:26 +00:00
Andrew V. Samoilov
82f98b11d4 * util.c(strip_password): Add support for '@' in username. 2004-10-05 14:25:28 +00:00
Andrew V. Samoilov
220cf56f19 Fix typos 2004-10-05 07:15:01 +00:00
Andrew V. Samoilov
919aa12d7d * cons.saver.c: Partly rewritten cons.saver.c. 2004-10-05 07:14:09 +00:00
Andrew V. Samoilov
7d393abc2c * util.c (convert_controls): Fix possible buffer overflow
for ".*^" strings.
2004-09-28 09:28:57 +00:00
Roland Illig
49117d0f31 * complete.c [__linux__ && !__USE_GNU]: Fix compilation on Red Hat 7.3
* util.c (convert_controls): Fix compilation.
2004-09-27 11:26:53 +00:00
Roland Illig
c47cd9de68 * util.h (convert_controls): Adjusted the comment to what the
function really does.
2004-09-26 18:36:54 +00:00
Roland Illig
f54aef1cfc * pipethrough.c: #include <string.h> to compile on Solaris. 2004-09-26 11:50:39 +00:00
Andrew V. Samoilov
11c6534e70 * key.c (qansi_key_defines[]): Add support for qansi-m terminals.
Needed on QNX Neutrino. (correct_key_code): Likewise.
2004-09-26 00:58:47 +00:00
Roland Illig
8676605ad2 * pipethrough.c: Added pipethrough, a function to execute child
processes in a simple way.
	* pipethrough.h: The interface for the function.
	* pipethrough.3: The manpage (will be installed in maintainer-mode).
	* Makefile.am: Added the files to SRCS.
2004-09-25 21:21:09 +00:00
Roland Illig
771f60dac1 * complete.c: Partly reverted my last patch. I had committed it
accidentally.
2004-09-25 21:08:29 +00:00
Roland Illig
dc259a038c * widget.c (label_callback): Reverted my last change. It crashed. 2004-09-25 20:49:15 +00:00
Roland Illig
9f6a39e83f * command.c (examine_cd): Likewise. Additionally used g_strdup to
not accidentally modify an environment variable.
	* complete.c (command_completion_function): Likewise.
	(filename_completion_function): Likewise. (try_complete): Likewise.
	(variable_completion_function): Likewise.
2004-09-25 14:34:27 +00:00
Roland Illig
8b1e87523a * boxes.c (display_unit): Added const qualifier.
* file.c (check_hardlinks): Likewise.
	* find.c (find_do_view_edit): Likewise. (find_file): Likewise.
	* global.h (home_dir): Likewise.
	* main.c (get_parent_dir_name): Likewise. (init_xterm_support):
	Likewise. (OS_Setup): Likewise.
	* menu.c (create_menu): Likewise.
	* mountlist.c (xatoi): Likewise. (read_filesystem_list): Likewise.
	* poptconfig.c (poptReadDefaultConfig): Likewise.
	* popthelp.c (showHelpIntro): Likewise.
	* rxvt.c (look_for_rxvt_extensions): Likewise.
	* slint.c (has_colors): Likewise.
	* subshell.c (check_sid): Likewise.
	* user.c (check_format_var): Likewise.
	* widget.c (radio_callback): Likewise.
2004-09-25 13:46:23 +00:00
Roland Illig
f02ccb81a0 * view.c (display): Display "_\b_" correctly in both colors. 2004-09-25 02:00:25 +00:00
Roland Illig
bf256d7e04 * view.c (display): Recognize "+\bo" as a list item in nroff mode.
* view.c (hex_search): Added const qualifier.
2004-09-25 01:12:09 +00:00
Andrew V. Samoilov
68a7c1dfab * boxes.c (configure_vfs): g_free handles NULL argument too,
no need for the comparison.
        * cmd.c (set_panel_filter_to): Likewise.
            (do_link): Likewise.
            (quick_cd_cmd): Likewise.
        * color.c (done_colors): Likewise.
        * dialog.c (destroy_dlg): Likewise.
        * dir.c (alloc_dir_copy): Likewise.
        * ext.c (flush_extension_file): Likewise.
        * file.c (copy_file_file): Likewise.
            (panel_operate): Likewise.
        * hotlist.c (remove_group): Likewise.
            (remove_from_hotlist): Likewise.
            (done_hotlist): Likewise.
        * main.c (main): Likewise.
        * setup.c (panel_load_setup): Likewise.
        * tree.c (tree_destroy): Likewise.
            (show_tree): Likewise.
        * user.c (user_menu_cmd): Likewise.
        * utilunix.c (i_cache_add): Likewise.
            (putenv): Likewise.
        * view.c (view_done): Likewise.
            (regexp_search): Likewise.
            (normal_search): Likewise.
            (change_viewer): Likewise.
        * widget.c (label_set_text): Likewise.
            (set_label_text): Likewise.
2004-09-24 22:22:35 +00:00
Roland Illig
2448006e86 * file.c (progress_update_one): Changed parameter type from int
to off_t.

	Fixes http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=124241
2004-09-24 18:14:49 +00:00
Roland Illig
3c09855c2d * util.c (load_file_position): Fixed possible segmentation fault
when an $HOME/.mc/filepos did not contain a ';'.
2004-09-24 16:43:08 +00:00
Roland Illig
11842a375f 2004-09-24 Roland Illig <roland.illig@gmx.de>
* boxes.c: Replaced NULL with (char *) NULL. Likewise for 0, where
	NULL was meant.
	* cmd.c: Likewise.
	* dialog.c: Likewise.
	* ext.c: Likewise.
	* file.c: Likewise.
	* find.c: Likewise.
	* hotlist.c: Likewise.
	* learn.c: Likewise.
	* main.c: Likewise.
	* screen.c: Likewise.
	* setup.c: Likewise.
	* treestore.c: Likewise.
	* user.c: Likewise.
	* util.c: Likewise.
	* utilunix.c: Likewise.
	* view.c: Likewise.
	* widget.c: Likewise.
	* wtools.c: Likewise.
2004-09-24 15:05:28 +00:00
Roland Illig
e0f5d6e37f * cons.handler.c (handle_console_linux): Replaced NULL with
(char *) NULL in call to execl.
	* subshell.c (init_subshell_child): Likewise.
	* utilunix.c (my_system): Likewise.

	From patches from the OpenBSD ports collection.
2004-09-24 14:02:39 +00:00
Roland Illig
ff7a776535 * main.c (OS_Setup): Fixed segmentation fault.
From Oskar Liljeblad <oskar osk.mine.nu>
2004-09-23 14:07:44 +00:00
Andrew V. Samoilov
c5fd73d92b * filegui.c (file_mask_dialog): Expand tilde. Remove redundant
ifs before g_free().
2004-09-21 12:40:50 +00:00
Roland Illig
3c6a792d4b * edit/edit.h: renamed edit() to edit_file() to avoid GCC shadow
warnings (many variables are also called edit).
	* edit/editwidget.c: likewise.
	* src/cmd.c: renamed edit() to edit_file() to avoid GCC shadow
	warnings (many variables are also called edit).
	* src/main.c: likewise.
2004-09-19 17:46:39 +00:00
Roland Illig
9707addee8 * complete.c: Surrounded the declaration of environ by and #ifdef
guard to avoid a GCC warning about a redundant declaration.
2004-09-19 17:35:05 +00:00
Roland Illig
c4db0cac6a * boxes.c: Added const qualifiers. 2004-09-19 17:33:18 +00:00
Roland Illig
9c334b4dd8 * achown.c: Added const qualifiers and const_cast.
* background.c: likewise.
	* boxes.c: likewise.
	* file.c: likewise.
	* filegui.c: likewise.
	* find.c: likewise.
	* hotlist.c: likewise.
	* info.c: likewise.
	* layout.c: likewise.
	* myslang.h: likewise.
	* option.c: likewise.
	* user.c: likewise.
	* util.c: likewise.
	* utilunix.c: likewise.
	* view.c: likewise.
	* widget.c: likewise.
2004-09-19 15:55:58 +00:00
Roland Illig
07d52482c6 * util.c (strip_home_and_password): Fixed possible buffer overflow. 2004-09-19 12:45:43 +00:00
Roland Illig
2f059780af * find.c: Applied patch to make the find dialog more responsive
while scanning through large files.

	From Jindrich Makovicka <makovick kmlinux.fjfi.cvut.cz>
2004-09-19 11:32:30 +00:00
Roland Illig
fd4b2d7d35 * view.c (view_handle_key): Fixed invalid-offset-bug when handling
ctrl-e in hex mode.
2004-09-18 22:00:55 +00:00
Roland Illig
2994c738d0 * help.c (search_string): Fixed a warning about a const qualifier.
A local copy of the string is used for modifying.
	* menu.h: Removed the const qualifier from Menu.name and
	Menu.help_node as they are freed in destroy_menu.
	* menu.c (destroy_menu): Removed the (now unnecessary) casts.
	* popt.h: Removed a const qualifier to avoid compiler warnings.
	* profile.c (get_profile_string): Added const qualifiers to
	avoid compiler warnings. (GetSetProfile): likewise.
	(GetSetProfileChar): likewise.
	* profile.h (get_profile_string): likewise.
	* win.c (check_movement_keys): likewise.
	* win.h (check_movement_keys): likewise.
2004-09-18 14:30:58 +00:00
Andrew V. Samoilov
28c5119bd1 * ext.c (get_file_type_local): Fixes <zombies> in
QNX 6.x (QNX Neutrino) when guessing file type before
        viewing file.
2004-09-17 11:40:30 +00:00
Andrew V. Samoilov
ed53105975 Fix const. Partially revert previous patch. 2004-09-17 08:46:53 +00:00
Andrew V. Samoilov
80ad2213bb * wtools.h (QuickWidget): Make text const.
* wtools.c (fg_input_dialog_help): Fix warning.
2004-09-17 03:19:21 +00:00
Andrew V. Samoilov
0b032ef66f * hotlist.c (add_new_entry_input): Fix warnings. 2004-09-17 03:02:18 +00:00
Andrew V. Samoilov
0e7b3d6ac6 * utilunix.c (tilde_expand): Fix extra slash in result from
tilde_expand() for ~<user>/dir.
2004-09-14 17:39:12 +00:00
Andrew V. Samoilov
8919656440 * utilunix.c (tilde_expand): Fix extra slash in result from tilde_expand() for ~<user>/dir. 2004-09-14 17:23:16 +00:00
Andrew V. Samoilov
ee2e35afb4 * key.c (get_modifier): Recognize keyboard modifiers on Cygwin. 2004-09-14 17:18:25 +00:00
Andrew V. Samoilov
e3698948a4 * execute.c (toggle_panels): Fix error. show_output_starts_shell=1
is not working
        * cmd.c (view_other_cmd): Likewise.
2004-09-12 10:52:17 +00:00
Andrew V. Samoilov
7ff781db70 * view.c (get_byte): Fix avoid dying if file is too large
to fit into memory.
        (load_view_file): Fix avoid mmaping just part of a >=4GB file
        on 32-bit arches.

        * setup.c (load_keys_from_section): Handle "copy".
2004-09-10 09:25:20 +00:00
Andrew V. Samoilov
b6ad379291 * view.c (get_byte): Fix avoid dying if file is too large
to fit into memory.
        (load_view_file): Fix avoid mmaping just part of a >=4GB file
        on 32-bit arches.
2004-09-10 09:14:55 +00:00
Andrew V. Samoilov
9e27c8703a * info.c (info_show_info): don't truncate block counts to 32 bits
on 64-bit platforms
        * util.c (get_current_wd): We know there is just one '\0' byte
        in p, at p[len - 1].
2004-09-03 22:32:41 +00:00
Andrew V. Samoilov
7c9f703060 * util.c (get_current_wd): We know there is just one '\0' byte
in p, at p[len - 1].
2004-09-03 22:05:13 +00:00
Andrew V. Samoilov
2253379eb8 * subshell.c (exit_subshell): Prevent unwanted reuse of freed
pty_buffer.
        * complete.c (variable_completion_function): strncpy()->memcpy()
        changes are because we know there is no '\0' among the first
        length bytes.
        (insert_text): Likewise.
        (command_completion_function): Avoid memory leaks.
        (filename_completion_function): g_free handles NULL argument too,
        no need for the comparison.
        (try_complete): Likewise.
        (command_completion_function): Likewise.
        (free_completions): Likewise.
        * widget.c (gauge_callback): Fix for 64-bit arches (%*s len must
        be int, %3d takes int.
        (copy_region): g_free handles NULL argument too, no need for
        the comparison.
        (kill_line): Likewise.
        * find.c (do_search): Likewise.
        (init_find_vars): Likewise.
        (do_find): Likewise.
2004-09-03 22:00:27 +00:00
Andrew V. Samoilov
d3e4fcb5b0 * menu.c (destroy_menu): Fix warnings.
* view.c (view_adjust_size): Likewise.
        * widget.c (find_buttonbar): Likewise.
2004-09-02 20:14:12 +00:00
Roland Illig
3fe957aef4 * Makefile.am (man2hlp): Added source file glibcompat.c for
glib-1.2 compatibility.
2004-09-02 15:03:48 +00:00
Roland Illig
207711e166 Typo. 2004-09-02 14:59:12 +00:00
Roland Illig
f30fc0163b * man2hlp.c (handle_link): Added header "glib-compat.h" because
glib-1.2 does not know g_strlcpy.
2004-09-02 14:32:53 +00:00
Roland Illig
68fa8e1cd8 * color.c (try_alloc_color_pair (ncurses)): Added const qualifier
to the arguments.
2004-09-02 12:51:09 +00:00
Roland Illig
38257a486a * man2hlp.c (handle_link): Reverted the last change because
glib-1.2 does not know g_strlcpy.
2004-09-02 12:30:28 +00:00
Andrew V. Samoilov
1b80f9ceac * complete.c (completion_matches): Use more suitable function
g_strndup(), instead sequence g_malloc(), strncpy(),
        name[len] = '\0'
* widget.c (copy_region): Likewise. (delete_region): Use
        memmove() instead strcpy().
* user.c (debug_out): Eliminate buffer array.
2004-09-01 23:25:21 +00:00
Andrew V. Samoilov
f27d0e157f * color.c (load_dialog_colors): Make a separate color for
hotkeys in red dialogs.
* color.h: Likewise.
* view.c (view_ok_to_quit): Add hotkey to dialog.
2004-09-01 22:33:43 +00:00
Andrew V. Samoilov
de59cf86c4 * user.c (check_format_var): Use more suitable function
g_strndup, instead sequence g_malloc(), strncpy(), name[len] = '\0'
* man2hlp.c (handle_link): Use g_strlcpy instead sequence
        strncpy(), name[len] = '\0'
* profile.c (GetSetProfile): Likewise.
* wtools.c (fg_input_dialog_help): Likewise.
2004-09-01 18:31:24 +00:00
Andrew V. Samoilov
03ddc6c8e9 * wtools.h: Fix warnings.
* selcodepage.c (select_charset): Likewise.
        * boxes.c (display_bits_box): Likewise.
2004-09-01 17:46:53 +00:00
Andrew V. Samoilov
facaac9889 * color.c (mc_init_pair): Use cast to avoid warning.
* screen.c (display_mini_info): Likewise.
* slint.c (do_define_key): Likewise.
* tree.c (tree_show_mini_info): Likewise. (show_tree):Likewise.
* view.c (view_status): Likewise.
2004-08-31 23:34:18 +00:00
Roland Illig
2ed35b596c * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional
	changes. Patch contributed by Andrew V Samoilov.
2004-08-30 10:38:00 +00:00
Roland Illig
3da9abba54 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-30 00:02:36 +00:00
Roland Illig
7bff9337c0 * Code cleanup: Added const qualifier for variables and
function declarations where possible. Additionally wrapped
	the calls to putenv() by g_strdup().
2004-08-29 23:59:17 +00:00
Roland Illig
3f3c24f511 * view.c (move_backward2): Removed unused variables. 2004-08-29 23:56:53 +00:00
Roland Illig
1d573d9059 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 23:54:47 +00:00
Roland Illig
3957415603 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 23:39:38 +00:00
Roland Illig
03913065b4 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 23:27:40 +00:00
Roland Illig
17714fd8d9 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 23:20:01 +00:00
Roland Illig
4c1ea14493 * Code cleanup: Added const qualifier for variables and
function declarations where possible. Now using two temp
	variables: one for strings that need not be freed (temp) and
	one for strings that need to (temp2).
2004-08-29 22:55:57 +00:00
Roland Illig
5697bd2a92 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 22:51:02 +00:00
Roland Illig
d6d457ba9a * dialog.c: made the callback parameter of find_widget_type correctly typed. 2004-08-29 22:44:17 +00:00
Roland Illig
b75c5a31a3 * dialog.h: marked the title as "notconst", as it is freed
by the destructor.
2004-08-29 22:43:27 +00:00
Roland Illig
5c4add0e6e * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 22:38:06 +00:00
Roland Illig
b86b6a7bc7 * background.c (do_background): Fixed file descriptor leak. 2004-08-29 18:57:31 +00:00
Roland Illig
243e84706e * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 18:45:56 +00:00
Roland Illig
4baefa09c2 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 17:15:23 +00:00
Roland Illig
8458240147 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 16:42:40 +00:00
Roland Illig
6f68fa3082 * cmd.c (do_link): Fixed memory leak and cleaned up code. 2004-08-26 00:12:16 +00:00
Roland Illig
1544da13a1 Added missing ChangeLog entries from 2004-08-16. 2004-08-24 12:58:56 +00:00
Andrew V. Samoilov
6ca233ecea * utilunix.c (tilde_expand): Use more suitable function
g_strndup, instead sequence g_malloc, strncpy, name[len] = '\0'
2004-08-20 21:28:05 +00:00
Roland Illig
fb4fd57695 * view.c (move_backward2): Bugfix: Only move the view if the cursor would be out-of-view. 2004-08-19 19:34:16 +00:00
Roland Illig
a540dee8b5 Fixed misleading indentation. 2004-08-19 19:19:04 +00:00
Roland Illig
ea14b320f7 * util.h (move_backward2): Fixed endless loop. Cleaned up code. The only case that's left with the old code is text mode with line wrapping. (move_backward2_textmode_wrap): The special case of moving some lines up in text mode with line wrapping enabled. 2004-08-19 19:16:57 +00:00
Roland Illig
d3a5b40c19 * util.h: Added the function free_after for easier handling of dynamically allocated strings. 2004-08-19 11:35:56 +00:00
Roland Illig
c6e3dde5a5 * util.c: Added the function str_replace, which replaces all occurences of a character in a string. 2004-08-19 11:26:48 +00:00
Andrew V. Samoilov
fecb161283 x.c (mc_tmpdir): Fix typos in comment.
Set MC_TMPDIR environment variable for vfs scripts.
        Clear error after successful test of mc temp dir.
2004-08-18 20:34:01 +00:00
Roland Illig
226177cf11 "make uninstall" removes the symlinks bin/mcedit and bin/mcview. 2004-08-18 20:22:59 +00:00
Andrew V. Samoilov
03976121d9 * screen.c (paint_frame): Fix possible buffer overflow. 2004-08-18 19:55:47 +00:00
Roland Illig
bc8127ded6 Added more const-ness. 2004-08-18 08:58:37 +00:00
Roland Illig
25d3b4b489 Added a FIXME comment concerning the interpretation of the "cd" command. 2004-08-17 20:08:07 +00:00
Andrew V. Samoilov
6776c2cdb9 do_background: Use O_RDWR when opening the file '/dev/null'
for replacement standard streams.
2004-08-17 20:01:58 +00:00
Andrew V. Samoilov
ff6051511f ckground.c (do_background): Use O_RDWR when opening the file '/dev/null'
for replacement standard streams.
2004-08-17 20:01:30 +00:00
Andrew V. Samoilov
d3d15be22f utilunix.c(mc_tmpdir): Check return value of getpwuid() for NULL. 2004-08-17 18:46:33 +00:00
Andrew V. Samoilov
72488a9d6c mc_tmpdir: Check return value of getpwuid() for NULL. 2004-08-17 18:45:47 +00:00
Roland Illig
756067410f Removed trailing comma in enumeration. 2004-08-17 11:13:10 +00:00
Roland Illig
2ebf787653 Renamed version to show_version to avoid name clashes. 2004-08-17 10:40:16 +00:00
Roland Illig
207f7d126c Even more const-ification. 2004-08-17 00:00:32 +00:00
Roland Illig
5c74367969 Added more const-ness to variables. 2004-08-16 23:48:46 +00:00
Roland Illig
1105b8e941 Splittet the vfs.h header into a user's part (vfs.h) and an implementor's part (vfs-impl.h). 2004-08-16 23:25:49 +00:00
Roland Illig
9d41314d09 Added more const-ness to print_vfs_message. 2004-08-16 18:31:30 +00:00
Roland Illig
a22afa7a72 Added more const-ness to variables. 2004-08-16 18:31:05 +00:00
Roland Illig
9dfb30636e Compacted and commented the code in do_try_to_select. 2004-08-16 18:30:34 +00:00
Roland Illig
511c710fe6 Added explicit initializers for global variables. 2004-08-16 18:25:16 +00:00
Roland Illig
2c77aa7e1c Documented x_basename and added const. 2004-08-16 18:19:37 +00:00
Roland Illig
2399a1604f Removed unnecessary type cast. 2004-08-16 17:45:59 +00:00
Roland Illig
493febff35 Added more const-ness to a variable. 2004-08-16 17:45:38 +00:00
Roland Illig
13e298c2ea Replaced (char *) 0 by NULL. 2004-08-16 17:44:14 +00:00
Roland Illig
b2605e09e9 Code cleanup concerning PAUSE_OPTIONS. 2004-08-16 17:43:36 +00:00
Roland Illig
d003fcb1e0 Use memmove instead of memcpy for overlapping objects. 2004-08-16 17:42:47 +00:00
Roland Illig
748279de99 Added more const-ness to the function arguments. 2004-08-16 16:22:35 +00:00
Roland Illig
bfb2047463 Removed unnecessary type cast. 2004-08-16 16:22:14 +00:00
Roland Illig
8aeea3256f Added more const-ness to the function arguments. 2004-08-16 15:45:05 +00:00
Roland Illig
5d44086ccc Added a C++ like const_cast macro. 2004-08-16 15:42:48 +00:00
Roland Illig
f17c1f291c mc_ungetlocalcopy does not free its second argument anymore. 2004-08-16 15:18:17 +00:00
Roland Illig
f4129bc22b Fixed a format string bug (%s => %d). 2004-08-16 05:17:49 +00:00
Roland Illig
60ae60fb1e Print the pid as an int. 2004-08-16 04:57:07 +00:00
Roland Illig
6bd6aa7b50 Made output of the st_mode system independent. 2004-08-16 04:56:19 +00:00
Roland Illig
c673ebfc89 Made an integer literal compatible to the variable it is compared with. 2004-08-16 04:25:41 +00:00
Roland Illig
7adbbafc6a Made the data type of some variables more appropriate. 2004-08-16 04:25:06 +00:00
Roland Illig
bdd1d219a3 Created a new type (tree_key_map) for functions that act on a tree. 2004-08-16 04:24:45 +00:00
Roland Illig
a91c5b9ad2 Created a new type (panel_key_map) and wrote some wrapper functions where the parameters didn't match. Adjusted the type of some variables. 2004-08-16 04:24:04 +00:00
Roland Illig
e0ea1733e3 The type key_callback has got a real prototype. 2004-08-16 04:20:56 +00:00
Roland Illig
b08778c9c6 Made the data type of some variables more appropriate. 2004-08-16 04:17:43 +00:00
Roland Illig
e0512c10dc Invented two new data types (offset_type and screen_dimen) and adjusted the type of many variables. 2004-08-16 04:16:55 +00:00
Roland Illig
4afb6e832d Added a prototype to the function declaration. 2004-08-16 03:24:49 +00:00
Roland Illig
0784d2a7b7 Added type casts where necessary to avoid the "signed-unsigned-comparison" warning. 2004-08-16 03:14:04 +00:00
Roland Illig
6cefb6d3bb Made the data type of some variables more appropriate. 2004-08-16 03:12:05 +00:00
Roland Illig
397d28da8f Corrected data type in printf argument. 2004-08-15 23:09:36 +00:00
Roland Illig
a47ff4dece Added missing initializers for poptOption.argDescrip. 2004-08-15 23:06:19 +00:00
Roland Illig
a553518dc7 Corrected data type in printf argument. 2004-08-15 23:03:08 +00:00
Roland Illig
1fe1eb886a Marked the last item of a QuickWidget array as NULL_QuickWidget. 2004-08-15 19:04:19 +00:00
Roland Illig
c6ecc5b303 Marked the last item of a QuickWidget array as NULL_QuickWidget. 2004-08-15 18:24:06 +00:00
Roland Illig
6607288ca0 Added missing initializers. 2004-08-15 18:23:25 +00:00
Roland Illig
80ed49f132 Marked the last item of a QuickWidget array as NULL_QuickWidget. 2004-08-15 18:22:39 +00:00
Roland Illig
fea3a45fff Added the macro NULL_QuickWidget for safer declarations of arrays of QuickWidgets. 2004-08-15 18:17:40 +00:00
Pavel Roskin
3a0c1187b2 * vfsdummy.h [!USE_VFS]: Make sure that vfs_canon() doesn't
change the original string.  Fix compilation without VFS.
2004-04-18 20:56:08 +00:00
Andrew V. Samoilov
49bcfac068 * (insert_char): Use g_realloc() instead of g_malloc()+strcpy()+g_free(). 2004-03-07 07:29:12 +00:00
Andrew V. Samoilov
50dda0fcb3 * user.c (extract_line): Add a new parameter (size of the
output buffer) to prevent buffer overflow.
2004-03-07 06:24:14 +00:00
Andrew V. Samoilov
d1943ab8cf * achown.c (init_chown_advanced) [ENABLE_NLS]: i18n fix. 2004-03-07 06:21:16 +00:00
Pavel Roskin
d78f9b9bf0 * subshell.c: Partly revert previous patch to preserve translated strings. 2004-03-05 08:08:13 +00:00
Pavel Roskin
0899d3f580 Fix date of the last commit. 2004-03-05 08:05:18 +00:00
Pavel Roskin
3722e428c0 * subshell.c: Partly revert previous patch to preserve
translated strings.
2004-03-05 08:01:44 +00:00
Pavel Roskin
b46fe283f6 Fix use of uninitialized pty_name. 2004-02-10 00:16:17 +00:00
Pavel Roskin
7eb0ef8bd2 * subshell.c: Use "rn" at the end of all error messages.
Don't use perror().  Make error messages more exact.
2004-02-10 00:11:09 +00:00
Pavel Roskin
291f976b13 * utilunix.c (canonicalize_pathname): Add support for UNC paths. 2004-01-24 00:17:34 +00:00
Pavel Roskin
4ced5086ac * utilunix.c (canonicalize_pathname): Return void to make it
clear that the conversion is done in place.  Adjust all callers.
2004-01-23 23:53:37 +00:00
Pavel Roskin
c7c3073133 * filegui.c (init_replace): Don't show the "Reget" button when
moving files.  Reported by Arpad Biro <biro_arpad@yahoo.com>
2004-01-23 22:08:05 +00:00
Pavel Roskin
efff2a4d4e * fileopctx.h: Add "operation" filed to FileOpContext.
* fileopctx.c (file_op_context_new): Add "operation" argument.
* filegui.c (file_op_context_create_ui): Remove "operation"
argument, it's known already.  Adjust all callers.
2004-01-23 21:59:38 +00:00
Pavel Roskin
9fe5ee23c9 * user.c (execute_menu_command): Put /bin/sh in the beginning of
the script.
2004-01-23 17:33:36 +00:00
Pavel Roskin
1d6ab07a10 * screen.c (display_mini_info): Correctly fill the space after
"<readlink failed>".
2004-01-22 08:25:23 +00:00
Pavel Roskin
429f1a476e * glibcompat.h: Fix definition of g_try_realloc(). 2004-01-22 07:19:58 +00:00
Dmitry Alexeyev
6147cf303e * key.c (get_event): Treat all negative values of gpm_fd in the
same way.  Add one more check that gpm is alive.
2003-12-24 07:21:34 +00:00
Dmitry Alexeyev
1172440f67 Warning fix from Dmitry Alexeyev <dmi_a@qnx.org.ru> 2003-12-24 07:11:31 +00:00
Dmitry Alexeyev
95a681cd24 * layout.c (rotate_dash): Set color before printing the dash. 2003-12-24 06:43:26 +00:00
Pavel Roskin
b151ce4419 Constify rotating_dash. 2003-12-06 04:04:27 +00:00
Pavel Roskin
c1b37a392b Typo fix. 2003-12-06 04:03:07 +00:00
Pavel Roskin
125456c5d8 * command.c (examine_cd): Add tilde expansion. 2003-12-01 16:59:29 +00:00
Pavel Roskin
e30307ea4a * utilunix.c (tilde_expand): Correct last fix, simplify code.
Reported by David Sterba <dave@jikos.cz>
2003-11-28 15:23:19 +00:00
Pavel Roskin
ab4e930084 * execute.c (toggle_panels): Refresh panels after returning from
Ctrl-O.
2003-11-27 18:19:57 +00:00
Pavel Roskin
7c0f20bcb8 * src/TODO: Move ...
* TODO: ... here.
* doc/DEVEL: Move ...
* HACKING: ... here.  Adjust makefiles.
2003-11-27 18:06:56 +00:00
Pavel Roskin
1edc838fb9 TODO for version 4.6.1 completed. 2003-11-27 17:58:40 +00:00
Pavel Roskin
73968fe432 * cmd.c (view_file_cmd): Use input_expand_dialog(). 2003-11-27 17:52:55 +00:00