1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-13 01:53:01 +01:00

move log struct to proper place

This commit is contained in:
Jfreegman 2014-03-25 08:25:10 -04:00
parent a5ce17f44e
commit 3baa830afb
5 changed files with 12 additions and 9 deletions

View File

@ -30,6 +30,7 @@
#include "toxic_windows.h"
#include "misc_tools.h"
#include "friendlist.h"
#include "log.h"
#include "line_info.h"
extern char *DATA_FILE;

View File

@ -31,6 +31,7 @@
#include "configdir.h"
#include "toxic_windows.h"
#include "misc_tools.h"
#include "log.h"
/* Creates/fetches log file by appending to the config dir the name and a pseudo-unique identity */
void init_logging_session(uint8_t *name, uint8_t *key, struct chatlog *log)

View File

@ -20,6 +20,15 @@
*
*/
#define LOG_FLUSH_LIMIT 2 /* limits calls to fflush(logfile) to a max of one per LOG_FLUSH_LIMIT seconds */
struct chatlog {
FILE *file;
uint64_t lastwrite;
int pos;
bool log_on; /* specific to current chat window */
};
/* Creates/fetches log file by appending to the config dir the name and a pseudo-unique identity */
void init_logging_session(uint8_t *name, uint8_t *key, struct chatlog *log);

View File

@ -32,6 +32,7 @@
#include "execute.h"
#include "misc_tools.h"
#include "toxic_strings.h"
#include "log.h"
#include "line_info.h"
uint8_t pending_frnd_requests[MAX_FRIENDS_NUM][TOX_CLIENT_ID_SIZE] = {0};

View File

@ -165,15 +165,6 @@ struct StatusBar {
bool is_online;
};
#define LOG_FLUSH_LIMIT 2 /* limits calls to fflush(logfile) to a max of one per LOG_FLUSH_LIMIT seconds */
struct chatlog {
FILE *file;
uint64_t lastwrite;
int pos;
bool log_on; /* specific to current chat window */
};
#define MAX_LINE_HIST 128
/* chat and groupchat window/buffer holder */