Commit Graph

140 Commits

Author SHA1 Message Date
Roland Illig
3b1fcf6792 * editcmd.c (edit_completion_dialog): Code cleanup. 2005-08-15 21:35:33 +00:00
Leonard den Ottolander
f21564b9e6 * edit/choosesyntax.c: Create file. Menu option to override syntax
highlighting.
* edit/Makefile.am: Add choosesyntax.c.
* edit/edit.c (edit_init): Set option_auto_syntax to 1 on every invokation
of the editor.
* edit/edit.h: Pass char*** to edit_load_syntax(). Add parameters for
syntax dialog and override.
* edit/editmenu.c (menu_options): Add menu option to override syntax
hightlighting.
* edit/editoptions.c (edit_options_dialog): Pass option_syntax_type to
edit_load_syntax().
* edit/syntax.c (edit_read_syntax_file): Dynamically allocate and fill
syntax list pnames.
* edit/syntax.c (edit_load_syntax): Use char*** for syntax list.
* src/wtools.h: #include "widget.h" and remove redundant declarations
of Dlg_head and WListbox.
2005-07-24 13:37:58 +00:00
Roland Illig
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
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +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
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
e5e3a8f87d * editcmd.c: Fixed whitespacing issues.
* editdraw.c: Likewise.
	* syntax.c: Likewise.
2005-02-07 20:32:17 +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
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
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
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
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
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
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
Andrew V. Samoilov
12d24222db * edit.c (edit_clean): g_free handles NULL argument too,
no need for the comparison.
            (edit_move_backward_lots): Likewise.
        * editcmd.c (edit_set_filename): Likewise.
            (edit_replace_cmd): Likewise.
            (edit_search_cmd): Likewise.
            (edit_sort_cmd): Likewise.
            (edit_mail_dialog): Likewise.
        * syntax.c (syntax_g_free): Likewise.
            (edit_read_syntax_rules): Likewise.
2004-09-24 22:37:00 +00:00
Roland Illig
9c65d36bdd * edit.c: Replaced NULL with (char *) NULL. Likewise for 0, where
NULL was meant.
	* editcmd.c: Likewise.
	* editlock.c: Likewise.
	* editwidget.c: Likewise.
	* syntax.c: Likewise.
2004-09-24 14:57:57 +00:00
Roland Illig
6c29de339b * editcmd.c (edit_replace_prompt): Allocate the label text
dynamically instead of using catstrs. Don't handle
	ENABLE_CHARSET specially.
2004-09-19 17:23:52 +00:00
Roland Illig
d5f70f2ab8 * editcmd.c (edit_replace_cmd): Added const qualifier.
* editwidget.c (edit_my_define): likewise.
2004-09-19 15:40:09 +00:00
Andrew V. Samoilov
32cdf184ba * editcmd.c (edit_replace_prompt) [HAVE_CHARSET]: Warning hack. 2004-09-17 03:07:37 +00:00
Andrew V. Samoilov
0758929ef1 * editwidget.c (edit_adjust_size): Fix warnings.
(edit_dialog_callback): Likewise.
        edit.c (menu_save_mode_cmd): Likewise.
2004-09-02 20:36:17 +00:00
Andrew V. Samoilov
f379b30232 * editcmd.c (edit_save_as_cmd): Add hotkey to dialog.
(edit_save_confirm_cmd): Likewise. (edit_new_cmd): Likewise.
(edit_load_cmd): Likewise. (edit_block_move_cmd): Likewise.
(edit_block_delete): Likewise. (edit_ok_to_exit): Likewise.
2004-09-01 22:40:45 +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
243e84706e * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 18:45:56 +00:00
Andrew V. Samoilov
761406cfdf * edit/editcmd.c: Fix buffer overflows in edit replace code. 2004-08-25 22:12:02 +00:00
Roland Illig
640f3a163c Added more const-ness to variables and functions. 2004-08-16 17:49:57 +00:00
Roland Illig
6cefb6d3bb Made the data type of some variables more appropriate. 2004-08-16 03:12:05 +00:00
Roland Illig
9902c1b885 Added missing initializers for QuickDialog.i18n. 2004-08-15 22:55:17 +00:00
Roland Illig
c6ecc5b303 Marked the last item of a QuickWidget array as NULL_QuickWidget. 2004-08-15 18:24:06 +00:00
Pavel Roskin
a7c0bbac62 * editcmd.c: Use input_expand_dialog() instead of input_dialog()
for loading and saving files.
2003-11-27 10:23:50 +00:00
Pavel Roskin
f51e86a184 * editcmd.c (pipe_mail): Eliminate g_strdup_printf().
(edit_complete_word_cmd): Fix possible buffer overflow.
2003-11-24 20:27:34 +00:00
Pavel Roskin
4bc92accff * editcmd.c (edit_mail_dialog): Trivial clean-up. 2003-11-03 18:59:50 +00:00
Pavel Roskin
8bc40b44f0 Fix includes not to rely on $(top_srcdir) being in the include path. 2003-10-29 08:54:22 +00:00
Pavel Roskin
e90a7540a2 * edit.h: Make static all functions and variables that don't
need to be global.  Remove unused functions.  Adjust all
dependencies.
2003-10-14 21:48:40 +00:00
Pavel Roskin
e0f9b7ab83 * editcmd.c (edit_raw_key_query): Use straight widget order.
(edit_completion_dialog): Likewise.
* editwidget.c (edit): Likewise.
2003-09-12 21:30:29 +00:00
Pavel Roskin
e14f56d71b * dlg.h: Replace DLG_BACKWARD to DLG_REVERSE with a better
defined meaning.  Make it default to populate dialogs from the
top.  Change all calls to create_dlg().
2003-09-12 21:22:01 +00:00
Pavel Roskin
0c794a4e95 Fix unsafe defines. 2003-09-10 21:33:12 +00:00
Pavel Roskin
13a02ef978 * dlg.h: Use new types for dialog callbacks.
(dlg_cb_fn): Swap msg and parm arguments for consistency with
widget callbacks.  Adjust all dependencies.
2003-09-07 21:24:01 +00:00
Pavel Roskin
f8e00e7b6a * widget.c (listbox_new): Remove "action" argument. Listboxes
without callbacks default to closing the dialog.  Adjust all
users.  This fixes double click on completion listbox.
* widget.h: Use uppercase names for the return values of the
listbox callback.
2003-09-01 07:31:56 +00:00
Pavel Roskin
58545e65c2 * widget.h: Use exact type in the listbox callback. Adjust all
legitimate users, remove all unused callbacks.
2003-09-01 05:43:20 +00:00