Just a fuzzy trim...
[midnight-commander.git] / edit / ChangeLog
blob982e76ea199639e470131bd98eb5e87903c86c32
1 2002-05-13  Andrew V. Samoilov  <kai@cmail.ru>
3         * editcmd.c (edit_save_file): Call mc_chown () and mc_chmod ()
4         before mc_open () to prevent hangs over ftpfs. 
6         * edit.h: Remove open, close, write, read and mkdir definitions.
7         * edit.c: Use mc_open, mc_close, mc_write, mc_read, mc_rename,
8         mc_chmod and mc_chown. Don't cast (char *) to (unsigned long)
9         in pointer arithmetics.
10         * editcmd.c: Likewise.
12 2002-03-25  Andrew V. Samoilov  <kai@cmail.ru>
14         * syntax.c (edit_read_syntax_file): Use system wide Syntax
15         Highlighting definitions' file if there is no users one.
17 2002-03-18  Pavel Roskin  <proski@gnu.org>
19         * edit.h: Use eregex.h, not regex.h.
20         From Alexander Varakin <avarakin00@hotmail.com>
22 2002-02-27  Andrew V. Samoilov  <kai@cmail.ru>
24         * editcmd.c (edit_replace_cmd): Eliminate fin_string
25         and use message() to fix possible buffer overflow.
26         (edit_search_cmd): Likewise.
28 2002-02-18  Andrew V. Samoilov  <kai@cmail.ru>
30         * syntax.c (convert): Fix buffer overflow for ".*\" cases.
32 2002-01-22  Pavel Roskin  <proski@gnu.org>
34         * editdraw.c (edit_scroll_screen_over_cursor): Do nothing if the
35         edit widget has zero width or height.
37 2002-01-21  Pavel Roskin  <proski@gnu.org>
39         * edit.c: Rename DELETE to DELCHAR to avoid macro redefinition
40         on Win32.
41         * edit.h: Likewise.
43 2002-01-21  Matthias Urban  <murban@cs.uni-magdeburg.de>
45         * edit.c: Add support for CK_Complete_Word event.
46         * editcmddef.h: Likewise.
47         * edit_key_translator.c (cooledit_key_map): Bind Alt-Tab to
48         CK_Complete_Word.
49         (emacs_key_map): Likewise.
50         * editcmd.c: Implement word completion.
52 2002-01-21  Pavel Roskin  <proski@gnu.org>
54         * editmenu.c (CmdMenuEmacs): Add mail command without shortcut.
55         Users of emacs keys should be able to send mail too.
57 2002-01-15  Andrew V. Samoilov  <kai@cmail.ru>
59         * syntax.c (syntax_g_free): New macro to release and NULLify
60         glib allocated memory area(s).
61         (strdup_convert): Rename to ...
62         (convert): ... this.  Don't strdup passed string.
63         (get_args): Use convert instead of strdup_convert.
64         (free_args): Make it do notning macro.
65         (open_include_file): Eliminate p array. Use glib function to
66         construct error_file_name. Use PATH_SEP instead of '/';
67         (edit_read_syntax_file): Use PATH_SEP_STR.
68         (edit_load_syntax): Use syntax_g_free to release error_file_name.
69         (edit_read_syntax_rules): Likewise.
70         Eliminate c->single_char. It's only written but never read.
72         * edit.h (struct context_rule): Comment out single_char field.
73         It is written once but never read.
75         * edit-widget.h: Use PATH_SEP_STR.
77 2001-12-22  Andrew V. Samoilov  <kai@cmail.ru>
79         * editcmd.c (edit_goto_cmd): Use g_free to release f.
80         (edit_save_file): Use PATH_SEP instead of '/'.
81         Undefine "close" before closing file created by mc_mkstemps.
82         Define close to mc_close after it - temporary fix.
84         (sprintf_p): Don't cast (char *) to (unsigned long).
86         * syntax.c (read_one_line): Undo last patch - errno is a
87         function on some systems.  Check ferror() status before
88         everithing else if fgetc returns EOF.
89         Accept last line without trailing newline.
91         (compare_word_to_right): Don't cast p and q to unsigned long.
92         (apply_rules_going_right): Likewise.
94 2001-12-21  Pavel Roskin  <proski@gnu.org>
96         * edit.c (user_menu): Don't move the cursor before and after
97         inserting the block.
98         Reported by Matthias Urban <murban@cs.uni-magdeburg.de>
100         * syntax.c (read_one_line): Clear errno before using it.  Don't
101         use the result of fgetc() if errno is EINTR.
103 2001-11-28  Andrew V. Samoilov  <kai@cmail.ru>
105         * syntax.c (apply_rules_going_right): Fix crash for lines like
106         \s+ \n lightgray/13 red
107         in Syntax file.
108         (read_one_line): Use EOF instead of -1.
109         (get_args): Fix buffer overflow for l without trailing
110         whitespace(s).
111         (break_a): New macro.
112         (edit_read_syntax_rules): Use break_a to fix memory leaks.
113         (edit_load_syntax): Eliminate s and use message to prevent
114         buffer overflow.
116         * editdraw.c (edit_render): Eliminate f. It's only written
117         but never read.
119 2001-11-27  Andrew V. Samoilov  <kai@cmail.ru>
121         * editmenu.c (edit_wrap_cmd): Use g_free() on the result
122         of input_dialog().
124 2001-11-22  Andrew V. Samoilov  <kai@cmail.ru>
126         * editcmd.c (edit_save_file): Use g_free() on the result of
127         mc_mkstemps().
128         (edit_replace_cmd): Fix rare memory leaks.
130 2001-11-19  Andrew V. Samoilov  <kai@cmail.ru>
132         * edit.c (edit_renew): Release dir after use.
134         * editcmd.c (edit_replace_dialog): Eliminate tsearch_text,
135         treplace_text and targ_order.
136         (edit_replace_cmd): edit_replace_dialog gives g_malloced
137         strings, so g_strdup/g_free have to be used.  Accept only
138         positive pattern number in Scanf search and replace.
139         (edit_save_file): Enable safe save and backups on remote VFS.
141 2001-11-16  Andrew V. Samoilov  <kai@cmail.ru>
143         * edit_key_translator.c (cooledit_key_map):
144         Add C-k, CK_Delete_To_Line_End.
146         * edit.c (user_menu): Don't assign block_file twice.
148 2001-11-07  Andrew V. Samoilov  <kai@cmail.ru>
150         * edit.c (edit_reload): destroy_dlg g_free()s widget(s), so
151         g_malloc/g_free have to be used.
152         (edit_init): Ditto.  Eliminate st.
154 2001-11-05  Andrew V. Samoilov  <kai@cmail.ru>
156         * edit.h (edit_execute_cmd): Declare it here.
158         * edit.c: Remove edit_execute_cmd declaration.
159         (edit_execute_cmd): Use edit_print_string instead of edit_printf.
161         * editcmd.c: Remove edit_execute_cmd declaration.
162         (edit_search_dialog): Eliminate tsearch_text.
163         (edit_search_cmd): edit_search_dialog gives g_malloc()ed exp.
164         Use g_strdup/g_free instead of strdup/free.
165         (edit_mail_dialog): quick_dialog use g_strdup, so g_free
166         must be used.
167         (edit_load_cmd): input_dialog returns g_malloc(ed) string,
168         so g_free has to be used.
169         (edit_save_block_cmd): Likewise.
170         (edit_insert_file_cmd): Likewise.
171         (edit_sort_cmd): Likewise.
172         (edit_save_as_cmd): Likewise. Memory leak fixed.
174         * bookmark.c (book_mark_clear): Eliminate rend.
175         It's only written but never read.
176         (book_mark_flush): Likewise.
177         (book_mark_inc): Likewise.
178         (book_mark_dec): Likewise.
180 2001-10-23  Pavel Roskin  <proski@gnu.org>
182         * edit.c (user_menu): If the error file is missing, treat it as
183         success.  Truncate block file unconditionally.
185 2001-10-22  Pavel Roskin  <proski@gnu.org>
187         * edit.c: Stop using _EDIT_C definition.  Move variable
188         declarations from edit.h, make static or eliminate if possible.
189         Report errors immediately.
190         * edit.h: Likewise.
191         * editwidget.c (edit): Don't report errors from edit_init(),
192         they are reported in place.
194 2001-10-20  Pavel Roskin  <proski@gnu.org>
196         * editcmd.c (sprintf_p): Declare with the printf attribute.
197         Make static.
199         * edit.h: Declare edit_printf() with the printf attribute.
201 2001-10-18  Pavel Roskin  <proski@gnu.org>
203         * edit.c (check_file_access): Only allow to edit regular files.
204         Use stat() before open() to prevent hangs on pipes, use fstat()
205         afterwards if stat() was unsuccessful.
207 2001-09-17  Pavel Roskin  <proski@gnu.org>
209         * edit.h: Don't use macro `stat' - it's already a macro on
210         Solaris 8 with large file support.
211         * editcmd.c: Replace stat() with mc_stat().
212         * edit.c: Likewise.
214 2001-09-11  Pavel Roskin  <proski@gnu.org>
216         * syntax.c (syntax_text): Remove, it's a separate file now.
217         (upgrade_syntax_file): Remove.
218         (edit_read_syntax_file): Use check_for_default().
220 2001-09-08  Pavel Roskin  <proski@gnu.org>
222         * edit.h: Remove some useless definitions.
224 2001-09-07  Pavel Roskin  <proski@gnu.org>
226         * Makefile.am: Don't define "MIDNIGHT" - it's unused now.
228         * edit.c: Eliminate all code disabled for the text edition.
229         * editcmddef.h: Likewise.
230         * editmenu.c: Likewise.
231         * editwidget.c: Likewise.
232         * syntax.c: Likewise.
233         * wordproc.c: Likewise.
235         * edit-widget.h: Change ~/.cedit to ~/.mc/cedit to keep mcedit
236         files separate from cooledit.
238         * bookmark.c: Eliminate all code disabled for the text edition.
239         * edit-widget.h: Likewise.
240         * editcmd.c: Likewise.
241         * editdraw.c: Likewise.
242         * editoptions.c: Likewise.
244         * edit.h: Eliminate all code disabled for the text edition.
245         Reorder and simplify includes.
246         * edit.c: Likewise.
248 2001-09-06  Pavel Roskin  <proski@gnu.org>
250         * syntax.c (syntax_text): Add PHP support from Cooledit.
252 2001-09-04  Pavel Roskin  <proski@gnu.org>
254         * Makefile.am (AM_CFLAGS): Remove CFLAGS, don't use substituted
255         values directly.
257         * syntax.c (syntax_text): Remove useless ']' in the Perl and
258         Python rules.  Change shell script rule to use more portable
259         regular expression.
261         * editcmd.c (edit_block_process_cmd): Prepend space to the
262         command to avoid polluting bash history.  Document arguments.
263         Fix crash if block is 0 - not used currently.
265 2001-08-26  Pavel Roskin  <proski@gnu.org>
267         * Makefile.am: Don't install libedit.a.
269         * Makefile.in: Converted to ...
270         * Makefile.am: ... this.
272 2001-08-24  Pavel Roskin  <proski@gnu.org>
274         * Makefile.in (EDITSRC): Add headers.
275         (CPPFLAGS): Remove reference to gtkedit.
277         Copy all necessary files from gtkedit.
278         * Makefile.in (EDITLINKS): Merge with EDITSRC, remove all
279         references.
281 2001-08-24  Pavel Roskin  <proski@gnu.org>
283         * syntax.c (syntax_text): Fix recognizing pdksh and zsh scripts.
285 2001-08-23  Pavel Roskin  <proski@gnu.org>
287         * editcmd.c (edit_block_process_cmd): Use execute(), not
288         my_system() to relieve interactive scripts, such as spell
289         checker, from saving and restoring the terminal.
291 2001-08-19  Pavel Roskin  <proski@gnu.org>
293         * gtkedit.c: Include <sys/param.h> if present - it should always
294         be included before <glib.h> to avoid redefining MIN and MAX.
295         * editcmd.c [!MIDNIGHT]: Undefine B_ENTER and B_CANCEL before
296         redefining them.
298         * edit.h: Include <sys/param.h> if present.  Include Gtk+
299         headers as system headers.
300         * gtkedit.c: Include Gtk+ headers as system headers.
302 2001-08-18  Pavel Roskin  <proski@gnu.org>
304         * syntax.c (syntax_text): Highlight *.pot as PO files.
306         * edit.h [GTK]: Fix definition of edit_message_dialog().
307         * gtkedit.c (gtk_edit_dialog_message): Use "OK" button, not
308         "Cancel", for consistency with the text edition.
310 2001-08-17  Pavel Roskin  <proski@gnu.org>
312         * syntax.c (syntax_text): Add support for PO files.
314 2001-08-12  Pavel Roskin  <proski@gnu.org>
316         * edit.c: Handle CK_Shell.
317         * editcmddef.h: Define CK_Shell.
318         * editmenu.c (FileMenu): Remove C-o from the "Open file..."
319         item.
320         (FileMenuEmacs): Likewise.
322 2001-08-06  Andrew V. Samoilov  <kai@cmail.ru>
324         * editcmd.c (edit_replace_prompt): Fix menu location calculation.
326 2001-08-01  Pavel Roskin  <proski@gnu.org>
328         * editcmd.c (edit_save_file): Temporarily disable safe save
329         and backups on remote VFS because it doesn't work.  Use
330         mc_mkstemps() instead of tempnam().
332 2001-07-29  Pavel Roskin  <proski@gnu.org>
334         * syntax.c (syntax_text): Add support for S-Lang.
336 2001-07-28  Pavel Roskin  <proski@gnu.org>
338         * editcmd.c (menu_save_mode_cmd): Resurrect i18n code lost in
339         the last resync with Cooledit.
340         Reported by David Martin <dmartina@excite.es>
342         * gtkedit.c (gtk_edit_delete_cb): Handler for "delete_event".
343         (edit): Connect it.
345 2001-07-27  Pavel Roskin  <proski@gnu.org>
347         * edit.c: Fix include.
349 2001-07-20  Pavel Roskin  <proski@gnu.org>
351         * syntax.c (open_include_file) [GTK]: Use mc_home instead of
352         LIBDIR.
354 2001-07-19  Pavel Roskin  <proski@gnu.org>
356         * editcmd.c (edit_canonicalize_pathname): Don't ever use
357         getwd(), use g_get_current_dir() instead.
359         * editoptions.c (edit_options_dialog): Call edit_load_syntax()
360         if user turned syntax highlighting off to unload the rules.
362 2001-07-17  Pavel Roskin  <proski@gnu.org>
364         * edit.h [MIDNIGHT]: Declare wedit.
365         * editmenu.c: Remove wedit declaration.
366         * editoptions.c (edit_options_dialog): Load syntax rules if user
367         turned syntax highlighting on.
368         * syntax.c (edit_load_syntax): Don't load rules if syntax
369         highlighting is disabled.
371 2001-07-13  Pavel Roskin  <proski@gnu.org>
373         * editoptions.c (edit_options_dialog): Allow numbers for tab
374         spacing. Reported by mharris@redhat.com.
375         http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=34852
377         * editcmd.c (menu_save_mode_cmd): Give meaningful names to the
378         input fields instead of "i" so that they have separate history.
379         * editoptions.c (edit_options_dialog): Likewise.
381 2001-07-11  Pavel Roskin  <proski@gnu.org>
383         * editdraw.c (status_string): Use g_snprintf() instead of
384         snprintf().
385         From Libor Motyèka <l_motycka@ortex.cz>
387 2001-07-10  Pavel Roskin  <proski@gnu.org>
389         * gtkeditkey.c (edit_translate_key): When processing bindings
390         with Alt check that Shift is not pressed - it's handled later.
392 2001-07-05  Pavel Roskin  <proski@gnu.org>
394         * editdraw.c: Comment fixes.
396 2001-06-26  Pavel Roskin  <proski@gnu.org>
398         * edit-widget.h (editor_widget): Rename `stat' to `stat1' to
399         avoid problems on Solaris with 64-bit file access, when `stat'
400         is a macro. All users adjusted.
401         Reported by Maksym Polyakov <polyama@yahoo.com>.
403 2001-06-25  Pavel Roskin  <proski@gnu.org>
405         * gtkedit.c: Remove home_dir - it's declared in main.c.
407 2001-06-15  Pavel Roskin  <proski@gnu.org>
409         * editcmd.c (canonicalize_pathname) [GTK]: Rename to ...
410         (edit_canonicalize_pathname): ... this to avoid namespace clash.
411         * edit.h [MIDNIGHT]: Include "src/cmd.h" and "src/user.h".
412         Remove declarations duplicating "src/user.h".
413         [GTK]: Include "src/dialog.h" and "src/util.h".
415         * editmenu.c (edit_wrap_cmd): Fix declaration.
416         (edit_about_cmd): Likewise.
417         * editwidget.c (get_key_state): Likewise.
419         * editcmd.c (edit_quit_cmd): Don't use strcmp on the result of
420         gtk_dialog_cauldron() since it's NULL if the dialog has been
421         closed without using buttons.
423         * edit.c (edit_execute_cmd): Put time format to a variable to
424         avoid gcc warning about Y2K issues with %c in strftime().
426 2001-06-14  Pavel Roskin  <proski@gnu.org>
428         * edit.c: Declare cmd_F* static. Comment out cmd_F9.
430         * edit.c: Use indented #error for compatibility with old C
431         compilers.
433 2001-06-13  Pavel Roskin  <proski@gnu.org>
435         * edit.c (edit_execute_cmd) [GTK]: Disable user menu - it
436         doesn't work.
437         (user_menu) [GTK]: Disable.
438         * gtkedit.c (tb_items): Use complete words. Disable pull-down
439         menu.
441 2001-06-09  Pavel Roskin  <proski@gnu.org>
443         * editcmd.c (catstrs): Use interactive_display() without
444         specifying the help file.
445         From Andrew V. Samoilov.
447 2001-06-08  Andrew V. Samoilov  <sav@bcs.zp.ua>
449         * editcmd.c [HAVE_CHARSET]: Really include charset.h.
450         * editmenu.c (edit_wrap_cmd): Memory leaking fixed.
452 2001-06-05  Pavel Roskin  <proski@gnu.org>
454         * edit.c [HAVE_CHARSET]: Include charsets.h and selcodepage.h.
455         * editcmd.c [HAVE_CHARSET]: Add charset conversion support.
456         * editdraw.c [HAVE_CHARSET]: Likewise.
457         From Andrew V. Samoilov <sav@bcs.zp.ua>
458         and Walery Studennikov <hqsoftware@mail.ru>.
460 2001-06-01  Pavel Roskin  <proski@gnu.org>
462         * gtkedit.h: Warning fix - use stricter declarations for
463         destroy_me and destroy_me_user_data.
465 2001-05-31  Pavel Roskin  <proski@gnu.org>
467         * Makefile.in: Define HAVE_X and HAVE_GNOME, not just GTK -
468         header files are using them.
470         * editdraw.c (edit_render) [GTK]: Revert previous patch, it
471         broke compilation.
473 2001-05-31  Andrew V. Samoilov  <sav@bcs.zp.ua>
475         * editdraw.c (edit_status): Use strcpy (s, ) instead of
476         sprintf (s, "%s", ).
478         (set_color) [MIDNIGHT]: Became a macro.
479         (render_edit_text) [defined(MIDNIGHT) || defined(GTK)]: Warning fix.
480         (edit_render) [GTK]: Eliminate win variable.
481         (key_pending) [!GTK]: Warning fix.
483 2001-05-30  Pavel Roskin  <proski@gnu.org>
485         * editdraw.c (status_string): Use is_printable(). Declare
486         static. Eliminate intermediate buffer. Use memset() for filling.
487         Print byte as unsigned. Use C notation for hex numbers.
489         * editdraw.c (status_string): Don't print non-printable chars.
490         Better formatting. Print "<EOF>" at the end of file instead of
491         -1. Use snprintf instead of sprintf.
493 2001-05-30  Andrew V. Samoilov  <sav@bcs.zp.ua>
495         * syntax.c (open_include_file) [MIDNIGHT]: Don't hardcode location
496         of syntax file(s) with LIBDIR, use mc_home instead.
497         From Ludovic Drolez <ludovic.drolez@freealter.com>.
499         (syntax_text): Use perl.syntax to highlight perl modules (.pm).
501 2001-05-18  Pavel Roskin  <proski@gnu.org>
503         * editcmd.c (edit_replace_prompt): Warning fix.
505 2001-02-26  Pavel Roskin  <proski@gnu.org>
507         * editcmd.c (edit_delete_macro_cmd) [MIDNIGHT]: Don't use
508         CK_Macro on the argument to edit_delete_macro().
510         * edit.c (edit_init_file): Remove, it's useless. All the
511         necessary files should be created when needed.
512         * edit.h: Remove declaration of edit_init_file().
514 2000-11-01  Andrew V. Samoilov  <sav@bcs.zp.ua>
516         * editcmd.c (canonicalize_pathname) [GTK]: memory leaking fixed
518 2000-10-30  Pavel Roskin  <proski@gnu.org>
520         * editcmd.c (canonicalize_pathname) [GTK]: Make the argument
521         constant.
522         (edit_split_filename) [GTK]: Make the second argument constant
523         to match the declaration.
525 2000-10-30  Andrew V. Samoilov  <sav@bcs.zp.ua>
527         * editcmd.c (edit_save_file): better error handling on writting
529         (edit_sort_cmd): saved sort options proposed in dialog
531         edit.h, editcmd.c: declaration for edit_save_block () added
533         (edit_split_filename): f constified
535         * edit.c (edit_init) [ENABLE_NLS]: option_whole_chars_search
536         expanded by national letters using current locale on first call
538         (edit_file_is_open) [MIDNIGHT]: all occurences and related code
539         are commented
541         (edit_execute_cmd): typo in error message fixed
543 2000-09-30  Pavel Roskin  <proski@gnu.org>
545         * libgettext.h: Removed, shouldn't be here.
546         * Makefile.in: Adjusted to remove libgettext.h
548 2000-09-15  Andrew V. Samoilov  <sav@bcs.zp.ua>
550         * editcmd.c (edit_delete_macro, edit_(load|save)_macro_cmd): don't
551         translate keywords written to macro file or macro don't work, at least
552         for Cyrillic. Made this as separate commit, so, if it seriously breaks
553         compatibility it's easy to revert it.
555 2000-09-15  Andrew V. Samoilov  <sav@bcs.zp.ua>
557         * editcmd.c (edit_save_file): fopen()+fwrite()+fclose() replaced
558         by open()+write()+close() to restore possibility to edit files
559         over Midnight Commander's VFSes
561         (edit_replace_cmd) [MIDNIGHT]: some more right algorithm to calculate
562         menu coordinates used. I don't like if menu hides replaced text.
564         (edit_goto_cmd): Memory leaking fixed when f is empty string
566 2000-09-07  Andrew V. Samoilov  <sav@bcs.zp.ua>
568         * edit.c (check_file_access) [MIDNIGHT,GTK]: error message localized;
569         some cosmetics changes to avoid annoying warnings
571         * editcmd.c (edit_save_file): pclose returns 0 on success,
572         file fclose()d when fwrite fails
574         (pipe_mail): malloc () + sprintf () replaced by g_strdup_printf ()
576         * syntax.c (syntax_text): Makefile replaced by [Mm]akefile to cover
577         makefile and GNUmakefile
578         (upgrade_syntax_file): infinitive loop fixed when rule file
579         is outdated but it cannot be unlinked/overwritten
581 2000-08-30  Pavel Roskin  <proski@gnu.org>
583         * editwidget.c [!MIDNIGHT]: include xdnd.h
584         * Makefile.in: distribute xdnd.h
586 2000-08-18  Pavel Roskin  <proski@gnu.org>
588         * Makefile.in: adjusted list of distributed files.
589         Added rule for rebuilding Makefile
591 2000-08-08  Pavel Roskin  <proski@gnu.org>
593         * gtkedit.c [GTK]: don't include mousemark.h
594         * gtkedit.h [GTK]: likewise
596 2000-08-03  Pavel Roskin  <proski@gnu.org>
598         * mousemark.c, mousemark.h: removed
599         * Makefile.in: don't distribute mousemark.h
600         * gtkedit.c [MIDNIGHT]: don't include mousemark.h
601         * gtkedit.h [MIDNIGHT]: likewise
603 2000-07-20  Andrew V. Samoilov  <sav@bcs.zp.ua>
605         * gtkedit/editcmd.c (edit_save_file): check fclose()s return value
606         to prevent loss of data
607         (edit_block_process_cmd): don't translate empty string
609         * gtkedit/edit.h (edit_get_write_filter, edit_write_stream,
610         edit_init_file): added declarations
612         * edit.c (edit_filters): constified
613         (edit_get_write_filter): filename constified
614         (user_menu): don't translate empty string
616         * syntax.c (syntax_text): constified
617         (upgrade_syntax_file): syntax_line constified, f closed after use