Ilia Maslakov
b0729f75fb
replace isalpha to g_ascii_isalpha
...
replace strlen to str_term_width1
add #include "strutil.h" if need
2009-04-06 10:31:12 +00:00
Slava Zanko
e54f318cef
Completely removed MHL stuff
...
Changed all source files relative to remove MHL
Some string-related functions moved into src/util.c
This stable fix.
2009-02-06 14:01:28 +02:00
Patrick Winnertz
3b8f37b99e
Moved some functions out of mhl into src/util.c
...
This commit moves the mhl_str_concat_dir_and_file back into src/util.c whitout changing atm the functionality.
Please note that this is an incomplete fix and needs to be partially enhanced in order to keep the full functionality with glib.
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-06 11:17:03 +01:00
Patrick Winnertz
d84586ba82
Reverted the use of mhl_str_dup and use g_strdup instead.
...
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:40:32 +01:00
Patrick Winnertz
1c287d798d
First bunch of mhl_mem_free removal patches
...
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:36:58 +01:00
Patrick Winnertz
3d0f9e419a
Reverted some more GString removals. (See f235b1976e
)
...
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:22:08 +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
f235b1976e
replaced GString stuff by static buffers
2009-01-31 21:55:51 +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
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
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
Leonard den Ottolander
2f8a75974b
* syntax.c (edit_read_syntax_file): Set NENTRIES to 30.
2006-08-02 15:18:22 +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
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
Roland Illig
13684ebcd7
Added many empty lines to make reading easier.
2005-10-12 15:50:43 +00:00
Roland Illig
1c607a7414
Removed unused variable.
2005-08-15 21:40:34 +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
1f60f44145
Update postal address of Free Software Foundation.
2005-05-27 03:35:10 +00:00
Pavel Roskin
21ea3f6740
* *.c: Remove duplicate includes.
2005-05-10 20:57:11 +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
e5e3a8f87d
* editcmd.c: Fixed whitespacing issues.
...
* editdraw.c: Likewise.
* syntax.c: Likewise.
2005-02-07 20:32:17 +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
05d2881a71
* *.c: Removed trailing whitespace.
2005-02-07 07:31:19 +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
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
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
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
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
243e84706e
* Code cleanup: Added const qualifier for variables and
...
function declarations where possible. No functional changes.
2004-08-29 18:45:56 +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
29010bfdd1
Removed explicit loop unrolling in xx_strchr as that is the job of the compiler.
2004-08-16 17:48:38 +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
8bc40b44f0
Fix includes not to rely on $(top_srcdir) being in the include path.
2003-10-29 08:54:22 +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
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
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