My slstatus configuration
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

16 行
197 B

  1. #include <time.h>
  2. #include "util.h"
  3. const char *
  4. datetime(const char *fmt)
  5. {
  6. time_t t;
  7. t = time(NULL);
  8. if (strftime(buf, sizeof(buf), fmt, localtime(&t)) == 0)
  9. return NULL;
  10. return buf;
  11. }