forked from Ivasoft/DSView
Code refactoring 6
This commit is contained in:
@@ -1,8 +1,34 @@
|
||||
|
||||
#include <libsigrok.h>
|
||||
#include "../log.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int main2()
|
||||
#undef LOG_PREFIX
|
||||
#define LOG_PREFIX "test_main: "
|
||||
|
||||
int main()
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if ((ret = sr_lib_init()) != SR_OK)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
sr_info("%s", "start.");
|
||||
|
||||
char c = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
c = getchar();
|
||||
|
||||
if (c == 'x'){
|
||||
sr_lib_exit();
|
||||
sr_info("%s", "exit.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user