Share datetime buffer size among modules

This commit is contained in:
Alex Kotov 2021-11-12 16:32:01 +05:00
parent d6b0c95b91
commit 5885ea936c
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
3 changed files with 4 additions and 4 deletions

View File

@ -8,8 +8,6 @@
#include <time.h>
#include <unistd.h>
#define BUFFER_SIZE 32
static void datetime_lock();
static void datetime_unlock();
static void *run(void *vargp);
@ -22,7 +20,7 @@ static bool running = false;
static pthread_t thread;
static bool thread_created = false;
static char buffer[BUFFER_SIZE];
static char buffer[DATETIME_BUFFER_SIZE];
void datetime_lock()
{

View File

@ -3,6 +3,8 @@
#include <stdbool.h>
#define DATETIME_BUFFER_SIZE 32
bool datetime_start();
void datetime_stop();

View File

@ -1,6 +1,7 @@
#include "status.h"
#include "atoms.h"
#include "datetime.h"
#include <pthread.h>
#include <stdio.h>
@ -8,7 +9,6 @@
#include <X11/Xlib.h>
#define EXTERNAL_BUFFER_SIZE 256
#define DATETIME_BUFFER_SIZE 32
#define BUFFER_SIZE (EXTERNAL_BUFFER_SIZE + 3 + DATETIME_BUFFER_SIZE)