Commit Graph

679 Commits

Author SHA1 Message Date
Patrick Winnertz
5920d13810 First bunch of reverting stuff from mhl to switch back to glib
This removes the usage of stdbool.h in favour of mhl/tyes.h as we have to revert everything one by one

Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:09:37 +01:00
Enrico Weigelt, metux IT service
a6a9c1c147 fixed edit.c 2009-02-04 21:16:01 +01:00
Enrico Weigelt, metux IT service
a5ba278729 merged in lzma patch from mandriva 2009-02-04 21:16:00 +01:00
Enrico Weigelt, metux IT service
0c97636212 fixed #240 2009-02-04 01:11:56 +01:00
Enrico Weigelt, metux IT service
463a18623d removed obsolete own memmove implementation (#242) 2009-02-03 19:51:01 +01:00
Enrico Weigelt, metux IT service
9b9cab5874 manually merged 234_remove_g_string 2009-02-02 22:39:12 +01:00
Enrico Weigelt, metux IT service
8b38cf44da manully merged 227_replace_g_free 2009-02-02 22:34:05 +01:00
Enrico Weigelt, metux IT service
035fa47c06 manually merged 228_replace_g_strdup 2009-02-02 21:28:01 +01:00
Enrico Weigelt, metux IT service
7015de5db5 Merge commit 'origin/236_replace_gboolean' 2009-02-02 21:16:39 +01:00
Enrico Weigelt, metux IT service
4fcf4e9685 replaced TRUE/FALSE by true/false 2009-02-02 21:12:46 +01:00
Enrico Weigelt, metux IT service
0434e3de5d manually merged 235_remove_g_snprintf 2009-02-02 20:53:03 +01:00
Enrico Weigelt, metux IT service
45964f373b replaced gboolean by bool (from mhl/types.h) 2009-02-02 05:07:56 +01:00
Enrico Weigelt, metux IT service
e4a4f77ac2 replaced g_snprintf() by snprintf() 2009-02-01 20:03:28 +01:00
Sergei Trofimovich
df4129517b Merge branch 'mc-4.6'
* mc-4.6: (38 commits)
  mhl: mhl_shell_unescape_buf(): fixed memory array OOB.
  completion: fixed complete already escaped secuences.
  completion: added changelog entry for solved #147
  completion: fixed completion of escaped commands in commandline
  Removed unused char*.
  mhl: added mhl_strmove() function (memmove semantics)
  completion: added escapes in command line on completion
  complete: cleanup: #define to enum INPUT_COMPLETION_FLAGS
  added a new parameter for completion flags to input_new
  fish: cleanup: unboxed quoted strings when generate shell commands
  introduced new type SHELL_ESCAPED_STR for more type safety
  added mhl/types.h which defines bool enum, escape.h now using this type
  Removed unused variable
  Changes for use MHL.
  Fixed bug with renamig/copying files with backshashes in names
  Remove some testing stuff
  Temporarry commit. Fixed completion in browse by directoryes.
  Fixed some memory leaks.
  Add $ and ` for escaping and reorder it according to the ascii values
  Rewrite it to use g_string_append_c instead of some homebrew stuff
  ...
2009-02-01 14:26:54 +02:00
Enrico Weigelt, metux IT service
f235b1976e replaced GString stuff by static buffers 2009-01-31 21:55:51 +01:00
Sergei Trofimovich
ff4de3d66f Merge branch 'mc-4.6' into 147_escaping
* mc-4.6:
  replaced buggy concat_dir_and_file() by mhl_str_dir_plus_file()
  fixed out-of-tree-builds
  Updated the NEWS file for 4.6.2 and added the bugnumbers behind the items in the list.
  Update for OpenOffice and StarOffice viewer.
  changelog: added entry for python syntax
  syntax: python: keywords update (patch by NNemec) fixes #216
  AC_USE_SYSTEM_EXTENSIONS macro requires autoconf >= 2.60
  po/ru.po: In russian translation, there are some hotkey conficts in menu.
  ChangeLog/NEWS: added entry for #181 ticket (copy to deleted dir)
  Now a trailing slash will only be added in copy & move dialogs if the path itselfs
  copy/move dialog: add trailing '/' to default destination path (fix #181)
  fixed comments to /* ... */
  Not only comment it out but removing it
  Removed unneeded var to make build process a bit cleaner
  Add code snipplet by il.smind which should fix issues with putty and

Conflicts:
	ChangeLog
	mhl/string.h
	src/command.c
	src/complete.c
	src/file.c
	src/util.c
2009-01-31 22:18:19 +02:00
Enrico Weigelt, metux IT service
5f77615b35 Merge commit 'origin/mc-4.6' 2009-01-31 18:20:54 +01:00
Enrico Weigelt, metux IT service
54d6ec88dc replaced buggy concat_dir_and_file() by mhl_str_dir_plus_file() 2009-01-31 16:51:58 +01:00
Enrico Weigelt, metux IT service
b407c65b74 manually merged mc-4.6 2009-01-31 06:34:40 +01:00
Enrico Weigelt, metux IT service
f921cc40cd replaced calls to g_strdup() by mhl_str_dup() 2009-01-30 20:10:40 +01:00
Enrico Weigelt, metux IT service
15d7d47c15 replaced g_free() by mhl_mem_free() 2009-01-30 19:28:35 +01:00
Enrico Weigelt, metux IT service
e3a3890a3a fixed out-of-tree-builds 2009-01-30 16:46:44 +01:00
Enrico Weigelt, metux IT service
7639b364af added a new parameter for completion flags to input_new 2009-01-29 19:17:43 +01:00
Slava Zanko
4f00496233 patches by Rostislav Beneš: mc-12-menu
like buttons use menu entries hotkey_t. But menus are staticly defined, so this
change is much bigger. All menu declaration must be edited. follow standard
changes in drawing and handling hotkeys.

now basic mc's functions works in utf-8, remain correct calculation of controls
width in dialogs, replace functions like tolower, toupper,isspace, ... width
functions from strutil or g_ascii variant.
2009-01-26 11:47:41 +02:00
Enrico Weigelt, metux IT service
7cef5b112e Merge commit 'origin/50_history_sections.metux' 2009-01-25 07:00:32 +01:00
Enrico Weigelt, metux IT service
0dcb057459 separated out history section names to history.h 2009-01-24 21:51:29 +01:00
Enrico Weigelt, metux IT service
b9b09436c4 Merge commit 'origin/50_history_section_names' into 50_history_sections.metux 2009-01-24 21:26:41 +01:00
Patrick Winnertz
106616423e Merge branch 'mc-4.6' 2009-01-24 13:21:18 +01:00
Patrick Winnertz
786f68dd4f Merge branch '207_minor_regex_fixes' into mc-4.6 2009-01-24 13:17:28 +01:00
Enrico Weigelt, metux IT service
5d150562aa merged 158_message_codes branch 2009-01-24 04:53:51 +01:00
Patrick Winnertz
9bed802084 Merge branch 'mc-4.6' 2009-01-23 20:06:12 +01:00
Patrick Winnertz
88c320822a Fix some smaller errors concerning regex searches in mcedit 2009-01-23 20:01:15 +01:00
Patrick Winnertz
b7ac1e0484 Applied patch from debian which fixes a test if a file can be opened. 2009-01-23 19:55:43 +01:00
Slava Zanko
22fada9ce0 History sections names:
Make names of sections with function name as prefix string.

for example:
[inp:mc_mkdir Enter directory name ]
0=...
2009-01-20 00:57:09 +02:00
Enrico Weigelt, metux IT service
c3a1d292fd added patch from ticket 148 2009-01-19 22:09:54 +01:00
Patrick Winnertz
537b55b46e Move this var into if condition as it's only needed there 2009-01-14 23:28:35 +01:00
Patrick Winnertz
a144f2e4f6 Apply patch to fix localised history headers to mc-4.6 branch.
This is bad as if the localised string changed or you start mc
in another language your history will be lost.
2009-01-14 01:01:18 +01:00
Patrick Winnertz
aed7edf0f6 Removed some unused vars and functions 2009-01-12 22:47:05 +01:00
Enrico Weigelt, metux IT service
8fef98a418 Merge commit 'origin/96_segfault_invalid_mtime' into mc-4.6 2009-01-11 22:07:25 +01:00
Enrico Weigelt, metux IT service
154feb5160 2009-01-10 Enrico Weigelt, metux ITS <weigelt@metux.de>
* edit/editcmd.c:
    * src/achown.c src/background.c src/boxes.c src/chmod.c:
    * src/chown.c src/cmd.c src/command.c src/dir.c src/execute.c:
    * src/ext.c src/file.c src/filegui.c src/find.c src/help.c:
    * src/learn.c src/main.c src/panelize.c src/screen.c:
    * src/selcodepage.c src/subshell.c src/tree.c src/user.c:
    * src/utilunix.c src/view.c:
    * vfs/cpio.c vfs/direntry.c vfs/extfs.c vfs/fish.c vfs/ftpfs.c:
    * vfs/mcfs.c vfs/sfs.c vfs/smbfs.c vfs/tar.c vfs/undelfs.c:
    * vfs/utilvfs.c vfs/vfs.c:

    Changed message type codes on calls to message(), query_dialog(),
    close_error_pipe() from numeric IDs to symbols D_ERROR, D_NORMAL
2009-01-10 14:13:56 +01:00
Patrick Winnertz
197973ccf2 Applied patch from metux on git - needed to fix some stuff manually.
This branch is based on mc-4.6
2009-01-10 11:53:20 +01:00
Slava Zanko
8ebe7873c9 in file edit/edit.[ch]
make function edit_cursor_move() to non-return (void).
2009-01-09 01:33:17 +02:00
Patrick Winnertz
6f8a3b3825 Add small patch which should fix the uninitialised warning 2009-01-08 23:05:30 +01:00
Patrick Winnertz
dcd57a34ef Removed .cvsignore files as we don't need them any longer 2009-01-05 16:58:44 +01:00
Slava Zanko
aad7c6c317 Added .svnignore files (same as .cvsignore) 2008-12-28 23:27:03 +02:00
Pavel Tsekov
b0f2d1654c * edit/editlock.c (lock_build_name): Check the return value of getpwuid().
* src/cmd.c (save_setup_cmd): Remove redundant g_strconcat() call.
* src/hotlist.c (load_hotlist): Likewise.
* vfs/smbfs.c (smbfs_convert_path): Replaced NULL with (char *) NULL.
2007-11-02 14:02:23 +00:00
Pavel Tsekov
2f3df3af4e * edit/bookmark.c: Update copyright notice.
* edit/edit.c: Likewise.
* edit/editcmd.c: Likewise.
* edit/editdraw.c: Likewise.
* edit/editkeys.c: Likewise.
* edit/editlock.c: Likewise.
* edit/editmenu.c: Likewise.
* edit/editoptions.c: Likewise.
* edit/editwidget.c: Likewise.
* edit/syntax.c: Likewise.
* src/background.c: Likewise.
* src/boxes.c: Likewise.
* src/complete.c: Likewise.
* src/execute.c: Likewise.
* src/ext.c: Likewise.
* src/file.c: Likewise.
* src/filegui.c: Likewise.
* src/fileopctx.c: Likewise.
* src/find.c: Likewise.
* src/hotlist.c: Likewise.
* src/key.c: Likewise.
* src/keyxdef.c: Likewise.
* src/layout.c: Likewise.
* src/learn.c: Likewise.
* src/listmode.c: Likewise.
* src/main.c: Likewise.
* src/panelize.c: Likewise.
* src/slint.c: Likewise.
* src/textconf.c: Likewise.
* src/tree.c: Likewise.
* src/treestore.c: Likewise.
* src/tty.c: Likewise.
* src/util.c: Likewise.
* src/utilunix.c: Likewise.
* src/view.c: Likewise.
* src/widget.c: Likewise.
* src/wtools.c: Likewise.
* src/x11conn.c: Likewise.
* vfs/cpio.c: Likewise.
* vfs/extfs.c: Likewise.
* vfs/fish.c: Likewise.
* vfs/ftpfs.c: Likewise.
* vfs/gc.c: Likewise.
* vfs/mcfs.c: Likewise.
* vfs/mcserv.c: Likewise.
* vfs/smbfs.c: Likewise.
* vfs/tar.c: Likewise.
2007-09-25 15:33:35 +00:00
Pavel Tsekov
23361694b6 * src/background.c: Use the correct form of FSF's name in the copyright
notice.
* src/boxes.c: Ditto.
* src/complete.c: Ditto.
* src/execute.c: Ditto.
* src/ext.c: Ditto.
* src/file.c: Ditto.
* src/filegui.c: Ditto.
* src/fileopctx.c: Ditto.
* src/fileopctx.h: Ditto.
* src/find.c: Ditto.
* src/hotlist.c: Ditto.
* src/key.c: Ditto.
* src/keyxdef.c: Ditto.
* src/layout.c: Ditto.
* src/learn.c: Ditto.
* src/listmode.c: Ditto.
* src/main.c: Ditto.
* src/panelize.c: Ditto.
* src/slint.c: Ditto.
* src/textconf.c: Ditto.
* src/tree.c: Ditto.
* src/treestore.c: Ditto.
* src/tty.c: Ditto.
* src/util.c: Ditto.
* src/utilunix.c: Ditto.
* src/view.c: Ditto.
* src/widget.c: Ditto.
* src/wtools.c: Ditto.
* src/x11conn.c: Ditto.
* vfs/cpio.c: Ditto.
* vfs/extfs.c: Ditto.
* vfs/fish.c: Ditto.
* vfs/ftpfs.c: Ditto.
* vfs/gc.c: Ditto.
* vfs/mcfs.c: Ditto.
* vfs/mcserv.c: Ditto.
* vfs/smbfs.c: Ditto.
* vfs/tar.c: Ditto.
* vfs/undelfs.c: Ditto.
* vfs/utilvfs.c: Ditto.
* vfs/vfs.c: Ditto.
* edit/bookmark.c: Ditto.
* edit/edit.c: Ditto.
* edit/edit.h: Ditto.
* edit/editcmd.c: Ditto.
* edit/editdraw.c: Ditto.
* edit/editkeys.c: Ditto.
* edit/editlock.c: Ditto.
* edit/editmenu.c: Ditto.
* edit/editoptions.c: Ditto.
* edit/editwidget.c: Ditto.
* edit/syntax.c: Ditto.
2007-09-24 09:28:32 +00:00
Pavel Tsekov
ca6af7ed40 * edit/choosesyntax.c (pstrcmp): Make static. 2007-09-11 08:34:31 +00:00
Pavel Tsekov
139e48183f * src/color.h: Add a new color pair.
* src/color.c: Likewise.
* edit/editdraw.c (print_to_widget): Make tabs and trailing whitespace
characters visible.
(edit_draw_this_line): Likewise.
2007-08-27 12:06:02 +00:00
Pavel Tsekov
46d039e0e1 * edit/editcmd.c (edit_find_string): Fix an off-by-one error when matching
against a RE.
2007-05-02 11:22:01 +00:00
Pavel Tsekov
fb01c26098 * edit/editcmd.c (edit_replace_cmd): Disable scanf-printf replacement
if "Regular expression" is selected. Fix for savannah bug #19333.
2007-04-27 08:53:50 +00:00
Pavel Roskin
5da9a185c9 * edit.h: Make skip_detach_prompt unsigned. Otherwise, it
cannot get value of 1.
2007-02-03 01:03:53 +00:00
Pavel Tsekov
bb2231fd1b * edit/edit.c (edit_execute_cmd): Update the bracket pair highlighter
state after processing CK_Find, CK_Find_Again, CK_Replace,
CK_Replace_Again, CK_Complete_Word.
2007-01-04 15:37:23 +00:00
Pavel Tsekov
2cb049a9cb * edit/edit.h (edit_move_to_prev_col): Declare the function to have
external linkage.
(edit_find_bracket): Likewise.
* edit/edit.c (edit_move_to_prev_col): Reflect the changes above.
(edit_find_bracket): Likewise.
* edit/editwidget.c (edit_event): When moving around with the mouse
use edit_move_down(), edit_move_up() and edit_move_to_prev_col()
instead of move_cursor() to update the cursor position since
the latter doesn't update some internal variables.
Use edit_find_bracket() to update the bracket pair highlighter
state.
2006-12-10 22:07:28 +00:00
Leonard den Ottolander
59e59d9e3b * edit/editdraw.c (edit_draw_this_line): Remove unused variable book_mark. 2006-12-04 22:44:50 +00:00
Roland Illig
45bb7dbe50 The file's mtime is checked before saving. 2006-11-17 21:50:33 +00:00
Leonard den Ottolander
2f8a75974b * syntax.c (edit_read_syntax_file): Set NENTRIES to 30. 2006-08-02 15:18:22 +00:00
Pavel Tsekov
6625412758 * edit/wordproc.c (next_word_start): A word is preceded by a whitespace -
the latest changes missed that fact. Restore the original behaviour.
2006-06-16 20:01:29 +00:00
Pavel Tsekov
13884c4908 * src/wordproc.c (word_start): Add new argument. Pass extra argument
to next_word_start().
(next_word_start):  Add new argument to denote the maximum number of
characters to process.
(format_this): Reflect the changes above.
2006-06-16 19:34:49 +00:00
Pavel Tsekov
afe0fce14e * edit/choosesyntax.c (pstrcmp): Fix the function declaration. 2006-05-04 12:33:57 +00:00
Leonard den Ottolander
d5a17b01f8 * syntax.c (edit_read_syntax_rules): Zero edit->rules on allocation to
avoid crash after attempting to load a non existent syntax file.
2006-04-03 21:22:09 +00:00
Leonard den Ottolander
76cf84bb69 * choosesyntax.c: Sort syntax list. 2006-03-21 22:23:37 +00:00
Leonard den Ottolander
8d439c2f88 * choosesyntax.c: GPL v2 only. 2006-03-21 22:22:03 +00:00
Pavel Tsekov
2a7a8fa19d * edit/edit-widget.h (struct WEdit): Add new field.
* edit/editcmd.c (edit_save_file): Prompt whether to detach a hardlinked
file if in "Quick save" mode.
Return -1 to indicated that the user requested to cancel the operation.
(edit_save_as_cmd): Adjust the code to handle the new return value of
edit_save_file().
(edit_save_cmd): Likewise.
2006-03-17 15:41:21 +00:00
Pavel Tsekov
1ab4a2b41c * edit/editcmd.c (edit_save_as_cmd): If saving of the file fails
remove only the _save_ lock.
2006-03-17 10:24:50 +00:00
Pavel Tsekov
03e7a434b4 * edit/editlock.c: Fix for savannah bug #13673.
(lock_build_symlink_name): New function.
(edit_lock_file): Use lock_build_symlink_name().
(edit_unlock_file): Likewise.
2006-03-15 16:08:28 +00:00
Pavel Tsekov
fcc6f9bbea * edit/editcmd.c (edit_new_cmd): Remove redundant call to
`edit_unlock_file()'.
(edit_ok_to_exit): Likewise.
2006-03-15 13:20:24 +00:00
Roland Illig
663f821891 * edit.c (user_menu): There is no need to prefix the filename
with PATH_SEP when calling concat_dir_and_file().
2006-02-10 12:29:36 +00:00
Roland Illig
c29b321563 * edit.h: Removed the leading PATH_SEP_STR from EDIT_DIR, as the
latter is not an absolute directory.
	* edit.c: Adjusted the users of EDIT_DIR.
	* editcmd.c: Likewise.
	* syntax.c: Likewise.
	* src/user.c: Likewise.
2006-02-04 14:41:41 +00:00
Leonard den Ottolander
2157716489 edit/edit.c (edit_execute_cmd): Reload syntax on toggle to on. 2006-02-02 19:45:49 +00:00
Leonard den Ottolander
17108c8b2e edit/edit.c, edit/editcmddef.h, edit/editkeys.c: Add Ctrl-S to toggle syntax
highlighting.
2006-02-01 17:07:11 +00:00
Pavel Tsekov
b0ced33741 * edit/editcmd.c: Do not set the field histname' of QuickWidget' unless
the widget is of type `quick_input'.
* src/boxes.c: Likewise.
* src/filegui.c: Likewise.
* src/hotlist.c: Likewise.
2006-01-30 09:22:33 +00:00
Pavel Tsekov
60658b4b35 * editcmd.c (edit_block_copy_cmd): Allow a block of selected
columns	as created by Shift + F3 to be copied anywhere in
the editor area.
2006-01-27 15:00:59 +00:00
Pavel Tsekov
450fe431fc * edit.c (edit_auto_indent): Remove redundant parameters.
Change the indentation strategy to copy whitespace
from the previous line instead of filling up with allegedly
equivalent whitespace depending on the tab setting.
(edit_execute_cmd): Accomodate change of parameters to
edit_auto_indent().
2006-01-26 15:42:56 +00:00
Leonard den Ottolander
689681db31 * edit/editcmd.c (edit_replace_dialog): Use Alt-m on pro&Mpt in replace
dialog. Alt-p is in use for the previous entry.
* po/*.po: Update pro&Mpt string.
2005-11-22 22:05:44 +00:00
Pavel Roskin
0e653491c1 * choosesyntax.c: Make undeclared functions static.
* editmenu.c: Likewise.
* usermap.c: Likewise.
2005-11-11 02:26:04 +00:00
Roland Illig
13684ebcd7 Added many empty lines to make reading easier. 2005-10-12 15:50:43 +00:00
Leonard den Ottolander
cd2061a883 * edit/editcmd.c (edit_replace_dialog): Replace duplicate hotkey.
* po/*.po: Update changed string.
2005-10-04 21:15:06 +00:00
Roland Illig
9be77996d6 Replaced the
editor_option_backup_ext_int hack with a string configuration
	variable, which allows the backup extension to have more than
	just four characters.
2005-09-07 08:54:11 +00:00
Roland Illig
34d39bfd0b * editmenu.c: Added a "Save setup..." entry. There had not been
the possibility of saving editor options except calling the
	"Save setup..." function from within the file manager.
2005-09-07 08:49:30 +00:00
Roland Illig
ad9acbde44 Moved printwstr() from src/slint.c to edit/editdraw.c. 2005-09-05 02:14:29 +00:00
Roland Illig
d12e66fb17 * editcmd.c: Fixed some of the gcc warnings. 2005-09-05 01:25:34 +00:00
David Martin
e97997b2ba Do translate dialog strings, not just mark. 2005-08-19 09:10:07 +00:00
Roland Illig
1c607a7414 Removed unused variable. 2005-08-15 21:40:34 +00:00
Roland Illig
ad8b819a48 * editdraw.c (render_edit_text): Removed unused variables. 2005-08-15 21:38:33 +00:00
Roland Illig
dee3850ee4 * editdraw.c (render_edit_text): Removed unused variable. 2005-08-15 21:37:34 +00:00
Roland Illig
3b1fcf6792 * editcmd.c (edit_completion_dialog): Code cleanup. 2005-08-15 21:35:33 +00:00
Roland Illig
f9df117df1 * edit-widget.h: Changed bit fields of length 1 from signed to
unsigned.
2005-08-15 20:34:26 +00:00
Pavel Roskin
56c1ec97ad * choosesyntax.c (edit_syntax_dialog): Add parentheses as
suggested by gcc.
* editkeys.c: Use braces in the keymap initializers.
2005-08-10 16:47:44 +00:00
Leonard den Ottolander
412d3b8123 edit/choosesyntax.c: Add option to reload current syntax. 2005-07-27 15:43:55 +00:00
Leonard den Ottolander
ed1899d211 * src/ChangeLog, edit/ChangeLog: Fix wrong dates on latest entries. 2005-07-24 13:42:28 +00:00
Leonard den Ottolander
f21564b9e6 * edit/choosesyntax.c: Create file. Menu option to override syntax
highlighting.
* edit/Makefile.am: Add choosesyntax.c.
* edit/edit.c (edit_init): Set option_auto_syntax to 1 on every invokation
of the editor.
* edit/edit.h: Pass char*** to edit_load_syntax(). Add parameters for
syntax dialog and override.
* edit/editmenu.c (menu_options): Add menu option to override syntax
hightlighting.
* edit/editoptions.c (edit_options_dialog): Pass option_syntax_type to
edit_load_syntax().
* edit/syntax.c (edit_read_syntax_file): Dynamically allocate and fill
syntax list pnames.
* edit/syntax.c (edit_load_syntax): Use char*** for syntax list.
* src/wtools.h: #include "widget.h" and remove redundant declarations
of Dlg_head and WListbox.
2005-07-24 13:37:58 +00:00
Pavel Roskin
2fd33802b3 * Makefile.am: Add usermap.h to the sources. 2005-07-21 21:01:51 +00:00
Roland Illig
073907ec5f * usermap.c: Allow user-defined keyboard bindings for mcedit.
* usermap.h: Likewise.
	* Makefile.am: Likewise.
	* editcmd.c: Define new editor commands which had been coded
	inline before.
	This change also affects some other files.
	* edit-widget.h: Invented a new type edit_key_map_type instead of
	using long for.
	* editkeys.c: Using that type.
2005-07-20 11:56:30 +00:00
Roland Illig
fb221cb8b0 * editkeys.c: When typing literal characters after C-q, allow
the alphabetic characters to input ASCII control characters.
2005-07-18 09:32:19 +00:00
Roland Illig
bf034f70e1 * edit.h: Added missing #include <stdio.h>. 2005-07-06 21:26:26 +00:00
Roland Illig
0ee0936513 * editwidget.c: Don't dereference WButtonBar. 2005-06-14 13:00:09 +00:00
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Roland Illig
7758bb1b95 * editwidget.c: Removed casts on function pointer types. 2005-05-23 11:14:31 +00:00
Pavel Roskin
cd702593f6 * editwidget.c (edit_file): Move menu initialization ...
* editmenu.c (edit_init_menu): ... here.  Allocate menu
dynamically.
(edit_done_menu): Take Wmenu argument rather than Menu.  Free
menu.
(edit_reload_menu): New function, reload the menu.
(edit_options_dialog): Reload the menu if key emulation has
changed.
2005-05-20 21:19:40 +00:00
Pavel Roskin
9260860bbf * dialog.c (dlg_select_widget): Remove first argument, it's
redundant.  Adjust all callers.
(dlg_replace_widget): Likewise.
2005-05-20 20:22:06 +00:00
Pavel Roskin
b5b70bce10 * edit.h: Eliminate global EditMenuBar. Fix all dependencies. 2005-05-20 19:46:47 +00:00
Pavel Roskin
7511729690 * edit.h: Eliminate edit_message_dialog macro - it's used
inconsistently.  Fix all callers to use query_dialog().
2005-05-20 19:27:45 +00:00
Pavel Roskin
071f70d0e9 * edit-widget.h: Revert signedness fixes. We need unsigned char
for character classification.
* editcmd.c: Likewise.  Use casts to suppress warnings instead.
Thanks to Roland Illig <roland.illig@gmx.de>
2005-05-10 23:04:32 +00:00
Pavel Roskin
21ea3f6740 * *.c: Remove duplicate includes. 2005-05-10 20:57:11 +00:00
Pavel Roskin
4adb9bfe13 * edit-widget.h: Use char instead of unsigned char to fix
warnings from gcc 4.0.
* editcmd.c: Likewise.
2005-05-03 23:40:15 +00:00
Pavel Roskin
d78556d3c5 * edit.h: Use D_ERROR for edit_error_dialog, D_NORMAL for query
dialogs.  Remove unused edit_query_dialog4.
2005-05-03 23:26:51 +00:00
Leonard den Ottolander
8994b8bbec Added casts on 2 parameters to g_snprintf. 2005-04-27 21:02:59 +00:00
Pavel Roskin
b2999839e8 * editcmd.c (edit_replace_cmd): Restore correct behavior of
Shift-F4.
2005-03-17 21:18:23 +00:00
Roland Illig
ecc08f6c60 * edit.h: Removed unnecessary #include directives ...
* *.c: ... and added them here.
2005-02-22 17:00:36 +00:00
Roland Illig
5dbdfb07ba * editcmd.c: Explicitly declared unused variables to make gcc
quiet.
2005-02-08 17:14:34 +00:00
Roland Illig
e501886d58 * editdraw.c: Renamed redraw_labels to buttonbar_redraw.
* editwidget.c: Likewise. Renamed define_label_data to
	buttonbar_set_label_data.
2005-02-08 09:50:16 +00:00
Roland Illig
db5eec4964 * edit.h: Reformatted #definitions. 2005-02-08 06:48:54 +00:00
Roland Illig
e5e3a8f87d * editcmd.c: Fixed whitespacing issues.
* editdraw.c: Likewise.
	* syntax.c: Likewise.
2005-02-07 20:32:17 +00:00
Roland Illig
15342acba1 * edit.c: Fixed some whitespacing issues. 2005-02-07 20:28:13 +00:00
Roland Illig
2a281ad18d * *.c: Removed unused parameters for static functions. Marked
unused parameters for global functions. Removed redundant
	comments.
2005-02-07 20:08:01 +00:00
Roland Illig
51156030fb * ChangeLog: Applied trim_changelog. 2005-02-07 07:33:47 +00:00
Roland Illig
05d2881a71 * *.c: Removed trailing whitespace. 2005-02-07 07:31:19 +00:00
Roland Illig
e8e0035587 * edit.h: Removed catstrs, as it is only used in editcmd.c.
* editcmd.c (catstrs): Changed declaration to be static.
2005-02-07 06:34:08 +00:00
Roland Illig
b49ac634f5 * editwidget.c: Don't use catstrs anymore. 2005-02-07 06:31:04 +00:00
Roland Illig
13737b1de1 * edit.c (user_menu): Don't use catstrs anymore. 2005-02-07 06:18:13 +00:00
Roland Illig
259485542a * syntax.c: Don't use catstrs anymore. 2005-02-07 06:11:15 +00:00
Roland Illig
64eed6e12b * edit.h (catstrs): Changed the return type to "const char *".
* editcmd.c (catstrs): Likewise.
	* edit.c (user_menu): Added const qualifiers.
	* editcmd.c: Likewise.
	* syntax.c: Likewise.
2005-02-07 06:02:59 +00:00
Roland Illig
c90e9d1b95 * edit.c: Improved message formatting. 2005-02-06 23:58:59 +00:00
Roland Illig
6dc6158ff1 * edit.h: Removed NO_INLINE_GETBYTE conditional. The name was
misleading, as it really meant INLINE_GETBYTE. Furthermore,
	it has not been working since the split of edit.h into edit-widget.h.
	* edit.c: Likewise.
2005-01-30 20:34:58 +00:00
Roland Illig
020455853d * editdraw.c (edit_status): Changed some variables from size_t to
int to avoid GCC warnings.
2005-01-28 01:34:48 +00:00
Roland Illig
067e407cf7 * editdraw.c (edit_status): Fixed drawing bug with ncurses. 2005-01-27 22:14:58 +00:00
Roland Illig
6f03d9bbd9 * edit.h: Renamed multiple inclusion guards that started with a
double underscore. Added #includes for dependent files.
	* editcmddef.h: Likewise.
	* editlock.h: Likewise.
	* edit-widget.h: Likewise.
2004-12-03 17:09:27 +00:00
Roland Illig
521be0ef82 * editcmd.c (edit_replace_cmd): Separated input and output arguments.
* editcmd.c (edit_replace_dialog): Code cleanup.
2004-12-02 21:02:07 +00:00
Andrew V. Samoilov
a6c81a0d7a Change my contacts 2004-12-02 16:53:50 +00:00
Andrew V. Samoilov
26e400227a * editcmd.c (edit_replace_prompt): Fix warning with 'unused' label_len. 2004-12-02 08:31:52 +00:00
Roland Illig
badf915e39 * editcmd.c: Introduced a type edit_getbyte_fn to get rid of
the many function type casts.
2004-12-01 00:55:17 +00:00
Andrew V. Samoilov
82f580f857 * syntax.c (get_args): Use in "args_size" argument instead of
in out "argc".  Return number of found entries.
        Adjust all callers.
2004-11-18 10:02:33 +00:00
Andrew V. Samoilov
f22b5d749f * syntax.c (get_args): Use "argc" to check "args" size.
(edit_read_syntax_rules): Add new parameter "argc" (size of the
        "args" buffer) to prevent buffer overflow.
2004-11-16 19:46:46 +00:00
Andrew V. Samoilov
bfee231c11 * editdraw.c (edit_status): Don't output extra characters on the
status line.
        (print_to_widget): Don't use addch() with negative offset to skip
        over excessive columns. Output only those columns that should be
        displayed on the screen.
2004-11-10 14:11:27 +00:00
Roland Illig
188b970477 * editcmd.c (edit_replace_prompt): Fixed codepage conversion bug
introduced in on 2004-09-25 by me.
2004-11-10 06:50:50 +00:00
Roland Illig
63cae58f20 * editdraw.c (edit_status): Expand the filename field in the status
line to 16 characters even if the actual filename is shorter.
2004-10-23 13:14:14 +00:00
Roland Illig
5d5237e557 * syntax.c (read_one_line): Fixed SEGV when reading syntax file
with "\r\n" line endings on Unix.
2004-10-16 13:33:21 +00:00
Andrew V. Samoilov
5d5f56d4ee * editcmd.c (regexp_error): Small text fix.
(edit_search_cmd): Likewise.
2004-10-11 05:31:29 +00:00
Roland Illig
7a505ea99d * editcmd.c (edit_ext_cmd): Revoked my last change. 2004-09-26 11:42:17 +00:00
Roland Illig
8d75409e60 * editcmd.c (edit_ext_cmd): Don't delete the current block if no
block has been selected. In that case, just insert the output.
2004-09-25 21:39:11 +00:00
Roland Illig
d0a8da7cef * editcmd.c (edit_ext_cmd): Replaced the old version with a new
one that uses ../src/pipethrough. The new version feeds the
	currently selected block (or an empty input) into the command
	which reduces the chance of a deadlock when the command tried
	to read from stdin. It also allows the user to insert the output
	of a command that has exited with a nonzero result. Another
	feature is that it does not use temporary files.
2004-09-25 21:34:36 +00:00
Roland Illig
2a2b478f67 * syntax.c (this_try_alloc_color_pair): Added const qualifiers.
* editcmd.c (snprintf_p): Likewise. (edit_replace_prompt):
	Simplified the code.
2004-09-25 20:53:32 +00:00
Roland Illig
a3c3564d4d * syntax.c (this_try_alloc_color_pair): Added const qualifiers. 2004-09-25 14:28:10 +00:00
Andrew V. Samoilov
12d24222db * edit.c (edit_clean): g_free handles NULL argument too,
no need for the comparison.
            (edit_move_backward_lots): Likewise.
        * editcmd.c (edit_set_filename): Likewise.
            (edit_replace_cmd): Likewise.
            (edit_search_cmd): Likewise.
            (edit_sort_cmd): Likewise.
            (edit_mail_dialog): Likewise.
        * syntax.c (syntax_g_free): Likewise.
            (edit_read_syntax_rules): Likewise.
2004-09-24 22:37:00 +00:00
Roland Illig
9c65d36bdd * edit.c: Replaced NULL with (char *) NULL. Likewise for 0, where
NULL was meant.
	* editcmd.c: Likewise.
	* editlock.c: Likewise.
	* editwidget.c: Likewise.
	* syntax.c: Likewise.
2004-09-24 14:57:57 +00:00
Roland Illig
283441db92 * editdraw.c (status_string): Removed unused parameter.
(edit_status): Rewrote to allow longer filenames to be displayed
	completely whenever possible.
2004-09-24 11:13:11 +00:00
Roland Illig
3c6a792d4b * edit/edit.h: renamed edit() to edit_file() to avoid GCC shadow
warnings (many variables are also called edit).
	* edit/editwidget.c: likewise.
	* src/cmd.c: renamed edit() to edit_file() to avoid GCC shadow
	warnings (many variables are also called edit).
	* src/main.c: likewise.
2004-09-19 17:46:39 +00:00
Roland Illig
6c29de339b * editcmd.c (edit_replace_prompt): Allocate the label text
dynamically instead of using catstrs. Don't handle
	ENABLE_CHARSET specially.
2004-09-19 17:23:52 +00:00
Roland Illig
d5f70f2ab8 * editcmd.c (edit_replace_cmd): Added const qualifier.
* editwidget.c (edit_my_define): likewise.
2004-09-19 15:40:09 +00:00
Andrew V. Samoilov
fade042845 Typos 2004-09-17 08:32:59 +00:00
Andrew V. Samoilov
32cdf184ba * editcmd.c (edit_replace_prompt) [HAVE_CHARSET]: Warning hack. 2004-09-17 03:07:37 +00:00
Andrew V. Samoilov
0758929ef1 * editwidget.c (edit_adjust_size): Fix warnings.
(edit_dialog_callback): Likewise.
        edit.c (menu_save_mode_cmd): Likewise.
2004-09-02 20:36:17 +00:00
Andrew V. Samoilov
f379b30232 * editcmd.c (edit_save_as_cmd): Add hotkey to dialog.
(edit_save_confirm_cmd): Likewise. (edit_new_cmd): Likewise.
(edit_load_cmd): Likewise. (edit_block_move_cmd): Likewise.
(edit_block_delete): Likewise. (edit_ok_to_exit): Likewise.
2004-09-01 22:40:45 +00:00
Andrew V. Samoilov
83de09639c * syntax.c(this_try_alloc_color_pair): Use g_strlcpy instead
sequence strncpy(), name[len] = '\0'
(edit_read_syntax_rules):Likewise.
2004-09-01 18:37:14 +00:00
Roland Illig
03913065b4 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 23:27:40 +00:00
Roland Illig
243e84706e * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 18:45:56 +00:00
Roland Illig
263ea5c1d5 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 17:57:39 +00:00
Andrew V. Samoilov
761406cfdf * edit/editcmd.c: Fix buffer overflows in edit replace code. 2004-08-25 22:12:02 +00:00
Roland Illig
c12aeadadb Added missing ChangeLog items from 2004-08-16. 2004-08-24 11:24:43 +00:00
Andrew V. Samoilov
bb8bf1756e * syntax.c (edit_read_syntax_rules): Dynamically allocate
more space for contexts and for words in context.
2004-08-22 20:47:56 +00:00
Roland Illig
3dcf497216 Added more const-ness to variables. 2004-08-16 17:53:07 +00:00
Roland Illig
640f3a163c Added more const-ness to variables and functions. 2004-08-16 17:49:57 +00:00
Roland Illig
29010bfdd1 Removed explicit loop unrolling in xx_strchr as that is the job of the compiler. 2004-08-16 17:48:38 +00:00
Roland Illig
d1b57fbf7f Avoid compiler warning using gcc/Solaris8. 2004-08-16 04:49:08 +00:00
Roland Illig
6cefb6d3bb Made the data type of some variables more appropriate. 2004-08-16 03:12:05 +00:00
Roland Illig
9902c1b885 Added missing initializers for QuickDialog.i18n. 2004-08-15 22:55:17 +00:00
Roland Illig
3b421b32bb Moved a semicolon outside of a declaration macro. 2004-08-15 19:34:37 +00:00
Roland Illig
c6ecc5b303 Marked the last item of a QuickWidget array as NULL_QuickWidget. 2004-08-15 18:24:06 +00:00
Pavel Roskin
603e2af580 * editcmddef.h: Split CK_No_Command into CK_Insert_Char and
CK_Ignore_Key.
* editkeys.c (emacs_key_map): Ignore Ctrl-g.  Requested by
Paul Seelig <pseelig@uni-mainz.de>
(edit_translate_key): Implement CK_Ignore_Key.
2004-02-04 23:09:22 +00:00
Pavel Roskin
90ae5d102d * edit.c (edit_execute_key_command): Return void, the result is
never used.
(edit_execute_cmd): Likewise.
2004-02-04 22:27:58 +00:00
Dmitry Alexeyev
c459caead1 * syntax.c (edit_read_syntax_rules): Fix crash if syntax file
has more than 1024 keywords.
2003-12-24 07:38:49 +00:00
Pavel Roskin
a7c0bbac62 * editcmd.c: Use input_expand_dialog() instead of input_dialog()
for loading and saving files.
2003-11-27 10:23:50 +00:00
Pavel Roskin
f51e86a184 * editcmd.c (pipe_mail): Eliminate g_strdup_printf().
(edit_complete_word_cmd): Fix possible buffer overflow.
2003-11-24 20:27:34 +00:00
Pavel Roskin
a128188ae1 Warning fixes for FreeBSD 5.1. 2003-11-21 03:17:18 +00:00
Pavel Roskin
4bc92accff * editcmd.c (edit_mail_dialog): Trivial clean-up. 2003-11-03 18:59:50 +00:00
Pavel Roskin
8bc40b44f0 Fix includes not to rely on $(top_srcdir) being in the include path. 2003-10-29 08:54:22 +00:00
Pavel Roskin
98950838b4 * dlg.h: Merge with ...
* dialog.h: ... this.  Adjust all dependencies.
* dlg.c: Merge with ...
* dialog.c: ... this.
* Makefile.am (SRCS): Remove dlg.h and dlg.c.
2003-10-24 23:20:30 +00:00
Pavel Roskin
ad84a71c64 * edit-widget.h (struct WEdit): Add GTree *defines field.
* syntax.c: Use edit->defines instead of static defines.
2003-10-23 23:23:46 +00:00
Pavel Roskin
f426c570a6 * syntax.c (compare_word_to_right): More checks for braces and
brackets.
2003-10-16 20:31:06 +00:00
Pavel Roskin
7f8dfa977d * syntax.c (compare_word_to_right): Fix recent breakage - rules
ending with wildcard (e.g. "$+") won't match.
2003-10-16 20:16:38 +00:00
Pavel Roskin
e90a7540a2 * edit.h: Make static all functions and variables that don't
need to be global.  Remove unused functions.  Adjust all
dependencies.
2003-10-14 21:48:40 +00:00
Pavel Roskin
fce42c9316 * syntax.c: Give names to numeric tokens. 2003-09-22 23:04:48 +00:00
Pavel Roskin
daab7bd737 * syntax.c (compare_word_to_right): Add checks that we don't go
beyond text length for certain invalid rules.
Reported by Juan C. Olivares <juancri@TAGnet.org>
2003-09-22 22:30:48 +00:00
Pavel Roskin
6eda31f362 * menu.h: Return to keeping dialog id instead of a widget
pointer for previous widget.  The widget can be replaced in the
meantime.
* dlg.c (dlg_select_by_id): New function, essentially a cleaner
implementation of dlg_select_nth_widget().
2003-09-13 07:43:20 +00:00
Pavel Roskin
c0b34498dd * dlg.h: Merge Widget_Item into Widget. Massive adjustment. 2003-09-12 23:38:42 +00:00
Pavel Roskin
824a5256c1 * menu.h (WMenu): Save pointer to the previous widget, not its
number.  Adjust all dependencies.
* menu.c (menubar_finish): Restore focus on the saved widget.
* dlg.c (dlg_item_number): Remove, it's unused now.
(dlg_select_nth_widget): Likewise.
2003-09-12 22:45:51 +00:00
Pavel Roskin
e0f9b7ab83 * editcmd.c (edit_raw_key_query): Use straight widget order.
(edit_completion_dialog): Likewise.
* editwidget.c (edit): Likewise.
2003-09-12 21:30:29 +00:00
Pavel Roskin
e14f56d71b * dlg.h: Replace DLG_BACKWARD to DLG_REVERSE with a better
defined meaning.  Make it default to populate dialogs from the
top.  Change all calls to create_dlg().
2003-09-12 21:22:01 +00:00
Pavel Roskin
e355e25b56 * dlg.h: Use cb_ret_t and widget_msg_t in widget callbacks.
Massive adjustment for the above.
2003-09-10 22:48:54 +00:00
Pavel Roskin
0c794a4e95 Fix unsafe defines. 2003-09-10 21:33:12 +00:00
Pavel Roskin
24737eb1c1 * dlg.h: Remove restroy callback. Widgets should use
WIDGET_DESTROY.  Adjust all dependencies.
2003-09-10 18:21:40 +00:00
Pavel Roskin
13a02ef978 * dlg.h: Use new types for dialog callbacks.
(dlg_cb_fn): Swap msg and parm arguments for consistency with
widget callbacks.  Adjust all dependencies.
2003-09-07 21:24:01 +00:00
Pavel Roskin
38265d418d * edit.h: Get rid of WIDGET_COMMAND, update all dependencies. 2003-09-07 19:08:07 +00:00
Pavel Roskin
1e0850ab07 * dlg.c (find_widget_type): Take pointer to void to avoid casts
everywhere.  Adjust all callers.
2003-09-07 07:16:12 +00:00
Pavel Roskin
f8e00e7b6a * widget.c (listbox_new): Remove "action" argument. Listboxes
without callbacks default to closing the dialog.  Adjust all
users.  This fixes double click on completion listbox.
* widget.h: Use uppercase names for the return values of the
listbox callback.
2003-09-01 07:31:56 +00:00
Pavel Roskin
58545e65c2 * widget.h: Use exact type in the listbox callback. Adjust all
legitimate users, remove all unused callbacks.
2003-09-01 05:43:20 +00:00
Pavel Roskin
2b9b18150e * widget.h (button_new): Remove unused extra argument. Adjust
all dependencies.
2003-09-01 02:07:02 +00:00
Pavel Roskin
fab6e8a493 * widget.h: Completely get rid of tkname. Rename it to histname
for the input widget.  Adjust all dependencies.
2003-09-01 00:18:37 +00:00
Pavel Roskin
10f65ac83d * dlg.h (struct Widget): Remove tkname field.
(init_widget): Remove tkname argument.
* widget.h (listbox_new): Likewise.
Adjust all dependencies.
2003-08-31 23:29:49 +00:00
Pavel Roskin
d521073663 Add missing include. 2003-08-18 05:20:52 +00:00
Pavel Roskin
cf9acd036e * edit-widget.h: Resurrect "dir" field in WEdit to store
directory for relative filenames.

* edit.c (edit_clean): Release edit->dir.

* editcmd.c (edit_save_file): Use absolute filename.
Temporarily disable safe save and backups on remote VFS because
it doesn't work - again.
2003-07-31 16:38:07 +00:00
Pavel Roskin
81d396da33 Remove useless initialization. 2003-07-31 16:32:30 +00:00
Pavel Roskin
58572c60da * edit.c (edit_execute_cmd): Enable user menu in mcedit. 2003-07-25 18:52:28 +00:00
Pavel Roskin
c72a1ea44c Get rid of all references to NATIVE_WIN32. 2003-07-23 03:22:32 +00:00
Pavel Roskin
dadbdd25e9 * editcmd.c (edit_quit_cmd): Rename to ...
(edit_ok_to_exit): ... this.  Don't stop dialog - this function
is called by the dialog code.
* editwidget.c (edit_dialog_callback): Process DLG_VALIDATE
event.  Don't exit it the user wants to continue editing.
* edit.c (edit_execute_cmd): Close the dialog - it will ask user
if necessary.
2003-07-21 03:54:47 +00:00
Pavel Roskin
7a5c9a3834 Kill another instance of using delete_file in a wrong place. 2003-07-20 23:34:29 +00:00
Pavel Roskin
9bc8df86ad * editcmd.c (edit_quit_cmd): Don't save this command in the undo
stack.  Don't force any refresh.  Don't delete unsaved files, do
it ...
* edit.c (edit_clean): ... here.  This ensures that unsaved
files from the mcedit command line are erased on Ctrl-n.
2003-07-20 23:24:25 +00:00
Pavel Roskin
0633d91f60 * editwidget.c (edit): Remove unused variable "framed". 2003-07-20 22:15:28 +00:00
Pavel Roskin
4b8f0b02b2 * edit.c (edit_clean): Remove stale lock if any. 2003-07-09 00:21:09 +00:00
Pavel Roskin
5ff5f8e9d1 * edit-widget.h: Add new field loading_done.
* edit.c (edit_init): Set loading_done.
(edit_insert): Don't call edit_modification() before the file is
completely loaded.
2003-07-09 00:18:11 +00:00
Pavel Roskin
59593d0e1b * edit-widget.h: Eliminate unused explicit_syntax field. 2003-07-08 23:58:36 +00:00
Pavel Roskin
729a855b29 * edit-widget.h: Stop misusing "unsigned char" for boolean.
Eliminate have_frame - it's unused.  Adjust all dependencies.
2003-07-08 23:46:01 +00:00
Pavel Roskin
6b63507463 * editkeys.c: Leave only distinct entries in cooledit_key_map
and emacs_key_map.  Move the rest to common_key_map.
2003-06-14 05:02:33 +00:00
Pavel Roskin
9dae056016 * editkeys.c (emacs_key_map): Move Atl-'>' and Alt-'<' ...
(common_key_map): ... here.
2003-06-10 00:35:55 +00:00
Pavel Roskin
4a398f0ee7 * editcmd.c (edit_ext_cmd): Fix memory leak. 2003-06-05 17:55:50 +00:00
Pavel Roskin
69a16471a9 edit_ext_cmd(): trivial simplification. 2003-06-05 04:06:37 +00:00
Pavel Roskin
f6e1d08562 Typo. 2003-06-02 19:25:15 +00:00
Pavel Roskin
3cd4571dc9 Typos and britainisms. 2003-06-02 18:39:44 +00:00
Pavel Roskin
a66e5f511f Add comment for edit_ext_cmd. 2003-05-30 21:14:07 +00:00
Pavel Roskin
bdc56f331b * editcmd.c: Implement pasting the output of any external
command.
* editmenu.c: Add menu entries for that.
* editcmddef.h: Add new command CK_ExtCmd.
2003-05-30 21:06:10 +00:00
Pavel Roskin
e95373535c * edit.c: Move edit_modification() before actions to provide
proper repainting if there are dialogs invoked by actions.
2003-04-05 01:43:58 +00:00
Pavel Roskin
66a823861f * editlock.c: Split lock into user@host and pid and report them
separately.
2003-04-05 01:29:15 +00:00
Pavel Roskin
ebf1bcfa33 * edit.c (edit_load_file): Use vfs_file_is_local(), not
vfs_current_is_local().
* editlock.c (edit_lock_file): Disable locking on VFS.
2003-04-02 22:25:00 +00:00
Pavel Roskin
d88b75838a * editlock.c, editlock.h: New files. Implement file locking in
Emacs style, as documented in JED editor sources.
* Makefile.am: Add those files to build tree.

* edit-widget.c (WEdit): New property 'locked', 0 on edit_init.
* edit.c (edit_modification): Lock buffer on modification.
* editcmd.c (edit_save_cmd, edit_save_as_cmd): Handle locking
during file save.
(edit_load_file_from_filename): Unlock.  Remove 2 duplicate
lines (handled by edit_init).
(edit_quit_cmd): Unlock.
2003-04-02 19:36:10 +00:00
Pavel Roskin
d4336795e6 * edit.h: Make it easier to tweak buffer size and maximal number
of buffers.
2003-03-12 07:07:27 +00:00
Pavel Roskin
867704615b * key.c (correct_key_code): Convert unrecognized 0177, Ctrl-h
and Ctrl-d into Delete and Backspace.  Remove all references to
those keys in other files.
2003-03-10 20:27:54 +00:00
Pavel Roskin
7cdbc354c2 * editkeys.c (common_key_map): Delete previous word by
Alt-Backspace.  Fix Ctrl-Backspace on some terminals.
Reported by Andrew V. Samoilov <sav@bcs.zp.ua>
2003-03-07 21:47:32 +00:00
Andrew V. Samoilov
6f35fce869 * syntax.c (edit_read_syntax_file): Fix segmentation violation. 2003-03-06 18:42:33 +00:00
Andrew V. Samoilov
902cd4834b * syntax.c (edit_read_syntax_rules): Check for list of defines
is already initialized.
(edit_read_syntax_file): Process `include ...` before first
`file ...`, so color definitions can be stored separately.
2003-03-04 09:52:40 +00:00
Andrew V. Samoilov
599f3e8bfb * syntax.c (subst_defines): New function to substitute defines.
(this_try_alloc_color_pair): Move color substitution ...
(edit_read_syntax_rules): ... here.  Use subst_defines() to
substitute colors for contexts and keywords.  Allow multiword
defines.
2003-03-03 13:37:45 +00:00
Andrew V. Samoilov
0c03bd9dd3 * (edit_read_syntax_rules): Fix memory corruption if key is redefined 2003-03-03 08:55:11 +00:00
Andrew V. Samoilov
f0a33821e6 * syntax.c (edit_read_syntax_rules): Add args argument and it
use instead of own auto args array to share this area with ...
(edit_read_syntax_file): ... this.  Adjust for the above.
Use strncpy() instead of unsafe strcpy().
2003-02-26 19:15:27 +00:00
Andrew V. Samoilov
6a8a443ed2 * syntax.c (edit_read_syntax_rules): Add args argument and it
use instead of own auto args array to share this area with ...
(edit_read_syntax_file): ... this.  Adjust for the above.
Use strncpy() instead of unsafe strcpy().
2003-02-26 19:01:40 +00:00
Andrew V. Samoilov
4dc31f3e06 (this_try_alloc_color_pair): Set fg to f if fg is not NULL. Likewise for
fg and bg.
(edit_free_syntax_rules): Call destroy_defines() even if there is no rules.
2003-02-25 16:16:18 +00:00
Pavel Roskin
0158eaf0f3 * syntax.c (defines): New static variable for list of defines.
(mc_defines_destroy): New function to release memory of key
pair.
(destroy_defines): New function to destroy list of defines
completely.
(this_try_alloc_color_pair): Use strncpy() instead of unsafe
strcpy().  Use values from list of defines to substitute given
parameters.
(edit_read_syntax_rules): Initialize list of defines and process
new "define" keyword.  Use strncpy() instead of unsafe strcpy().
(edit_free_syntax_rules): Destroy list of defines.
2003-02-25 15:07:53 +00:00
Andrew V. Samoilov
ebc8d1690a * editmenu.c (OptMenuEmacs): Define as OptMenu.
(SearReplMenuEmacs): Define as SearReplMenu.
(EditMenuEmacs): Define as EditMenu.
2003-02-21 23:32:06 +00:00
Pavel Roskin
0da0c44f87 * (OptMenu): Add "Learn Keys".
(OptMenuEmacs): Likewise.
2003-01-28 17:56:53 +00:00
Andrew V. Samoilov
a132b94cf9 * edit-widget.h (struct macro): Move definition ...
* edit.h: ... here to fix compilation on HP-UX.
2003-01-27 15:46:40 +00:00
Pavel Roskin
812bac9a33 * editkeys.c: Move key maps to the file scope. Put common keys
to a separate table common_key_map.
(edit_translate_key): Remove unused argument x_keycode.
2002-12-25 22:53:07 +00:00
Pavel Roskin
e0bbeb7085 * editkeys.c (edit_translate_key): Treat Shift-Enter as return
without indent.  Useful when pasting multiline text with
Shift-button3 or Shift-Insert with autoindent enabled.
2002-12-25 05:46:03 +00:00
Pavel Roskin
554acb2837 * editkeys.c (edit_translate_key): Treat Ctrl-Home and Ctrl-End
like Ctrl-PgUp and Ctrl-PgDown respectively.
2002-12-23 10:18:22 +00:00
Pavel Roskin
ab43e6db88 * edit_key_translator.c: Rename to ...
* editkeys.c: ... this.
* edit.c (edit_translate_key): Move to editkeys.c.
* Makefile.am: Adjust for the above.
2002-12-23 10:13:35 +00:00
Pavel Roskin
361ec45373 Fix includes. 2002-12-23 10:12:40 +00:00
Pavel Roskin
d6947e39cf * edit.c (edit_translate_key): Remove x_state argument, it's now
a part of x_keycode.
* editwidget.c (get_key_state): Remove.
2002-12-21 08:46:50 +00:00
Andrew V. Samoilov
4718c1105d * editcmd.c (edit_block_process_cmd): Quote filename. 2002-12-19 13:01:34 +00:00
Andrew V. Samoilov
bce2ba99e9 * edit.h (edit_save_mode_t): New enum for file saving mode.
* editcmd.c (): Use edit_save_mode_t.
(pipe_mail): Quote to, subject and cc with name_quote().
* edit.c (edit_get_filter): Use quoted filename.
(edit_get_write_filter): Use quoted writename.
(edit_push_action): Use g_realloc().
2002-12-18 20:04:39 +00:00
Pavel Roskin
e0a241f570 * editcmd.c (edit_goto_cmd): Add support for negative line
numbers, which are counted from the last line.  Use strtol(), so
hex numbers are supported as well.
2002-12-16 07:13:12 +00:00
Pavel Roskin
0454cf6eb1 * edit.c: Use edit->stack_disable instead of static variable. 2002-12-16 05:21:42 +00:00