Andrew V. Samoilov
63d111db28
* editcmd.c (edit_printf): Use g_vsnprintf() instead of sprintf().
2002-08-27 17:01:23 +00:00
Pavel Roskin
b6862a8c26
Fix some not quite English strings in edit_block_process_cmd().
2002-08-25 19:21:30 +00:00
Pavel Roskin
221c35266c
* edit-widget.h: Eliminate ERROR_FILE.
...
* edit.c: Remove all references to ERROR_FILE.
* editcmd.c (edit_block_process_cmd): Revert to using catstrs(),
those strings are freed now. Use system(), not execute() to
execute commands. Use open_error_pipe() and close_error_pipe()
to keep track of errors.
2002-08-24 17:22:15 +00:00
Pavel Roskin
74d224e1b2
* editcmd.c: Clean up global variables in the completion code.
2002-08-22 22:15:39 +00:00
Pavel Roskin
6071fea76d
* editwidget.c: Use new dialog flags.
...
* editcmd.c: Likewise.
(edit_completion_dialog): Set DLG_COMPACT for the dialog.
2002-08-22 15:38:27 +00:00
Pavel Roskin
089a1ae9e5
* editcmd.c (compl_callback): Use common_dialog_repaint().
2002-08-22 06:10:41 +00:00
Pavel Roskin
8275c2f5fd
* editcmd.c (raw_callback): Use standard common_dialog_repaint()
...
to handle DLG_DRAW.
2002-08-22 05:58:30 +00:00
Pavel Roskin
231f67342e
* editwidget.c (edit): Make edit_bar a local variable.
2002-08-21 22:54:27 +00:00
Pavel Roskin
9e36fa257d
* global.h: Move include for rx.h and eregex.h here.
2002-08-21 07:20:39 +00:00
Pavel Roskin
4756fbf271
* editcmd.c (freestrs): Set freed strings to NULL.
...
(catstrs): Use g_malloc() and g_free().
2002-08-20 23:57:34 +00:00
Pavel Roskin
42f28932fc
* editcmd.c (freestrs): New function to clean temporary strings.
...
* edit.c (edit_clean): Call freestrs().
2002-08-20 23:18:36 +00:00
Pavel Roskin
37318c2b78
* editmenu.c: Use new create_menu() interface.
2002-08-20 21:31:23 +00:00
Pavel Roskin
3a93326ce7
* editoptions.c: Make some variables static.
...
* edit.h: Take extern declaratrions from all C files.
2002-08-19 01:23:24 +00:00
Pavel Roskin
5dbb74eca2
* editcmd.c (edit_block_process_cmd): Plug memory leak.
...
Simplify logic, reformat.
2002-08-19 00:33:08 +00:00
Pavel Roskin
21cc1c5e28
* edit.c (edit_push_action): Fix access to uninitialized memory.
...
Found by Valgrind.
2002-08-02 16:44:04 +00:00
Pavel Roskin
d6a8671055
* syntax.c: Remove all references to MAD.
2002-08-01 20:44:24 +00:00
Pavel Roskin
e692d7865c
* edit.h: Don't include mad.h.
2002-08-01 19:42:45 +00:00
Andrew V. Samoilov
bfe29a4ac2
* edit.h: Really remove open, close, write, read and mkdir definitions.
2002-07-30 18:39:04 +00:00
Andrew V. Samoilov
f7de38f345
* edit.h (edit_get_load_file): Mark message for translation.
...
(edit_get_save_file): Ditto.
2002-07-29 17:09:02 +00:00
Pavel Roskin
2e17e22122
* syntax.c (apply_rules_going_right): Recheck keyword rules when
...
a keyword is found on the left border of a context.
2002-07-20 09:12:55 +00:00
Pavel Roskin
72a5fc5cc1
* syntax.c (edit_get_syntax_color): Return colorpair index, not
...
attribute, when syntax highlighting is disabled. Handle black
and white mode separately.
2002-07-14 22:39:07 +00:00
Pavel Roskin
3c437c273d
* syntax.c (edit_load_syntax): Do nothing in black and white
...
mode.
2002-07-14 22:19:49 +00:00
Pavel Roskin
75666df0fe
* edit.h [!HAVE_SLANG]: Enable syntax highlighting.
...
* editdraw.c [!HAVE_SLANG]: Respect attributes for color pairs
by using MY_COLOR_PAIR macro.
2002-07-14 21:43:53 +00:00
Pavel Roskin
a23618b2ef
* edit.h (struct key_word): Remove unused "bg" field, rename
...
"fg" to "color", since it keeps all color information.
* syntax.c (edit_get_syntax_color): Replace "fg" and "bg"
arguments with a single argument "color".
Adjust all dependencies.
2002-07-14 17:56:47 +00:00
Pavel Roskin
bb989f677a
* editdraw.c (edit_draw_this_line): Fix setting MOD_ABNORMAL
...
attribute.
(print_to_widget): Fix displaying non-printable characters with
ncurses. Set color for every character even if syntax
highlighting is not compiled - it's needed to reset color after
non-printable characters.
2002-07-14 07:49:24 +00:00
Pavel Roskin
4655fbbb6b
* editdraw.c (edit_status): Use EDITOR_NORMAL_COLOR instead of
...
NORMAL_COLOR.
* syntax.c (edit_get_syntax_color) [!HAVE_SYNTAXH]: Likewise.
2002-07-14 06:17:02 +00:00
Pavel Roskin
2ce74d23e1
* edit.c (check_file_access): Return 1 on all errors, document
...
this behavior. Set edit->delete_file to 1 for newly created
files.
(edit_open_file): Don't set edit->delete_file, it's now done in
check_file_access().
Reported by Saso <saso@bojler.dhs.org>
2002-06-24 23:41:59 +00:00
Andrew V. Samoilov
a1efabf66b
Revert two casts back to fix calculation
2002-05-13 17:28:28 +00:00
Andrew V. Samoilov
17a0c13186
s/declaration/definitions/ in the last but one entry
2002-05-13 17:15:14 +00:00
Andrew V. Samoilov
16b73c1f39
* editcmd.c (edit_save_file): Call mc_chown () and mc_chmod ()
...
before mc_open () to prevent hangs over ftpfs.
2002-05-13 17:12:45 +00:00
Andrew V. Samoilov
0b08e1b69f
* edit.h: Remove open, close, write, read and mkdir declaration.
...
* edit.c: Use mc_open, mc_close, mc_write, mc_read, mc_rename,
mc_chmod and mc_chown. Don't cast (char *) to (unsigned long)
in pointer arithmetics.
* editcmd.c: Likewise.
2002-05-13 16:53:51 +00:00
Andrew V. Samoilov
47f1ce66af
* syntax.c (edit_read_syntax_file): Use system wide Syntax
...
Highlighting definitions' file if there is no users one.
2002-03-25 07:52:53 +00:00
Pavel Roskin
351a118d20
* edit.h: Use eregex.h, not regex.h.
...
From Alexander Varakin <avarakin00@hotmail.com>
2002-03-18 21:09:50 +00:00
Andrew V. Samoilov
80fb518808
* editcmd.c (edit_replace_cmd): Eliminate fin_string
...
and use message() to fix possible buffer overflow.
(edit_search_cmd): Likewise.
2002-02-27 15:40:22 +00:00
Andrew V. Samoilov
fc3ef44f3b
* syntax.c (convert): Fix buffer overflow for ".*\" cases.
2002-02-18 14:48:36 +00:00
Pavel Roskin
817602f8af
* editdraw.c (edit_scroll_screen_over_cursor): Do nothing if the
...
edit widget has zero width or height.
2002-01-23 00:12:17 +00:00
Pavel Roskin
3d0de08b32
* edit.c: Rename DELETE to DELCHAR to avoid macro redefinition
...
on Win32.
* edit.h: Likewise.
2002-01-22 00:49:33 +00:00
Pavel Roskin
7ed785e3cc
* edit.c: Add support for CK_Complete_Word event.
...
* editcmddef.h: Likewise.
* edit_key_translator.c (cooledit_key_map): Bind Alt-Tab to
CK_Complete_Word.
(emacs_key_map): Likewise.
* editcmd.c: Implement word completion.
2002-01-21 17:49:57 +00:00
Pavel Roskin
eb28e580d9
* editmenu.c (CmdMenuEmacs): Add mail command without shortcut.
...
Users of emacs keys should be able to send mail too.
2002-01-21 08:26:23 +00:00
Andrew V. Samoilov
1e5b1bfde1
* edit-widget.h: Use PATH_SEP_STR.
2002-01-15 01:43:50 +00:00
Andrew V. Samoilov
e41f4c01e4
(edit_read_syntax_rules): Eliminate c->single_char.
...
It's only written but never read.
* edit.h (struct context_rule): Comment out single_char field.
It is written once but never read.
2002-01-15 01:41:18 +00:00
Andrew V. Samoilov
3eea969c3b
* syntax.c (syntax_g_free): New macro to release and NULLify
...
glib allocated memory area(s).
(strdup_convert): Rename to ...
(convert): ... this. Don't strdup passed string.
(get_args): Use convert instead of strdup_convert.
(free_args): Make it do notning macro.
(open_include_file): Eliminate p array. Use glib function to
construct error_file_name. Use PATH_SEP instead of '/';
(edit_read_syntax_file): Use PATH_SEP_STR.
(edit_load_syntax): Use syntax_g_free to release error_file_name.
(edit_read_syntax_rules): Likewise.
2002-01-15 01:32:59 +00:00
Andrew V. Samoilov
3f55f6bf2f
* editcmd.c (sprintf_p): Don't cast (char *) to (unsigned long).
2001-12-22 17:34:51 +00:00
Andrew V. Samoilov
c69a25c5eb
* editcmd.c (edit_goto_cmd): Use g_free to release f.
...
(edit_save_file): Use PATH_SEP instead of '/'.
Undefine "close" before closing file created by mc_mkstemps.
Define close to mc_close after it - temporary fix.
2001-12-22 17:29:46 +00:00
Andrew V. Samoilov
bd3bdac638
* syntax.c (read_one_line): Undo last patch - errno is a
...
function on some systems. Check ferror() status before
everithing else if fgetc returns EOF.
Accept last line without trailing newline.
(compare_word_to_right): Don't cast p and q to unsigned long.
(apply_rules_going_right): Likewise.
2001-12-22 16:00:30 +00:00
Pavel Roskin
eba0c6e703
* edit.c (user_menu): Don't move the cursor before and after
...
inserting the block.
Reported by Matthias Urban <murban@cs.uni-magdeburg.de>
2001-12-22 00:32:20 +00:00
Pavel Roskin
6c821c8ad5
* syntax.c (read_one_line): Clear errno before using it. Don't
...
use the result of fgetc() if errno is EINTR.
2001-12-21 23:33:18 +00:00
Pavel Roskin
27d176979b
s/crush/crash/ and other minor things.
2001-12-03 23:38:11 +00:00
Andrew V. Samoilov
a34c2786cb
* syntax.c (apply_rules_going_right): Fix crush for lines like
...
\s+ \n lightgray/13 red
in Syntax file.
(read_one_line): Use EOF instead of -1.
(get_args): Fix buffer overflow for l without trailing
whitespace(s).
(break_a): New macro.
(edit_read_syntax_rules): Use break_a to fix memory leaks.
(edit_load_syntax): Eliminate s and use message to prevent
buffer overflow.
2001-11-28 12:40:18 +00:00
Andrew V. Samoilov
23bdcf3d1e
* editdraw.c (edit_render): Eliminate f. It's only written
...
but never read.
2001-11-28 12:31:48 +00:00