My slstatus configuration
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 

20 líneas
333 B

  1. /* See LICENSE file for copyright and license details. */
  2. #include <stdio.h>
  3. #include <time.h>
  4. #include "../util.h"
  5. const char *
  6. datetime(const char *fmt)
  7. {
  8. time_t t;
  9. t = time(NULL);
  10. if (!strftime(buf, sizeof(buf), fmt, localtime(&t))) {
  11. warn("strftime: Result string exceeds buffer size");
  12. return NULL;
  13. }
  14. return buf;
  15. }