Implement logger functionality and signal handling: add Logger structure with mutex, logging functions, and handle SIGINT in utils.
This commit is contained in:
+21
-3
@@ -1,3 +1,23 @@
|
||||
/**
|
||||
* @file main.h
|
||||
* @brief Main header file for the application.
|
||||
*
|
||||
* This header includes all necessary standard and project-specific headers,
|
||||
* defines basic macros and types, and declares the main entry point of the program.
|
||||
*
|
||||
* Included headers:
|
||||
* - Standard C libraries (stdio, stdlib, stdint, time, unistd, pthread, ncurses, fcntl, errno, termios, string, signal)
|
||||
* - Project-specific modules (utils, logger, users, tui, rfid_handler, file_handler)
|
||||
*
|
||||
* Macros:
|
||||
* - TRUE, FALSE: Boolean values for logic operations.
|
||||
* - BYTE: Unsigned 8-bit integer type alias.
|
||||
* - MIN_X_TERMINAL_SIZE, MIN_Y_TERMINAL_SIZE: Minimum terminal dimensions for UI.
|
||||
*
|
||||
* Function Declarations:
|
||||
* - int main(int argc, char const **argv): Program entry point.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
@@ -14,7 +34,6 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef __MAIN_H__
|
||||
#define __MAIN_H__
|
||||
@@ -34,9 +53,8 @@
|
||||
#define MIN_X_TERMINAL_SIZE 50
|
||||
#define MIN_Y_TERMINAL_SIZE 20
|
||||
|
||||
void handle_sigint(int sig);
|
||||
#define JOURNAL_FILENAME "lighttam_journal"
|
||||
|
||||
int main(int argc, char const **argv);
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user