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.
|
|
|
/* Copyright 2016 Alex 'AdUser' Z (ad_user@runbox.com)
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
#ifndef F2B_LOGFILE_H_
|
|
|
|
#define F2B_LOGFILE_H_
|
|
|
|
|
|
|
|
typedef struct f2b_logfile_t {
|
|
|
|
struct f2b_logfile_t *next;
|
|
|
|
bool opened;
|
|
|
|
char path[PATH_MAX];
|
|
|
|
FILE *fd;
|
|
|
|
struct stat st;
|
|
|
|
} f2b_logfile_t;
|
|
|
|
|
|
|
|
bool f2b_logfile_open(f2b_logfile_t *file, const char *path);
|
|
|
|
void f2b_logfile_close(f2b_logfile_t *file);
|
|
|
|
bool f2b_logfile_rotated(const f2b_logfile_t *file);
|
|
|
|
bool f2b_logfile_getline(const f2b_logfile_t *file, char *buf, size_t bufsize);
|
|
|
|
|
|
|
|
#endif /* F2B_LOGFILE_H_ */
|