1 2001-11-22 Andrew V. Samoilov <kai@cmail.ru>
3 * editcmd.c (edit_save_file): Use g_free() on the result of
6 2001-11-19 Andrew V. Samoilov <kai@cmail.ru>
8 * edit.c (edit_renew): Release dir after use.
10 * editcmd.c (edit_replace_dialog): Eliminate tsearch_text,
11 treplace_text and targ_order.
12 (edit_replace_cmd): edit_replace_dialog gives g_malloced
13 strings, so g_strdup/g_free have to be used. Accept only
14 positive pattern number in Scanf search and replace.
15 (edit_save_file): Enable safe save and backups on remote VFS.
17 2001-11-16 Andrew V. Samoilov <kai@cmail.ru>
19 * edit_key_translator.c (cooledit_key_map):
20 Add C-k, CK_Delete_To_Line_End.
22 * edit.c (user_menu): Don't assign block_file twice.
24 2001-11-07 Andrew V. Samoilov <kai@cmail.ru>
26 * edit.c (edit_reload): destroy_dlg g_free()s widget(s), so
27 g_malloc/g_free have to be used.
28 (edit_init): Ditto. Eliminate st.
30 2001-11-05 Andrew V. Samoilov <kai@cmail.ru>
32 * edit.h (edit_execute_cmd): Declare it here.
34 * edit.c: Remove edit_execute_cmd declaration.
35 (edit_execute_cmd): Use edit_print_string instead of edit_printf.
37 * editcmd.c: Remove edit_execute_cmd declaration.
38 (edit_search_dialog): Eliminate tsearch_text.
39 (edit_search_cmd): edit_search_dialog gives g_malloc()ed exp.
40 Use g_strdup/g_free instead of strdup/free.
41 (edit_mail_dialog): quick_dialog use g_strdup, so g_free
43 (edit_load_cmd): input_dialog returns g_malloc(ed) string,
44 so g_free has to be used.
45 (edit_save_block_cmd): Likewise.
46 (edit_insert_file_cmd): Likewise.
47 (edit_sort_cmd): Likewise.
48 (edit_save_as_cmd): Likewise. Memory leak fixed.
50 * bookmark.c (book_mark_clear): Eliminate rend.
51 It's only written but never read.
52 (book_mark_flush): Likewise.
53 (book_mark_inc): Likewise.
54 (book_mark_dec): Likewise.
56 2001-10-23 Pavel Roskin <proski@gnu.org>
58 * edit.c (user_menu): If the error file is missing, treat it as
59 success. Truncate block file unconditionally.
61 2001-10-22 Pavel Roskin <proski@gnu.org>
63 * edit.c: Stop using _EDIT_C definition. Move variable
64 declarations from edit.h, make static or eliminate if possible.
65 Report errors immediately.
67 * editwidget.c (edit): Don't report errors from edit_init(),
68 they are reported in place.
70 2001-10-20 Pavel Roskin <proski@gnu.org>
72 * editcmd.c (sprintf_p): Declare with the printf attribute.
75 * edit.h: Declare edit_printf() with the printf attribute.
77 2001-10-18 Pavel Roskin <proski@gnu.org>
79 * edit.c (check_file_access): Only allow to edit regular files.
80 Use stat() before open() to prevent hangs on pipes, use fstat()
81 afterwards if stat() was unsuccessful.
83 2001-09-17 Pavel Roskin <proski@gnu.org>
85 * edit.h: Don't use macro `stat' - it's already a macro on
86 Solaris 8 with large file support.
87 * editcmd.c: Replace stat() with mc_stat().
90 2001-09-11 Pavel Roskin <proski@gnu.org>
92 * syntax.c (syntax_text): Remove, it's a separate file now.
93 (upgrade_syntax_file): Remove.
94 (edit_read_syntax_file): Use check_for_default().
96 2001-09-08 Pavel Roskin <proski@gnu.org>
98 * edit.h: Remove some useless definitions.
100 2001-09-07 Pavel Roskin <proski@gnu.org>
102 * Makefile.am: Don't define "MIDNIGHT" - it's unused now.
104 * edit.c: Eliminate all code disabled for the text edition.
105 * editcmddef.h: Likewise.
106 * editmenu.c: Likewise.
107 * editwidget.c: Likewise.
108 * syntax.c: Likewise.
109 * wordproc.c: Likewise.
111 * edit-widget.h: Change ~/.cedit to ~/.mc/cedit to keep mcedit
112 files separate from cooledit.
114 * bookmark.c: Eliminate all code disabled for the text edition.
115 * edit-widget.h: Likewise.
116 * editcmd.c: Likewise.
117 * editdraw.c: Likewise.
118 * editoptions.c: Likewise.
120 * edit.h: Eliminate all code disabled for the text edition.
121 Reorder and simplify includes.
124 2001-09-06 Pavel Roskin <proski@gnu.org>
126 * syntax.c (syntax_text): Add PHP support from Cooledit.
128 2001-09-04 Pavel Roskin <proski@gnu.org>
130 * Makefile.am (AM_CFLAGS): Remove CFLAGS, don't use substituted
133 * syntax.c (syntax_text): Remove useless ']' in the Perl and
134 Python rules. Change shell script rule to use more portable
137 * editcmd.c (edit_block_process_cmd): Prepend space to the
138 command to avoid polluting bash history. Document arguments.
139 Fix crash if block is 0 - not used currently.
141 2001-08-26 Pavel Roskin <proski@gnu.org>
143 * Makefile.am: Don't install libedit.a.
145 * Makefile.in: Converted to ...
146 * Makefile.am: ... this.
148 2001-08-24 Pavel Roskin <proski@gnu.org>
150 * Makefile.in (EDITSRC): Add headers.
151 (CPPFLAGS): Remove reference to gtkedit.
153 Copy all necessary files from gtkedit.
154 * Makefile.in (EDITLINKS): Merge with EDITSRC, remove all
157 2001-08-24 Pavel Roskin <proski@gnu.org>
159 * syntax.c (syntax_text): Fix recognizing pdksh and zsh scripts.
161 2001-08-23 Pavel Roskin <proski@gnu.org>
163 * editcmd.c (edit_block_process_cmd): Use execute(), not
164 my_system() to relieve interactive scripts, such as spell
165 checker, from saving and restoring the terminal.
167 2001-08-19 Pavel Roskin <proski@gnu.org>
169 * gtkedit.c: Include <sys/param.h> if present - it should always
170 be included before <glib.h> to avoid redefining MIN and MAX.
171 * editcmd.c [!MIDNIGHT]: Undefine B_ENTER and B_CANCEL before
174 * edit.h: Include <sys/param.h> if present. Include Gtk+
175 headers as system headers.
176 * gtkedit.c: Include Gtk+ headers as system headers.
178 2001-08-18 Pavel Roskin <proski@gnu.org>
180 * syntax.c (syntax_text): Highlight *.pot as PO files.
182 * edit.h [GTK]: Fix definition of edit_message_dialog().
183 * gtkedit.c (gtk_edit_dialog_message): Use "OK" button, not
184 "Cancel", for consistency with the text edition.
186 2001-08-17 Pavel Roskin <proski@gnu.org>
188 * syntax.c (syntax_text): Add support for PO files.
190 2001-08-12 Pavel Roskin <proski@gnu.org>
192 * edit.c: Handle CK_Shell.
193 * editcmddef.h: Define CK_Shell.
194 * editmenu.c (FileMenu): Remove C-o from the "Open file..."
196 (FileMenuEmacs): Likewise.
198 2001-08-06 Andrew V. Samoilov <kai@cmail.ru>
200 * editcmd.c (edit_replace_prompt): Fix menu location calculation.
202 2001-08-01 Pavel Roskin <proski@gnu.org>
204 * editcmd.c (edit_save_file): Temporarily disable safe save
205 and backups on remote VFS because it doesn't work. Use
206 mc_mkstemps() instead of tempnam().
208 2001-07-29 Pavel Roskin <proski@gnu.org>
210 * syntax.c (syntax_text): Add support for S-Lang.
212 2001-07-28 Pavel Roskin <proski@gnu.org>
214 * editcmd.c (menu_save_mode_cmd): Resurrect i18n code lost in
215 the last resync with Cooledit.
216 Reported by David Martin <dmartina@excite.es>
218 * gtkedit.c (gtk_edit_delete_cb): Handler for "delete_event".
221 2001-07-27 Pavel Roskin <proski@gnu.org>
223 * edit.c: Fix include.
225 2001-07-20 Pavel Roskin <proski@gnu.org>
227 * syntax.c (open_include_file) [GTK]: Use mc_home instead of
230 2001-07-19 Pavel Roskin <proski@gnu.org>
232 * editcmd.c (edit_canonicalize_pathname): Don't ever use
233 getwd(), use g_get_current_dir() instead.
235 * editoptions.c (edit_options_dialog): Call edit_load_syntax()
236 if user turned syntax highlighting off to unload the rules.
238 2001-07-17 Pavel Roskin <proski@gnu.org>
240 * edit.h [MIDNIGHT]: Declare wedit.
241 * editmenu.c: Remove wedit declaration.
242 * editoptions.c (edit_options_dialog): Load syntax rules if user
243 turned syntax highlighting on.
244 * syntax.c (edit_load_syntax): Don't load rules if syntax
245 highlighting is disabled.
247 2001-07-13 Pavel Roskin <proski@gnu.org>
249 * editoptions.c (edit_options_dialog): Allow numbers for tab
250 spacing. Reported by mharris@redhat.com.
251 http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=34852
253 * editcmd.c (menu_save_mode_cmd): Give meaningful names to the
254 input fields instead of "i" so that they have separate history.
255 * editoptions.c (edit_options_dialog): Likewise.
257 2001-07-11 Pavel Roskin <proski@gnu.org>
259 * editdraw.c (status_string): Use g_snprintf() instead of
261 From Libor Motyèka <l_motycka@ortex.cz>
263 2001-07-10 Pavel Roskin <proski@gnu.org>
265 * gtkeditkey.c (edit_translate_key): When processing bindings
266 with Alt check that Shift is not pressed - it's handled later.
268 2001-07-05 Pavel Roskin <proski@gnu.org>
270 * editdraw.c: Comment fixes.
272 2001-06-26 Pavel Roskin <proski@gnu.org>
274 * edit-widget.h (editor_widget): Rename `stat' to `stat1' to
275 avoid problems on Solaris with 64-bit file access, when `stat'
276 is a macro. All users adjusted.
277 Reported by Maksym Polyakov <polyama@yahoo.com>.
279 2001-06-25 Pavel Roskin <proski@gnu.org>
281 * gtkedit.c: Remove home_dir - it's declared in main.c.
283 2001-06-15 Pavel Roskin <proski@gnu.org>
285 * editcmd.c (canonicalize_pathname) [GTK]: Rename to ...
286 (edit_canonicalize_pathname): ... this to avoid namespace clash.
287 * edit.h [MIDNIGHT]: Include "src/cmd.h" and "src/user.h".
288 Remove declarations duplicating "src/user.h".
289 [GTK]: Include "src/dialog.h" and "src/util.h".
291 * editmenu.c (edit_wrap_cmd): Fix declaration.
292 (edit_about_cmd): Likewise.
293 * editwidget.c (get_key_state): Likewise.
295 * editcmd.c (edit_quit_cmd): Don't use strcmp on the result of
296 gtk_dialog_cauldron() since it's NULL if the dialog has been
297 closed without using buttons.
299 * edit.c (edit_execute_cmd): Put time format to a variable to
300 avoid gcc warning about Y2K issues with %c in strftime().
302 2001-06-14 Pavel Roskin <proski@gnu.org>
304 * edit.c: Declare cmd_F* static. Comment out cmd_F9.
306 * edit.c: Use indented #error for compatibility with old C
309 2001-06-13 Pavel Roskin <proski@gnu.org>
311 * edit.c (edit_execute_cmd) [GTK]: Disable user menu - it
313 (user_menu) [GTK]: Disable.
314 * gtkedit.c (tb_items): Use complete words. Disable pull-down
317 2001-06-09 Pavel Roskin <proski@gnu.org>
319 * editcmd.c (catstrs): Use interactive_display() without
320 specifying the help file.
321 From Andrew V. Samoilov.
323 2001-06-08 Andrew V. Samoilov <sav@bcs.zp.ua>
325 * editcmd.c [HAVE_CHARSET]: Really include charset.h.
326 * editmenu.c (edit_wrap_cmd): Memory leaking fixed.
328 2001-06-05 Pavel Roskin <proski@gnu.org>
330 * edit.c [HAVE_CHARSET]: Include charsets.h and selcodepage.h.
331 * editcmd.c [HAVE_CHARSET]: Add charset conversion support.
332 * editdraw.c [HAVE_CHARSET]: Likewise.
333 From Andrew V. Samoilov <sav@bcs.zp.ua>
334 and Walery Studennikov <hqsoftware@mail.ru>.
336 2001-06-01 Pavel Roskin <proski@gnu.org>
338 * gtkedit.h: Warning fix - use stricter declarations for
339 destroy_me and destroy_me_user_data.
341 2001-05-31 Pavel Roskin <proski@gnu.org>
343 * Makefile.in: Define HAVE_X and HAVE_GNOME, not just GTK -
344 header files are using them.
346 * editdraw.c (edit_render) [GTK]: Revert previous patch, it
349 2001-05-31 Andrew V. Samoilov <sav@bcs.zp.ua>
351 * editdraw.c (edit_status): Use strcpy (s, ) instead of
354 (set_color) [MIDNIGHT]: Became a macro.
355 (render_edit_text) [defined(MIDNIGHT) || defined(GTK)]: Warning fix.
356 (edit_render) [GTK]: Eliminate win variable.
357 (key_pending) [!GTK]: Warning fix.
359 2001-05-30 Pavel Roskin <proski@gnu.org>
361 * editdraw.c (status_string): Use is_printable(). Declare
362 static. Eliminate intermediate buffer. Use memset() for filling.
363 Print byte as unsigned. Use C notation for hex numbers.
365 * editdraw.c (status_string): Don't print non-printable chars.
366 Better formatting. Print "<EOF>" at the end of file instead of
367 -1. Use snprintf instead of sprintf.
369 2001-05-30 Andrew V. Samoilov <sav@bcs.zp.ua>
371 * syntax.c (open_include_file) [MIDNIGHT]: Don't hardcode location
372 of syntax file(s) with LIBDIR, use mc_home instead.
373 From Ludovic Drolez <ludovic.drolez@freealter.com>.
375 (syntax_text): Use perl.syntax to highlight perl modules (.pm).
377 2001-05-18 Pavel Roskin <proski@gnu.org>
379 * editcmd.c (edit_replace_prompt): Warning fix.
381 2001-02-26 Pavel Roskin <proski@gnu.org>
383 * editcmd.c (edit_delete_macro_cmd) [MIDNIGHT]: Don't use
384 CK_Macro on the argument to edit_delete_macro().
386 * edit.c (edit_init_file): Remove, it's useless. All the
387 necessary files should be created when needed.
388 * edit.h: Remove declaration of edit_init_file().
390 2000-11-01 Andrew V. Samoilov <sav@bcs.zp.ua>
392 * editcmd.c (canonicalize_pathname) [GTK]: memory leaking fixed
394 2000-10-30 Pavel Roskin <proski@gnu.org>
396 * editcmd.c (canonicalize_pathname) [GTK]: Make the argument
398 (edit_split_filename) [GTK]: Make the second argument constant
399 to match the declaration.
401 2000-10-30 Andrew V. Samoilov <sav@bcs.zp.ua>
403 * editcmd.c (edit_save_file): better error handling on writting
405 (edit_sort_cmd): saved sort options proposed in dialog
407 edit.h, editcmd.c: declaration for edit_save_block () added
409 (edit_split_filename): f constified
411 * edit.c (edit_init) [ENABLE_NLS]: option_whole_chars_search
412 expanded by national letters using current locale on first call
414 (edit_file_is_open) [MIDNIGHT]: all occurences and related code
417 (edit_execute_cmd): typo in error message fixed
419 2000-09-30 Pavel Roskin <proski@gnu.org>
421 * libgettext.h: Removed, shouldn't be here.
422 * Makefile.in: Adjusted to remove libgettext.h
424 2000-09-15 Andrew V. Samoilov <sav@bcs.zp.ua>
426 * editcmd.c (edit_delete_macro, edit_(load|save)_macro_cmd): don't
427 translate keywords written to macro file or macro don't work, at least
428 for Cyrillic. Made this as separate commit, so, if it seriously breaks
429 compatibility it's easy to revert it.
431 2000-09-15 Andrew V. Samoilov <sav@bcs.zp.ua>
433 * editcmd.c (edit_save_file): fopen()+fwrite()+fclose() replaced
434 by open()+write()+close() to restore possibility to edit files
435 over Midnight Commander's VFSes
437 (edit_replace_cmd) [MIDNIGHT]: some more right algorithm to calculate
438 menu coordinates used. I don't like if menu hides replaced text.
440 (edit_goto_cmd): Memory leaking fixed when f is empty string
442 2000-09-07 Andrew V. Samoilov <sav@bcs.zp.ua>
444 * edit.c (check_file_access) [MIDNIGHT,GTK]: error message localized;
445 some cosmetics changes to avoid annoying warnings
447 * editcmd.c (edit_save_file): pclose returns 0 on success,
448 file fclose()d when fwrite fails
450 (pipe_mail): malloc () + sprintf () replaced by g_strdup_printf ()
452 * syntax.c (syntax_text): Makefile replaced by [Mm]akefile to cover
453 makefile and GNUmakefile
454 (upgrade_syntax_file): infinitive loop fixed when rule file
455 is outdated but it cannot be unlinked/overwritten
457 2000-08-30 Pavel Roskin <proski@gnu.org>
459 * editwidget.c [!MIDNIGHT]: include xdnd.h
460 * Makefile.in: distribute xdnd.h
462 2000-08-18 Pavel Roskin <proski@gnu.org>
464 * Makefile.in: adjusted list of distributed files.
465 Added rule for rebuilding Makefile
467 2000-08-08 Pavel Roskin <proski@gnu.org>
469 * gtkedit.c [GTK]: don't include mousemark.h
470 * gtkedit.h [GTK]: likewise
472 2000-08-03 Pavel Roskin <proski@gnu.org>
474 * mousemark.c, mousemark.h: removed
475 * Makefile.in: don't distribute mousemark.h
476 * gtkedit.c [MIDNIGHT]: don't include mousemark.h
477 * gtkedit.h [MIDNIGHT]: likewise
479 2000-07-20 Andrew V. Samoilov <sav@bcs.zp.ua>
481 * gtkedit/editcmd.c (edit_save_file): check fclose()s return value
482 to prevent loss of data
483 (edit_block_process_cmd): don't translate empty string
485 * gtkedit/edit.h (edit_get_write_filter, edit_write_stream,
486 edit_init_file): added declarations
488 * edit.c (edit_filters): constified
489 (edit_get_write_filter): filename constified
490 (user_menu): don't translate empty string
492 * syntax.c (syntax_text): constified
493 (upgrade_syntax_file): syntax_line constified, f closed after use