From a3c6b5acc188645590993c59a5481c8c85afede3 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 7 Sep 2021 18:08:58 +0200 Subject: [PATCH] use inttypes --- lib/ddzap.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/ddzap.c b/lib/ddzap.c index 06b6391..5620abc 100644 --- a/lib/ddzap.c +++ b/lib/ddzap.c @@ -12,6 +12,7 @@ #include #include #include +#include char line_start[16] = ""; char line_end[16] = "\r"; @@ -427,7 +428,10 @@ int main(int argc, char **argv) get_ts = 0; break; case 'h': - fprintf(fout,"ddzap [-d delivery_system] [-p polarity] [-c config_dir] [-f frequency(Hz)]\n" + fprintf(fout,"ddzap [-d delivery_system] [-p polarity] [-c config_dir]\n" + " [-f frequency(Hz for terr./kHz for SAT)]\n" + " [-m 16APSK/32APSK/64APSK/128APSK/256APSK]\n" + " (only needed for higher modulations than 8PSK) on some cards\n" " [-b bandwidth(Hz)] [-s symbol_rate(Hz)]\n" " [-g gold_code] [-r root_code] [-i id] [-n device_num]\n" " [-o (write dvr to stdout)]\n" @@ -503,9 +507,10 @@ int main(int argc, char **argv) str = dddvb_get_strength(fe); cnr = dddvb_get_cnr(fe); - printf("stat=%02x, str=%lld.%03llddB, snr=%lld.%03llddB \n", - stat, (long long int)str/1000, (long long int) abs(str%1000), - (long long int) cnr/1000, (long long int)abs(cnr%1000)); + printf("stat=%02x, str=%" PRId64 ".%03udBm, " + "snr=%" PRId64 ".%03uddB \n", + stat, str/1000, abs(str%1000), + cnr/1000, abs(cnr%1000)); sleep(1); } } else {