* edit.c (edit_execute_cmd): Put time format to a variable to
avoid gcc warning about Y2K issues with %c in strftime().
Этот коммит содержится в:
родитель
a06415a371
Коммит
0a2a50de04
@ -1,3 +1,8 @@
|
||||
2001-06-15 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* edit.c (edit_execute_cmd): Put time format to a variable to
|
||||
avoid gcc warning about Y2K issues with %c in strftime().
|
||||
|
||||
2001-06-14 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* edit.c: Declare cmd_F* static. Comment out cmd_F9.
|
||||
|
@ -2570,10 +2570,11 @@ int edit_execute_cmd (WEdit * edit, int command, int char_for_insertion)
|
||||
time_t t;
|
||||
#ifdef HAVE_STRFTIME
|
||||
char s[1024];
|
||||
static const char time_format[] = "%c";
|
||||
#endif
|
||||
time (&t);
|
||||
#ifdef HAVE_STRFTIME
|
||||
strftime (s, sizeof (s), "%c", localtime (&t));
|
||||
strftime (s, sizeof (s), time_format, localtime (&t));
|
||||
edit_printf (edit, s);
|
||||
#else
|
||||
edit_printf (edit, ctime (&t));
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user