mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 01:38:30 +00:00
Work towards improving signals and processes
This commit is contained in:
parent
de703b182c
commit
d7ac16a9ed
96 changed files with 1474 additions and 427 deletions
|
@ -27,6 +27,13 @@ static unsigned clip(unsigned index, unsigned count) {
|
|||
return index < count ? index : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts date time to string.
|
||||
*
|
||||
* @param buf needs to have 64 bytes
|
||||
* @return pointer to buf
|
||||
* @see asctime_r for reentrant version
|
||||
*/
|
||||
char *asctime_r(const struct tm *date, char buf[hasatleast 64]) {
|
||||
(snprintf)(buf, 64, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
|
||||
kWeekdayNameShort[clip(date->tm_wday, 7)],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue