extremely small and simple HTTP GET/HEAD-only web server for static content
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
536 B

  1. /* See LICENSE file for copyright and license details. */
  2. #ifndef UTIL_H
  3. #define UTIL_H
  4. #include <time.h>
  5. #include "arg.h"
  6. #undef MIN
  7. #define MIN(x,y) ((x) < (y) ? (x) : (y))
  8. #undef MAX
  9. #define MAX(x,y) ((x) > (y) ? (x) : (y))
  10. #undef LEN
  11. #define LEN(x) (sizeof (x) / sizeof *(x))
  12. extern char *argv0;
  13. void warn(const char *, ...);
  14. void die(const char *, ...);
  15. long long strtonum(const char *, long long, long long, const char **);
  16. #define TIMESTAMP_LEN 30
  17. char *timestamp(time_t, char buf[TIMESTAMP_LEN]);
  18. #endif /* UTIL_H */