Commit Graph

484 Commits

Author SHA1 Message Date
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
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
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
ca6af7ed40 * edit/choosesyntax.c (pstrcmp): Make static. 2007-09-11 08:34:31 +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
46d039e0e1 * edit/editcmd.c (edit_find_string): Fix an off-by-one error when matching
against a RE.
2007-05-02 11:22:01 +00:00
Pavel Tsekov
fb01c26098 * edit/editcmd.c (edit_replace_cmd): Disable scanf-printf replacement
if "Regular expression" is selected. Fix for savannah bug #19333.
2007-04-27 08:53:50 +00:00
Pavel Roskin
5da9a185c9 * edit.h: Make skip_detach_prompt unsigned. Otherwise, it
cannot get value of 1.
2007-02-03 01:03:53 +00:00
Pavel Tsekov
bb2231fd1b * edit/edit.c (edit_execute_cmd): Update the bracket pair highlighter
state after processing CK_Find, CK_Find_Again, CK_Replace,
CK_Replace_Again, CK_Complete_Word.
2007-01-04 15:37:23 +00:00
Pavel Tsekov
2cb049a9cb * edit/edit.h (edit_move_to_prev_col): Declare the function to have
external linkage.
(edit_find_bracket): Likewise.
* edit/edit.c (edit_move_to_prev_col): Reflect the changes above.
(edit_find_bracket): Likewise.
* edit/editwidget.c (edit_event): When moving around with the mouse
use edit_move_down(), edit_move_up() and edit_move_to_prev_col()
instead of move_cursor() to update the cursor position since
the latter doesn't update some internal variables.
Use edit_find_bracket() to update the bracket pair highlighter
state.
2006-12-10 22:07:28 +00:00
Leonard den Ottolander
59e59d9e3b * edit/editdraw.c (edit_draw_this_line): Remove unused variable book_mark. 2006-12-04 22:44:50 +00:00
Roland Illig
45bb7dbe50 The file's mtime is checked before saving. 2006-11-17 21:50:33 +00:00
Leonard den Ottolander
2f8a75974b * syntax.c (edit_read_syntax_file): Set NENTRIES to 30. 2006-08-02 15:18:22 +00:00
Pavel Tsekov
6625412758 * edit/wordproc.c (next_word_start): A word is preceded by a whitespace -
the latest changes missed that fact. Restore the original behaviour.
2006-06-16 20:01:29 +00:00
Pavel Tsekov
13884c4908 * src/wordproc.c (word_start): Add new argument. Pass extra argument
to next_word_start().
(next_word_start):  Add new argument to denote the maximum number of
characters to process.
(format_this): Reflect the changes above.
2006-06-16 19:34:49 +00:00
Pavel Tsekov
afe0fce14e * edit/choosesyntax.c (pstrcmp): Fix the function declaration. 2006-05-04 12:33:57 +00:00
Leonard den Ottolander
d5a17b01f8 * syntax.c (edit_read_syntax_rules): Zero edit->rules on allocation to
avoid crash after attempting to load a non existent syntax file.
2006-04-03 21:22:09 +00:00
Leonard den Ottolander
76cf84bb69 * choosesyntax.c: Sort syntax list. 2006-03-21 22:23:37 +00:00
Leonard den Ottolander
8d439c2f88 * choosesyntax.c: GPL v2 only. 2006-03-21 22:22:03 +00:00
Pavel Tsekov
2a7a8fa19d * edit/edit-widget.h (struct WEdit): Add new field.
* edit/editcmd.c (edit_save_file): Prompt whether to detach a hardlinked
file if in "Quick save" mode.
Return -1 to indicated that the user requested to cancel the operation.
(edit_save_as_cmd): Adjust the code to handle the new return value of
edit_save_file().
(edit_save_cmd): Likewise.
2006-03-17 15:41:21 +00:00
Pavel Tsekov
1ab4a2b41c * edit/editcmd.c (edit_save_as_cmd): If saving of the file fails
remove only the _save_ lock.
2006-03-17 10:24:50 +00:00
Pavel Tsekov
03e7a434b4 * edit/editlock.c: Fix for savannah bug #13673.
(lock_build_symlink_name): New function.
(edit_lock_file): Use lock_build_symlink_name().
(edit_unlock_file): Likewise.
2006-03-15 16:08:28 +00:00
Pavel Tsekov
fcc6f9bbea * edit/editcmd.c (edit_new_cmd): Remove redundant call to
`edit_unlock_file()'.
(edit_ok_to_exit): Likewise.
2006-03-15 13:20:24 +00:00
Roland Illig
663f821891 * edit.c (user_menu): There is no need to prefix the filename
with PATH_SEP when calling concat_dir_and_file().
2006-02-10 12:29:36 +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
Leonard den Ottolander
2157716489 edit/edit.c (edit_execute_cmd): Reload syntax on toggle to on. 2006-02-02 19:45:49 +00:00
Leonard den Ottolander
17108c8b2e edit/edit.c, edit/editcmddef.h, edit/editkeys.c: Add Ctrl-S to toggle syntax
highlighting.
2006-02-01 17:07:11 +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
Pavel Tsekov
60658b4b35 * editcmd.c (edit_block_copy_cmd): Allow a block of selected
columns	as created by Shift + F3 to be copied anywhere in
the editor area.
2006-01-27 15:00:59 +00:00
Pavel Tsekov
450fe431fc * edit.c (edit_auto_indent): Remove redundant parameters.
Change the indentation strategy to copy whitespace
from the previous line instead of filling up with allegedly
equivalent whitespace depending on the tab setting.
(edit_execute_cmd): Accomodate change of parameters to
edit_auto_indent().
2006-01-26 15:42:56 +00:00
Leonard den Ottolander
689681db31 * edit/editcmd.c (edit_replace_dialog): Use Alt-m on pro&Mpt in replace
dialog. Alt-p is in use for the previous entry.
* po/*.po: Update pro&Mpt string.
2005-11-22 22:05:44 +00:00
Pavel Roskin
0e653491c1 * choosesyntax.c: Make undeclared functions static.
* editmenu.c: Likewise.
* usermap.c: Likewise.
2005-11-11 02:26:04 +00:00
Roland Illig
13684ebcd7 Added many empty lines to make reading easier. 2005-10-12 15:50:43 +00:00
Leonard den Ottolander
cd2061a883 * edit/editcmd.c (edit_replace_dialog): Replace duplicate hotkey.
* po/*.po: Update changed string.
2005-10-04 21:15:06 +00:00
Roland Illig
9be77996d6 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.
2005-09-07 08:54:11 +00:00
Roland Illig
34d39bfd0b * editmenu.c: Added a "Save setup..." entry. There had not been
the possibility of saving editor options except calling the
	"Save setup..." function from within the file manager.
2005-09-07 08:49:30 +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
d12e66fb17 * editcmd.c: Fixed some of the gcc warnings. 2005-09-05 01:25:34 +00:00
David Martin
e97997b2ba Do translate dialog strings, not just mark. 2005-08-19 09:10:07 +00:00
Roland Illig
1c607a7414 Removed unused variable. 2005-08-15 21:40:34 +00:00
Roland Illig
ad8b819a48 * editdraw.c (render_edit_text): Removed unused variables. 2005-08-15 21:38:33 +00:00
Roland Illig
dee3850ee4 * editdraw.c (render_edit_text): Removed unused variable. 2005-08-15 21:37:34 +00:00
Roland Illig
3b1fcf6792 * editcmd.c (edit_completion_dialog): Code cleanup. 2005-08-15 21:35:33 +00:00
Roland Illig
f9df117df1 * edit-widget.h: Changed bit fields of length 1 from signed to
unsigned.
2005-08-15 20:34:26 +00:00
Pavel Roskin
56c1ec97ad * choosesyntax.c (edit_syntax_dialog): Add parentheses as
suggested by gcc.
* editkeys.c: Use braces in the keymap initializers.
2005-08-10 16:47:44 +00:00
Leonard den Ottolander
412d3b8123 edit/choosesyntax.c: Add option to reload current syntax. 2005-07-27 15:43:55 +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
Pavel Roskin
2fd33802b3 * Makefile.am: Add usermap.h to the sources. 2005-07-21 21:01:51 +00:00
Roland Illig
073907ec5f * usermap.c: Allow user-defined keyboard bindings for mcedit.
* usermap.h: Likewise.
	* Makefile.am: Likewise.
	* editcmd.c: Define new editor commands which had been coded
	inline before.
	This change also affects some other files.
	* edit-widget.h: Invented a new type edit_key_map_type instead of
	using long for.
	* editkeys.c: Using that type.
2005-07-20 11:56:30 +00:00
Roland Illig
fb221cb8b0 * editkeys.c: When typing literal characters after C-q, allow
the alphabetic characters to input ASCII control characters.
2005-07-18 09:32:19 +00:00
Roland Illig
bf034f70e1 * edit.h: Added missing #include <stdio.h>. 2005-07-06 21:26:26 +00:00
Roland Illig
0ee0936513 * editwidget.c: Don't dereference WButtonBar. 2005-06-14 13:00:09 +00:00
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Roland Illig
7758bb1b95 * editwidget.c: Removed casts on function pointer types. 2005-05-23 11:14:31 +00:00
Pavel Roskin
cd702593f6 * editwidget.c (edit_file): Move menu initialization ...
* editmenu.c (edit_init_menu): ... here.  Allocate menu
dynamically.
(edit_done_menu): Take Wmenu argument rather than Menu.  Free
menu.
(edit_reload_menu): New function, reload the menu.
(edit_options_dialog): Reload the menu if key emulation has
changed.
2005-05-20 21:19:40 +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
Pavel Roskin
b5b70bce10 * edit.h: Eliminate global EditMenuBar. Fix all dependencies. 2005-05-20 19:46:47 +00:00
Pavel Roskin
7511729690 * edit.h: Eliminate edit_message_dialog macro - it's used
inconsistently.  Fix all callers to use query_dialog().
2005-05-20 19:27:45 +00:00
Pavel Roskin
071f70d0e9 * edit-widget.h: Revert signedness fixes. We need unsigned char
for character classification.
* editcmd.c: Likewise.  Use casts to suppress warnings instead.
Thanks to Roland Illig <roland.illig@gmx.de>
2005-05-10 23:04:32 +00:00
Pavel Roskin
21ea3f6740 * *.c: Remove duplicate includes. 2005-05-10 20:57:11 +00:00
Pavel Roskin
4adb9bfe13 * edit-widget.h: Use char instead of unsigned char to fix
warnings from gcc 4.0.
* editcmd.c: Likewise.
2005-05-03 23:40:15 +00:00
Pavel Roskin
d78556d3c5 * edit.h: Use D_ERROR for edit_error_dialog, D_NORMAL for query
dialogs.  Remove unused edit_query_dialog4.
2005-05-03 23:26:51 +00:00
Leonard den Ottolander
8994b8bbec Added casts on 2 parameters to g_snprintf. 2005-04-27 21:02:59 +00:00
Pavel Roskin
b2999839e8 * editcmd.c (edit_replace_cmd): Restore correct behavior of
Shift-F4.
2005-03-17 21:18:23 +00:00
Roland Illig
ecc08f6c60 * edit.h: Removed unnecessary #include directives ...
* *.c: ... and added them here.
2005-02-22 17:00:36 +00:00
Roland Illig
5dbdfb07ba * editcmd.c: Explicitly declared unused variables to make gcc
quiet.
2005-02-08 17:14:34 +00:00
Roland Illig
e501886d58 * editdraw.c: Renamed redraw_labels to buttonbar_redraw.
* editwidget.c: Likewise. Renamed define_label_data to
	buttonbar_set_label_data.
2005-02-08 09:50:16 +00:00
Roland Illig
db5eec4964 * edit.h: Reformatted #definitions. 2005-02-08 06:48:54 +00:00
Roland Illig
e5e3a8f87d * editcmd.c: Fixed whitespacing issues.
* editdraw.c: Likewise.
	* syntax.c: Likewise.
2005-02-07 20:32:17 +00:00
Roland Illig
15342acba1 * edit.c: Fixed some whitespacing issues. 2005-02-07 20:28:13 +00:00
Roland Illig
2a281ad18d * *.c: Removed unused parameters for static functions. Marked
unused parameters for global functions. Removed redundant
	comments.
2005-02-07 20:08:01 +00:00
Roland Illig
51156030fb * ChangeLog: Applied trim_changelog. 2005-02-07 07:33:47 +00:00
Roland Illig
05d2881a71 * *.c: Removed trailing whitespace. 2005-02-07 07:31:19 +00:00
Roland Illig
e8e0035587 * edit.h: Removed catstrs, as it is only used in editcmd.c.
* editcmd.c (catstrs): Changed declaration to be static.
2005-02-07 06:34:08 +00:00
Roland Illig
b49ac634f5 * editwidget.c: Don't use catstrs anymore. 2005-02-07 06:31:04 +00:00
Roland Illig
13737b1de1 * edit.c (user_menu): Don't use catstrs anymore. 2005-02-07 06:18:13 +00:00
Roland Illig
259485542a * syntax.c: Don't use catstrs anymore. 2005-02-07 06:11:15 +00:00
Roland Illig
64eed6e12b * edit.h (catstrs): Changed the return type to "const char *".
* editcmd.c (catstrs): Likewise.
	* edit.c (user_menu): Added const qualifiers.
	* editcmd.c: Likewise.
	* syntax.c: Likewise.
2005-02-07 06:02:59 +00:00
Roland Illig
c90e9d1b95 * edit.c: Improved message formatting. 2005-02-06 23:58:59 +00:00
Roland Illig
6dc6158ff1 * edit.h: Removed NO_INLINE_GETBYTE conditional. The name was
misleading, as it really meant INLINE_GETBYTE. Furthermore,
	it has not been working since the split of edit.h into edit-widget.h.
	* edit.c: Likewise.
2005-01-30 20:34:58 +00:00
Roland Illig
020455853d * editdraw.c (edit_status): Changed some variables from size_t to
int to avoid GCC warnings.
2005-01-28 01:34:48 +00:00
Roland Illig
067e407cf7 * editdraw.c (edit_status): Fixed drawing bug with ncurses. 2005-01-27 22:14:58 +00:00
Roland Illig
6f03d9bbd9 * edit.h: Renamed multiple inclusion guards that started with a
double underscore. Added #includes for dependent files.
	* editcmddef.h: Likewise.
	* editlock.h: Likewise.
	* edit-widget.h: Likewise.
2004-12-03 17:09:27 +00:00
Roland Illig
521be0ef82 * editcmd.c (edit_replace_cmd): Separated input and output arguments.
* editcmd.c (edit_replace_dialog): Code cleanup.
2004-12-02 21:02:07 +00:00
Andrew V. Samoilov
a6c81a0d7a Change my contacts 2004-12-02 16:53:50 +00:00
Andrew V. Samoilov
26e400227a * editcmd.c (edit_replace_prompt): Fix warning with 'unused' label_len. 2004-12-02 08:31:52 +00:00
Roland Illig
badf915e39 * editcmd.c: Introduced a type edit_getbyte_fn to get rid of
the many function type casts.
2004-12-01 00:55:17 +00:00
Andrew V. Samoilov
82f580f857 * syntax.c (get_args): Use in "args_size" argument instead of
in out "argc".  Return number of found entries.
        Adjust all callers.
2004-11-18 10:02:33 +00:00
Andrew V. Samoilov
f22b5d749f * syntax.c (get_args): Use "argc" to check "args" size.
(edit_read_syntax_rules): Add new parameter "argc" (size of the
        "args" buffer) to prevent buffer overflow.
2004-11-16 19:46:46 +00:00
Andrew V. Samoilov
bfee231c11 * editdraw.c (edit_status): Don't output extra characters on the
status line.
        (print_to_widget): Don't use addch() with negative offset to skip
        over excessive columns. Output only those columns that should be
        displayed on the screen.
2004-11-10 14:11:27 +00:00
Roland Illig
188b970477 * editcmd.c (edit_replace_prompt): Fixed codepage conversion bug
introduced in on 2004-09-25 by me.
2004-11-10 06:50:50 +00:00
Roland Illig
63cae58f20 * editdraw.c (edit_status): Expand the filename field in the status
line to 16 characters even if the actual filename is shorter.
2004-10-23 13:14:14 +00:00
Roland Illig
5d5237e557 * syntax.c (read_one_line): Fixed SEGV when reading syntax file
with "\r\n" line endings on Unix.
2004-10-16 13:33:21 +00:00
Andrew V. Samoilov
5d5f56d4ee * editcmd.c (regexp_error): Small text fix.
(edit_search_cmd): Likewise.
2004-10-11 05:31:29 +00:00
Roland Illig
7a505ea99d * editcmd.c (edit_ext_cmd): Revoked my last change. 2004-09-26 11:42:17 +00:00
Roland Illig
8d75409e60 * editcmd.c (edit_ext_cmd): Don't delete the current block if no
block has been selected. In that case, just insert the output.
2004-09-25 21:39:11 +00:00
Roland Illig
d0a8da7cef * editcmd.c (edit_ext_cmd): Replaced the old version with a new
one that uses ../src/pipethrough. The new version feeds the
	currently selected block (or an empty input) into the command
	which reduces the chance of a deadlock when the command tried
	to read from stdin. It also allows the user to insert the output
	of a command that has exited with a nonzero result. Another
	feature is that it does not use temporary files.
2004-09-25 21:34:36 +00:00
Roland Illig
2a2b478f67 * syntax.c (this_try_alloc_color_pair): Added const qualifiers.
* editcmd.c (snprintf_p): Likewise. (edit_replace_prompt):
	Simplified the code.
2004-09-25 20:53:32 +00:00
Roland Illig
a3c3564d4d * syntax.c (this_try_alloc_color_pair): Added const qualifiers. 2004-09-25 14:28:10 +00:00