ChangeLog 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996
  1. 2002-12-15 Pavel Roskin <proski@gnu.org>
  2. * (edit_init): Move file loading to ...
  3. (edit_load_file): ... a separate function.
  4. * edit.c (init_dynamic_edit_buffers): Remove unused code to
  5. support loading text from buffer.
  6. 2002-12-14 Pavel Roskin <proski@gnu.org>
  7. * editcmd.c (edit_split_filename): Rename to edit_set_filename,
  8. use g_malloc() and g_free() on edit->filename.
  9. 2002-12-08 Pavel Roskin <proski@gnu.org>
  10. * edit.c (edit_open_file): Remove "text" and "text_size"
  11. arguments. Adjust all callers.
  12. * edit.c (edit_move_to_column): Remove, use
  13. edit_move_to_prev_col() instead.
  14. * edit.c: Commit the rest of the position saving code.
  15. (edit_load_position): New function, load position.
  16. (edit_save_position): New function, save position.
  17. (edit_init): Take new argument "line". If it's 0, load position
  18. from .mc/filepos.
  19. (edit_clean): Save file position to .mc/filepos even if the file
  20. is not being saved.
  21. * editwidget.c (edit): Don't set the initial line, pass it to
  22. edit_init().
  23. 2002-12-07 Pavel Roskin <proski@gnu.org>
  24. * syntax.c (edit_load_syntax): Reuse more informative error
  25. message.
  26. * edit.c (check_file_access): Use O_EXCL when opening new files.
  27. Don't allow editing stale symlinks.
  28. Reported by Max Derzhak <max@linux.zp.ua>
  29. 2002-12-05 Pavel Roskin <proski@gnu.org>
  30. * edit-widget.h: Remove "from_here" and "to_here".
  31. * edit.c (edit_purge_widget): New function - clean struct WEdit
  32. except the Widget part.
  33. 2002-12-04 Pavel Roskin <proski@gnu.org>
  34. * editcmd.c: Include dialog.h.
  35. Reported by Frédéric L. W. Meunier <lists@pervalidus.net>
  36. 2002-11-30 Pavel Roskin <proski@gnu.org>
  37. * edit.h: Remove "dir" field in WEdit - it's always an empty
  38. string. Adjust all dependencies.
  39. * editcmd.c (edit_get_load_file): Remove first argument, it's
  40. unused.
  41. (edit_get_save_file): Likewise.
  42. * syntax.c: Make structures key_word, context_rule and
  43. _syntax_marker opaque.
  44. * edit.c: Use g_malloc() and g_free() on buffers1 and buffers2.
  45. Eliminate CMalloc.
  46. (edit_get_buffer_as_text): Remove, it's unused.
  47. * editcmd.c (edit_set_search_parameters): Use g_malloc().
  48. (edit_complete_word_cmd): Use g_free().
  49. 2002-11-29 Pavel Roskin <proski@gnu.org>
  50. * edit.h: Don't define HAVE_SYNTAXH.
  51. * syntax.c: Syntax highlighting is no more optional.
  52. (edit_check_spelling): Remove.
  53. * editoptions.c (edit_options_dialog): Add "Save file position"
  54. option, make "Syntax highlighting" unconditional.
  55. * edit.c: First part of the position saving code.
  56. (edit_move_to_column): New function.
  57. 2002-11-29 Andrew V. Samoilov <sav@bcs.zp.ua>
  58. * editoptions.c (edit_options_dialog): Use g_free() to release
  59. variables allocated in quick_dialog().
  60. 2002-11-28 Pavel Roskin <proski@gnu.org>
  61. * edit-widget.h: Move typedef WEdit and file names ...
  62. * edit.h: ... here. Don't include edit-widget.h. Adjust all
  63. dependencies.
  64. 2002-11-23 Andrew V. Samoilov <sav@bcs.zp.ua>
  65. * editoptions.c (edit_options_dialog): Clean up and use g_snprintf()
  66. instead of sprintf().
  67. 2002-11-14 Pavel Roskin <proski@gnu.org>
  68. * edit.h: Decentralize includes.
  69. * editmenu.c (edit_user_menu_cmd): Move to ../src/cmd.c.
  70. * edit.c (edit_delete_line): Don't remove and restore the
  71. preceding newline. Don't treat binary zero as newline.
  72. From Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
  73. 2002-11-12 Pavel Roskin <proski@gnu.org>
  74. * *.c: Fix all global functions without declarations - declare,
  75. make static or remove.
  76. * syntax.c (syntax_change_callback): Remove, it's unused.
  77. (edit_set_syntax_change_callback): Likewise.
  78. * edit.c (edit_execute_cmd): Fool gcc to prevent Y2K warning.
  79. * editwidget.c (edit_adjust_size): Use find_buttonbar().
  80. 2002-11-11 Pavel Roskin <proski@gnu.org>
  81. * editcmd.c: Warning fix for compilers that don't understand the
  82. "const" keyword and variable size arrays.
  83. 2002-11-06 Pavel Roskin <proski@gnu.org>
  84. * editcmd.c (edit_save_file): Restore ownership before access
  85. mode, not after. Otherwise suid bit is lost.
  86. Reported by Nerijus Baliunas <nerijus@users.sourceforge.net>
  87. 2002-10-30 Pavel Roskin <proski@gnu.org>
  88. * edit.c: Include charset.h unconditionally, use new conversion
  89. functions that don't require ifdefs.
  90. * edit_key_translator.c: Likewise.
  91. * editcmd.c: Likewise.
  92. * editdraw.c: Likewise.
  93. 2002-10-20 Pavel Roskin <proski@gnu.org>
  94. * edit-widget.h: Add new field macro_depth to control depth of
  95. macro recursion.
  96. * edit.c (edit_execute_macro): Make static. Increment
  97. macro_depth on entry, decrement on exit, don't allow it to be
  98. too large.
  99. * wordproc.c (line_start): Remove incorrect optimization abusing
  100. static variables. Internal formatting should be usable now.
  101. 2002-10-18 Pavel Roskin <proski@gnu.org>
  102. * wordproc.c (begin_paragraph): Fix the same off-by-one error as
  103. in end_paragraph() - it affects formatting of the paragraph
  104. after the first line in the file it that line starts with a dot.
  105. Remove unused argument.
  106. * wordproc.c (end_paragraph): The last line of the file wasn't
  107. tested for being blank, which resulted in the last newline
  108. becoming a space after formatting.
  109. 2002-10-17 Pavel Roskin <proski@gnu.org>
  110. * editoptions.c (edit_options_dialog): Don't allow
  111. option_tab_spacing to be 0. Reset invalid values to 8.
  112. Reported by Ury N. Stankevich <ury@bofh.homeunix.org>
  113. 2002-10-08 Pavel Roskin <proski@gnu.org>
  114. * wordproc.c (format_paragraph): If formatting was successful,
  115. scroll to the left to show the formatted paragraph.
  116. 2002-10-06 Pavel Roskin <proski@gnu.org>
  117. * editdraw.c (print_to_widget): Eliminate use of floating point.
  118. Change all callers.
  119. 2002-10-02 Andrew V. Samoilov <sav@bcs.zp.ua>
  120. * editcmd.c (edit_insert_column_of_text): Fix infinite loop if
  121. block of text is copied past the end of the buffer.
  122. By Paul Sheer <psheer@icon.co.za>.
  123. (stacked): Don't initialize static arrays by zeros.
  124. 2002-09-26 Andrew V. Samoilov <sav@bcs.zp.ua>
  125. * edit.h (struct key_word): Remove time field.
  126. * syntax.c: Remove MAD support.
  127. 2002-09-24 Pavel Roskin <proski@gnu.org>
  128. * editwidget.c (edit): Make edit_dlg local variable.
  129. * editmenu.c (edit_drop_menu_cmd): Don't use edit_dlg variable.
  130. * edit.c: Remove all references to CR_LF_TRANSLATION.
  131. * editcmd.c: Likewise.
  132. 2002-09-23 Pavel Roskin <proski@gnu.org>
  133. * editwidget.c (edit): Install handler for DLG_RESIZE.
  134. * editwidget.c (edit): Set edit_dlg to NULL after it's
  135. destroyed.
  136. * edit.h: Move style definitions ...
  137. * editdraw.c: ... here. Multiply them by 256. Remove unused
  138. styles.
  139. (print_to_widget): Don't divide style by 256. Simplify logic
  140. since we only have 4 styles now.
  141. * edit.c (edit_move_forward3): Use caret notation for code 127
  142. and below code 32.
  143. * editdraw.c (edit_draw_this_line): Likewise. Print '.' for
  144. other non-printable characters and remove this code from ...
  145. (print_to_widget): ... here.
  146. * edit.c (edit_move_forward3): Show '\r' as ^M.
  147. * editdraw.c (edit_draw_this_line): Likewise. Use MOD_ABNORMAL
  148. attribute.
  149. From Alexander Varakin <avarakin00@hotmail.com>
  150. * edit.h: Remove all references to O_TEXT, USE_O_TEXT and
  151. MY_O_TEXT.
  152. * edit.c: Use O_BINARY when opening files.
  153. * editcmd.c: Likewise.
  154. From Alexander Varakin <avarakin00@hotmail.com>
  155. 2002-09-20 Pavel Roskin <proski@gnu.org>
  156. * editwidget.c (edit_event): Add support for mouse wheel events.
  157. * edit.h: Add missing declarations for edit_move_up() and
  158. edit_move_down().
  159. 2002-09-20 Andrew V. Samoilov <sav@bcs.zp.ua>
  160. * edit.c: Don't initialize static selection and selection_history.
  161. * editdraw.c (status_string): Remove font_width argument.
  162. (edit_status): Fix calculation to use last column in the
  163. status string.
  164. 2002-09-04 Pavel Roskin <proski@gnu.org>
  165. * edit.c (edit_filters): Use gzip, not compress for *.Z files
  166. for consistency with other parts of the code (viewer, mc.ext).
  167. 2002-09-03 Pavel Roskin <proski@gnu.org>
  168. * editcmd.c: Recheck and fix all calls to create_dlg().
  169. * editwidget.c: Likewise.
  170. 2002-09-02 Pavel Roskin <proski@gnu.org>
  171. * editcmd.c (edit_raw_key_query): Eliminate
  172. x_set_dialog_title().
  173. 2002-09-01 Pavel Roskin <proski@gnu.org>
  174. * editcmd.c (edit_block_process_cmd): Restore third argument
  175. (but make it /dev/null) for compatibility with old scripts.
  176. Reported by Andrew V. Samoilov <sav@bcs.zp.ua>
  177. 2002-08-31 Pavel Roskin <proski@gnu.org>
  178. * editwidget.c (edit): Avoid passing an uninitialized color
  179. array to create_dlg() - pass NULL instead.
  180. 2002-08-27 Andrew V. Samoilov <sav@bcs.zp.ua>
  181. * editcmd.c (edit_printf): Use g_vsnprintf() instead of sprintf().
  182. 2002-08-24 Pavel Roskin <proski@gnu.org>
  183. * edit-widget.h: Eliminate ERROR_FILE.
  184. * edit.c: Remove all references to ERROR_FILE.
  185. * editcmd.c (edit_block_process_cmd): Revert to using catstrs(),
  186. those strings are freed now. Use system(), not execute() to
  187. execute commands. Use open_error_pipe() and close_error_pipe()
  188. to keep track of errors.
  189. 2002-08-22 Pavel Roskin <proski@gnu.org>
  190. * editcmd.c: Clean up global variables in the completion code.
  191. * editwidget.c: Use new dialog flags.
  192. * editcmd.c: Likewise.
  193. (edit_completion_dialog): Set DLG_COMPACT for the dialog.
  194. * editcmd.c (compl_callback): Use common_dialog_repaint().
  195. * editcmd.c (raw_callback): Use standard common_dialog_repaint()
  196. to handle DLG_DRAW.
  197. 2002-08-21 Pavel Roskin <proski@gnu.org>
  198. * editwidget.c (edit): Make edit_bar a local variable.
  199. 2002-08-20 Pavel Roskin <proski@gnu.org>
  200. * editcmd.c (freestrs): Set freed strings to NULL.
  201. (catstrs): Use g_malloc() and g_free().
  202. * editcmd.c (freestrs): New function to clean temporary strings.
  203. * edit.c (edit_clean): Call freestrs().
  204. 2002-08-20 David Martin <dmartina@excite.com>
  205. * editmenu.c: Use new create_menu() interface.
  206. 2002-08-18 Pavel Roskin <proski@gnu.org>
  207. * editoptions.c: Make some variables static.
  208. * edit.h: Take extern declarations from all C files.
  209. * editcmd.c (edit_block_process_cmd): Plug memory leak.
  210. Simplify logic, reformat.
  211. 2002-08-02 Paul Sheer <psheer@icon.co.za>
  212. * edit.c (edit_push_action): Fix access to uninitialized memory.
  213. Found by Valgrind.
  214. 2002-08-01 Pavel Roskin <proski@gnu.org>
  215. * syntax.c: Remove all references to MAD.
  216. * edit.h: Don't include mad.h.
  217. 2002-07-29 Andrew V. Samoilov <kai@cmail.ru>
  218. * edit.h (edit_get_load_file): Mark message for translation.
  219. (edit_get_save_file): Ditto.
  220. 2002-07-20 Pavel Roskin <proski@gnu.org>
  221. * syntax.c (apply_rules_going_right): Recheck keyword rules when
  222. a keyword is found on the left border of a context.
  223. 2002-07-14 Pavel Roskin <proski@gnu.org>
  224. * syntax.c (edit_get_syntax_color): Return colorpair index, not
  225. attribute, when syntax highlighting is disabled. Handle black
  226. and white mode separately.
  227. * syntax.c (edit_load_syntax): Do nothing in black and white
  228. mode.
  229. * edit.h [!HAVE_SLANG]: Enable syntax highlighting.
  230. * editdraw.c [!HAVE_SLANG]: Respect attributes for color pairs
  231. by using MY_COLOR_PAIR macro.
  232. * edit.h (struct key_word): Remove unused "bg" field, rename
  233. "fg" to "color", since it keeps all color information.
  234. * syntax.c (edit_get_syntax_color): Replace "fg" and "bg"
  235. arguments with a single argument "color".
  236. Adjust all dependencies.
  237. * editdraw.c (edit_draw_this_line): Fix setting MOD_ABNORMAL
  238. attribute.
  239. (print_to_widget): Fix displaying non-printable characters with
  240. ncurses. Set color for every character even if syntax
  241. highlighting is not compiled - it's needed to reset color after
  242. non-printable characters.
  243. * editdraw.c (edit_status): Use EDITOR_NORMAL_COLOR instead of
  244. NORMAL_COLOR.
  245. * syntax.c (edit_get_syntax_color) [!HAVE_SYNTAXH]: Likewise.
  246. 2002-06-24 Pavel Roskin <proski@gnu.org>
  247. * edit.c (check_file_access): Return 1 on all errors, document
  248. this behavior. Set edit->delete_file to 1 for newly created
  249. files.
  250. (edit_open_file): Don't set edit->delete_file, it's now done in
  251. check_file_access().
  252. Reported by Saso <saso@bojler.dhs.org>
  253. 2002-05-13 Andrew V. Samoilov <kai@cmail.ru>
  254. * editcmd.c (edit_save_file): Call mc_chown() and mc_chmod()
  255. before mc_open() to prevent hangs over ftpfs.
  256. * edit.h: Remove open, close, write, read and mkdir definitions.
  257. * edit.c: Use mc_open, mc_close, mc_write, mc_read, mc_rename,
  258. mc_chmod and mc_chown. Don't cast (char *) to (unsigned long)
  259. in pointer arithmetics.
  260. * editcmd.c: Likewise.
  261. 2002-03-25 Andrew V. Samoilov <kai@cmail.ru>
  262. * syntax.c (edit_read_syntax_file): Use system wide Syntax
  263. Highlighting definitions' file if there is no users one.
  264. 2002-03-18 Pavel Roskin <proski@gnu.org>
  265. * edit.h: Use eregex.h, not regex.h.
  266. From Alexander Varakin <avarakin00@hotmail.com>
  267. 2002-02-27 Andrew V. Samoilov <kai@cmail.ru>
  268. * editcmd.c (edit_replace_cmd): Eliminate fin_string
  269. and use message() to fix possible buffer overflow.
  270. (edit_search_cmd): Likewise.
  271. 2002-02-18 Andrew V. Samoilov <kai@cmail.ru>
  272. * syntax.c (convert): Fix buffer overflow for ".*\" cases.
  273. 2002-01-22 Pavel Roskin <proski@gnu.org>
  274. * editdraw.c (edit_scroll_screen_over_cursor): Do nothing if the
  275. edit widget has zero width or height.
  276. 2002-01-21 Pavel Roskin <proski@gnu.org>
  277. * edit.c: Rename DELETE to DELCHAR to avoid macro redefinition
  278. on Win32.
  279. * edit.h: Likewise.
  280. 2002-01-21 Matthias Urban <murban@cs.uni-magdeburg.de>
  281. * edit.c: Add support for CK_Complete_Word event.
  282. * editcmddef.h: Likewise.
  283. * edit_key_translator.c (cooledit_key_map): Bind Alt-Tab to
  284. CK_Complete_Word.
  285. (emacs_key_map): Likewise.
  286. * editcmd.c: Implement word completion.
  287. 2002-01-21 Pavel Roskin <proski@gnu.org>
  288. * editmenu.c (CmdMenuEmacs): Add mail command without shortcut.
  289. Users of emacs keys should be able to send mail too.
  290. 2002-01-15 Andrew V. Samoilov <kai@cmail.ru>
  291. * syntax.c (syntax_g_free): New macro to release and NULLify
  292. glib allocated memory area(s).
  293. (strdup_convert): Rename to ...
  294. (convert): ... this. Don't strdup() passed string.
  295. (get_args): Use convert() instead of strdup_convert().
  296. (free_args): Make it do nothing macro.
  297. (open_include_file): Eliminate p array. Use glib function to
  298. construct error_file_name. Use PATH_SEP instead of '/';
  299. (edit_read_syntax_file): Use PATH_SEP_STR.
  300. (edit_load_syntax): Use syntax_g_free to release error_file_name.
  301. (edit_read_syntax_rules): Likewise.
  302. Eliminate c->single_char. It's only written but never read.
  303. * edit.h (struct context_rule): Comment out single_char field.
  304. It is written once but never read.
  305. * edit-widget.h: Use PATH_SEP_STR.
  306. 2001-12-22 Andrew V. Samoilov <kai@cmail.ru>
  307. * editcmd.c (edit_goto_cmd): Use g_free() to release f.
  308. (edit_save_file): Use PATH_SEP instead of '/'.
  309. Undefine "close" before closing file created by mc_mkstemps.
  310. Define close to mc_close() after it - temporary fix.
  311. (sprintf_p): Don't cast (char *) to (unsigned long).
  312. * syntax.c (read_one_line): Undo last patch - errno is a
  313. function on some systems. Check ferror() status before
  314. everything else if fgetc() returns EOF.
  315. Accept last line without trailing newline.
  316. (compare_word_to_right): Don't cast p and q to unsigned long.
  317. (apply_rules_going_right): Likewise.
  318. 2001-12-21 Pavel Roskin <proski@gnu.org>
  319. * edit.c (user_menu): Don't move the cursor before and after
  320. inserting the block.
  321. Reported by Matthias Urban <murban@cs.uni-magdeburg.de>
  322. * syntax.c (read_one_line): Clear errno before using it. Don't
  323. use the result of fgetc() if errno is EINTR.
  324. 2001-11-28 Andrew V. Samoilov <kai@cmail.ru>
  325. * syntax.c (apply_rules_going_right): Fix crash for lines like
  326. \s+ \n lightgray/13 red
  327. in Syntax file.
  328. (read_one_line): Use EOF instead of -1.
  329. (get_args): Fix buffer overflow for l without trailing
  330. whitespace(s).
  331. (break_a): New macro.
  332. (edit_read_syntax_rules): Use break_a to fix memory leaks.
  333. (edit_load_syntax): Eliminate s and use message to prevent
  334. buffer overflow.
  335. * editdraw.c (edit_render): Eliminate f. It's only written
  336. but never read.
  337. 2001-11-27 Andrew V. Samoilov <kai@cmail.ru>
  338. * editmenu.c (edit_wrap_cmd): Use g_free() on the result
  339. of input_dialog().
  340. 2001-11-22 Andrew V. Samoilov <kai@cmail.ru>
  341. * editcmd.c (edit_save_file): Use g_free() on the result of
  342. mc_mkstemps().
  343. (edit_replace_cmd): Fix rare memory leaks.
  344. 2001-11-19 Andrew V. Samoilov <kai@cmail.ru>
  345. * edit.c (edit_renew): Release dir after use.
  346. * editcmd.c (edit_replace_dialog): Eliminate tsearch_text,
  347. treplace_text and targ_order.
  348. (edit_replace_cmd): edit_replace_dialog gives g_malloced
  349. strings, so g_strdup/g_free have to be used. Accept only
  350. positive pattern number in Scanf search and replace.
  351. (edit_save_file): Enable safe save and backups on remote VFS.
  352. 2001-11-16 Andrew V. Samoilov <kai@cmail.ru>
  353. * edit_key_translator.c (cooledit_key_map):
  354. Add C-k, CK_Delete_To_Line_End.
  355. * edit.c (user_menu): Don't assign block_file twice.
  356. 2001-11-07 Andrew V. Samoilov <kai@cmail.ru>
  357. * edit.c (edit_reload): destroy_dlg g_free()s widget(s), so
  358. g_malloc/g_free have to be used.
  359. (edit_init): Ditto. Eliminate st.
  360. 2001-11-05 Andrew V. Samoilov <kai@cmail.ru>
  361. * edit.h (edit_execute_cmd): Declare it here.
  362. * edit.c: Remove edit_execute_cmd declaration.
  363. (edit_execute_cmd): Use edit_print_string instead of edit_printf.
  364. * editcmd.c: Remove edit_execute_cmd declaration.
  365. (edit_search_dialog): Eliminate tsearch_text.
  366. (edit_search_cmd): edit_search_dialog gives g_malloc()ed exp.
  367. Use g_strdup/g_free instead of strdup/free.
  368. (edit_mail_dialog): quick_dialog use g_strdup, so g_free
  369. must be used.
  370. (edit_load_cmd): input_dialog returns g_malloc(ed) string,
  371. so g_free has to be used.
  372. (edit_save_block_cmd): Likewise.
  373. (edit_insert_file_cmd): Likewise.
  374. (edit_sort_cmd): Likewise.
  375. (edit_save_as_cmd): Likewise. Memory leak fixed.
  376. * bookmark.c (book_mark_clear): Eliminate rend.
  377. It's only written but never read.
  378. (book_mark_flush): Likewise.
  379. (book_mark_inc): Likewise.
  380. (book_mark_dec): Likewise.
  381. 2001-10-23 Pavel Roskin <proski@gnu.org>
  382. * edit.c (user_menu): If the error file is missing, treat it as
  383. success. Truncate block file unconditionally.
  384. 2001-10-22 Pavel Roskin <proski@gnu.org>
  385. * edit.c: Stop using _EDIT_C definition. Move variable
  386. declarations from edit.h, make static or eliminate if possible.
  387. Report errors immediately.
  388. * edit.h: Likewise.
  389. * editwidget.c (edit): Don't report errors from edit_init(),
  390. they are reported in place.
  391. 2001-10-20 Pavel Roskin <proski@gnu.org>
  392. * editcmd.c (sprintf_p): Declare with the printf attribute.
  393. Make static.
  394. * edit.h: Declare edit_printf() with the printf attribute.
  395. 2001-10-18 Pavel Roskin <proski@gnu.org>
  396. * edit.c (check_file_access): Only allow to edit regular files.
  397. Use stat() before open() to prevent hangs on pipes, use fstat()
  398. afterwards if stat() was unsuccessful.
  399. 2001-09-17 Pavel Roskin <proski@gnu.org>
  400. * edit.h: Don't use macro `stat' - it's already a macro on
  401. Solaris 8 with large file support.
  402. * editcmd.c: Replace stat() with mc_stat().
  403. * edit.c: Likewise.
  404. 2001-09-11 Pavel Roskin <proski@gnu.org>
  405. * syntax.c (syntax_text): Remove, it's a separate file now.
  406. (upgrade_syntax_file): Remove.
  407. (edit_read_syntax_file): Use check_for_default().
  408. 2001-09-08 Pavel Roskin <proski@gnu.org>
  409. * edit.h: Remove some useless definitions.
  410. 2001-09-07 Pavel Roskin <proski@gnu.org>
  411. * Makefile.am: Don't define "MIDNIGHT" - it's unused now.
  412. * edit.c: Eliminate all code disabled for the text edition.
  413. * editcmddef.h: Likewise.
  414. * editmenu.c: Likewise.
  415. * editwidget.c: Likewise.
  416. * syntax.c: Likewise.
  417. * wordproc.c: Likewise.
  418. * edit-widget.h: Change ~/.cedit to ~/.mc/cedit to keep mcedit
  419. files separate from cooledit.
  420. * bookmark.c: Eliminate all code disabled for the text edition.
  421. * edit-widget.h: Likewise.
  422. * editcmd.c: Likewise.
  423. * editdraw.c: Likewise.
  424. * editoptions.c: Likewise.
  425. * edit.h: Eliminate all code disabled for the text edition.
  426. Reorder and simplify includes.
  427. * edit.c: Likewise.
  428. 2001-09-06 Pavel Roskin <proski@gnu.org>
  429. * syntax.c (syntax_text): Add PHP support from Cooledit.
  430. 2001-09-04 Pavel Roskin <proski@gnu.org>
  431. * Makefile.am (AM_CFLAGS): Remove CFLAGS, don't use substituted
  432. values directly.
  433. * syntax.c (syntax_text): Remove useless ']' in the Perl and
  434. Python rules. Change shell script rule to use more portable
  435. regular expression.
  436. * editcmd.c (edit_block_process_cmd): Prepend space to the
  437. command to avoid polluting bash history. Document arguments.
  438. Fix crash if block is 0 - not used currently.
  439. 2001-08-26 Pavel Roskin <proski@gnu.org>
  440. * Makefile.am: Don't install libedit.a.
  441. * Makefile.in: Converted to ...
  442. * Makefile.am: ... this.
  443. 2001-08-24 Pavel Roskin <proski@gnu.org>
  444. * Makefile.in (EDITSRC): Add headers.
  445. (CPPFLAGS): Remove reference to gtkedit.
  446. Copy all necessary files from gtkedit.
  447. * Makefile.in (EDITLINKS): Merge with EDITSRC, remove all
  448. references.
  449. 2001-08-24 Pavel Roskin <proski@gnu.org>
  450. * syntax.c (syntax_text): Fix recognizing pdksh and zsh scripts.
  451. 2001-08-23 Pavel Roskin <proski@gnu.org>
  452. * editcmd.c (edit_block_process_cmd): Use execute(), not
  453. my_system() to relieve interactive scripts, such as spell
  454. checker, from saving and restoring the terminal.
  455. 2001-08-19 Pavel Roskin <proski@gnu.org>
  456. * gtkedit.c: Include <sys/param.h> if present - it should always
  457. be included before <glib.h> to avoid redefining MIN and MAX.
  458. * editcmd.c [!MIDNIGHT]: Undefine B_ENTER and B_CANCEL before
  459. redefining them.
  460. * edit.h: Include <sys/param.h> if present. Include Gtk+
  461. headers as system headers.
  462. * gtkedit.c: Include Gtk+ headers as system headers.
  463. 2001-08-18 Pavel Roskin <proski@gnu.org>
  464. * syntax.c (syntax_text): Highlight *.pot as PO files.
  465. * edit.h [GTK]: Fix definition of edit_message_dialog().
  466. * gtkedit.c (gtk_edit_dialog_message): Use "OK" button, not
  467. "Cancel", for consistency with the text edition.
  468. 2001-08-17 Pavel Roskin <proski@gnu.org>
  469. * syntax.c (syntax_text): Add support for PO files.
  470. 2001-08-12 Pavel Roskin <proski@gnu.org>
  471. * edit.c: Handle CK_Shell.
  472. * editcmddef.h: Define CK_Shell.
  473. * editmenu.c (FileMenu): Remove C-o from the "Open file..."
  474. item.
  475. (FileMenuEmacs): Likewise.
  476. 2001-08-06 Andrew V. Samoilov <kai@cmail.ru>
  477. * editcmd.c (edit_replace_prompt): Fix menu location calculation.
  478. 2001-08-01 Pavel Roskin <proski@gnu.org>
  479. * editcmd.c (edit_save_file): Temporarily disable safe save
  480. and backups on remote VFS because it doesn't work. Use
  481. mc_mkstemps() instead of tempnam().
  482. 2001-07-29 Pavel Roskin <proski@gnu.org>
  483. * syntax.c (syntax_text): Add support for S-Lang.
  484. 2001-07-28 Pavel Roskin <proski@gnu.org>
  485. * editcmd.c (menu_save_mode_cmd): Resurrect i18n code lost in
  486. the last resync with Cooledit.
  487. Reported by David Martin <dmartina@excite.es>
  488. * gtkedit.c (gtk_edit_delete_cb): Handler for "delete_event".
  489. (edit): Connect it.
  490. 2001-07-27 Pavel Roskin <proski@gnu.org>
  491. * edit.c: Fix include.
  492. 2001-07-20 Pavel Roskin <proski@gnu.org>
  493. * syntax.c (open_include_file) [GTK]: Use mc_home instead of
  494. LIBDIR.
  495. 2001-07-19 Pavel Roskin <proski@gnu.org>
  496. * editcmd.c (edit_canonicalize_pathname): Don't ever use
  497. getwd(), use g_get_current_dir() instead.
  498. * editoptions.c (edit_options_dialog): Call edit_load_syntax()
  499. if user turned syntax highlighting off to unload the rules.
  500. 2001-07-17 Pavel Roskin <proski@gnu.org>
  501. * edit.h [MIDNIGHT]: Declare wedit.
  502. * editmenu.c: Remove wedit declaration.
  503. * editoptions.c (edit_options_dialog): Load syntax rules if user
  504. turned syntax highlighting on.
  505. * syntax.c (edit_load_syntax): Don't load rules if syntax
  506. highlighting is disabled.
  507. 2001-07-13 Pavel Roskin <proski@gnu.org>
  508. * editoptions.c (edit_options_dialog): Allow numbers for tab
  509. spacing. Reported by mharris@redhat.com.
  510. http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=34852
  511. * editcmd.c (menu_save_mode_cmd): Give meaningful names to the
  512. input fields instead of "i" so that they have separate history.
  513. * editoptions.c (edit_options_dialog): Likewise.
  514. 2001-07-11 Pavel Roskin <proski@gnu.org>
  515. * editdraw.c (status_string): Use g_snprintf() instead of
  516. snprintf().
  517. From Libor Motyèka <l_motycka@ortex.cz>
  518. 2001-07-10 Pavel Roskin <proski@gnu.org>
  519. * gtkeditkey.c (edit_translate_key): When processing bindings
  520. with Alt check that Shift is not pressed - it's handled later.
  521. 2001-07-05 Pavel Roskin <proski@gnu.org>
  522. * editdraw.c: Comment fixes.
  523. 2001-06-26 Pavel Roskin <proski@gnu.org>
  524. * edit-widget.h (editor_widget): Rename `stat' to `stat1' to
  525. avoid problems on Solaris with 64-bit file access, when `stat'
  526. is a macro. All users adjusted.
  527. Reported by Maksym Polyakov <polyama@yahoo.com>.
  528. 2001-06-25 Pavel Roskin <proski@gnu.org>
  529. * gtkedit.c: Remove home_dir - it's declared in main.c.
  530. 2001-06-15 Pavel Roskin <proski@gnu.org>
  531. * editcmd.c (canonicalize_pathname) [GTK]: Rename to ...
  532. (edit_canonicalize_pathname): ... this to avoid namespace clash.
  533. * edit.h [MIDNIGHT]: Include "src/cmd.h" and "src/user.h".
  534. Remove declarations duplicating "src/user.h".
  535. [GTK]: Include "src/dialog.h" and "src/util.h".
  536. * editmenu.c (edit_wrap_cmd): Fix declaration.
  537. (edit_about_cmd): Likewise.
  538. * editwidget.c (get_key_state): Likewise.
  539. * editcmd.c (edit_quit_cmd): Don't use strcmp on the result of
  540. gtk_dialog_cauldron() since it's NULL if the dialog has been
  541. closed without using buttons.
  542. * edit.c (edit_execute_cmd): Put time format to a variable to
  543. avoid gcc warning about Y2K issues with %c in strftime().
  544. 2001-06-14 Pavel Roskin <proski@gnu.org>
  545. * edit.c: Declare cmd_F* static. Comment out cmd_F9.
  546. * edit.c: Use indented #error for compatibility with old C
  547. compilers.
  548. 2001-06-13 Pavel Roskin <proski@gnu.org>
  549. * edit.c (edit_execute_cmd) [GTK]: Disable user menu - it
  550. doesn't work.
  551. (user_menu) [GTK]: Disable.
  552. * gtkedit.c (tb_items): Use complete words. Disable pull-down
  553. menu.
  554. 2001-06-09 Pavel Roskin <proski@gnu.org>
  555. * editcmd.c (catstrs): Use interactive_display() without
  556. specifying the help file.
  557. From Andrew V. Samoilov.
  558. 2001-06-08 Andrew V. Samoilov <sav@bcs.zp.ua>
  559. * editcmd.c [HAVE_CHARSET]: Really include charset.h.
  560. * editmenu.c (edit_wrap_cmd): Memory leaking fixed.
  561. 2001-06-05 Pavel Roskin <proski@gnu.org>
  562. * edit.c [HAVE_CHARSET]: Include charsets.h and selcodepage.h.
  563. * editcmd.c [HAVE_CHARSET]: Add charset conversion support.
  564. * editdraw.c [HAVE_CHARSET]: Likewise.
  565. From Andrew V. Samoilov <sav@bcs.zp.ua>
  566. and Walery Studennikov <hqsoftware@mail.ru>.
  567. 2001-06-01 Pavel Roskin <proski@gnu.org>
  568. * gtkedit.h: Warning fix - use stricter declarations for
  569. destroy_me and destroy_me_user_data.
  570. 2001-05-31 Pavel Roskin <proski@gnu.org>
  571. * Makefile.in: Define HAVE_X and HAVE_GNOME, not just GTK -
  572. header files are using them.
  573. * editdraw.c (edit_render) [GTK]: Revert previous patch, it
  574. broke compilation.
  575. 2001-05-31 Andrew V. Samoilov <sav@bcs.zp.ua>
  576. * editdraw.c (edit_status): Use strcpy (s, ) instead of
  577. sprintf (s, "%s", ).
  578. (set_color) [MIDNIGHT]: Became a macro.
  579. (render_edit_text) [defined(MIDNIGHT) || defined(GTK)]: Warning fix.
  580. (edit_render) [GTK]: Eliminate win variable.
  581. (key_pending) [!GTK]: Warning fix.
  582. 2001-05-30 Pavel Roskin <proski@gnu.org>
  583. * editdraw.c (status_string): Use is_printable(). Declare
  584. static. Eliminate intermediate buffer. Use memset() for filling.
  585. Print byte as unsigned. Use C notation for hex numbers.
  586. * editdraw.c (status_string): Don't print non-printable chars.
  587. Better formatting. Print "<EOF>" at the end of file instead of
  588. -1. Use snprintf instead of sprintf.
  589. 2001-05-30 Andrew V. Samoilov <sav@bcs.zp.ua>
  590. * syntax.c (open_include_file) [MIDNIGHT]: Don't hardcode location
  591. of syntax file(s) with LIBDIR, use mc_home instead.
  592. From Ludovic Drolez <ludovic.drolez@freealter.com>.
  593. (syntax_text): Use perl.syntax to highlight perl modules (.pm).
  594. 2001-05-18 Pavel Roskin <proski@gnu.org>
  595. * editcmd.c (edit_replace_prompt): Warning fix.
  596. 2001-02-26 Pavel Roskin <proski@gnu.org>
  597. * editcmd.c (edit_delete_macro_cmd) [MIDNIGHT]: Don't use
  598. CK_Macro on the argument to edit_delete_macro().
  599. * edit.c (edit_init_file): Remove, it's useless. All the
  600. necessary files should be created when needed.
  601. * edit.h: Remove declaration of edit_init_file().
  602. 2000-11-01 Andrew V. Samoilov <sav@bcs.zp.ua>
  603. * editcmd.c (canonicalize_pathname) [GTK]: memory leaking fixed
  604. 2000-10-30 Pavel Roskin <proski@gnu.org>
  605. * editcmd.c (canonicalize_pathname) [GTK]: Make the argument
  606. constant.
  607. (edit_split_filename) [GTK]: Make the second argument constant
  608. to match the declaration.
  609. 2000-10-30 Andrew V. Samoilov <sav@bcs.zp.ua>
  610. * editcmd.c (edit_save_file): better error handling on writing
  611. (edit_sort_cmd): saved sort options proposed in dialog
  612. edit.h, editcmd.c: declaration for edit_save_block () added
  613. (edit_split_filename): f constified
  614. * edit.c (edit_init) [ENABLE_NLS]: option_whole_chars_search
  615. expanded by national letters using current locale on first call
  616. (edit_file_is_open) [MIDNIGHT]: all occurrences and related code
  617. are commented
  618. (edit_execute_cmd): typo in error message fixed
  619. 2000-09-30 Pavel Roskin <proski@gnu.org>
  620. * libgettext.h: Removed, shouldn't be here.
  621. * Makefile.in: Adjusted to remove libgettext.h
  622. 2000-09-15 Andrew V. Samoilov <sav@bcs.zp.ua>
  623. * editcmd.c (edit_delete_macro, edit_(load|save)_macro_cmd): don't
  624. translate keywords written to macro file or macro don't work, at least
  625. for Cyrillic. Made this as separate commit, so, if it seriously breaks
  626. compatibility it's easy to revert it.
  627. 2000-09-15 Andrew V. Samoilov <sav@bcs.zp.ua>
  628. * editcmd.c (edit_save_file): fopen()+fwrite()+fclose() replaced
  629. by open()+write()+close() to restore possibility to edit files
  630. over Midnight Commander's VFSes
  631. (edit_replace_cmd) [MIDNIGHT]: some more right algorithm to calculate
  632. menu coordinates used. I don't like if menu hides replaced text.
  633. (edit_goto_cmd): Memory leaking fixed when f is empty string
  634. 2000-09-07 Andrew V. Samoilov <sav@bcs.zp.ua>
  635. * edit.c (check_file_access) [MIDNIGHT,GTK]: error message localized;
  636. some cosmetics changes to avoid annoying warnings
  637. * editcmd.c (edit_save_file): pclose returns 0 on success,
  638. file fclose()d when fwrite fails
  639. (pipe_mail): malloc () + sprintf () replaced by g_strdup_printf ()
  640. * syntax.c (syntax_text): Makefile replaced by [Mm]akefile to cover
  641. makefile and GNUmakefile
  642. (upgrade_syntax_file): infinitive loop fixed when rule file
  643. is outdated but it cannot be unlinked/overwritten
  644. 2000-08-30 Pavel Roskin <proski@gnu.org>
  645. * editwidget.c [!MIDNIGHT]: include xdnd.h
  646. * Makefile.in: distribute xdnd.h
  647. 2000-08-18 Pavel Roskin <proski@gnu.org>
  648. * Makefile.in: adjusted list of distributed files.
  649. Added rule for rebuilding Makefile
  650. 2000-08-08 Pavel Roskin <proski@gnu.org>
  651. * gtkedit.c [GTK]: don't include mousemark.h
  652. * gtkedit.h [GTK]: likewise
  653. 2000-08-03 Pavel Roskin <proski@gnu.org>
  654. * mousemark.c, mousemark.h: removed
  655. * Makefile.in: don't distribute mousemark.h
  656. * gtkedit.c [MIDNIGHT]: don't include mousemark.h
  657. * gtkedit.h [MIDNIGHT]: likewise
  658. 2000-07-20 Andrew V. Samoilov <sav@bcs.zp.ua>
  659. * gtkedit/editcmd.c (edit_save_file): check fclose()s return value
  660. to prevent loss of data
  661. (edit_block_process_cmd): don't translate empty string
  662. * gtkedit/edit.h (edit_get_write_filter, edit_write_stream,
  663. edit_init_file): added declarations
  664. * edit.c (edit_filters): constified
  665. (edit_get_write_filter): filename constified
  666. (user_menu): don't translate empty string
  667. * syntax.c (syntax_text): constified
  668. (upgrade_syntax_file): syntax_line constified, f closed after use