display module created
This commit is contained in:
parent
a051c10713
commit
d7f8eebcd1
2
Makefile
2
Makefile
|
@ -3,7 +3,7 @@ CFLAGS=-g -Wall -Wextra -std=gnu99
|
|||
BIN_DIR=bin
|
||||
SRC_DIR=src
|
||||
TARGET=$(BIN_DIR)/netsl
|
||||
OBJECTS=$(BIN_DIR)/main.o $(BIN_DIR)/msg.o $(BIN_DIR)/net.o
|
||||
OBJECTS=$(BIN_DIR)/main.o $(BIN_DIR)/msg.o $(BIN_DIR)/net.o $(BIN_DIR)/display.o
|
||||
|
||||
all: $(BIN_DIR) $(TARGET)
|
||||
|
||||
|
|
6
src/display.c
Normal file
6
src/display.c
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
#include "display.h"
|
||||
|
||||
void callback(long tst) {
|
||||
printf("in callback, tst=%ld\n", tst);
|
||||
}
|
8
src/display.h
Normal file
8
src/display.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef __DISPLAY
|
||||
#define __DISPLAY
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void callback(long tst);
|
||||
|
||||
#endif
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "misc.h"
|
||||
#include "net.h"
|
||||
#include "display.h"
|
||||
|
||||
#define MODE_SERVER 0
|
||||
#define MODE_CLIENT 1
|
||||
|
@ -57,9 +58,6 @@ int parseArgs(struct prog_info *pinfo, int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void callback(long tst) {
|
||||
printf("in callback, tst=%ld\n", tst);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef __MSG
|
||||
# define __MSG
|
||||
|
||||
//typedef struct Buffer {
|
||||
// int size;
|
||||
|
@ -23,3 +25,5 @@ void serialize_int(int x,Buffer *b);
|
|||
void serialize_string(char *str,Buffer *b);
|
||||
void serialize_message(struct message *msg,Buffer *b);
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user