strdate.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 47 行
GML
47 行
.func _strdate _wstrdate _ustrdate
#include <time.h>
char *_strdate( char *datestr )
.ixfunc2 '&Conversion' &func
.if &'length(&wfunc.) ne 0 .do begin
wchar_t _wstrdate( wchar_t *datestr );
.ixfunc2 '&Conversion' &wfunc
.ixfunc2 '&Wide' &wfunc
.do end
.if &'length(&ufunc.) ne 0 .do begin
wchar_t _ustrdate( wchar_t *datestr );
.ixfunc2 '&Conversion' &ufunc
.do end
.funcend
.desc begin
The &func function copies the current date to the buffer pointed to by
.arg datestr.
The date is formatted as "MM/DD/YY"
where "MM" is two digits representing the month,
where "DD" is two digits representing the day, and
where "YY" is two digits representing the year.
The buffer must be at least 9 bytes long.
.im widefunc
.im unifunc
.desc end
.return begin
The &func function returns a pointer to the resulting text string
.arg datestr.
.return end
.see begin
.seelist &function. asctime ctime gmtime localtime mktime
.seelist &function. _strdate _strtime time tzset
.see end
.exmp begin
#include <stdio.h>
#include <time.h>
void main()
{
char datebuff[9];
.exmp break
printf( "%s\n", _strdate( datebuff ) );
}
.exmp end
.class WATCOM
.system
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?