timed tail for logfiles. Display loglines given a minimum date and/or a maximum date.
c
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.

fmt_regex.c 536B

1234567891011121314151617181920212223242526
  1. #include "include/fmt_regex.h"
  2. ttail_datefmt* ttail_fmt_regex_init(ttail_options* options)
  3. {
  4. ttail_datefmt *res;
  5. res = malloc(sizeof(ttail_datefmt));
  6. if(!res)
  7. {
  8. perror("Failed to allocate the dateformat");
  9. goto ttail_fmt_regex_init_malloc_err;
  10. }
  11. res->name = malloc(sizeof(char)*(sizeof(TTAIL_FMT_REGEX_NAME)));
  12. if(!res->name)
  13. {
  14. perror("Failed to allocate the dateformat name");
  15. goto ttail_fmt_regex_init_err;
  16. }
  17. return res;
  18. ttail_fmt_regex_init_err:
  19. free(res);
  20. ttail_fmt_regex_init_malloc_err:
  21. return NULL;
  22. }