Cleaned up
This commit is contained in:
@ -20,6 +20,7 @@
|
|||||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
|
||||||
#include <hackrf.h>
|
#include <hackrf.h>
|
||||||
|
|
||||||
@ -47,7 +48,6 @@ typedef int bool;
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define M_PI 3.14159265358979323846264338327950288
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
@ -334,7 +334,11 @@ void sigint_callback_handler(int signum) {
|
|||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
int opt, i, result = 0;
|
int opt, i, result = 0;
|
||||||
|
#ifdef _WIN32
|
||||||
|
const char* path = "nul";
|
||||||
|
#else
|
||||||
const char* path = "/dev/null";
|
const char* path = "/dev/null";
|
||||||
|
#endif
|
||||||
const char* serial_number = NULL;
|
const char* serial_number = NULL;
|
||||||
int exit_code = EXIT_SUCCESS;
|
int exit_code = EXIT_SUCCESS;
|
||||||
struct timeval t_end;
|
struct timeval t_end;
|
||||||
@ -517,9 +521,6 @@ int main(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fd = fopen(path, "wb");
|
fd = fopen(path, "wb");
|
||||||
if (fd == NULL) {
|
|
||||||
fd = fopen("nul", "wb");
|
|
||||||
}
|
|
||||||
if( fd == NULL ) {
|
if( fd == NULL ) {
|
||||||
fprintf(stderr, "Failed to open file: %s\n", path);
|
fprintf(stderr, "Failed to open file: %s\n", path);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
Reference in New Issue
Block a user