Commit Graph

127 Commits

Author SHA1 Message Date
Pavel Roskin 2f2864e500 * syntax.c (edit_load_syntax): Reuse more informative error
message.
2002-12-08 01:57:35 +00:00
Pavel Roskin c3cdbeb001 * edit.c (check_file_access): Use O_EXCL when opening new files.
Don't allow editing stale symlinks.
Reported by Max Derzhak <max@linux.zp.ua>
2002-12-08 00:55:03 +00:00
Pavel Roskin f2ccab3adc * edit-widget.h: Remove "from_here" and "to_here".
* edit.c (edit_purge_widget): New function - clean struct WEdit
except the Widget part.
2002-12-06 04:49:58 +00:00
Pavel Roskin dceb3b50d4 * editcmd.c: Include dialog.h.
Reported by Frédéric L. W. Meunier <lists@pervalidus.net>
2002-12-04 07:20:19 +00:00
Pavel Roskin dd7f5798fa * edit.h: Remove "dir" field in WEdit - it's always an empty
string.  Adjust all dependencies.
2002-11-30 19:50:51 +00:00
Pavel Roskin 9a4513aceb * editcmd.c (edit_get_save_file): Remove first argument, it's
unused.
(edit_get_save_file): Likewise.
2002-11-30 18:49:20 +00:00
Pavel Roskin 75fbf0b2f5 * syntax.c: Make structures key_word, context_rule and
_syntax_marker opaque.
2002-11-30 18:07:42 +00:00
Pavel Roskin 41fbb5099f * edit.c: Use g_malloc() and g_free() on buffers1 and buffers2.
Eliminate CMalloc.
(edit_get_buffer_as_text): Remove, it's unused.
2002-11-30 17:53:12 +00:00
Pavel Roskin 29f1543919 * editcmd.c (edit_set_search_parameters): Use g_malloc().
(edit_complete_word_cmd): Use g_free().
2002-11-30 17:41:07 +00:00
Pavel Roskin b628d515c0 * edit.h: Don't define HAVE_SYNTAXH.
* syntax.c: Syntax highlighting is no more optional.
(edit_check_spelling): Remove.
2002-11-30 02:29:43 +00:00
Pavel Roskin c63d61600a * editoptions.c (edit_options_dialog): Add "Save file position"
option, make "Syntax highlighting" unconditional.
2002-11-30 00:41:47 +00:00
Pavel Roskin 527cb0c64c * edit.c: First part of the position saving code.
(edit_move_to_column): New function.
2002-11-30 00:35:07 +00:00
Andrew V. Samoilov 085f43fc8d * editoptions.c (edit_options_dialog): Use g_free() to release
variables allocated in quick_dialog().
2002-11-29 08:28:51 +00:00
Pavel Roskin 18de4488e3 * edit-widget.h: Move typedef WEdit and file names ...
* edit.h: ... here.  Don't include edit-widget.h.  Adjust all
dependencies.
2002-11-29 03:01:06 +00:00
Andrew V. Samoilov 486038e9b4 * editoptions.c (edit_options_dialog): Clean up and use g_snprintf()
instead of sprintf().
2002-11-23 17:26:55 +00:00
Pavel Roskin 7969f851bb * edit.h: Decentralize includes. 2002-11-14 19:38:26 +00:00
Pavel Roskin 389ed511de * editmenu.c (edit_user_menu_cmd): Move to ../src/cmd.c. 2002-11-14 06:25:46 +00:00
Pavel Roskin c6e56452ea * exit.c (edit_delete_line): Don't remove and restore the
preceding newline.  Don't treat binary zero as newline.
From Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
2002-11-14 05:17:56 +00:00
Pavel Roskin e741be7a5d * *.c: Fix all global functions without declarations - declare,
make static or remove.
2002-11-13 04:32:00 +00:00
Pavel Roskin 47ab84d950 * syntax.c (syntax_change_callback): Remove, it's unused.
(edit_set_syntax_change_callback): Likewise.
2002-11-13 02:13:37 +00:00
Pavel Roskin 2b9d151923 * edit.c (edit_execute_cmd): Fool gcc to prevent Y2K warning. 2002-11-13 02:05:01 +00:00
Pavel Roskin 0106eebda6 * editwidget.c (edit_adjust_size): Use find_buttonbar(). 2002-11-12 23:35:25 +00:00
Pavel Roskin 4061502e82 * editcmd.c: Warning fix for compilers that don't understand the
"const" keyword and variable size arrays.
2002-11-11 08:06:01 +00:00
Andrew V. Samoilov 2a63d42f09 s/varaibles/variables/
s/declaratrions/declarations/
s/notning/nothing/
s/writting/writing/
s/occurences/occurrences/
2002-11-07 06:52:25 +00:00
Pavel Roskin c626f5fdcc * editcmd.c (edit_save_file): Restore ownership before access
mode, not after.  Otherwise suid bit is lost.
Reported by Nerijus Baliunas <nerijus@users.sourceforge.net>
2002-11-06 18:09:40 +00:00
Pavel Roskin b2fd313167 * edit.c: Include charset.h unconditionally, use new conversion
functions that don't require ifdefs.
* edit_key_translator.c: Likewise.
* editcmd.c: Likewise.
* editdraw.c: Likewise.
2002-10-30 23:56:49 +00:00
Pavel Roskin 63983758e0 * edit-widget.h: Add new field macro_depth to control depth of
macro recursion.
* edit.c (edit_execute_macro): Make static.  Increment
macro_depth on entry, decrement on exit, don't allow it to be
too large.
2002-10-21 02:06:03 +00:00
Pavel Roskin 7f072959a4 * wordproc.c (line_start): Remove incorrect optimization abusing
static varaibles.  Internal formatting should be usable now.
2002-10-20 17:08:11 +00:00
Pavel Roskin eec9e4b850 * wordproc.c (begin_paragraph): Fix the same off-by-one error as
in end_paragraph() - it affects formatting of the paragraph
after the first line in the file it that line starts with a dot.
Remove unused argument.
2002-10-18 16:43:03 +00:00
Pavel Roskin 387cf0327b * wordproc.c (end_paragraph): The last line of the file wasn't
tested for being blank, which resulted in the last newline
becoming a space after formatting.
2002-10-18 05:25:01 +00:00
Pavel Roskin 2b5fec4594 * editoptions.c (edit_options_dialog): Don't allow
option_tab_spacing to be 0.  Reset invalid values to 8.
Reported by Ury N. Stankevich <ury@bofh.homeunix.org>
2002-10-17 05:43:57 +00:00
Pavel Roskin 346e628955 * wordproc.c (format_paragraph): If formatting was successful,
scroll to the left to show the formatted paragraph.
2002-10-08 05:03:45 +00:00
Pavel Roskin 540ffe0db3 * editdraw.c (print_to_widget): Eliminate use of floating point.
Change all callers.
2002-10-06 21:08:20 +00:00
Andrew V. Samoilov b8d41cad3b * (edit_insert_column_of_text): Fix infinite loop if
block of text is copied past the end of the buffer.
By Paul Sheer <psheer@icon.co.za>.

