diff options
Diffstat (limited to 'host/examples')
-rw-r--r-- | host/examples/benchmark_rate.cpp | 3 | ||||
-rw-r--r-- | host/examples/latency_test.cpp | 2 | ||||
-rw-r--r-- | host/examples/network_relay.cpp | 5 | ||||
-rw-r--r-- | host/examples/rx_ascii_art_dft.cpp | 9 | ||||
-rw-r--r-- | host/examples/rx_multi_samples.cpp | 2 | ||||
-rw-r--r-- | host/examples/rx_samples_to_file.cpp | 2 | ||||
-rw-r--r-- | host/examples/rx_samples_to_udp.cpp | 2 | ||||
-rw-r--r-- | host/examples/rx_timed_samples.cpp | 2 | ||||
-rw-r--r-- | host/examples/test_dboard_coercion.cpp | 2 | ||||
-rw-r--r-- | host/examples/test_messages.cpp | 2 | ||||
-rw-r--r-- | host/examples/test_pps_input.cpp | 2 | ||||
-rw-r--r-- | host/examples/test_timed_commands.cpp | 2 | ||||
-rw-r--r-- | host/examples/transport_hammer.cpp | 2 | ||||
-rw-r--r-- | host/examples/tx_bursts.cpp | 2 | ||||
-rw-r--r-- | host/examples/tx_samples_from_file.cpp | 2 | ||||
-rw-r--r-- | host/examples/tx_timed_samples.cpp | 2 | ||||
-rw-r--r-- | host/examples/tx_waveforms.cpp | 2 | ||||
-rw-r--r-- | host/examples/txrx_loopback_to_file.cpp | 2 |
18 files changed, 25 insertions, 22 deletions
diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp index 8a000f6c3..ed3a8580a 100644 --- a/host/examples/benchmark_rate.cpp +++ b/host/examples/benchmark_rate.cpp @@ -25,6 +25,7 @@ #include <boost/math/special_functions/round.hpp> #include <iostream> #include <complex> +#include <cstdlib> namespace po = boost::program_options; @@ -264,5 +265,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/latency_test.cpp b/host/examples/latency_test.cpp index 518d2383a..461ac9bf8 100644 --- a/host/examples/latency_test.cpp +++ b/host/examples/latency_test.cpp @@ -164,5 +164,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ **************************************************************/ std::cout << boost::format("\nACK %d, UNDERFLOW %d, TIME_ERR %d, other %d") % ack % underflow % time_error % other << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/network_relay.cpp b/host/examples/network_relay.cpp index e8f9e667f..bb09296b3 100644 --- a/host/examples/network_relay.cpp +++ b/host/examples/network_relay.cpp @@ -24,6 +24,7 @@ #include <iostream> #include <csignal> #include <vector> +#include <cstdlib> namespace po = boost::program_options; namespace asio = boost::asio; @@ -202,7 +203,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ << "Runs a network relay between UHD on one computer and a USRP on the network.\n" << "This example is basically for test purposes. Use at your own convenience.\n" << std::endl; - return ~0; + return EXIT_FAILURE; } { @@ -223,5 +224,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/rx_ascii_art_dft.cpp b/host/examples/rx_ascii_art_dft.cpp index fe8fb0347..1aede51a4 100644 --- a/host/examples/rx_ascii_art_dft.cpp +++ b/host/examples/rx_ascii_art_dft.cpp @@ -25,6 +25,7 @@ #include <curses.h> #include <iostream> #include <complex> +#include <cstdlib> namespace po = boost::program_options; @@ -63,7 +64,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //print the help message if (vm.count("help") or not vm.count("rate")){ std::cout << boost::format("UHD RX ASCII Art DFT %s") % desc << std::endl; - return ~0; + return EXIT_FAILURE; } //create a usrp device @@ -82,7 +83,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //set the sample rate if (not vm.count("rate")){ std::cerr << "Please specify the sample rate with --rate" << std::endl; - return ~0; + return EXIT_FAILURE; } std::cout << boost::format("Setting RX Rate: %f Msps...") % (rate/1e6) << std::endl; usrp->set_rx_rate(rate); @@ -91,7 +92,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //set the center frequency if (not vm.count("freq")){ std::cerr << "Please specify the center frequency with --freq" << std::endl; - return ~0; + return EXIT_FAILURE; } std::cout << boost::format("Setting RX Freq: %f MHz...") % (freq/1e6) << std::endl; usrp->set_rx_freq(freq); @@ -194,5 +195,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/rx_multi_samples.cpp b/host/examples/rx_multi_samples.cpp index 42ef33d70..83d648eb5 100644 --- a/host/examples/rx_multi_samples.cpp +++ b/host/examples/rx_multi_samples.cpp @@ -174,5 +174,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/rx_samples_to_file.cpp b/host/examples/rx_samples_to_file.cpp index 5197bfe69..d0a02a6c1 100644 --- a/host/examples/rx_samples_to_file.cpp +++ b/host/examples/rx_samples_to_file.cpp @@ -214,5 +214,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/rx_samples_to_udp.cpp b/host/examples/rx_samples_to_udp.cpp index 42b80762f..105db0a02 100644 --- a/host/examples/rx_samples_to_udp.cpp +++ b/host/examples/rx_samples_to_udp.cpp @@ -168,5 +168,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/rx_timed_samples.cpp b/host/examples/rx_timed_samples.cpp index 143bceb03..f0d49b4bd 100644 --- a/host/examples/rx_timed_samples.cpp +++ b/host/examples/rx_timed_samples.cpp @@ -124,5 +124,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/test_dboard_coercion.cpp b/host/examples/test_dboard_coercion.cpp index 5b1e9f0e2..cfc745147 100644 --- a/host/examples/test_dboard_coercion.cpp +++ b/host/examples/test_dboard_coercion.cpp @@ -573,5 +573,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ if(test_tx and test_rx) std::cout << std::endl; if(test_rx) std::cout << rx_results << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/test_messages.cpp b/host/examples/test_messages.cpp index afb092092..6f2ddfe28 100644 --- a/host/examples/test_messages.cpp +++ b/host/examples/test_messages.cpp @@ -350,5 +350,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/test_pps_input.cpp b/host/examples/test_pps_input.cpp index 994b7ca87..c07f2fffd 100644 --- a/host/examples/test_pps_input.cpp +++ b/host/examples/test_pps_input.cpp @@ -58,5 +58,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::cout << std::endl << "Attempt to detect the PPS and set the time..." << std::endl << std::endl; usrp->set_time_unknown_pps(uhd::time_spec_t(0.0)); std::cout << std::endl << "Success!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/test_timed_commands.cpp b/host/examples/test_timed_commands.cpp index 34c83dfd6..cecf1607c 100644 --- a/host/examples/test_timed_commands.cpp +++ b/host/examples/test_timed_commands.cpp @@ -125,5 +125,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/transport_hammer.cpp b/host/examples/transport_hammer.cpp index e32912eaa..ff35ceb21 100644 --- a/host/examples/transport_hammer.cpp +++ b/host/examples/transport_hammer.cpp @@ -272,5 +272,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/tx_bursts.cpp b/host/examples/tx_bursts.cpp index 4cf5f2fd1..8dd4a002c 100644 --- a/host/examples/tx_bursts.cpp +++ b/host/examples/tx_bursts.cpp @@ -156,5 +156,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/tx_samples_from_file.cpp b/host/examples/tx_samples_from_file.cpp index 04a6a63d4..f9447c25d 100644 --- a/host/examples/tx_samples_from_file.cpp +++ b/host/examples/tx_samples_from_file.cpp @@ -192,5 +192,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/tx_timed_samples.cpp b/host/examples/tx_timed_samples.cpp index 3b8cc75d4..4cc31a7c0 100644 --- a/host/examples/tx_timed_samples.cpp +++ b/host/examples/tx_timed_samples.cpp @@ -124,5 +124,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp index 3c5eecd65..40326ae93 100644 --- a/host/examples/tx_waveforms.cpp +++ b/host/examples/tx_waveforms.cpp @@ -260,5 +260,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } diff --git a/host/examples/txrx_loopback_to_file.cpp b/host/examples/txrx_loopback_to_file.cpp index 495c9f7e4..9dc348da8 100644 --- a/host/examples/txrx_loopback_to_file.cpp +++ b/host/examples/txrx_loopback_to_file.cpp @@ -443,5 +443,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } |