/*
* Copyright 2017 Yann Weber
*
* This file is part of Ttail.
*
* Ttail is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Ttail is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Ttail. If not, see .
*/
#ifndef _ttail_h__
#define _ttail_h__
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
typedef struct _ttail_s ttail_t;
#include "config.h"
#include "ttail_search.h"
#define TTAIL_FLAG_PREFIX 1
#define TTAIL_FLAG_DATE_MIN 2
#define TTAIL_FLAG_DATE_MAX 4
#define TTAIL_FLAG_FORMAT 8
#define TTAIL_FLAG_EXTENDED_RE 16
#define TTAIL_FLAG_CI_RE 32
#define TTAIL_DEFAULT_FORMATS {"%m",\
"%A %B %d, %Y %H:%M:%S",\
"%A",\
"%B%n%d %H:%M:%S",\
"%B%n%d %H:%M",\
"%m/%d/%y %I %p",\
"%d,%m,%Y %H:%M",\
"at %A the %dst of %B in %Y",\
"run job at %I %p,%B %dnd",\
"%A den %d. %B %Y %H.%M Uhr",\
"%c",\
"%y/%m/%d",\
"%Y/%m/%d",\
"%y-%m-%d",\
"%Y/%m/%d:%H:%M",NULL}
struct _ttail_s
{
char **logfile_name; /*!< logfiles name */
FILE **logfile; /*!< logfiles pointers */
size_t logfile_sz; /*