(stacked): Don't initialize static arrays by zeros.
2002-10-02 15:44:35 +00:00
Andrew V. Samoilov 790b85b555 * edit.h (struct key_word): Remove time field.
* syntax.c: Remove MAD support.
2002-09-26 12:23:13 +00:00
Pavel Roskin e7e6552a03 * editwidget.c (edit): Make edit_dlg local variable. 2002-09-24 15:10:47 +00:00
Pavel Roskin 91f4a75562 * editmenu.c (edit_drop_menu_cmd): Don't use edit_dlg variable. 2002-09-24 15:04:22 +00:00
Pavel Roskin 2e3fc9234b * edit.c: Remove all references to CR_LF_TRANSLATION.
* editcmd.c: Likewise.
2002-09-24 04:35:44 +00:00
Pavel Roskin 996a847666 * editwidget.c (edit): Install handler for DLG_RESIZE. 2002-09-24 03:57:36 +00:00
Pavel Roskin 2571416650 * editwidget.c (edit): Set edit_dlg to NULL after it's
destroyed.
2002-09-23 23:42:44 +00:00
Pavel Roskin 50c15654ef * edit.h: Move style definitions ...
* editdraw.c: ... here.  Multiply them by 256.  Remove unused
styles.
(print_to_widget): Don't divide style by 256.  Simplify logic
since we only have 4 styles now.
2002-09-23 23:05:15 +00:00
Pavel Roskin 6d1beed458 * edit.c (edit_move_forward3): Use caret notation for code 127
and below code 32.
* editdraw.c (edit_draw_this_line): Likewise.  Print '.' for
other non-printable characters and remove this code from ...
(print_to_widget): ... here.
2002-09-23 22:32:47 +00:00
Pavel Roskin 07de958369 * edit.c (edit_move_forward3): Show 'r' as ^M.
* editdraw.c (edit_draw_this_line): Likewise.  Use MOD_ABNORMAL
attribute.
From Alexander Varakin <avarakin00@hotmail.com>
2002-09-23 07:13:11 +00:00
Pavel Roskin 3d8a56ee9c * edit.h: Remove all references to O_TEXT, USE_O_TEXT and
MY_O_TEXT.
2002-09-23 07:00:30 +00:00
Pavel Roskin e49a220a30 * edit.c: Use O_BINARY when opening files.
* editcmd.c: Likewise.
From Alexander Varakin <avarakin00@hotmail.com>
2002-09-23 06:54:50 +00:00
Pavel Roskin fb418291eb * editwidget.c (edit_event): Add support for mouse wheel events.
* edit.h: Add missing declarations for edit_move_up() and
edit_move_down().
2002-09-21 00:16:04 +00:00
Andrew V. Samoilov bb947f855e * edit.c: Don't initialize static selection and selection_history. 2002-09-20 15:42:25 +00:00
Andrew V. Samoilov 9f80054302 * editdraw.c (status_string): Remove font_width argument.
(edit_status): Fix calculation to use last column in the status string.
2002-09-20 15:15:43 +00:00
Pavel Roskin b5265f8da5 * edit.c (edit_filters): Use gzip, not compress for *.Z files
for consistency with other parts of the code (viewer, mc.ext).
2002-09-04 18:57:14 +00:00
Pavel Roskin 31e34e93b8 * editcmd.c: Recheck and fix all calls to create_dlg().
* editwidget.c: Likewise.
2002-09-03 19:37:40 +00:00