Skip to content

Commit

Permalink
* editcmd.c (edit_printf): Use g_vsnprintf() instead of sprintf().
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew V. Samoilov committed Aug 27, 2002
1 parent 3f03b46 commit 63d111d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions edit/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2002-08-27 Andrew V. Samoilov <[email protected]>

* editcmd.c (edit_printf): Use g_vsnprintf() instead of sprintf().

2002-08-24 Pavel Roskin <[email protected]>

* edit-widget.h: Eliminate ERROR_FILE.
Expand Down Expand Up @@ -165,8 +169,8 @@
* syntax.c (syntax_g_free): New macro to release and NULLify
glib allocated memory area(s).
(strdup_convert): Rename to ...
(convert): ... this. Don't strdup passed string.
(get_args): Use convert instead of strdup_convert.
(convert): ... this. Don't strdup() passed string.
(get_args): Use convert() instead of strdup_convert().
(free_args): Make it do notning macro.
(open_include_file): Eliminate p array. Use glib function to
construct error_file_name. Use PATH_SEP instead of '/';
Expand All @@ -182,16 +186,16 @@

2001-12-22 Andrew V. Samoilov <[email protected]>

* editcmd.c (edit_goto_cmd): Use g_free to release f.
* editcmd.c (edit_goto_cmd): Use g_free() to release f.
(edit_save_file): Use PATH_SEP instead of '/'.
Undefine "close" before closing file created by mc_mkstemps.
Define close to mc_close after it - temporary fix.
Define close to mc_close() after it - temporary fix.

(sprintf_p): Don't cast (char *) to (unsigned long).

* syntax.c (read_one_line): Undo last patch - errno is a
function on some systems. Check ferror() status before
everithing else if fgetc returns EOF.
everything else if fgetc() returns EOF.
Accept last line without trailing newline.

(compare_word_to_right): Don't cast p and q to unsigned long.
Expand Down
4 changes: 2 additions & 2 deletions edit/editcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2291,13 +2291,13 @@ int edit_print_string (WEdit * e, const char *s)
return i;
}

int edit_printf (WEdit * e, const char *fmt,...)
int edit_printf (WEdit * e, const char *fmt, ...)
{
int i;
va_list pa;
char s[1024];
va_start (pa, fmt);
sprintf (s, fmt, pa);
g_vsnprintf (s, sizeof (s), fmt, pa);
i = edit_print_string (e, s);
va_end (pa);
return i;
Expand Down

0 comments on commit 63d111d

Please sign in to comment.