api: fix type of value returned by function util_get_time_string
parent
e8615c1691
commit
23fd23fd1a
|
@ -41,7 +41,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
|||
* core: fix display of time in bare display when option
|
||||
weechat.look.buffer_time_format is set to empty string (closes #441)
|
||||
* api: fix type of value returned by functions strcasestr, utf8_prev_char,
|
||||
utf8_next_char and utf8_add_offset
|
||||
utf8_next_char, utf8_add_offset and util_get_time_string
|
||||
* api: fix type of value returned by function strcasestr
|
||||
* fifo: fix send error on Cygwin when something is received in the pipe
|
||||
(closes #436)
|
||||
|
|
|
@ -2960,21 +2960,26 @@ This function is not available in scripting API.
|
|||
|
||||
==== util_get_time_string
|
||||
|
||||
_WeeChat ≥ 0.3.2._
|
||||
_WeeChat ≥ 0.3.2, updated in 1.3._
|
||||
|
||||
Get date/time as a string built with "strftime".
|
||||
Get date/time as a string built with "strftime" and the format defined in
|
||||
option 'weechat.look.time_format'.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
char *weechat_util_get_time_string (const time_t *date);
|
||||
const char *weechat_util_get_time_string (const time_t *date);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* 'date': pointer to date
|
||||
|
||||
Return value:
|
||||
|
||||
* pointer to a string with date/time
|
||||
|
||||
C example:
|
||||
|
||||
[source,C]
|
||||
|
|
|
@ -3015,21 +3015,26 @@ Cette fonction n'est pas disponible dans l'API script.
|
|||
|
||||
==== util_get_time_string
|
||||
|
||||
_WeeChat ≥ 0.3.2._
|
||||
_WeeChat ≥ 0.3.2, mise à jour dans la 1.3._
|
||||
|
||||
Retourner la date/heure sous forme de chaîne construite avec "strftime".
|
||||
Retourner la date/heure sous forme de chaîne construite avec "strftime" et le
|
||||
format défini dans l'option 'weechat.look.time_format'.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,C]
|
||||
----
|
||||
char *weechat_util_get_time_string (const time_t *date);
|
||||
const char *weechat_util_get_time_string (const time_t *date);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* 'date' : pointeur vers la date
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
* pointeur vers une chaîne contenant la date/heure
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,C]
|
||||
|
|
|
@ -3060,21 +3060,29 @@ Questa funzione non è disponibile nelle API per lo scripting.
|
|||
|
||||
==== util_get_time_string
|
||||
|
||||
_WeeChat ≥ 0.3.2._
|
||||
// TRANSLATION MISSING
|
||||
_WeeChat ≥ 0.3.2, updated in 1.3._
|
||||
|
||||
Riceve data/ora come stringa compilata con "strftime".
|
||||
// TRANSLATION MISSING
|
||||
Get date/time as a string built with "strftime" and the format defined in
|
||||
option 'weechat.look.time_format'.
|
||||
|
||||
Prototipo:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
char *weechat_util_get_time_string (const time_t *date);
|
||||
const char *weechat_util_get_time_string (const time_t *date);
|
||||
----
|
||||
|
||||
Argomenti:
|
||||
|
||||
* 'date': puntatore alla data
|
||||
|
||||
Valore restituito:
|
||||
|
||||
// TRANSLATION MISSING
|
||||
* pointer to a string with date/time
|
||||
|
||||
Esempio in C:
|
||||
|
||||
[source,C]
|
||||
|
|
|
@ -2971,21 +2971,29 @@ weechat_util_timeval_add (&tv, 2000000); /* add 2 seconds */
|
|||
|
||||
==== util_get_time_string
|
||||
|
||||
_WeeChat バージョン 0.3.2 以上で利用可。_
|
||||
// TRANSLATION MISSING
|
||||
_WeeChat ≥ 0.3.2, updated in 1.3._
|
||||
|
||||
日付や時間を "strftime" で作った文字列で取得。
|
||||
// TRANSLATION MISSING
|
||||
Get date/time as a string built with "strftime" and the format defined in
|
||||
option 'weechat.look.time_format'.
|
||||
|
||||
プロトタイプ:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
char *weechat_util_get_time_string (const time_t *date);
|
||||
const char *weechat_util_get_time_string (const time_t *date);
|
||||
----
|
||||
|
||||
引数:
|
||||
|
||||
* 'date': 日付へのポインタ
|
||||
|
||||
戻り値:
|
||||
|
||||
// TRANSLATION MISSING
|
||||
* pointer to a string with date/time
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
[source,C]
|
||||
|
|
|
@ -305,7 +305,7 @@ util_timeval_add (struct timeval *tv, long long interval)
|
|||
* (can be localized).
|
||||
*/
|
||||
|
||||
char *
|
||||
const char *
|
||||
util_get_time_string (const time_t *date)
|
||||
{
|
||||
struct tm *local_time;
|
||||
|
|
|
@ -38,7 +38,7 @@ extern void util_setrlimit ();
|
|||
extern int util_timeval_cmp (struct timeval *tv1, struct timeval *tv2);
|
||||
extern long long util_timeval_diff (struct timeval *tv1, struct timeval *tv2);
|
||||
extern void util_timeval_add (struct timeval *tv, long long interval);
|
||||
extern char *util_get_time_string (const time_t *date);
|
||||
extern const char *util_get_time_string (const time_t *date);
|
||||
extern int util_signal_search (const char *name);
|
||||
extern void util_catch_signal (int signum, void (*handler)(int));
|
||||
extern int util_mkdir_home (const char *directory, int mode);
|
||||
|
|
|
@ -57,7 +57,7 @@ struct timeval;
|
|||
* please change the date with current one; for a second change at same
|
||||
* date, increment the 01, otherwise please keep 01.
|
||||
*/
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20150704-01"
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20150704-02"
|
||||
|
||||
/* macros for defining plugin infos */
|
||||
#define WEECHAT_PLUGIN_NAME(__name) \
|
||||
|
@ -347,7 +347,7 @@ struct t_weechat_plugin
|
|||
int (*util_timeval_cmp) (struct timeval *tv1, struct timeval *tv2);
|
||||
long long (*util_timeval_diff) (struct timeval *tv1, struct timeval *tv2);
|
||||
void (*util_timeval_add) (struct timeval *tv, long long interval);
|
||||
char *(*util_get_time_string) (const time_t *date);
|
||||
const char *(*util_get_time_string) (const time_t *date);
|
||||
int (*util_version_number) (const char *version);
|
||||
|
||||
/* sorted lists */
|
||||
|
|
Loading…
Reference in New Issue