1 2007-11-02 Vladimir Nadvornik <nadvornik@suse.cz>
3 * editlock.c (lock_build_name): Check the return value of getpwuid().
5 2007-09-11 Pavel Tsekov <ptsekov@gmx.net>
7 * choosesyntax.c (pstrcmp): Make static.
9 2007-08-27 Oswald Buddenhagen <ossi@kde.org>
11 * editdraw.c (print_to_widget): Make tabs and trailing whitespace
13 (edit_draw_this_line): Likewise.
15 2007-05-02 Pavel Tsekov <ptsekov@gmx.net>
17 * editcmd.c (edit_find_string): Fix an off-by-one error when matching
20 2007-04-27 Pavel Tsekov <ptsekov@gmx.net>
22 * editcmd.c (edit_replace_cmd): Disable scanf-printf replacement
23 if "Regular expression" is selected. Fix for savannah bug #19333.
25 2007-02-02 Pavel Roskin <proski@gnu.org>
27 * edit.h: Make skip_detach_prompt unsigned. Otherwise, it
28 cannot get value of 1.
30 2007-01-04 Pavel Tsekov <ptsekov@gmx.net>
32 * edit.c (edit_execute_cmd): Update the bracket pair highlighter
33 state after processing CK_Find, CK_Find_Again, CK_Replace,
34 CK_Replace_Again, CK_Complete_Word.
36 2006-12-10 Pavel Tsekov <ptsekov@gmx.net>
38 * edit.h (edit_move_to_prev_col): Declare the function to have
40 (edit_find_bracket): Likewise.
41 * edit.c (edit_move_to_prev_col): Reflect the changes above.
42 (edit_find_bracket): Likewise.
43 * editwidget.c (edit_event): When moving around with the mouse
44 use edit_move_down(), edit_move_up() and edit_move_to_prev_col()
45 instead of move_cursor() to update the cursor position since
46 the latter doesn't update some internal variables.
47 Use edit_find_bracket() to update the bracket pair highlighter
50 2006-12-04 Leonard den Ottolander <leonard den ottolander nl>
52 * editdraw.c (edit_draw_this_line): Remove unused variable book_mark.
54 2006-11-17 Roland Illig <roland.illig@gmx.de>
56 * edit_cmd.c (edit_save_file): The file's modification time is
57 recorded and compared to the one of the file on disk. If it
58 differs, the user is asked whether the file should really be
60 * edit.c (edit_init): Likewise.
62 2006-08-02 Leonard den Ottolander <leonard den ottolander nl>
64 * syntax.c (edit_read_syntax_file): Set NENTRIES to 30.
66 2006-06-16 Leonard den Ottolander <leonard den ottolander nl>
68 * wordproc.c (next_word_start): A word is preceded by a whitespace -
69 the latest changes missed that fact. Restore the original behaviour.
71 2006-06-16 Jindrich Novy <jnovy@redhat.com>
73 * wordproc.c (word_start): Add new argument. Pass extra argument
75 (next_word_start): Add new argument to denote the maximum number
76 of characters to process.
77 (format_this): Reflect the changes above.
79 2006-05-04 Pavel Tsekov <ptsekov@gmx.net>
81 * choosesyntax.c (pstrcmp): Fix the function declaration.
83 2006-04-03 Pavel Tsekov <ptsekov@gmx.net>
85 * syntax.c (edit_read_syntax_rules): Zero edit->rules on allocation to
86 avoid crash after attempting to load a non existent syntax file.
88 2006-03-21 Leonard den Ottolander <leonard den ottolander nl>
90 * choosesyntax.c: Sort syntax list.
92 2006-03-21 Leonard den Ottolander <leonard den ottolander nl>
94 * choosesyntax.c: GPL v2 only.
96 2006-03-17 Oswald Buddenhagen <ossi@kde.org>
98 * edit-widget.h (struct WEdit): Add new field.
99 * editcmd.c (edit_save_file): Prompt whether to detach a hardlinked
100 file if in "Quick save" mode.
101 Return -1 to indicated that the user requested to cancel the
103 (edit_save_as_cmd): Adjust the code to handle the new return
104 value of edit_save_file().
105 (edit_save_cmd): Likewise.
107 2006-03-17 Oswald Buddenhagen <ossi@kde.org>
109 * editcmd.c (edit_save_as_cmd): If saving of the file fails
110 remove only the _save_ lock.
112 2006-03-15 Pavel Tsekov <ptsekov@gmx.net>
114 * editlock.c: Fix for savannah bug #13673.
115 (lock_build_symlink_name): New function.
116 (edit_lock_file): Use lock_build_symlink_name().
117 (edit_unlock_file): Likewise.
119 2006-03-15 Pavel Tsekov <ptsekov@gmx.net>
121 * editcmd.c (edit_new_cmd): Remove redundant call to
122 `edit_unlock_file()'.
123 (edit_ok_to_exit): Likewise.
125 2006-02-10 Roland Illig <roland.illig@gmx.de>
127 * edit.c (user_menu): There is no need to prefix the filename
128 with PATH_SEP when calling concat_dir_and_file().
130 2006-02-03 Roland Illig <roland.illig@gmx.de>
132 * edit.h: Removed the leading PATH_SEP_STR from EDIT_DIR, as the
133 latter is not an absolute directory.
134 * edit.c: Adjusted the users of EDIT_DIR.
135 * editcmd.c: Likewise.
136 * syntax.c: Likewise.
137 * src/user.c: Likewise.
139 2006-02-02 Leonard den Ottolander <leonard den ottolander nl>
141 * edit.c (edit_execute_cmd): Reload syntax on toggle to on.
143 2006-02-01 Andy Shevchenko <andy@pylesos.interdon.net>
145 * edit.c, editcmddef.h, editkeys.c: Add Ctrl-S to toggle syntax
146 highlighting. Patch from unnamed MPlayer developer.
148 2006-01-30 Pavel Tsekov <ptsekov@gmx.net>
150 * editcmd.c: Do not set the field `histname' of `QuickWidget'
151 unless the widget is of type `quick_input'.
153 2006-01-27 Pavel Tsekov <ptsekov@gmx.net>
155 * editcmd.c (edit_block_copy_cmd): Allow a block of selected
156 columns as created by Shift + F3 to be copied anywhere in
159 2006-01-26 Oswald Buddenhagen <ossi@kde.org>
161 * edit.c (edit_auto_indent): Remove redundant parameters.
162 Change the indentation strategy to copy whitespace
163 from the previous line instead of filling up with allegedly
164 equivalent whitespace depending on the tab setting.
165 (edit_execute_cmd): Accomodate change of parameters to
168 2005-11-22 Leonard den Ottolander <leonard den ottolander nl>
170 * editcmd.c (edit_replace_dialog): Alt-p is in use for the
171 previous entry. Use Alt-m on pro&Mpt.
173 2005-11-10 Pavel Roskin <proski@gnu.org>
175 * choosesyntax.c: Make undeclared functions static.
176 * editmenu.c: Likewise.
177 * usermap.c: Likewise.
179 2005-10-04 Leonard den Ottolander <leonard den ottolander nl>
181 * editcmd.c (edit_replace_dialog): Replace duplicate hotkey.
183 2005-09-07 Roland Illig <roland.illig@gmx.de>
185 * editmenu.c: Added a "Save setup..." entry. There had not been
186 the possibility of saving editor options except calling the
187 "Save setup..." function from within the file manager.
189 * edit.c, edit.h, editcmd.c, editwidget.c: Replaced the
190 editor_option_backup_ext_int hack with a string configuration
191 variable, which allows the backup extension to have more than
192 just four characters.
194 2005-09-05 Roland Illig <roland.illig@gmx.de>
196 * editcmd.c: Fixed some of the gcc warnings.
197 * editdraw.c: Moved printwstr() from ../src/slint.c to here.
199 2005-08-19 David Martin <dmartina@excite.com>
201 * choosesyntax.c (exec_edit_syntax_dialog): Not just mark for
202 l10n, but do translate dialog strings.
204 2005-08-15 Roland Illig <roland.illig@gmx.de>
206 * edit-widget.h: Changed bit fields of length 1 from signed to
208 * editcmd.c (edit_completion_dialog): Code cleanup.
209 * editdraw.c (render_edit_text): Removed unused variables.
210 * syntax.c (edit_read_syntax_file): Likewise.
212 2005-08-10 Pavel Roskin <proski@gnu.org>
214 * choosesyntax.c (edit_syntax_dialog): Add parentheses as
216 * editkeys.c: Use braces in the keymap initializers.
218 2005-07-27 Leonard den Ottolander <leonard den ottolander nl>
220 * choosesyntax.c: Add option to reload current syntax.
222 2005-07-24 Leonard den Ottolander <leonard den ottolander nl>
224 * choosesyntax.c: Create file. Menu option to override syntax
226 * Makefile.am: Add choosesyntax.c..
227 * edit.c (edit_init): Set option_auto_syntax to 1 on every invokation
229 * edit.h: Pass char*** to edit_load_syntax(). Add parameters for
230 syntax dialog and override.
231 * editmenu.c (menu_options): Add menu option to override syntax
233 * editoptions.c (edit_options_dialog): Pass option_syntax_type to
235 * syntax.c (edit_read_syntax_file): Dynamically allocate and fill
237 * syntax.c (edit_load_syntax): Use char*** for syntax list.
239 2005-05-21 Pavel Roskin <proski@gnu.org>
241 * Makefile.am: Add usermap.h to the sources.
243 2005-07-20 Vitja Makarov <vitja.makarov@gmail.com>
245 * usermap.c: Allow user-defined keyboard bindings for mcedit.
246 * usermap.h: Likewise.
247 * Makefile.am: Likewise.
248 * editcmd.c: Define new editor commands which had been coded
250 This change also affects some other files.
252 2005-07-20 Roland Illig <roland.illig@gmx.de>
254 * edit-widget.h: Invented a new type edit_key_map_type instead of
256 * editkeys.c: Using that type.
258 2005-07-18 Roland Illig <roland.illig@gmx.de>
260 * editkeys.c: When typing literal characters after C-q, allow
261 the alphabetic characters to input ASCII control characters.
263 2005-07-06 Roland Illig <roland.illig@gmx.de>
265 * edit.h: Added missing #include <stdio.h>.
267 2005-06-14 Roland Illig <roland.illig@gmx.de>
269 * editwidget.c: Don't dereference WButtonBar.
271 2005-05-23 Roland Illig <roland.illig@gmx.de>
273 * editwidget.c: Removed casts on function pointer types.
275 2005-05-20 Pavel Roskin <proski@gnu.org>
277 * editwidget.c (edit_file): Move menu initialization ...
278 * editmenu.c (edit_init_menu): ... here. Allocate menu
280 (edit_done_menu): Take Wmenu argument rather than Menu. Free
282 (edit_reload_menu): New function, reload the menu.
283 (edit_options_dialog): Reload the menu if key emulation has
286 * edit.h: Eliminate global EditMenuBar. Fix all dependencies.
288 * edit.h: Eliminate edit_message_dialog macro - it's used
289 inconsistently. Fix all callers to use query_dialog().
291 2005-05-10 Pavel Roskin <proski@gnu.org>
293 * edit-widget.h: Revert signedness fixes. We need unsigned char
294 for character classification.
295 * editcmd.c: Likewise. Use casts to suppress warnings instead.
296 Thanks to Roland Illig <roland.illig@gmx.de>
298 * *.c: Remove duplicate includes.
300 2005-05-03 Pavel Roskin <proski@gnu.org>
302 * edit-widget.h: Use char instead of unsigned char to fix
303 warnings from gcc 4.0.
304 * editcmd.c: Likewise.
306 * edit.h: Use D_ERROR for edit_error_dialog, D_NORMAL for query
307 dialogs. Remove unused edit_query_dialog4.
309 2005-04-27 Leonard den Ottolander <leonard * den ottolander nl>
311 * editdraw.c (status_string): Added casts on 2 parameters to
314 2005-03-17 Pavel Roskin <proski@gnu.org>
316 * editcmd.c (edit_replace_cmd): Restore correct behavior of
319 2005-02-22 Roland Illig <roland.illig@gmx.de>
321 * edit.h: Removed unnecessary #include directives ...
322 * *.c: ... and added them here.
324 2005-02-08 Roland Illig <roland.illig@gmx.de>
326 * editdraw.c: Renamed redraw_labels to buttonbar_redraw.
327 * editwidget.c: Likewise. Renamed define_label_data to
328 buttonbar_set_label_data.
330 2005-02-08 Roland Illig <roland.illig@gmx.de>
332 * edit.h: Reformatted #definitions.
333 * editcmd.c: Explicitly declared unused variables to make gcc
336 2005-02-07 Roland Illig <roland.illig@gmx.de>
338 * *.c: Removed trailing whitespace.
339 * *.c: Removed unused parameters for static functions. Marked
340 unused parameters for global functions. Removed redundant
343 2005-02-07 Roland Illig <roland.illig@gmx.de>
345 * edit.h: Removed catstrs, as it is only used in editcmd.c.
346 * editcmd.c (catstrs): Changed declaration to be static.
347 * editcmd.c: Added const qualifiers.
348 * syntax.c: Don't use catstrs anymore.
349 * edit.c (user_menu): Likewise.
350 * editwidget.c: Likewise.
352 2005-02-07 Roland Illig <roland.illig@gmx.de>
354 * edit.c: Improved message formatting.
356 2005-01-30 Roland Illig <roland.illig@gmx.de>
358 * edit.h: Removed NO_INLINE_GETBYTE conditional. The name was
359 misleading, as it really meant INLINE_GETBYTE. Furthermore,
360 it has not been working since the split of edit.h into edit-widget.h.
363 2005-01-26 Roland Illig <roland.illig@gmx.de>
365 * editdraw.c (edit_status): Fixed drawing bug with ncurses.
367 2004-12-03 Roland Illig <roland.illig@gmx.de>
369 * edit.h: Renamed multiple inclusion guards that started with a
370 double underscore. Added #includes for dependent files.
371 * editcmddef.h: Likewise.
372 * editlock.h: Likewise.
373 * edit-widget.h: Likewise.
375 2004-12-02 Roland Illig <roland.illig@gmx.de>
377 * editcmd.c (edit_replace_cmd): Separated input and output arguments.
378 * editcmd.c (edit_replace_dialog): Code cleanup.
380 2004-12-02 Pavel S. Shirshov <me@pavelsh.pp.ru>
382 * editcmd.c (edit_replace_prompt): Fix warning with 'unused' label_len.
384 2004-12-01 Roland Illig <roland.illig@gmx.de>
386 * editcmd.c: Introduced a type edit_getbyte_fn to get rid of
387 the many function type casts.
389 2004-11-18 Andrew V. Samoilov <andrew@email.zp.ua>
391 * syntax.c (get_args): Use in "args_size" argument instead of
392 in out "argc". Return number of found entries.
395 2004-11-16 Andrew V. Samoilov <andrew@email.zp.ua>
397 * syntax.c (get_args): Use "argc" to check "args" size.
398 (edit_read_syntax_rules): Add new parameter "argc" (size of the
399 "args" buffer) to prevent buffer overflow.
401 2004-11-10 Pavel Tsekov <ptsekov@gmx.net>
403 * editdraw.c (edit_status): Don't output extra characters on the
405 (print_to_widget): Don't use addch() with negative offset to skip
406 over excessive columns. Output only those columns that should be
407 displayed on the screen.
409 2004-11-10 Roland Illig <roland.illig@gmx.de>
411 * editcmd.c (edit_replace_prompt): Fixed codepage conversion bug
412 introduced in on 2004-09-25 by me.
414 2004-10-23 Roland Illig <roland.illig@gmx.de>
416 * editdraw.c (edit_status): Expand the filename field in the status
417 line to 16 characters even if the actual filename is shorter.
419 2004-10-16 Roland Illig <roland.illig@gmx.de>
421 * syntax.c (read_one_line): Fixed SEGV when reading syntax file
422 with "\r\n" line endings on Unix.
424 2004-10-11 Leonard den Ottolander <leonard * den ottolander nl>
426 * editcmd.c (regexp_error): Small text fix.
427 (edit_search_cmd): Likewise.
429 2004-09-26 Roland Illig <roland.illig@gmx.de>
431 * editcmd.c (edit_ext_cmd): Revoked my last change.
433 2004-09-25 Roland Illig <roland.illig@gmx.de>
435 * editcmd.c (edit_ext_cmd): Replaced the old version with a new
436 one that uses ../src/pipethrough. The new version feeds the
437 currently selected block (or an empty input) into the command
438 which reduces the chance of a deadlock when the command tried
439 to read from stdin. It also allows the user to insert the output
440 of a command that has exited with a nonzero result. Another
441 feature is that it does not use temporary files.
443 2004-09-25 Roland Illig <roland.illig@gmx.de>
445 * syntax.c (this_try_alloc_color_pair): Added const qualifiers.
446 * editcmd.c (snprintf_p): Likewise. (edit_replace_prompt):
449 2004-09-25 Pavel S. Shirshov <me@pavelsh.pp.ru>
451 * edit.c (edit_clean): g_free handles NULL argument too,
452 no need for the comparison.
453 (edit_move_backward_lots): Likewise.
454 * editcmd.c (edit_set_filename): Likewise.
455 (edit_replace_cmd): Likewise.
456 (edit_search_cmd): Likewise.
457 (edit_sort_cmd): Likewise.
458 (edit_mail_dialog): Likewise.
459 * syntax.c (syntax_g_free): Likewise.
460 (edit_read_syntax_rules): Likewise.
462 2004-09-24 Roland Illig <roland.illig@gmx.de>
464 * editdraw.c (status_string): Removed unused parameter.
465 (edit_status): Rewrote to allow longer filenames to be displayed
466 completely whenever possible.
467 * edit.c: Replaced NULL with (char *) NULL. Likewise for 0, where
469 * editcmd.c: Likewise.
470 * editlock.c: Likewise.
471 * editwidget.c: Likewise.
472 * syntax.c: Likewise.
474 2004-09-19 Roland Illig <roland.illig@gmx.de>
476 * editcmd.c (edit_replace_cmd): Added const qualifier.
477 * editwidget.c (edit_my_define): likewise.
478 * editcmd.c (edit_replace_prompt): Allocate the label text
479 dynamically instead of using catstrs. Don't handle
480 ENABLE_CHARSET specially.
481 * edit.h: renamed edit() to edit_file() to avoid GCC shadow
482 warnings (many variables are also called edit).
483 * editwidget.c: likewise.
485 2004-09-17 Andrew V. Samoilov <andrew@email.zp.ua>
487 * editcmd.c (edit_replace_prompt) [HAVE_CHARSET]: Warning hack.
489 2004-09-03 Pavel S. Shirshov <me@pavelsh.pp.ru>
491 * editwidget.c (edit_adjust_size): Fix warnings.
492 (edit_dialog_callback): Likewise.
493 * edit.c (menu_save_mode_cmd): Likewise.
495 Based on patch from Jakub Jelinek <jakub@redhat.com>
498 2004-09-02 Pavel S. Shirshov <me@pavelsh.pp.ru>
500 * editcmd.c (edit_save_as_cmd): Add hotkey to dialog.
501 (edit_save_confirm_cmd): Likewise. (edit_new_cmd): Likewise.
502 (edit_load_cmd): Likewise. (edit_block_move_cmd): Likewise.
503 (edit_block_delete): Likewise. (edit_ok_to_exit): Likewise.
505 2004-09-01 Pavel S. Shirshov <me@pavelsh.pp.ru>
507 * syntax.c (this_try_alloc_color_pair): Use g_strlcpy instead
508 sequence strncpy(), name[len] = '\0'
509 (edit_read_syntax_rules): Likewise.
511 2004-08-29 Roland Illig <roland.illig@gmx.de>
513 * Code cleanup: Added const qualifier for variables and
514 function declarations where possible. No functional changes.
516 2004-08-26 Leonard den Ottolander <leonard * den ottolander nl>
518 * edit/editcmd.c: Fix buffer overflows in edit replace code.
520 Based on patch from Jakub Jelinek <jakub@redhat.com>
522 2004-08-23 Jakub Jelinek <jakub@redhat.com>
524 * syntax.c: (edit_read_syntax_rules): Fix boundary conditions.
526 2004-08-23 David Sterba <dave@jikos.cz>
528 * syntax.c: (edit_read_syntax_rules): Dynamically allocate
529 more space for contexts and for words in context.
531 2004-08-16 Roland Illig <roland.illig@gmx.de>
533 * edit.c (several functions): Changed the data type of some
534 variables from int to size_t (for string lengths) or unsigned
535 long (for editor offsets) to avoid implicit sign conversions.
536 No functional changes.
538 * edit.c, editcmds.h: Moved the semicolon out of the macro
539 definition SHELL_COMMANDS_i, so that the declaration in edit.c
540 looks more natural. No functional changes.
542 * editcmd.c: Added missing initializers for QuickDialogs.i18n.
543 Replaced the last item in QuickWidgets from {0} to
544 NULL_QuickWidget (that is, added missing initializers).
545 (edit_completion_dialog): Made dlg_h and dlg_w unsigned to
546 avoid implicit sign conversion. No functional changes.
548 * editlock.c (lock_build_name, edit_lock_file): Casted pid to
549 int to avoid wrong type argument for printf. No other functional
552 * editoptions.c: Added missing initializers for QuickDialogs
553 and QuickWidgets. No functional changes.
555 * syntax.c (xx_strchr): Removed explicit loop unrolling. It's
556 the job of the compiler.
558 2004-02-04 Pavel Roskin <proski@gnu.org>
560 * editcmddef.h: Split CK_No_Command into CK_Insert_Char and
562 * editkeys.c (emacs_key_map): Ignore Ctrl-g. Requested by
563 Paul Seelig <pseelig@uni-mainz.de>
564 (edit_translate_key): Implement CK_Ignore_Key.
566 * edit.c (edit_execute_key_command): Return void, the result is
568 (edit_execute_cmd): Likewise.
570 2003-12-24 Dmitry Alexeyev <dmi_a@qnx.org.ru>
572 * syntax.c (edit_read_syntax_rules): Fix crash if syntax file
573 has more than 1024 keywords.
575 2003-11-27 Pavel Roskin <proski@gnu.org>
577 * editcmd.c: Use input_expand_dialog() instead of input_dialog()
578 for loading and saving files.
580 2003-11-24 Andrew V. Samoilov <sav@bcs.zp.ua>
582 * editcmd.c (pipe_mail): Eliminate g_strdup_printf().
583 (edit_complete_word_cmd): Fix possible buffer overflow.
585 2003-11-03 Andrew V. Samoilov <sav@bcs.zp.ua>
587 * editcmd.c (edit_mail_dialog): Trivial clean-up.
589 2003-10-23 Andrew V. Samoilov <sav@bcs.zp.ua>
591 * edit-widget.h (struct WEdit): Add GTree *defines field.
592 * syntax.c: Use edit->defines instead of static defines.
594 2003-10-16 Andrew V. Samoilov <sav@bcs.zp.ua>
596 * syntax.c (compare_word_to_right): More checks for braces and
599 2003-10-16 Pavel Roskin <proski@gnu.org>
601 * syntax.c (compare_word_to_right): Fix recent breakage - rules
602 ending with wildcard (e.g. "$+") won't match.
604 2003-10-14 Pavel Roskin <proski@gnu.org>
606 * edit.h: Make static all functions and variables that don't
607 need to be global. Remove unused functions. Adjust all
610 2003-09-22 Pavel Roskin <proski@gnu.org>
612 * syntax.c: Give names to numeric tokens.
614 * syntax.c (compare_word_to_right): Add checks that we don't go
615 beyond text length for certain invalid rules.
616 Reported by Juan C. Olivares <juancri@TAGnet.org>
618 2003-09-12 Pavel Roskin <proski@gnu.org>
620 * editcmd.c (edit_raw_key_query): Use straight widget order.
621 (edit_completion_dialog): Likewise.
622 * editwidget.c (edit): Likewise.
624 2003-09-07 Pavel Roskin <proski@gnu.org>
626 * edit.h: Get rid of WIDGET_COMMAND, update all dependencies.
628 2003-07-31 Andrew V. Samoilov <sav@bcs.zp.ua>
630 * edit-widget.h: Resurrect "dir" field in WEdit to store
631 directory for relative filenames.
633 * edit.c (edit_clean): Release edit->dir.
635 * editcmd.c (edit_save_file): Use absolute filename.
636 Temporarily disable safe save and backups on remote VFS because
637 it doesn't work - again.
639 2003-07-25 Pavel Roskin <proski@gnu.org>
641 * edit.c (edit_execute_cmd): Enable user menu in mcedit.
643 2003-07-20 Pavel Roskin <proski@gnu.org>
645 * editcmd.c (edit_quit_cmd): Rename to ...
646 (edit_ok_to_exit): ... this. Don't stop dialog - this function
647 is called by the dialog code.
648 * editwidget.c (edit_dialog_callback): Process DLG_VALIDATE
649 event. Don't exit it the user wants to continue editing.
650 * edit.c (edit_execute_cmd): Close the dialog - it will ask user
653 * editcmd.c (edit_quit_cmd): Don't save this command in the undo
654 stack. Don't force any refresh. Don't delete unsaved files, do
656 * edit.c (edit_clean): ... here. This ensures that unsaved
657 files from the mcedit command line are erased on Ctrl-n.
659 * editwidget.c (edit): Remove unused variable "framed".
661 2003-07-08 Adam Byrtek <alpha@debian.org>
663 * edit.c (edit_clean): Remove stale lock if any.
665 2003-07-08 Pavel Roskin <proski@gnu.org>
667 * edit-widget.h: Add new field loading_done.
668 * edit.c (edit_init): Set loading_done.
669 (edit_insert): Don't call edit_modification() before the file is
672 * edit-widget.h: Eliminate unused explicit_syntax field.
674 * edit-widget.h: Stop misusing "unsigned char" for boolean.
675 Eliminate have_frame - it's unused. Adjust all dependencies.
677 2003-06-14 Pavel Roskin <proski@gnu.org>
679 * editkeys.c: Leave only distinct entries in cooledit_key_map
680 and emacs_key_map. Move the rest to common_key_map.
682 2003-06-09 Pavel Roskin <proski@gnu.org>
684 * editkeys.c (emacs_key_map): Move Atl-'>' and Alt-'<' ...
685 (common_key_map): ... here.
687 2003-06-05 Andrew V. Samoilov <sav@bcs.zp.ua>
689 * editcmd.c (edit_ext_cmd): Fix memory leak.
691 2003-05-30 Michal Szwaczko <mikey@scene.pl>
693 * editcmd.c: Implement pasting the output of any external
695 * editmenu.c: Add menu entries for that.
696 * editcmddef.h: Add new command CK_ExtCmd.
698 2003-04-04 Adam Byrtek <alpha@debian.org>
700 * edit.c: Move edit_modification() before actions to provide
701 proper repainting if there are dialogs invoked by actions.
703 * editlock.c: Split lock into user@host and pid and report them
706 2003-04-02 Pavel Roskin <proski@gnu.org>
708 * edit.c (edit_load_file): Use vfs_file_is_local(), not
709 vfs_current_is_local().
710 * editlock.c (edit_lock_file): Disable locking on VFS.
712 2003-04-01 Adam Byrtek <alpha@debian.org>
714 * editlock.c, editlock.h: New files. Implement file locking in
715 Emacs style, as documented in JED editor sources.
716 * Makefile.am: Add those files to build tree.
718 * edit-widget.c (WEdit): New property 'locked', 0 on edit_init.
719 * edit.c (edit_modification): Lock buffer on modification.
720 * editcmd.c (edit_save_cmd, edit_save_as_cmd): Handle locking
722 (edit_load_file_from_filename): Unlock. Remove 2 duplicate
723 lines (handled by edit_init).
724 (edit_quit_cmd): Unlock.
726 2003-03-12 Pavel Roskin <proski@gnu.org>
728 * edit.h: Make it easier to tweak buffer size and maximal number
731 2003-03-07 Pavel Roskin <proski@gnu.org>
733 * editkeys.c (common_key_map): Delete previous word by
734 Alt-Backspace. Fix Ctrl-Backspace on some terminals.
735 Reported by Andrew V. Samoilov <sav@bcs.zp.ua>
737 2003-03-06 Andrew V. Samoilov <sav@bcs.zp.ua>
739 * syntax.c (edit_read_syntax_file): Fix segmentation violation.
741 2003-03-03 Andrew V. Samoilov <sav@bcs.zp.ua>
743 * syntax.c (edit_read_syntax_rules): Check for list of defines
744 is already initialized.
745 (edit_read_syntax_file): Process `include ...` before first
746 `file ...`, so color definitions can be stored separately.
748 * syntax.c (subst_defines): New function to substitute defines.
749 (this_try_alloc_color_pair): Move color substitution ...
750 (edit_read_syntax_rules): ... here. Use subst_defines() to
751 substitute colors for contexts and keywords. Allow multiword
754 2003-02-26 Andrew V. Samoilov <sav@bcs.zp.ua>
756 * syntax.c (edit_read_syntax_rules): Add args argument and use
757 it instead of own auto args array to share this area with ...
758 (edit_read_syntax_file): ... this. Adjust for the above.
759 Use strncpy() instead of unsafe strcpy().
761 2003-02-25 Andrew V. Samoilov <sav@bcs.zp.ua>
763 * syntax.c (defines): New static variable for list of defines.
764 (mc_defines_destroy): New function to release memory of key
766 (destroy_defines): New function to destroy list of defines
768 (this_try_alloc_color_pair): Use strncpy() instead of unsafe
769 strcpy(). Use values from list of defines to substitute given
771 (edit_read_syntax_rules): Initialize list of defines and process
772 new "define" keyword. Use strncpy() instead of unsafe strcpy().
773 (edit_free_syntax_rules): Destroy list of defines.
775 2003-02-21 Andrew V. Samoilov <sav@bcs.zp.ua>
777 * editmenu.c (OptMenuEmacs): Define as OptMenu.
778 (SearReplMenuEmacs): Define as SearReplMenu.
779 (EditMenuEmacs): Define as EditMenu.
781 2002-12-28 Pavel Roskin <proski@gnu.org>
783 * editmenu.c (OptMenu): Add "Learn Keys".
784 (OptMenuEmacs): Likewise.
786 2003-01-27 Andrew V. Samoilov <sav@bcs.zp.ua>
788 * edit-widget.h (struct macro): Move definition ...
789 * edit.h: ... here to fix compilation on HP-UX.
791 2002-12-25 Pavel Roskin <proski@gnu.org>
793 * editkeys.c: Move key maps to the file scope. Put common keys
794 to a separate table common_key_map.
795 (edit_translate_key): Remove unused argument x_keycode.
797 * editkeys.c (edit_translate_key): Treat Shift-Enter as return
798 without indent. Useful when pasting multiline text with
799 Shift-button3 or Shift-Insert with autoindent enabled.
801 2002-12-23 Pavel Roskin <proski@gnu.org>
803 * editkeys.c (edit_translate_key): Treat Ctrl-Home and Ctrl-End
804 like Ctrl-PgUp and Ctrl-PgDown respectively.
806 * edit_key_translator.c: Rename to ...
807 * editkeys.c: ... this.
808 * edit.c (edit_translate_key): Move to editkeys.c.
809 * Makefile.am: Adjust for the above.
811 2002-12-21 Pavel Roskin <proski@gnu.org>
813 * edit.c (edit_translate_key): Remove x_state argument, it's now
815 * editwidget.c (get_key_state): Remove.
817 2002-12-18 Andrew V. Samoilov <sav@bcs.zp.ua>
819 * editcmd.c (edit_block_process_cmd): Quote filename.
821 * edit.h (edit_save_mode_t): New enum for file saving mode.
822 * editcmd.c (): Use edit_save_mode_t.
823 (pipe_mail): Quote to, subject and cc with name_quote().
824 * edit.c (edit_get_filter): Use quoted filename.
825 (edit_get_write_filter): Use quoted writename.
826 (edit_push_action): Use g_realloc().
828 2002-12-16 Pavel Roskin <proski@gnu.org>
830 * editcmd.c (edit_goto_cmd): Add support for negative line
831 numbers, which are counted from the last line. Use strtol(), so
832 hex numbers are supported as well.
834 * edit.c: Use edit->stack_disable instead of static variable.
836 2002-12-15 Pavel Roskin <proski@gnu.org>
838 * edit.c (check_file_access): Use non-blocking open() followed
839 by fstat() to avoid race conditions. Don't ask users to
840 recompile the editor.
842 * edit.c (edit_reload): Don't initialize edit->macro_i, because
843 edit_init() takes care of it.
844 * editwidget.c (edit): Likewise.
846 * edit.h: Don't inclide malloc.h. Use g_malloc() and g_free()
847 instead. Adjust all dependencies.
849 * edit.c (edit_load_file): Merge edit_open_file(). Disable fast
850 loading on non-local VFS because the file size can be wrong.
851 (init_dynamic_edit_buffers): Split into edit_init_buffers() and
852 edit_load_file_fast().
854 * edit.c (edit_init): Move file loading to ...
855 (edit_load_file): ... a separate function.
857 * edit.c (init_dynamic_edit_buffers): Remove unused code to
858 support loading text from buffer.
860 2002-12-14 Pavel Roskin <proski@gnu.org>
862 * editcmd.c (edit_split_filename): Rename to edit_set_filename,
863 use g_malloc() and g_free() on edit->filename.
865 2002-12-08 Pavel Roskin <proski@gnu.org>
867 * edit.c (edit_open_file): Remove "text" and "text_size"
868 arguments. Adjust all callers.
870 * edit.c (edit_move_to_column): Remove, use
871 edit_move_to_prev_col() instead.
873 * edit.c: Commit the rest of the position saving code.
874 (edit_load_position): New function, load position.
875 (edit_save_position): New function, save position.
876 (edit_init): Take new argument "line". If it's 0, load position
878 (edit_clean): Save file position to .mc/filepos even if the file
880 * editwidget.c (edit): Don't set the initial line, pass it to
883 2002-12-07 Pavel Roskin <proski@gnu.org>
885 * syntax.c (edit_load_syntax): Reuse more informative error
888 * edit.c (check_file_access): Use O_EXCL when opening new files.
889 Don't allow editing stale symlinks.
890 Reported by Max Derzhak <max@linux.zp.ua>
892 2002-12-05 Pavel Roskin <proski@gnu.org>
894 * edit-widget.h: Remove "from_here" and "to_here".
895 * edit.c (edit_purge_widget): New function - clean struct WEdit
896 except the Widget part.
898 2002-12-04 Pavel Roskin <proski@gnu.org>
900 * editcmd.c: Include dialog.h.
901 Reported by Frédéric L. W. Meunier <lists@pervalidus.net>
903 2002-11-30 Pavel Roskin <proski@gnu.org>
905 * edit.h: Remove "dir" field in WEdit - it's always an empty
906 string. Adjust all dependencies.
908 * editcmd.c (edit_get_load_file): Remove first argument, it's
910 (edit_get_save_file): Likewise.
912 * syntax.c: Make structures key_word, context_rule and
913 _syntax_marker opaque.
915 * edit.c: Use g_malloc() and g_free() on buffers1 and buffers2.
917 (edit_get_buffer_as_text): Remove, it's unused.
919 * editcmd.c (edit_set_search_parameters): Use g_malloc().
920 (edit_complete_word_cmd): Use g_free().
922 2002-11-29 Pavel Roskin <proski@gnu.org>
924 * edit.h: Don't define HAVE_SYNTAXH.
925 * syntax.c: Syntax highlighting is no more optional.
926 (edit_check_spelling): Remove.
928 * editoptions.c (edit_options_dialog): Add "Save file position"
929 option, make "Syntax highlighting" unconditional.
931 * edit.c: First part of the position saving code.
932 (edit_move_to_column): New function.
934 2002-11-29 Andrew V. Samoilov <sav@bcs.zp.ua>
936 * editoptions.c (edit_options_dialog): Use g_free() to release
937 variables allocated in quick_dialog().
939 2002-11-28 Pavel Roskin <proski@gnu.org>
941 * edit-widget.h: Move typedef WEdit and file names ...
942 * edit.h: ... here. Don't include edit-widget.h. Adjust all
945 2002-11-23 Andrew V. Samoilov <sav@bcs.zp.ua>
947 * editoptions.c (edit_options_dialog): Clean up and use g_snprintf()
948 instead of sprintf().
950 2002-11-14 Pavel Roskin <proski@gnu.org>
952 * edit.h: Decentralize includes.
954 * editmenu.c (edit_user_menu_cmd): Move to ../src/cmd.c.
956 * edit.c (edit_delete_line): Don't remove and restore the
957 preceding newline. Don't treat binary zero as newline.
958 From Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
960 2002-11-12 Pavel Roskin <proski@gnu.org>
962 * *.c: Fix all global functions without declarations - declare,
963 make static or remove.
965 * syntax.c (syntax_change_callback): Remove, it's unused.
966 (edit_set_syntax_change_callback): Likewise.
968 * edit.c (edit_execute_cmd): Fool gcc to prevent Y2K warning.
970 * editwidget.c (edit_adjust_size): Use find_buttonbar().
972 2002-11-11 Pavel Roskin <proski@gnu.org>
974 * editcmd.c: Warning fix for compilers that don't understand the
975 "const" keyword and variable size arrays.
977 2002-11-06 Pavel Roskin <proski@gnu.org>
979 * editcmd.c (edit_save_file): Restore ownership before access
980 mode, not after. Otherwise suid bit is lost.
981 Reported by Nerijus Baliunas <nerijus@users.sourceforge.net>
983 2002-10-30 Pavel Roskin <proski@gnu.org>
985 * edit.c: Include charset.h unconditionally, use new conversion
986 functions that don't require ifdefs.
987 * edit_key_translator.c: Likewise.
988 * editcmd.c: Likewise.
989 * editdraw.c: Likewise.
991 2002-10-20 Pavel Roskin <proski@gnu.org>
993 * edit-widget.h: Add new field macro_depth to control depth of
995 * edit.c (edit_execute_macro): Make static. Increment
996 macro_depth on entry, decrement on exit, don't allow it to be
999 * wordproc.c (line_start): Remove incorrect optimization abusing
1000 static variables. Internal formatting should be usable now.
1002 2002-10-18 Pavel Roskin <proski@gnu.org>
1004 * wordproc.c (begin_paragraph): Fix the same off-by-one error as
1005 in end_paragraph() - it affects formatting of the paragraph
1006 after the first line in the file it that line starts with a dot.
1007 Remove unused argument.
1009 * wordproc.c (end_paragraph): The last line of the file wasn't
1010 tested for being blank, which resulted in the last newline
1011 becoming a space after formatting.
1013 2002-10-17 Pavel Roskin <proski@gnu.org>
1015 * editoptions.c (edit_options_dialog): Don't allow
1016 option_tab_spacing to be 0. Reset invalid values to 8.
1017 Reported by Ury N. Stankevich <ury@bofh.homeunix.org>
1019 2002-10-08 Pavel Roskin <proski@gnu.org>
1021 * wordproc.c (format_paragraph): If formatting was successful,
1022 scroll to the left to show the formatted paragraph.
1024 2002-10-06 Pavel Roskin <proski@gnu.org>
1026 * editdraw.c (print_to_widget): Eliminate use of floating point.
1029 2002-10-02 Andrew V. Samoilov <sav@bcs.zp.ua>
1031 * editcmd.c (edit_insert_column_of_text): Fix infinite loop if
1032 block of text is copied past the end of the buffer.
1033 By Paul Sheer <psheer@icon.co.za>.
1035 (stacked): Don't initialize static arrays by zeros.
1037 2002-09-26 Andrew V. Samoilov <sav@bcs.zp.ua>
1039 * edit.h (struct key_word): Remove time field.
1040 * syntax.c: Remove MAD support.
1042 2002-09-24 Pavel Roskin <proski@gnu.org>
1044 * editwidget.c (edit): Make edit_dlg local variable.
1046 * editmenu.c (edit_drop_menu_cmd): Don't use edit_dlg variable.
1048 * edit.c: Remove all references to CR_LF_TRANSLATION.
1049 * editcmd.c: Likewise.
1051 2002-09-23 Pavel Roskin <proski@gnu.org>
1053 * editwidget.c (edit): Install handler for DLG_RESIZE.
1055 * editwidget.c (edit): Set edit_dlg to NULL after it's
1058 * edit.h: Move style definitions ...
1059 * editdraw.c: ... here. Multiply them by 256. Remove unused
1061 (print_to_widget): Don't divide style by 256. Simplify logic
1062 since we only have 4 styles now.
1064 * edit.c (edit_move_forward3): Use caret notation for code 127
1066 * editdraw.c (edit_draw_this_line): Likewise. Print '.' for
1067 other non-printable characters and remove this code from ...
1068 (print_to_widget): ... here.
1070 * edit.c (edit_move_forward3): Show '\r' as ^M.
1071 * editdraw.c (edit_draw_this_line): Likewise. Use MOD_ABNORMAL
1073 From Alexander Varakin <avarakin00@hotmail.com>
1075 * edit.h: Remove all references to O_TEXT, USE_O_TEXT and
1078 * edit.c: Use O_BINARY when opening files.
1079 * editcmd.c: Likewise.
1080 From Alexander Varakin <avarakin00@hotmail.com>
1082 2002-09-20 Pavel Roskin <proski@gnu.org>
1084 * editwidget.c (edit_event): Add support for mouse wheel events.
1085 * edit.h: Add missing declarations for edit_move_up() and
1088 2002-09-20 Andrew V. Samoilov <sav@bcs.zp.ua>
1090 * edit.c: Don't initialize static selection and selection_history.
1091 * editdraw.c (status_string): Remove font_width argument.
1092 (edit_status): Fix calculation to use last column in the
1095 2002-09-04 Pavel Roskin <proski@gnu.org>
1097 * edit.c (edit_filters): Use gzip, not compress for *.Z files
1098 for consistency with other parts of the code (viewer, mc.ext).
1100 2002-09-03 Pavel Roskin <proski@gnu.org>
1102 * editcmd.c: Recheck and fix all calls to create_dlg().
1103 * editwidget.c: Likewise.
1105 2002-09-02 Pavel Roskin <proski@gnu.org>
1107 * editcmd.c (edit_raw_key_query): Eliminate
1108 x_set_dialog_title().
1110 2002-09-01 Pavel Roskin <proski@gnu.org>
1112 * editcmd.c (edit_block_process_cmd): Restore third argument
1113 (but make it /dev/null) for compatibility with old scripts.
1114 Reported by Andrew V. Samoilov <sav@bcs.zp.ua>
1116 2002-08-31 Pavel Roskin <proski@gnu.org>
1118 * editwidget.c (edit): Avoid passing an uninitialized color
1119 array to create_dlg() - pass NULL instead.
1121 2002-08-27 Andrew V. Samoilov <sav@bcs.zp.ua>
1123 * editcmd.c (edit_printf): Use g_vsnprintf() instead of sprintf().
1125 2002-08-24 Pavel Roskin <proski@gnu.org>
1127 * edit-widget.h: Eliminate ERROR_FILE.
1128 * edit.c: Remove all references to ERROR_FILE.
1129 * editcmd.c (edit_block_process_cmd): Revert to using catstrs(),
1130 those strings are freed now. Use system(), not execute() to
1131 execute commands. Use open_error_pipe() and close_error_pipe()
1132 to keep track of errors.
1134 2002-08-22 Pavel Roskin <proski@gnu.org>
1136 * editcmd.c: Clean up global variables in the completion code.
1138 * editwidget.c: Use new dialog flags.
1139 * editcmd.c: Likewise.
1140 (edit_completion_dialog): Set DLG_COMPACT for the dialog.
1142 * editcmd.c (compl_callback): Use common_dialog_repaint().
1144 * editcmd.c (raw_callback): Use standard common_dialog_repaint()
1147 2002-08-21 Pavel Roskin <proski@gnu.org>
1149 * editwidget.c (edit): Make edit_bar a local variable.
1151 2002-08-20 Pavel Roskin <proski@gnu.org>
1153 * editcmd.c (freestrs): Set freed strings to NULL.
1154 (catstrs): Use g_malloc() and g_free().
1156 * editcmd.c (freestrs): New function to clean temporary strings.
1157 * edit.c (edit_clean): Call freestrs().
1159 2002-08-20 David Martin <dmartina@excite.com>
1161 * editmenu.c: Use new create_menu() interface.
1163 2002-08-18 Pavel Roskin <proski@gnu.org>
1165 * editoptions.c: Make some variables static.
1166 * edit.h: Take extern declarations from all C files.
1168 * editcmd.c (edit_block_process_cmd): Plug memory leak.
1169 Simplify logic, reformat.
1171 2002-08-02 Paul Sheer <psheer@icon.co.za>
1173 * edit.c (edit_push_action): Fix access to uninitialized memory.
1176 2002-08-01 Pavel Roskin <proski@gnu.org>
1178 * syntax.c: Remove all references to MAD.
1180 * edit.h: Don't include mad.h.
1182 2002-07-29 Andrew V. Samoilov <kai@cmail.ru>
1184 * edit.h (edit_get_load_file): Mark message for translation.
1185 (edit_get_save_file): Ditto.
1187 2002-07-20 Pavel Roskin <proski@gnu.org>
1189 * syntax.c (apply_rules_going_right): Recheck keyword rules when
1190 a keyword is found on the left border of a context.
1192 2002-07-14 Pavel Roskin <proski@gnu.org>
1194 * syntax.c (edit_get_syntax_color): Return colorpair index, not
1195 attribute, when syntax highlighting is disabled. Handle black
1196 and white mode separately.
1198 * syntax.c (edit_load_syntax): Do nothing in black and white
1201 * edit.h [!HAVE_SLANG]: Enable syntax highlighting.
1202 * editdraw.c [!HAVE_SLANG]: Respect attributes for color pairs
1203 by using MY_COLOR_PAIR macro.
1205 * edit.h (struct key_word): Remove unused "bg" field, rename
1206 "fg" to "color", since it keeps all color information.
1207 * syntax.c (edit_get_syntax_color): Replace "fg" and "bg"
1208 arguments with a single argument "color".
1209 Adjust all dependencies.
1211 * editdraw.c (edit_draw_this_line): Fix setting MOD_ABNORMAL
1213 (print_to_widget): Fix displaying non-printable characters with
1214 ncurses. Set color for every character even if syntax
1215 highlighting is not compiled - it's needed to reset color after
1216 non-printable characters.
1218 * editdraw.c (edit_status): Use EDITOR_NORMAL_COLOR instead of
1220 * syntax.c (edit_get_syntax_color) [!HAVE_SYNTAXH]: Likewise.
1222 2002-06-24 Pavel Roskin <proski@gnu.org>
1224 * edit.c (check_file_access): Return 1 on all errors, document
1225 this behavior. Set edit->delete_file to 1 for newly created
1227 (edit_open_file): Don't set edit->delete_file, it's now done in
1228 check_file_access().
1229 Reported by Saso <saso@bojler.dhs.org>
1231 2002-05-13 Andrew V. Samoilov <kai@cmail.ru>
1233 * editcmd.c (edit_save_file): Call mc_chown() and mc_chmod()
1234 before mc_open() to prevent hangs over ftpfs.
1236 * edit.h: Remove open, close, write, read and mkdir definitions.
1237 * edit.c: Use mc_open, mc_close, mc_write, mc_read, mc_rename,
1238 mc_chmod and mc_chown. Don't cast (char *) to (unsigned long)
1239 in pointer arithmetics.
1240 * editcmd.c: Likewise.
1242 2002-03-25 Andrew V. Samoilov <kai@cmail.ru>
1244 * syntax.c (edit_read_syntax_file): Use system wide Syntax
1245 Highlighting definitions' file if there is no users one.
1247 2002-03-18 Pavel Roskin <proski@gnu.org>
1249 * edit.h: Use eregex.h, not regex.h.
1250 From Alexander Varakin <avarakin00@hotmail.com>
1252 2002-02-27 Andrew V. Samoilov <kai@cmail.ru>
1254 * editcmd.c (edit_replace_cmd): Eliminate fin_string
1255 and use message() to fix possible buffer overflow.
1256 (edit_search_cmd): Likewise.
1258 2002-02-18 Andrew V. Samoilov <kai@cmail.ru>
1260 * syntax.c (convert): Fix buffer overflow for ".*\" cases.
1262 2002-01-22 Pavel Roskin <proski@gnu.org>
1264 * editdraw.c (edit_scroll_screen_over_cursor): Do nothing if the
1265 edit widget has zero width or height.
1267 2002-01-21 Pavel Roskin <proski@gnu.org>
1269 * edit.c: Rename DELETE to DELCHAR to avoid macro redefinition
1273 2002-01-21 Matthias Urban <murban@cs.uni-magdeburg.de>
1275 * edit.c: Add support for CK_Complete_Word event.
1276 * editcmddef.h: Likewise.
1277 * edit_key_translator.c (cooledit_key_map): Bind Alt-Tab to
1279 (emacs_key_map): Likewise.
1280 * editcmd.c: Implement word completion.
1282 2002-01-21 Pavel Roskin <proski@gnu.org>
1284 * editmenu.c (CmdMenuEmacs): Add mail command without shortcut.
1285 Users of emacs keys should be able to send mail too.
1287 2002-01-15 Andrew V. Samoilov <kai@cmail.ru>
1289 * syntax.c (syntax_g_free): New macro to release and NULLify
1290 glib allocated memory area(s).
1291 (strdup_convert): Rename to ...
1292 (convert): ... this. Don't strdup() passed string.
1293 (get_args): Use convert() instead of strdup_convert().
1294 (free_args): Make it do nothing macro.
1295 (open_include_file): Eliminate p array. Use glib function to
1296 construct error_file_name. Use PATH_SEP instead of '/';
1297 (edit_read_syntax_file): Use PATH_SEP_STR.
1298 (edit_load_syntax): Use syntax_g_free to release error_file_name.
1299 (edit_read_syntax_rules): Likewise.
1300 Eliminate c->single_char. It's only written but never read.
1302 * edit.h (struct context_rule): Comment out single_char field.
1303 It is written once but never read.
1305 * edit-widget.h: Use PATH_SEP_STR.
1307 2001-12-22 Andrew V. Samoilov <kai@cmail.ru>
1309 * editcmd.c (edit_goto_cmd): Use g_free() to release f.
1310 (edit_save_file): Use PATH_SEP instead of '/'.
1311 Undefine "close" before closing file created by mc_mkstemps.
1312 Define close to mc_close() after it - temporary fix.
1314 (sprintf_p): Don't cast (char *) to (unsigned long).
1316 * syntax.c (read_one_line): Undo last patch - errno is a
1317 function on some systems. Check ferror() status before
1318 everything else if fgetc() returns EOF.
1319 Accept last line without trailing newline.
1321 (compare_word_to_right): Don't cast p and q to unsigned long.
1322 (apply_rules_going_right): Likewise.
1324 2001-12-21 Pavel Roskin <proski@gnu.org>
1326 * edit.c (user_menu): Don't move the cursor before and after
1327 inserting the block.
1328 Reported by Matthias Urban <murban@cs.uni-magdeburg.de>
1330 * syntax.c (read_one_line): Clear errno before using it. Don't
1331 use the result of fgetc() if errno is EINTR.
1333 2001-11-28 Andrew V. Samoilov <kai@cmail.ru>
1335 * syntax.c (apply_rules_going_right): Fix crash for lines like
1336 \s+ \n lightgray/13 red
1338 (read_one_line): Use EOF instead of -1.
1339 (get_args): Fix buffer overflow for l without trailing
1341 (break_a): New macro.
1342 (edit_read_syntax_rules): Use break_a to fix memory leaks.
1343 (edit_load_syntax): Eliminate s and use message to prevent
1346 * editdraw.c (edit_render): Eliminate f. It's only written
1349 2001-11-27 Andrew V. Samoilov <kai@cmail.ru>
1351 * editmenu.c (edit_wrap_cmd): Use g_free() on the result
1354 2001-11-22 Andrew V. Samoilov <kai@cmail.ru>
1356 * editcmd.c (edit_save_file): Use g_free() on the result of
1358 (edit_replace_cmd): Fix rare memory leaks.
1360 2001-11-19 Andrew V. Samoilov <kai@cmail.ru>
1362 * edit.c (edit_renew): Release dir after use.
1364 * editcmd.c (edit_replace_dialog): Eliminate tsearch_text,
1365 treplace_text and targ_order.
1366 (edit_replace_cmd): edit_replace_dialog gives g_malloced
1367 strings, so g_strdup/g_free have to be used. Accept only
1368 positive pattern number in Scanf search and replace.
1369 (edit_save_file): Enable safe save and backups on remote VFS.
1371 2001-11-16 Andrew V. Samoilov <kai@cmail.ru>
1373 * edit_key_translator.c (cooledit_key_map):
1374 Add C-k, CK_Delete_To_Line_End.
1376 * edit.c (user_menu): Don't assign block_file twice.
1378 2001-11-07 Andrew V. Samoilov <kai@cmail.ru>
1380 * edit.c (edit_reload): destroy_dlg g_free()s widget(s), so
1381 g_malloc/g_free have to be used.
1382 (edit_init): Ditto. Eliminate st.
1384 2001-11-05 Andrew V. Samoilov <kai@cmail.ru>
1386 * edit.h (edit_execute_cmd): Declare it here.
1388 * edit.c: Remove edit_execute_cmd declaration.
1389 (edit_execute_cmd): Use edit_print_string instead of edit_printf.
1391 * editcmd.c: Remove edit_execute_cmd declaration.
1392 (edit_search_dialog): Eliminate tsearch_text.
1393 (edit_search_cmd): edit_search_dialog gives g_malloc()ed exp.
1394 Use g_strdup/g_free instead of strdup/free.
1395 (edit_mail_dialog): quick_dialog use g_strdup, so g_free
1397 (edit_load_cmd): input_dialog returns g_malloc(ed) string,
1398 so g_free has to be used.
1399 (edit_save_block_cmd): Likewise.
1400 (edit_insert_file_cmd): Likewise.
1401 (edit_sort_cmd): Likewise.
1402 (edit_save_as_cmd): Likewise. Memory leak fixed.
1404 * bookmark.c (book_mark_clear): Eliminate rend.
1405 It's only written but never read.
1406 (book_mark_flush): Likewise.
1407 (book_mark_inc): Likewise.
1408 (book_mark_dec): Likewise.
1410 2001-10-23 Pavel Roskin <proski@gnu.org>
1412 * edit.c (user_menu): If the error file is missing, treat it as
1413 success. Truncate block file unconditionally.
1415 2001-10-22 Pavel Roskin <proski@gnu.org>
1417 * edit.c: Stop using _EDIT_C definition. Move variable
1418 declarations from edit.h, make static or eliminate if possible.
1419 Report errors immediately.
1421 * editwidget.c (edit): Don't report errors from edit_init(),
1422 they are reported in place.
1424 2001-10-20 Pavel Roskin <proski@gnu.org>
1426 * editcmd.c (sprintf_p): Declare with the printf attribute.
1429 * edit.h: Declare edit_printf() with the printf attribute.
1431 2001-10-18 Pavel Roskin <proski@gnu.org>
1433 * edit.c (check_file_access): Only allow to edit regular files.
1434 Use stat() before open() to prevent hangs on pipes, use fstat()
1435 afterwards if stat() was unsuccessful.
1437 2001-09-17 Pavel Roskin <proski@gnu.org>
1439 * edit.h: Don't use macro `stat' - it's already a macro on
1440 Solaris 8 with large file support.
1441 * editcmd.c: Replace stat() with mc_stat().
1444 2001-09-11 Pavel Roskin <proski@gnu.org>
1446 * syntax.c (syntax_text): Remove, it's a separate file now.
1447 (upgrade_syntax_file): Remove.
1448 (edit_read_syntax_file): Use check_for_default().
1450 2001-09-08 Pavel Roskin <proski@gnu.org>
1452 * edit.h: Remove some useless definitions.
1454 2001-09-07 Pavel Roskin <proski@gnu.org>
1456 * Makefile.am: Don't define "MIDNIGHT" - it's unused now.
1458 * edit.c: Eliminate all code disabled for the text edition.
1459 * editcmddef.h: Likewise.
1460 * editmenu.c: Likewise.
1461 * editwidget.c: Likewise.
1462 * syntax.c: Likewise.
1463 * wordproc.c: Likewise.
1465 * edit-widget.h: Change ~/.cedit to ~/.mc/cedit to keep mcedit
1466 files separate from cooledit.
1468 * bookmark.c: Eliminate all code disabled for the text edition.
1469 * edit-widget.h: Likewise.
1470 * editcmd.c: Likewise.
1471 * editdraw.c: Likewise.
1472 * editoptions.c: Likewise.
1474 * edit.h: Eliminate all code disabled for the text edition.
1475 Reorder and simplify includes.
1478 2001-09-06 Pavel Roskin <proski@gnu.org>
1480 * syntax.c (syntax_text): Add PHP support from Cooledit.
1482 2001-09-04 Pavel Roskin <proski@gnu.org>
1484 * Makefile.am (AM_CFLAGS): Remove CFLAGS, don't use substituted
1487 * syntax.c (syntax_text): Remove useless ']' in the Perl and
1488 Python rules. Change shell script rule to use more portable
1491 * editcmd.c (edit_block_process_cmd): Prepend space to the
1492 command to avoid polluting bash history. Document arguments.
1493 Fix crash if block is 0 - not used currently.
1495 2001-08-26 Pavel Roskin <proski@gnu.org>
1497 * Makefile.am: Don't install libedit.a.
1499 * Makefile.in: Converted to ...
1500 * Makefile.am: ... this.
1502 2001-08-24 Pavel Roskin <proski@gnu.org>
1504 * Makefile.in (EDITSRC): Add headers.
1505 (CPPFLAGS): Remove reference to gtkedit.
1507 Copy all necessary files from gtkedit.
1508 * Makefile.in (EDITLINKS): Merge with EDITSRC, remove all
1511 2001-08-24 Pavel Roskin <proski@gnu.org>
1513 * syntax.c (syntax_text): Fix recognizing pdksh and zsh scripts.
1515 2001-08-23 Pavel Roskin <proski@gnu.org>
1517 * editcmd.c (edit_block_process_cmd): Use execute(), not
1518 my_system() to relieve interactive scripts, such as spell
1519 checker, from saving and restoring the terminal.
1521 2001-08-19 Pavel Roskin <proski@gnu.org>
1523 * gtkedit.c: Include <sys/param.h> if present - it should always
1524 be included before <glib.h> to avoid redefining MIN and MAX.
1525 * editcmd.c [!MIDNIGHT]: Undefine B_ENTER and B_CANCEL before
1528 * edit.h: Include <sys/param.h> if present. Include Gtk+
1529 headers as system headers.
1530 * gtkedit.c: Include Gtk+ headers as system headers.
1532 2001-08-18 Pavel Roskin <proski@gnu.org>
1534 * syntax.c (syntax_text): Highlight *.pot as PO files.
1536 * edit.h [GTK]: Fix definition of edit_message_dialog().
1537 * gtkedit.c (gtk_edit_dialog_message): Use "OK" button, not
1538 "Cancel", for consistency with the text edition.
1540 2001-08-17 Pavel Roskin <proski@gnu.org>
1542 * syntax.c (syntax_text): Add support for PO files.
1544 2001-08-12 Pavel Roskin <proski@gnu.org>
1546 * edit.c: Handle CK_Shell.
1547 * editcmddef.h: Define CK_Shell.
1548 * editmenu.c (FileMenu): Remove C-o from the "Open file..."
1550 (FileMenuEmacs): Likewise.
1552 2001-08-06 Andrew V. Samoilov <kai@cmail.ru>
1554 * editcmd.c (edit_replace_prompt): Fix menu location calculation.
1556 2001-08-01 Pavel Roskin <proski@gnu.org>
1558 * editcmd.c (edit_save_file): Temporarily disable safe save
1559 and backups on remote VFS because it doesn't work. Use
1560 mc_mkstemps() instead of tempnam().
1562 2001-07-29 Pavel Roskin <proski@gnu.org>
1564 * syntax.c (syntax_text): Add support for S-Lang.
1566 2001-07-28 Pavel Roskin <proski@gnu.org>
1568 * editcmd.c (menu_save_mode_cmd): Resurrect i18n code lost in
1569 the last resync with Cooledit.
1570 Reported by David Martin <dmartina@excite.es>
1572 * gtkedit.c (gtk_edit_delete_cb): Handler for "delete_event".
1575 2001-07-27 Pavel Roskin <proski@gnu.org>
1577 * edit.c: Fix include.
1579 2001-07-20 Pavel Roskin <proski@gnu.org>
1581 * syntax.c (open_include_file) [GTK]: Use mc_home instead of
1584 2001-07-19 Pavel Roskin <proski@gnu.org>
1586 * editcmd.c (edit_canonicalize_pathname): Don't ever use
1587 getwd(), use g_get_current_dir() instead.
1589 * editoptions.c (edit_options_dialog): Call edit_load_syntax()
1590 if user turned syntax highlighting off to unload the rules.
1592 2001-07-17 Pavel Roskin <proski@gnu.org>
1594 * edit.h [MIDNIGHT]: Declare wedit.
1595 * editmenu.c: Remove wedit declaration.
1596 * editoptions.c (edit_options_dialog): Load syntax rules if user
1597 turned syntax highlighting on.
1598 * syntax.c (edit_load_syntax): Don't load rules if syntax
1599 highlighting is disabled.
1601 2001-07-13 Pavel Roskin <proski@gnu.org>
1603 * editoptions.c (edit_options_dialog): Allow numbers for tab
1604 spacing. Reported by mharris@redhat.com.
1605 http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=34852
1607 * editcmd.c (menu_save_mode_cmd): Give meaningful names to the
1608 input fields instead of "i" so that they have separate history.
1609 * editoptions.c (edit_options_dialog): Likewise.
1611 2001-07-11 Pavel Roskin <proski@gnu.org>
1613 * editdraw.c (status_string): Use g_snprintf() instead of
1615 From Libor Motyèka <l_motycka@ortex.cz>
1617 2001-07-10 Pavel Roskin <proski@gnu.org>
1619 * gtkeditkey.c (edit_translate_key): When processing bindings
1620 with Alt check that Shift is not pressed - it's handled later.
1622 2001-07-05 Pavel Roskin <proski@gnu.org>
1624 * editdraw.c: Comment fixes.
1626 2001-06-26 Pavel Roskin <proski@gnu.org>
1628 * edit-widget.h (editor_widget): Rename `stat' to `stat1' to
1629 avoid problems on Solaris with 64-bit file access, when `stat'
1630 is a macro. All users adjusted.
1631 Reported by Maksym Polyakov <polyama@yahoo.com>.
1633 2001-06-25 Pavel Roskin <proski@gnu.org>
1635 * gtkedit.c: Remove home_dir - it's declared in main.c.
1637 2001-06-15 Pavel Roskin <proski@gnu.org>
1639 * editcmd.c (canonicalize_pathname) [GTK]: Rename to ...
1640 (edit_canonicalize_pathname): ... this to avoid namespace clash.
1641 * edit.h [MIDNIGHT]: Include "src/cmd.h" and "src/user.h".
1642 Remove declarations duplicating "src/user.h".
1643 [GTK]: Include "src/dialog.h" and "src/util.h".
1645 * editmenu.c (edit_wrap_cmd): Fix declaration.
1646 (edit_about_cmd): Likewise.
1647 * editwidget.c (get_key_state): Likewise.
1649 * editcmd.c (edit_quit_cmd): Don't use strcmp on the result of
1650 gtk_dialog_cauldron() since it's NULL if the dialog has been
1651 closed without using buttons.
1653 * edit.c (edit_execute_cmd): Put time format to a variable to
1654 avoid gcc warning about Y2K issues with %c in strftime().
1656 2001-06-14 Pavel Roskin <proski@gnu.org>
1658 * edit.c: Declare cmd_F* static. Comment out cmd_F9.
1660 * edit.c: Use indented #error for compatibility with old C
1663 2001-06-13 Pavel Roskin <proski@gnu.org>
1665 * edit.c (edit_execute_cmd) [GTK]: Disable user menu - it
1667 (user_menu) [GTK]: Disable.
1668 * gtkedit.c (tb_items): Use complete words. Disable pull-down
1671 2001-06-09 Pavel Roskin <proski@gnu.org>
1673 * editcmd.c (catstrs): Use interactive_display() without
1674 specifying the help file.
1675 From Andrew V. Samoilov.
1677 2001-06-08 Andrew V. Samoilov <sav@bcs.zp.ua>
1679 * editcmd.c [HAVE_CHARSET]: Really include charset.h.
1680 * editmenu.c (edit_wrap_cmd): Memory leaking fixed.
1682 2001-06-05 Pavel Roskin <proski@gnu.org>
1684 * edit.c [HAVE_CHARSET]: Include charsets.h and selcodepage.h.
1685 * editcmd.c [HAVE_CHARSET]: Add charset conversion support.
1686 * editdraw.c [HAVE_CHARSET]: Likewise.
1687 From Andrew V. Samoilov <sav@bcs.zp.ua>
1688 and Walery Studennikov <hqsoftware@mail.ru>.
1690 2001-06-01 Pavel Roskin <proski@gnu.org>
1692 * gtkedit.h: Warning fix - use stricter declarations for
1693 destroy_me and destroy_me_user_data.
1695 2001-05-31 Pavel Roskin <proski@gnu.org>
1697 * Makefile.in: Define HAVE_X and HAVE_GNOME, not just GTK -
1698 header files are using them.
1700 * editdraw.c (edit_render) [GTK]: Revert previous patch, it
1703 2001-05-31 Andrew V. Samoilov <sav@bcs.zp.ua>
1705 * editdraw.c (edit_status): Use strcpy (s, ) instead of
1706 sprintf (s, "%s", ).
1708 (set_color) [MIDNIGHT]: Became a macro.
1709 (render_edit_text) [defined(MIDNIGHT) || defined(GTK)]: Warning fix.
1710 (edit_render) [GTK]: Eliminate win variable.
1711 (key_pending) [!GTK]: Warning fix.
1713 2001-05-30 Pavel Roskin <proski@gnu.org>
1715 * editdraw.c (status_string): Use is_printable(). Declare
1716 static. Eliminate intermediate buffer. Use memset() for filling.
1717 Print byte as unsigned. Use C notation for hex numbers.
1719 * editdraw.c (status_string): Don't print non-printable chars.
1720 Better formatting. Print "<EOF>" at the end of file instead of
1721 -1. Use snprintf instead of sprintf.
1723 2001-05-30 Andrew V. Samoilov <sav@bcs.zp.ua>
1725 * syntax.c (open_include_file) [MIDNIGHT]: Don't hardcode location
1726 of syntax file(s) with LIBDIR, use mc_home instead.
1727 From Ludovic Drolez <ludovic.drolez@freealter.com>.
1729 (syntax_text): Use perl.syntax to highlight perl modules (.pm).
1731 2001-05-18 Pavel Roskin <proski@gnu.org>
1733 * editcmd.c (edit_replace_prompt): Warning fix.
1735 2001-02-26 Pavel Roskin <proski@gnu.org>
1737 * editcmd.c (edit_delete_macro_cmd) [MIDNIGHT]: Don't use
1738 CK_Macro on the argument to edit_delete_macro().
1740 * edit.c (edit_init_file): Remove, it's useless. All the
1741 necessary files should be created when needed.
1742 * edit.h: Remove declaration of edit_init_file().
1744 2000-11-01 Andrew V. Samoilov <sav@bcs.zp.ua>
1746 * editcmd.c (canonicalize_pathname) [GTK]: memory leaking fixed
1748 2000-10-30 Pavel Roskin <proski@gnu.org>
1750 * editcmd.c (canonicalize_pathname) [GTK]: Make the argument
1752 (edit_split_filename) [GTK]: Make the second argument constant
1753 to match the declaration.
1755 2000-10-30 Andrew V. Samoilov <sav@bcs.zp.ua>
1757 * editcmd.c (edit_save_file): better error handling on writing
1759 (edit_sort_cmd): saved sort options proposed in dialog
1761 edit.h, editcmd.c: declaration for edit_save_block () added
1763 (edit_split_filename): f constified
1765 * edit.c (edit_init) [ENABLE_NLS]: option_whole_chars_search
1766 expanded by national letters using current locale on first call
1768 (edit_file_is_open) [MIDNIGHT]: all occurrences and related code
1771 (edit_execute_cmd): typo in error message fixed
1773 2000-09-30 Pavel Roskin <proski@gnu.org>
1775 * libgettext.h: Removed, shouldn't be here.
1776 * Makefile.in: Adjusted to remove libgettext.h
1778 2000-09-15 Andrew V. Samoilov <sav@bcs.zp.ua>
1780 * editcmd.c (edit_delete_macro, edit_(load|save)_macro_cmd): don't
1781 translate keywords written to macro file or macro don't work, at least
1782 for Cyrillic. Made this as separate commit, so, if it seriously breaks
1783 compatibility it's easy to revert it.
1785 2000-09-15 Andrew V. Samoilov <sav@bcs.zp.ua>
1787 * editcmd.c (edit_save_file): fopen()+fwrite()+fclose() replaced
1788 by open()+write()+close() to restore possibility to edit files
1789 over Midnight Commander's VFSes
1791 (edit_replace_cmd) [MIDNIGHT]: some more right algorithm to calculate
1792 menu coordinates used. I don't like if menu hides replaced text.
1794 (edit_goto_cmd): Memory leaking fixed when f is empty string
1796 2000-09-07 Andrew V. Samoilov <sav@bcs.zp.ua>
1798 * edit.c (check_file_access) [MIDNIGHT,GTK]: error message localized;
1799 some cosmetics changes to avoid annoying warnings
1801 * editcmd.c (edit_save_file): pclose returns 0 on success,
1802 file fclose()d when fwrite fails
1804 (pipe_mail): malloc () + sprintf () replaced by g_strdup_printf ()
1806 * syntax.c (syntax_text): Makefile replaced by [Mm]akefile to cover
1807 makefile and GNUmakefile
1808 (upgrade_syntax_file): infinitive loop fixed when rule file
1809 is outdated but it cannot be unlinked/overwritten
1811 2000-08-30 Pavel Roskin <proski@gnu.org>
1813 * editwidget.c [!MIDNIGHT]: include xdnd.h
1814 * Makefile.in: distribute xdnd.h
1816 2000-08-18 Pavel Roskin <proski@gnu.org>
1818 * Makefile.in: adjusted list of distributed files.
1819 Added rule for rebuilding Makefile
1821 2000-08-08 Pavel Roskin <proski@gnu.org>
1823 * gtkedit.c [GTK]: don't include mousemark.h
1824 * gtkedit.h [GTK]: likewise
1826 2000-08-03 Pavel Roskin <proski@gnu.org>
1828 * mousemark.c, mousemark.h: removed
1829 * Makefile.in: don't distribute mousemark.h
1830 * gtkedit.c [MIDNIGHT]: don't include mousemark.h
1831 * gtkedit.h [MIDNIGHT]: likewise
1833 2000-07-20 Andrew V. Samoilov <sav@bcs.zp.ua>
1835 * gtkedit/editcmd.c (edit_save_file): check fclose()s return value
1836 to prevent loss of data
1837 (edit_block_process_cmd): don't translate empty string
1839 * gtkedit/edit.h (edit_get_write_filter, edit_write_stream,
1840 edit_init_file): added declarations
1842 * edit.c (edit_filters): constified
1843 (edit_get_write_filter): filename constified
1844 (user_menu): don't translate empty string
1846 * syntax.c (syntax_text): constified
1847 (upgrade_syntax_file): syntax_line constified, f closed after use