mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 05:35:10 -07:00
remove HAVE_STRFTIME
strftime is a C99 standard function.
This commit is contained in:
parent
5aa1128e97
commit
6c902e2104
@ -61,7 +61,6 @@
|
|||||||
#define HAVE_SIGVEC 1
|
#define HAVE_SIGVEC 1
|
||||||
#define HAVE_ST_BLKSIZE 1
|
#define HAVE_ST_BLKSIZE 1
|
||||||
#define HAVE_STRCASECMP 1
|
#define HAVE_STRCASECMP 1
|
||||||
#define HAVE_STRFTIME 1
|
|
||||||
#define HAVE_STRING_H 1
|
#define HAVE_STRING_H 1
|
||||||
#define HAVE_STRINGS_H 1
|
#define HAVE_STRINGS_H 1
|
||||||
#define HAVE_STRNCASECMP 1
|
#define HAVE_STRNCASECMP 1
|
||||||
|
@ -716,9 +716,7 @@ static void f_sqrt(typval_T *argvars, typval_T *rettv);
|
|||||||
static void f_str2float(typval_T *argvars, typval_T *rettv);
|
static void f_str2float(typval_T *argvars, typval_T *rettv);
|
||||||
static void f_str2nr(typval_T *argvars, typval_T *rettv);
|
static void f_str2nr(typval_T *argvars, typval_T *rettv);
|
||||||
static void f_strchars(typval_T *argvars, typval_T *rettv);
|
static void f_strchars(typval_T *argvars, typval_T *rettv);
|
||||||
#ifdef HAVE_STRFTIME
|
|
||||||
static void f_strftime(typval_T *argvars, typval_T *rettv);
|
static void f_strftime(typval_T *argvars, typval_T *rettv);
|
||||||
#endif
|
|
||||||
static void f_stridx(typval_T *argvars, typval_T *rettv);
|
static void f_stridx(typval_T *argvars, typval_T *rettv);
|
||||||
static void f_string(typval_T *argvars, typval_T *rettv);
|
static void f_string(typval_T *argvars, typval_T *rettv);
|
||||||
static void f_strlen(typval_T *argvars, typval_T *rettv);
|
static void f_strlen(typval_T *argvars, typval_T *rettv);
|
||||||
@ -7037,9 +7035,7 @@ static struct fst {
|
|||||||
{"str2nr", 1, 2, f_str2nr},
|
{"str2nr", 1, 2, f_str2nr},
|
||||||
{"strchars", 1, 1, f_strchars},
|
{"strchars", 1, 1, f_strchars},
|
||||||
{"strdisplaywidth", 1, 2, f_strdisplaywidth},
|
{"strdisplaywidth", 1, 2, f_strdisplaywidth},
|
||||||
#ifdef HAVE_STRFTIME
|
|
||||||
{"strftime", 1, 2, f_strftime},
|
{"strftime", 1, 2, f_strftime},
|
||||||
#endif
|
|
||||||
{"stridx", 2, 3, f_stridx},
|
{"stridx", 2, 3, f_stridx},
|
||||||
{"string", 1, 1, f_string},
|
{"string", 1, 1, f_string},
|
||||||
{"strlen", 1, 1, f_strlen},
|
{"strlen", 1, 1, f_strlen},
|
||||||
@ -14024,7 +14020,6 @@ static void f_str2nr(typval_T *argvars, typval_T *rettv)
|
|||||||
rettv->vval.v_number = n;
|
rettv->vval.v_number = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_STRFTIME
|
|
||||||
/*
|
/*
|
||||||
* "strftime({format}[, {time}])" function
|
* "strftime({format}[, {time}])" function
|
||||||
*/
|
*/
|
||||||
@ -14074,7 +14069,6 @@ static void f_strftime(typval_T *argvars, typval_T *rettv)
|
|||||||
vim_free(enc);
|
vim_free(enc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "stridx()" function
|
* "stridx()" function
|
||||||
|
@ -2497,7 +2497,6 @@ void ex_undolist(exarg_T *eap)
|
|||||||
*/
|
*/
|
||||||
static void u_add_time(char_u *buf, size_t buflen, time_t tt)
|
static void u_add_time(char_u *buf, size_t buflen, time_t tt)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_STRFTIME
|
|
||||||
struct tm *curtime;
|
struct tm *curtime;
|
||||||
|
|
||||||
if (time(NULL) - tt >= 100) {
|
if (time(NULL) - tt >= 100) {
|
||||||
@ -2509,7 +2508,6 @@ static void u_add_time(char_u *buf, size_t buflen, time_t tt)
|
|||||||
/* longer ago */
|
/* longer ago */
|
||||||
(void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", curtime);
|
(void)strftime((char *)buf, buflen, "%Y/%m/%d %H:%M:%S", curtime);
|
||||||
} else
|
} else
|
||||||
#endif
|
|
||||||
vim_snprintf((char *)buf, buflen, _("%ld seconds ago"),
|
vim_snprintf((char *)buf, buflen, _("%ld seconds ago"),
|
||||||
(long)(time(NULL) - tt));
|
(long)(time(NULL) - tt));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user