Blame view

main.c 496 Bytes
e583b6a9   henyxia   First version
1
  #include <stdio.h>
cdaa873f   henyxia   Log fixed
2
  #include <pthread.h>
ae25085d   henyxia   Output function done
3
  #include "printx.h"
ea1218f1   henyxia   UI finished
4
  #include "ui.h"
e583b6a9   henyxia   First version
5
  
cdaa873f   henyxia   Log fixed
6
7
  #include <unistd.h>
  
e583b6a9   henyxia   First version
8
9
  int main(void)
  {
cdaa873f   henyxia   Log fixed
10
11
12
13
14
  	pthread_t tUI, tNFC, tHVC;
  	tNFC = 0;
  	tHVC = 0;
  	tHVC = tNFC;
  	tNFC = tHVC;
ea1218f1   henyxia   UI finished
15
16
17
18
19
20
  	initUILog();
  	if(!initLog())
  	{
  		printf("Log creation failed\n");
  		return 1;
  	}
ae25085d   henyxia   Output function done
21
  	printx(INFO, "Tweekd starting\n");
cdaa873f   henyxia   Log fixed
22
  	printx(DEBUG, "Creating processes\n");
ea1218f1   henyxia   UI finished
23
  	displayUI();
cdaa873f   henyxia   Log fixed
24
25
26
  	close(1);// Black Magic Operating
  	pthread_create(&tUI, NULL, drawUI, NULL);
  	pthread_join(tUI, NULL);
ae25085d   henyxia   Output function done
27
  	closeLog();
e583b6a9   henyxia   First version
28
29
  	return 0;
  }