-
Notifications
You must be signed in to change notification settings - Fork 0
/
minitalk.h
34 lines (27 loc) · 1.23 KB
/
minitalk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* minitalk.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tunsal <tunsal@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/15 11:47:26 by tunsal #+# #+# */
/* Updated: 2023/11/18 01:51:27 by tunsal ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef MINITALK_H
# define MINITALK_H
# include <unistd.h>
# include <signal.h>
# include "ft_printf/ft_printf.h"
# define BITS_PER_CHAR 8
# define BIT_0_SIGNAL SIGUSR1
# define BIT_1_SIGNAL SIGUSR2
# define SV_MESSAGE_RECEIVED_SIGNAL SIGUSR2
typedef struct incoming_char
{
char c;
int bit_index;
} t_incoming_char;
t_incoming_char g_curr_char;
#endif