From cccf1318ce4e6238979e7e88c7c3d3bd94ef98fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Tue, 25 Jan 2005 00:22:14 +0000 Subject: [PATCH] second pass at getting rid of "ll" immediate literal format (64bit int) git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1904 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- alinco/alinco.c | 6 +++--- jrc/jrc.c | 6 +++--- kenwood/ic10.c | 27 +++++++++++---------------- kenwood/kenwood.c | 18 ++++++++---------- kenwood/th.c | 17 ++++++++--------- kenwood/tmv7.c | 9 +++++---- pcr/pcr.c | 20 ++++++++++---------- tentec/orion.c | 6 +++--- tests/memsave.c | 8 ++++---- tests/rigctl.c | 14 ++++---------- tests/rigmem.c | 10 ++-------- tests/testbcd.c | 8 ++++++-- tests/testfreq.c | 16 ++++++++++------ uniden/uniden.c | 6 +++--- yaesu/ft100.c | 4 ++-- yaesu/ft1000mp.c | 14 +++++++------- yaesu/ft747.c | 8 ++++---- yaesu/ft817.c | 6 +++--- yaesu/ft847.c | 6 +++--- yaesu/ft857.c | 4 ++-- yaesu/ft890.c | 12 ++++++------ yaesu/ft897.c | 4 ++-- yaesu/ft900.c | 12 ++++++------ yaesu/ft920.c | 12 ++++++------ yaesu/ft990.c | 6 +++--- 25 files changed, 124 insertions(+), 135 deletions(-) diff --git a/alinco/alinco.c b/alinco/alinco.c index 8c157e416..2af17c0d9 100644 --- a/alinco/alinco.c +++ b/alinco/alinco.c @@ -2,7 +2,7 @@ * Hamlib Alinco backend - main file * Copyright (c) 2001-2005 by Stephane Fillod * - * $Id: alinco.c,v 1.25 2005-01-24 23:03:25 fillods Exp $ + * $Id: alinco.c,v 1.26 2005-01-25 00:19:38 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -214,7 +214,7 @@ int alinco_set_freq(RIG *rig, vfo_t vfo, freq_t freq) return -RIG_EINVAL; /* at least 6 digits */ - freq_len = sprintf(freqbuf, AL CMD_RXFREQ "%06Ld" EOM, (long long)freq); + freq_len = sprintf(freqbuf, AL CMD_RXFREQ "%06"PRIll EOM, (long long)freq); return alinco_transaction (rig, freqbuf, freq_len, NULL, NULL); } @@ -409,7 +409,7 @@ int alinco_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) return -RIG_EINVAL; /* at least 6 digits */ - freq_len = sprintf(freqbuf, AL CMD_TXFREQ "%06Ld" EOM, (long long)tx_freq); + freq_len = sprintf(freqbuf, AL CMD_TXFREQ "%06"PRIll EOM, (long long)tx_freq); retval = alinco_transaction (rig, freqbuf, freq_len, NULL, NULL); diff --git a/jrc/jrc.c b/jrc/jrc.c index a3bf98ad5..32161d0e0 100644 --- a/jrc/jrc.c +++ b/jrc/jrc.c @@ -2,7 +2,7 @@ * Hamlib JRC backend - main file * Copyright (c) 2001-2005 by Stephane Fillod * - * $Id: jrc.c,v 1.20 2005-01-24 23:03:58 fillods Exp $ + * $Id: jrc.c,v 1.21 2005-01-25 00:19:41 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -125,7 +125,7 @@ int jrc_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (freq >= (freq_t)pow(10, priv->max_freq_len)) return -RIG_EINVAL; - freq_len = sprintf(freqbuf, "F%0*Ld" EOM, priv->max_freq_len, (long long)freq); + freq_len = sprintf(freqbuf, "F%0*"PRIll EOM, priv->max_freq_len, (long long)freq); return jrc_transaction (rig, freqbuf, freq_len, NULL, NULL); } @@ -1091,7 +1091,7 @@ int jrc_set_chan(RIG *rig, const channel_t *chan) default: cmdbuf[6] = MD_AM; } - sprintf(cmdbuf+7,"%0*Ld", priv->max_freq_len, (long long)chan->freq); + sprintf(cmdbuf+7,"%0*"PRIll, priv->max_freq_len, (long long)chan->freq); if (priv->mem_len==17) { switch (chan->levels[rig_setting2idx(RIG_LEVEL_AGC)].i) { diff --git a/kenwood/ic10.c b/kenwood/ic10.c index 7aaed2e86..3c5644668 100644 --- a/kenwood/ic10.c +++ b/kenwood/ic10.c @@ -2,9 +2,9 @@ * Hamlib Kenwood backend - IC-10 interface for: * TS-940, TS-811, TS-711, TS-440, and R-5000 * - * Copyright (c) 2000-2004 by Stephane Fillod and others + * Copyright (c) 2000-2005 by Stephane Fillod and others * - * $Id: ic10.c,v 1.3 2004-06-13 12:38:41 fillods Exp $ + * $Id: ic10.c,v 1.4 2005-01-25 00:20:04 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -273,7 +273,6 @@ int ic10_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { unsigned char infobuf[50]; int retval; - long long f; if (vfo != RIG_VFO_CURR) { /* targeted freq retrieval */ @@ -288,8 +287,7 @@ int ic10_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) /* IFggmmmkkkhhhxxxxxrrrrrssxcctmfcp */ infobuf[13] = '\0'; - sscanf(infobuf+2, "%011lld", &f); - *freq = (freq_t)f; + sscanf(infobuf+2, "%011"SCNfreq, freq); return RIG_OK; } @@ -320,7 +318,7 @@ int ic10_set_freq(RIG *rig, vfo_t vfo, freq_t freq) return -RIG_EINVAL; } - freq_len = sprintf(freqbuf,"F%c%011Ld;", vfo_letter, (long long)freq); + freq_len = sprintf(freqbuf,"F%c%011"PRIll";", vfo_letter, (long long)freq); retval = ic10_transaction (rig, freqbuf, freq_len, ackbuf, &ack_len); return retval; @@ -463,7 +461,6 @@ int ic10_get_channel(RIG *rig, channel_t *chan) { char membuf[16],infobuf[32]; int retval,info_len,len; - long long freq; len = sprintf(membuf,"MR0 %02d;",chan->channel_num); info_len = 24; @@ -489,8 +486,7 @@ int ic10_get_channel(RIG *rig, channel_t *chan) /* infobuf[17] = ' '; */ infobuf[17] = '\0'; - sscanf(infobuf+6, "%011lld", &freq); - chan->freq = (freq_t)freq; + sscanf(infobuf+6, "%011"SCNfreq, &chan->freq); chan->vfo=RIG_VFO_MEM; /* TX VFO (Split channel only) */ @@ -518,8 +514,7 @@ int ic10_get_channel(RIG *rig, channel_t *chan) /* infobuf[17] = ' '; */ infobuf[17] = '\0'; - sscanf(infobuf+6, "%011lld", &freq); - chan->tx_freq = (freq_t)freq; + sscanf(infobuf+6, "%011"SCNfreq, &chan->tx_freq); } return RIG_OK; @@ -548,7 +543,7 @@ int ic10_set_channel(RIG *rig, const channel_t *chan) } /* MWnxrrggmmmkkkhhhdzxxxx; */ - len = sprintf(membuf,"MW0 %02d%011lld%c0 ;", + len = sprintf(membuf,"MW0 %02d%011"PRIll"%c0 ;", chan->channel_num, freq, md @@ -574,7 +569,7 @@ int ic10_set_channel(RIG *rig, const channel_t *chan) } /* MWnxrrggmmmkkkhhhdzxxxx; */ - len = sprintf(membuf,"MW1 %02d%011lld%c0 ;", + len = sprintf(membuf,"MW1 %02d%011"PRIll"%c0 ;", chan->channel_num, freq, md @@ -869,7 +864,7 @@ int ic10_decode_event (RIG *rig) char asyncbuf[128],c; int retval,async_len=128; vfo_t vfo; - long long freq; + freq_t freq; rmode_t mode; ptt_t ptt; @@ -923,14 +918,14 @@ int ic10_decode_event (RIG *rig) ptt = asyncbuf[priv->if_len-5] == '0' ? RIG_PTT_OFF : RIG_PTT_ON; asyncbuf[13] = '\0'; - sscanf(asyncbuf+2, "%011lld", &freq); + sscanf(asyncbuf+2, "%011"SCNfreq, &freq); /* Callback execution */ if (rig->callbacks.vfo_event) { rig->callbacks.vfo_event(rig, vfo, rig->callbacks.vfo_arg); } if (rig->callbacks.freq_event) { - rig->callbacks.freq_event(rig, vfo, (freq_t)freq, rig->callbacks.freq_arg); + rig->callbacks.freq_event(rig, vfo, freq, rig->callbacks.freq_arg); } if (rig->callbacks.mode_event) { rig->callbacks.mode_event(rig, vfo, mode, RIG_PASSBAND_NORMAL, diff --git a/kenwood/kenwood.c b/kenwood/kenwood.c index 62fbc6e20..6e45e275c 100644 --- a/kenwood/kenwood.c +++ b/kenwood/kenwood.c @@ -1,8 +1,8 @@ /* * Hamlib Kenwood backend - main file - * Copyright (c) 2000-2004 by Stephane Fillod and others + * Copyright (c) 2000-2005 by Stephane Fillod and others * - * $Id: kenwood.c,v 1.81 2004-12-27 12:53:01 f4dwv Exp $ + * $Id: kenwood.c,v 1.82 2005-01-25 00:20:30 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -374,7 +374,7 @@ int kenwood_set_freq(RIG *rig, vfo_t vfo, freq_t freq) vfo); return -RIG_EINVAL; } - freq_len = sprintf(freqbuf,"F%c%011Ld;", vfo_letter, (long long)freq); + freq_len = sprintf(freqbuf,"F%c%011"PRIll";", vfo_letter, (long long)freq); ack_len = 0; retval = kenwood_transaction (rig, freqbuf, freq_len, ackbuf, &ack_len); @@ -392,7 +392,6 @@ int kenwood_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) unsigned char cmdbuf[4]; int cmd_len, freq_len, retval; char vfo_letter; - long long f; vfo_t tvfo; if(vfo==RIG_VFO_CURR) tvfo=rig->state.current_vfo; @@ -403,8 +402,8 @@ int kenwood_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) case RIG_VFO_B: vfo_letter = 'B'; break; case RIG_VFO_C: vfo_letter = 'C'; break; default: - rig_debug(RIG_DEBUG_ERR,"kenwood_get_freq: unsupported VFO %d\n", - vfo); + rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %d\n", + __FUNCTION__, vfo); return -RIG_EINVAL; } @@ -416,13 +415,12 @@ int kenwood_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) return retval; if (freq_len != 14 || freqbuf[0] != 'F') { - rig_debug(RIG_DEBUG_ERR,"kenwood_get_freq: unexpected answer %s, " - "len=%d\n", freqbuf, freq_len); + rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer %s, " + "len=%d\n", __FUNCTION__, freqbuf, freq_len); return -RIG_ERJCTED; } - sscanf(freqbuf+2, "%lld", &f); - *freq = (freq_t)f; + sscanf(freqbuf+2, "%"SCNfreq, freq); return RIG_OK; } diff --git a/kenwood/th.c b/kenwood/th.c index cbc503d65..c8e0dc3f1 100644 --- a/kenwood/th.c +++ b/kenwood/th.c @@ -2,7 +2,7 @@ * Hamlib Kenwood backend - TH handheld primitives * Copyright (c) 2001-2005 by Stephane Fillod * - * $Id: th.c,v 1.26 2005-01-24 23:04:03 fillods Exp $ + * $Id: th.c,v 1.27 2005-01-25 00:20:33 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -33,6 +33,7 @@ #include "kenwood.h" #include "th.h" #include "serial.h" +#include "misc.h" const struct kenwood_priv_caps th_priv_caps = { .cmdtrm = EOM_TH, @@ -94,7 +95,7 @@ th_decode_event (RIG *rig) vfo = (vfo == 0) ? RIG_VFO_A : RIG_VFO_B; mode = (mode == 0) ? RIG_MODE_FM : RIG_MODE_AM; - rig_debug(RIG_DEBUG_TRACE, "%s: Buffer (vfo %d, freq %lld Hz, mode %d)\n", __FUNCTION__, vfo, freq, mode); + rig_debug(RIG_DEBUG_TRACE, "%s: Buffer (vfo %d, freq %"PRIfreq" Hz, mode %d)\n", __FUNCTION__, vfo, freq, mode); /* Callback execution */ if (rig->callbacks.vfo_event) { @@ -193,7 +194,7 @@ th_set_freq (RIG *rig, vfo_t vfo, freq_t freq) step = 1; f=(long long) freq; - sprintf(freqbuf, "FQ %011lld,%1d"EOM, f, step); + sprintf(freqbuf, "FQ %011"PRIll",%1d"EOM, f, step); retval = kenwood_transaction(rig, freqbuf, strlen(freqbuf), ackbuf, &ack_len); if (retval != RIG_OK) return retval; @@ -210,7 +211,6 @@ th_get_freq (RIG *rig, vfo_t vfo, freq_t *freq) { char freqbuf[24], ackbuf[ACKBUF_LEN]; int retval, step,ack_len=ACKBUF_LEN; - long long f; rig_debug(RIG_DEBUG_TRACE, "%s: called\n", __FUNCTION__); @@ -226,13 +226,12 @@ th_get_freq (RIG *rig, vfo_t vfo, freq_t *freq) if (retval != RIG_OK) return retval; - retval = sscanf(ackbuf, "FQ %lld,%d",&f,&step); + retval = sscanf(ackbuf, "FQ %"SCNfreq",%d",freq,&step); if (retval != 2) { rig_debug(RIG_DEBUG_ERR, "%s: Unexpected reply '%s'\n", __FUNCTION__, freqbuf); return -RIG_ERJCTED; } - *freq=(freq_t)f; return RIG_OK; } @@ -1298,11 +1297,11 @@ int th_set_channel(RIG *rig, const channel_t *chan) return -RIG_EINVAL; if(chan->channel_num<=220) - sprintf(membuf, "%s,%011lld,%01d,%01d,0,%01d,%01d,,%02d,,%02d,%09lld,0"EOM, + sprintf(membuf, "%s,%011"PRIll",%01d,%01d,0,%01d,%01d,,%02d,,%02d,%09"PRIll",0"EOM, req,(long long)freq, step, shift, tone, ctcss, tonefq, ctcssfq, (long long)offset); else - sprintf(membuf, "%s,%011lld,%01d,%01d,0,%01d,%01d,,%02d,,%02d,%09lld"EOM, + sprintf(membuf, "%s,%011"PRIll",%01d,%01d,0,%01d,%01d,,%02d,,%02d,%09"PRIll EOM, req, (long long)freq, step, shift, tone, ctcss, tonefq, ctcssfq, (long long)offset); @@ -1313,7 +1312,7 @@ int th_set_channel(RIG *rig, const channel_t *chan) if(chan->channel_num<223 && chan->tx_freq!=RIG_FREQ_NONE) { req[5]='1'; - sprintf(membuf, "%s,%011lld,%01d"EOM, req,(long long)chan->tx_freq, step); + sprintf(membuf, "%s,%011"PRIll",%01d"EOM, req,(long long)chan->tx_freq, step); ack_len=ACKBUF_LEN; retval = kenwood_transaction(rig, membuf, strlen(membuf), ackbuf, &ack_len); if (retval != RIG_OK) diff --git a/kenwood/tmv7.c b/kenwood/tmv7.c index dc96e3fa6..f1aa363e0 100644 --- a/kenwood/tmv7.c +++ b/kenwood/tmv7.c @@ -2,7 +2,7 @@ * Hamlib Kenwood backend - TM-V7 description * Copyright (c) 2004-2005 by Stephane Fillod * - * $Id: tmv7.c,v 1.8 2005-01-24 23:04:16 fillods Exp $ + * $Id: tmv7.c,v 1.9 2005-01-25 00:20:36 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -32,6 +32,7 @@ #include #include "kenwood.h" #include "th.h" +#include "misc.h" #if 1 #define RIG_ASSERT(x) if (!(x)) { rig_debug(RIG_DEBUG_ERR, "Assertion failed on line %i\n",__LINE__); abort(); } @@ -615,11 +616,11 @@ int tmv7_set_channel(RIG *rig, const channel_t *chan) return -RIG_EINVAL; if(chan->channel_num<221) - sprintf(membuf, "%s,%011lld,%01d,%01d,0,%01d,%01d,0,%02d,000,%02d,0,0"EOM, + sprintf(membuf, "%s,%011"PRIll",%01d,%01d,0,%01d,%01d,0,%02d,000,%02d,0,0"EOM, req,(long long)freq, step, shift, tone, ctcss, tonefq, ctcssfq); else - sprintf(membuf, "%s,%011lld,%01d,%01d,0,%01d,%01d,0,%02d,000,%02d,"EOM, + sprintf(membuf, "%s,%011"PRIll",%01d,%01d,0,%01d,%01d,0,%02d,000,%02d,"EOM, req, (long long)freq, step, shift, tone, ctcss, tonefq, ctcssfq); @@ -630,7 +631,7 @@ int tmv7_set_channel(RIG *rig, const channel_t *chan) if(chan->tx_freq!=RIG_FREQ_NONE) { req[5]='1'; - sprintf(membuf, "%s,%011lld,%01d"EOM, req,(long long)chan->tx_freq, step); + sprintf(membuf, "%s,%011"PRIll",%01d"EOM, req,(long long)chan->tx_freq, step); ack_len=ACKBUF_LEN; retval = kenwood_transaction(rig, membuf, strlen(membuf), ackbuf, &ack_len); if (retval != RIG_OK) diff --git a/pcr/pcr.c b/pcr/pcr.c index eb4f31408..c9ee1833c 100644 --- a/pcr/pcr.c +++ b/pcr/pcr.c @@ -1,8 +1,8 @@ /* * Hamlib PCR backend - main file - * Copyright (c) 2001-2003 by Stephane Fillod and Darren Hatcher + * Copyright (c) 2001-2005 by Stephane Fillod and Darren Hatcher * - * $Id: pcr.c,v 1.20 2003-10-20 22:15:02 fillods Exp $ + * $Id: pcr.c,v 1.21 2005-01-25 00:20:40 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -269,7 +269,7 @@ int pcr_set_freq(RIG *rig, vfo_t vfo, freq_t freq) priv = (struct pcr_priv_data *)rig->state.priv; - freq_len = sprintf(freqbuf,"K0%010Ld0%c0%c00" EOM, (long long)freq, + freq_len = sprintf(freqbuf,"K0%010"PRIll"0%c0%c00" EOM, (long long)freq, priv->last_mode, priv->last_filter); ack_len = 6; @@ -328,8 +328,8 @@ int pcr_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case RIG_MODE_WFM: pcrmode = MD_WFM; pcrfilter = FLT_230kHz; break; case RIG_MODE_FM: pcrmode = MD_FM; pcrfilter = FLT_15kHz; break; default: - rig_debug(RIG_DEBUG_ERR,"pcr_set_mode: unsupported mode %d\n", - mode); + rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode %d\n", + __FUNCTION__, mode); return -RIG_EINVAL; } @@ -345,12 +345,12 @@ int pcr_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) case s_kHz(50): pcrfilter = FLT_50kHz; break; case s_kHz(230): pcrfilter = FLT_230kHz; break; default: - rig_debug(RIG_DEBUG_ERR,"pcr_set_mode: unsupported " - "width %d\n", width); + rig_debug(RIG_DEBUG_ERR,"%s: unsupported " + "width %d\n", __FUNCTION__, width); return -RIG_EINVAL; } - mdbuf_len = sprintf(mdbuf,"K0%010Ld0%c0%c00" EOM, (long long)priv->last_freq, + mdbuf_len = sprintf(mdbuf,"K0%010"PRIll"0%c0%c00" EOM, (long long)priv->last_freq, pcrmode, pcrfilter); ack_len = 6; @@ -359,8 +359,8 @@ int pcr_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) return retval; if (ack_len != 6 && ack_len != 4) { - rig_debug(RIG_DEBUG_ERR,"pcr_set_mode: ack NG, len=%d\n", - ack_len); + rig_debug(RIG_DEBUG_ERR,"%s: ack NG, len=%d\n", + __FUNCTION__, ack_len); return -RIG_ERJCTED; } diff --git a/tentec/orion.c b/tentec/orion.c index 6400bb530..7b9d25dbe 100644 --- a/tentec/orion.c +++ b/tentec/orion.c @@ -1,8 +1,8 @@ /* * Hamlib TenTenc backend - TT-565 description - * Copyright (c) 2004 by Stephane Fillod + * Copyright (c) 2004-2005 by Stephane Fillod * - * $Id: orion.c,v 1.2 2004-06-14 21:15:20 fillods Exp $ + * $Id: orion.c,v 1.3 2005-01-25 00:21:29 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -354,7 +354,7 @@ int tt565_set_freq(RIG *rig, vfo_t vfo, freq_t freq) int cmd_len, retval; unsigned char cmdbuf[16]; - cmd_len = sprintf (cmdbuf, "*%cF%lld" EOM, + cmd_len = sprintf (cmdbuf, "*%cF%"PRIll EOM, which_vfo(rig, vfo), (long long)freq); diff --git a/tests/memsave.c b/tests/memsave.c index 0bfaee575..8f841a586 100644 --- a/tests/memsave.c +++ b/tests/memsave.c @@ -1,8 +1,8 @@ /* - * memsave.c - Copyright (C) 2003-2004 Thierry Leconte + * memsave.c - Copyright (C) 2003-2005 Thierry Leconte * * - * $Id: memsave.c,v 1.7 2004-12-27 12:53:02 f4dwv Exp $ + * $Id: memsave.c,v 1.8 2005-01-25 00:21:44 fillods Exp $ * * * This program is free software; you can redistribute it and/or @@ -143,7 +143,7 @@ int dump_xml_chan(RIG *rig, xmlNodePtr root, int i, int chan_num) xmlNewProp(node, "ant", attrbuf); } if (rig->state.chan_list[i].mem_caps.freq && chan.freq != RIG_FREQ_NONE) { - sprintf(attrbuf,"%lld",(long long)chan.freq); + sprintf(attrbuf,"%"PRIll,(long long)chan.freq); xmlNewProp(node, "freq", attrbuf); } if (rig->state.chan_list[i].mem_caps.mode && chan.mode != RIG_MODE_NONE) { @@ -154,7 +154,7 @@ int dump_xml_chan(RIG *rig, xmlNodePtr root, int i, int chan_num) xmlNewProp(node, "width", attrbuf); } if (rig->state.chan_list[i].mem_caps.tx_freq && chan.tx_freq != RIG_FREQ_NONE) { - sprintf(attrbuf,"%lld",(long long)chan.tx_freq); + sprintf(attrbuf,"%"PRIll,(long long)chan.tx_freq); xmlNewProp(node, "tx_freq", attrbuf); } if (rig->state.chan_list[i].mem_caps.tx_mode && chan.tx_mode != RIG_MODE_NONE) { diff --git a/tests/rigctl.c b/tests/rigctl.c index dd0416bd5..b67465486 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -5,7 +5,7 @@ * It takes commands in interactive mode as well as * from command line options. * - * $Id: rigctl.c,v 1.53 2005-01-24 23:04:26 fillods Exp $ + * $Id: rigctl.c,v 1.54 2005-01-25 00:21:46 fillods Exp $ * * * This program is free software; you can redistribute it and/or @@ -41,12 +41,6 @@ #include "misc.h" #include "sprintflst.h" -#ifdef _WIN32 -#define LLFMT "L" -#else -#define LLFMT "ll" -#endif - #define MAXNAMSIZ 32 #define MAXNBOPT 100 /* max number of different options */ @@ -815,7 +809,7 @@ declare_proto_rig(get_freq) return status; if (interactive) printf("%s: ", cmd->arg1); /* i.e. "Frequency" */ - printf("%lld\n", (long long)freq); + printf("%"PRIll"\n", (long long)freq); return status; } @@ -1053,7 +1047,7 @@ declare_proto_rig(get_split_freq) return status; if (interactive) printf("%s: ", cmd->arg1); - printf("%lld\n", (long long)txfreq); + printf("%"PRIll"\n", (long long)txfreq); return status; } @@ -1453,7 +1447,7 @@ declare_proto_rig(get_channel) static int myfreq_event(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg) { - printf("Event: freq changed to %lliHz on %s\n", (long long)freq, rig_strvfo(vfo)); + printf("Event: freq changed to %"PRIll"Hz on %s\n", (long long)freq, rig_strvfo(vfo)); return 0; } diff --git a/tests/rigmem.c b/tests/rigmem.c index c5c4d60d7..877a72b70 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -1,10 +1,10 @@ /* - * rigmem.c - (C) Stephane Fillod and Thierry Leconte 2003-2004 + * rigmem.c - (C) Stephane Fillod and Thierry Leconte 2003-2005 * * This program exercises the backup and restore of a radio * using Hamlib. * - * $Id: rigmem.c,v 1.2 2004-05-17 21:09:45 fillods Exp $ + * $Id: rigmem.c,v 1.3 2005-01-25 00:21:56 fillods Exp $ * * * This program is free software; you can redistribute it and/or @@ -40,12 +40,6 @@ #include "misc.h" #include "sprintflst.h" -#ifdef _WIN32 -#define LLFMT "L" -#else -#define LLFMT "ll" -#endif - #define MAXNAMSIZ 32 #define MAXNBOPT 100 /* max number of different options */ diff --git a/tests/testbcd.c b/tests/testbcd.c index 51280ff43..c008dd03c 100644 --- a/tests/testbcd.c +++ b/tests/testbcd.c @@ -4,6 +4,10 @@ * This is mainly to test freq2bcd and bcd2freq functions. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -36,7 +40,7 @@ int main (int argc, char *argv[]) printf("BCD: %2.2x",b[0]); for (i = 1; i < (digits+1)/2; i++) printf(",%2.2x",b[i]); - printf("\nResult after recoding: %llu\n", from_bcd(b, digits)); + printf("\nResult after recoding: %"SCNll"\n", from_bcd(b, digits)); printf("\nBig Endian mode\n"); printf("Frequency: %"PRIfreq"\n",f); @@ -44,7 +48,7 @@ int main (int argc, char *argv[]) printf("BCD: %2.2x",b[0]); for (i = 1; i < (digits+1)/2; i++) printf(",%2.2x",b[i]); - printf("\nResult after recoding: %llu\n", from_bcd_be(b, digits)); + printf("\nResult after recoding: %"SCNll"\n", from_bcd_be(b, digits)); return 0; } diff --git a/tests/testfreq.c b/tests/testfreq.c index 6d3b7a91a..57c58351d 100644 --- a/tests/testfreq.c +++ b/tests/testfreq.c @@ -4,6 +4,10 @@ * This is mainly to test kHz, MHz, GHz macros and long long support. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -32,27 +36,27 @@ int main (int argc, char *argv[]) /* freq on 31bits test */ f = GHz(2); - printf("GHz(2) = %lld\n", (long long)f); + printf("GHz(2) = %"PRIll"\n", (long long)f); /* freq on 32bits test */ f = GHz(4); - printf("GHz(4) = %lld\n", (long long)f); + printf("GHz(4) = %"PRIll"\n", (long long)f); /* freq on >32bits test */ f = GHz(5); - printf("GHz(5) = %lld\n", (long long)f); + printf("GHz(5) = %"PRIll"\n", (long long)f); /* floating point to freq conversion test */ f = GHz(1.3); - printf("GHz(1.3) = %lld\n", (long long)f); + printf("GHz(1.3) = %"PRIll"\n", (long long)f); /* floating point to freq conversion precision test */ f = GHz(1.234567890); - printf("GHz(1.234567890) = %lld\n", (long long)f); + printf("GHz(1.234567890) = %"PRIll"\n", (long long)f); /* floating point to freq conversion precision test, with freq >32bits */ f = GHz(123.456789012); - printf("GHz(123.456789012) = %lld\n", (long long)f); + printf("GHz(123.456789012) = %"PRIll"\n", (long long)f); return 0; } diff --git a/uniden/uniden.c b/uniden/uniden.c index 0feda58ca..2fae51b8b 100644 --- a/uniden/uniden.c +++ b/uniden/uniden.c @@ -1,8 +1,8 @@ /* * Hamlib Uniden backend - main file - * Copyright (c) 2001-2004 by Stephane Fillod + * Copyright (c) 2001-2005 by Stephane Fillod * - * $Id: uniden.c,v 1.9 2004-02-08 16:59:48 fillods Exp $ + * $Id: uniden.c,v 1.10 2005-01-25 00:21:56 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -93,7 +93,7 @@ int uniden_set_freq(RIG *rig, vfo_t vfo, freq_t freq) return -RIG_EINVAL; /* exactly 8 digits */ - freq_len = sprintf(freqbuf, "RF%08Ld" EOM, (long long)freq); + freq_len = sprintf(freqbuf, "RF%08"PRIll EOM, (long long)freq); return uniden_transaction (rig, freqbuf, freq_len, NULL, NULL); } diff --git a/yaesu/ft100.c b/yaesu/ft100.c index 4f6d24156..bd0937aea 100644 --- a/yaesu/ft100.c +++ b/yaesu/ft100.c @@ -7,7 +7,7 @@ * The starting point for this code was Frank's ft847 implementation. * * - * $Id: ft100.c,v 1.15 2005-01-24 23:04:29 fillods Exp $ + * $Id: ft100.c,v 1.16 2005-01-25 00:21:58 fillods Exp $ * * * This library is free software; you can redistribute it and/or @@ -467,7 +467,7 @@ int ft100_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { rig_debug(RIG_DEBUG_VERBOSE,"ft100: d1=%"PRIfreq" d2=%"PRIfreq"\n",d1,d2); - sprintf(sfreq,"%8lli",(long long)d2); + sprintf(sfreq,"%8"PRIll,(long long)d2); rig_debug(RIG_DEBUG_VERBOSE,"ft100: get_freq= %s \n",sfreq); diff --git a/yaesu/ft1000mp.c b/yaesu/ft1000mp.c index 8352777ac..02cfff130 100644 --- a/yaesu/ft1000mp.c +++ b/yaesu/ft1000mp.c @@ -1,10 +1,10 @@ /* - * ft1000.c - (C) Stephane Fillod 2002-2004 (fillods@users.sourceforge.net) + * ft1000.c - (C) Stephane Fillod 2002-2005 (fillods@users.sourceforge.net) * * This shared library provides an API for communicating * via serial interface to an FT-1000MP using the "CAT" interface * - * $Id: ft1000mp.c,v 1.4 2004-05-17 21:09:41 fillods Exp $ + * $Id: ft1000mp.c,v 1.5 2005-01-25 00:21:58 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -425,7 +425,7 @@ int ft1000mp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { rig_s = &rig->state; - rig_debug(RIG_DEBUG_TRACE,"ft1000mp: requested freq = %lli Hz \n", freq); + rig_debug(RIG_DEBUG_TRACE,"ft1000mp: requested freq = %"PRIfreq" Hz \n", freq); if (vfo == RIG_VFO_CURR) vfo = p->current_vfo; @@ -452,7 +452,7 @@ int ft1000mp_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { to_bcd(p->p_cmd,freq/10,8); /* store bcd format in in p_cmd */ /* TODO -- fix 10Hz resolution -- FS */ - rig_debug(RIG_DEBUG_TRACE,"ft1000mp: requested freq after conversion = %lli Hz\n", + rig_debug(RIG_DEBUG_TRACE,"ft1000mp: requested freq after conversion = %"PRIll" Hz\n", from_bcd(p->p_cmd,8)* 10 ); cmd = p->p_cmd; /* get native sequence */ @@ -503,7 +503,7 @@ int ft1000mp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { /* big endian integer, kinda */ f = ((((((p[0]<<8) + p[1])<<8) + p[2])<<8) + p[3])*10/16; - rig_debug(RIG_DEBUG_TRACE,"ft1000mp: freq = %lli Hz for VFO [%x]\n", f, vfo); + rig_debug(RIG_DEBUG_TRACE,"ft1000mp: freq = %"PRIfreq" Hz for VFO [%x]\n", f, vfo); *freq = f; /* return diplayed frequency */ @@ -820,7 +820,7 @@ int ft1000mp_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit) { f = f*10/16; - rig_debug(RIG_DEBUG_TRACE,"ft1000mp: freq = %lli Hz for VFO [%x]\n", f, vfo); + rig_debug(RIG_DEBUG_TRACE,"ft1000mp: freq = %li Hz for VFO [%x]\n", f, vfo); *rit = f; /* return diplayed frequency */ @@ -905,7 +905,7 @@ int ft1000mp_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit) { f = f*10/16; - rig_debug(RIG_DEBUG_TRACE,"ft1000mp: freq = %lli Hz for VFO [%x]\n", f, vfo); + rig_debug(RIG_DEBUG_TRACE,"ft1000mp: freq = %li Hz for VFO [%x]\n", f, vfo); *xit = f; /* return diplayed frequency */ diff --git a/yaesu/ft747.c b/yaesu/ft747.c index 9c13eb9a3..4e9de9d7f 100644 --- a/yaesu/ft747.c +++ b/yaesu/ft747.c @@ -7,7 +7,7 @@ * box (FIF-232C) or similar * * - * $Id: ft747.c,v 1.20 2003-10-01 19:34:08 fillods Exp $ + * $Id: ft747.c,v 1.21 2005-01-25 00:21:58 fillods Exp $ * * * This library is free software; you can redistribute it and/or @@ -380,7 +380,7 @@ int ft747_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { rig_s = &rig->state; - rig_debug(RIG_DEBUG_VERBOSE,"ft747: requested freq = %lli Hz \n", freq); + rig_debug(RIG_DEBUG_VERBOSE,"ft747: requested freq = %"PRIfreq" Hz \n", freq); /* frontend sets VFO now , if targetable_vfo = 0 */ @@ -397,7 +397,7 @@ int ft747_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { to_bcd(p->p_cmd,freq/10,8); /* store bcd format in in p_cmd */ /* TODO -- fix 10Hz resolution -- FS */ - rig_debug(RIG_DEBUG_VERBOSE,"ft747: requested freq after conversion = %lli Hz \n", from_bcd(p->p_cmd,8)* 10 ); + rig_debug(RIG_DEBUG_VERBOSE,"ft747: requested freq after conversion = %"PRIll" Hz \n", from_bcd(p->p_cmd,8)* 10 ); cmd = p->p_cmd; /* get native sequence */ write_block(&rig_s->rigport, cmd, YAESU_CMD_LENGTH); @@ -437,7 +437,7 @@ int ft747_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { return -RIG_EINVAL; /* sorry, wrong VFO */ } - rig_debug(RIG_DEBUG_VERBOSE,"ft747: freq = %lli Hz for VFO = %u \n", f, vfo); + rig_debug(RIG_DEBUG_VERBOSE,"ft747: freq = %"PRIfreq" Hz for VFO = %u \n", f, vfo); (*freq) = f; /* return diplayed frequency */ diff --git a/yaesu/ft817.c b/yaesu/ft817.c index a783d50b6..b47440639 100644 --- a/yaesu/ft817.c +++ b/yaesu/ft817.c @@ -7,7 +7,7 @@ * The starting point for this code was Frank's ft847 implementation. * * - * $Id: ft817.c,v 1.9 2003-10-01 19:34:08 fillods Exp $ + * $Id: ft817.c,v 1.10 2005-01-25 00:21:58 fillods Exp $ * * * This library is free software; you can redistribute it and/or @@ -336,7 +336,7 @@ int ft817_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { rig_s = &rig->state; - rig_debug(RIG_DEBUG_VERBOSE,"ft817: requested freq = %lli Hz \n", freq); + rig_debug(RIG_DEBUG_VERBOSE,"ft817: requested freq = %"PRIfreq" Hz \n", freq); rig_debug(RIG_DEBUG_VERBOSE,"ft817: vfo =%i \n", vfo); if( ( vfo != RIG_VFO_CURR ) && @@ -358,7 +358,7 @@ int ft817_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { to_bcd_be(p->p_cmd,freq/10,8); /* store bcd format in in p_cmd */ /* TODO -- fix 10Hz resolution -- FS */ - rig_debug(RIG_DEBUG_VERBOSE,"ft817: requested freq after conversion = %lli Hz \n", from_bcd_be(p->p_cmd,8)* 10 ); + rig_debug(RIG_DEBUG_VERBOSE,"ft817: requested freq after conversion = %"PRIll" Hz \n", from_bcd_be(p->p_cmd,8)* 10 ); cmd = p->p_cmd; /* get native sequence */ write_block(&rig_s->rigport, cmd, YAESU_CMD_LENGTH); diff --git a/yaesu/ft847.c b/yaesu/ft847.c index 004d835f6..44be049e1 100644 --- a/yaesu/ft847.c +++ b/yaesu/ft847.c @@ -6,7 +6,7 @@ * via serial interface to an FT-847 using the "CAT" interface. * * - * $Id: ft847.c,v 1.29 2004-11-17 22:02:03 fillods Exp $ + * $Id: ft847.c,v 1.30 2005-01-25 00:21:58 fillods Exp $ * * * @@ -453,7 +453,7 @@ int ft847_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { rig_s = &rig->state; - rig_debug(RIG_DEBUG_VERBOSE,"ft847: requested freq = %lli Hz \n", freq); + rig_debug(RIG_DEBUG_VERBOSE,"ft847: requested freq = %"PRIfreq" Hz \n", freq); /* @@ -480,7 +480,7 @@ int ft847_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { to_bcd_be(p->p_cmd,freq/10,8); /* store bcd format in in p_cmd */ /* TODO -- fix 10Hz resolution -- FS */ - rig_debug(RIG_DEBUG_VERBOSE,"ft847: requested freq after conversion = %lli Hz \n", from_bcd_be(p->p_cmd,8)* 10 ); + rig_debug(RIG_DEBUG_VERBOSE,"ft847: requested freq after conversion = %"PRIll" Hz \n", from_bcd_be(p->p_cmd,8)* 10 ); cmd = p->p_cmd; /* get native sequence */ write_block(&rig_s->rigport, cmd, YAESU_CMD_LENGTH); diff --git a/yaesu/ft857.c b/yaesu/ft857.c index 3107082d3..62c4eef70 100644 --- a/yaesu/ft857.c +++ b/yaesu/ft857.c @@ -13,7 +13,7 @@ * The starting point for this code was Frank's ft847 implementation. * * - * $Id: ft857.c,v 1.6 2004-09-26 08:35:05 fillods Exp $ + * $Id: ft857.c,v 1.7 2005-01-25 00:21:58 fillods Exp $ * * * This library is free software; you can redistribute it and/or @@ -633,7 +633,7 @@ int ft857_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (vfo != RIG_VFO_CURR) return -RIG_ENTARGET; - rig_debug(RIG_DEBUG_VERBOSE,"ft857: requested freq = %lli Hz\n", freq); + rig_debug(RIG_DEBUG_VERBOSE,"ft857: requested freq = %"PRIfreq" Hz\n", freq); /* fill in the frequency */ to_bcd_be(data, (freq + 5) / 10, 8); diff --git a/yaesu/ft890.c b/yaesu/ft890.c index 1a0e53de5..6878f64a5 100644 --- a/yaesu/ft890.c +++ b/yaesu/ft890.c @@ -2,14 +2,14 @@ * hamlib - (C) Frank Singleton 2000 (javabear at users.sourceforge.net) * * ft890.c - (C) Frank Singleton 2000 (javabear at users.sourceforge.net) - * (C) Stephane Fillod 2002, 2003 (fillods at users.sourceforge.net) + * (C) Stephane Fillod 2002-2005 (fillods at users.sourceforge.net) * (C) Nate Bargmann 2002, 2003 (n0nb at arrl.net) * * This shared library provides an API for communicating * via serial interface to an FT-890 using the "CAT" interface * * - * $Id: ft890.c,v 1.6 2003-04-12 13:00:16 n0nb Exp $ + * $Id: ft890.c,v 1.7 2005-01-25 00:21:58 fillods Exp $ * * * This library is free software; you can redistribute it and/or @@ -405,7 +405,7 @@ static int ft890_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { priv = (struct ft890_priv_data *)rig->state.priv; rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = 0x%02x\n", __func__, vfo); - rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %lli Hz\n", __func__, freq); + rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %"PRIfreq" Hz\n", __func__, freq); if (vfo == RIG_VFO_CURR) { vfo = priv->current_vfo; /* from previous vfo cmd */ @@ -487,7 +487,7 @@ static int ft890_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { f = ((((p[0]<<8) + p[1])<<8) + p[2]) * 10; rig_debug(RIG_DEBUG_TRACE, - "%s: freq = %lli Hz for vfo 0x%02x\n", __func__, f, vfo); + "%s: freq = %"PRIfreq" Hz for vfo 0x%02x\n", __func__, f, vfo); *freq = f; /* return displayed frequency */ @@ -1627,7 +1627,7 @@ static int ft890_send_dial_freq(RIG *rig, unsigned char ci, freq_t freq) { return -RIG_EINVAL; rig_debug(RIG_DEBUG_TRACE, "%s: passed ci = %i\n", __func__, ci); - rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %lli Hz\n", __func__, freq); + rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %"PRIfreq" Hz\n", __func__, freq); priv = (struct ft890_priv_data *)rig->state.priv; if (priv->pcs[ci].ncomp) { @@ -1645,7 +1645,7 @@ static int ft890_send_dial_freq(RIG *rig, unsigned char ci, freq_t freq) { to_bcd(priv->p_cmd, freq/10, FT890_BCD_DIAL); rig_debug(RIG_DEBUG_TRACE, - "%s: requested freq after conversion = %lli Hz\n", + "%s: requested freq after conversion = %"PRIll" Hz\n", __func__, from_bcd(priv->p_cmd, FT890_BCD_DIAL)* 10); err = write_block(&rig_s->rigport, (unsigned char *) &priv->p_cmd, diff --git a/yaesu/ft897.c b/yaesu/ft897.c index 7c058e395..ff2f218e5 100644 --- a/yaesu/ft897.c +++ b/yaesu/ft897.c @@ -11,7 +11,7 @@ * The starting point for this code was Frank's ft847 implementation. * * - * $Id: ft897.c,v 1.3 2004-09-26 08:35:05 fillods Exp $ + * $Id: ft897.c,v 1.4 2005-01-25 00:21:58 fillods Exp $ * * * This library is free software; you can redistribute it and/or @@ -631,7 +631,7 @@ int ft897_set_freq(RIG *rig, vfo_t vfo, freq_t freq) if (vfo != RIG_VFO_CURR) return -RIG_ENTARGET; - rig_debug(RIG_DEBUG_VERBOSE,"ft897: requested freq = %lli Hz\n", freq); + rig_debug(RIG_DEBUG_VERBOSE,"ft897: requested freq = %"PRIfreq" Hz\n", freq); /* fill in the frequency */ to_bcd_be(data, (freq + 5) / 10, 8); diff --git a/yaesu/ft900.c b/yaesu/ft900.c index cfaadfbc6..5335f85c3 100644 --- a/yaesu/ft900.c +++ b/yaesu/ft900.c @@ -2,14 +2,14 @@ * hamlib - (C) Frank Singleton 2000 (javabear at users.sourceforge.net) * * ft900.c - (C) Frank Singleton 2000 (javabear at users.sourceforge.net) - * (C) Stephane Fillod 2002, 2003 (fillods at users.sourceforge.net) + * (C) Stephane Fillod 2002-2005 (fillods at users.sourceforge.net) * (C) Nate Bargmann 2002, 2003 (n0nb at arrl.net) * * This shared library provides an API for communicating * via serial interface to an FT-900 using the "CAT" interface * * - * $Id: ft900.c,v 1.1 2003-04-14 22:17:44 n0nb Exp $ + * $Id: ft900.c,v 1.2 2005-01-25 00:21:58 fillods Exp $ * * * This library is free software; you can redistribute it and/or @@ -405,7 +405,7 @@ static int ft900_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { priv = (struct ft900_priv_data *)rig->state.priv; rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = 0x%02x\n", __func__, vfo); - rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %lli Hz\n", __func__, freq); + rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %"PRIfreq" Hz\n", __func__, freq); if (vfo == RIG_VFO_CURR) { vfo = priv->current_vfo; /* from previous vfo cmd */ @@ -487,7 +487,7 @@ static int ft900_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { f = ((((p[0]<<8) + p[1])<<8) + p[2]) * 10; rig_debug(RIG_DEBUG_TRACE, - "%s: freq = %lli Hz for vfo 0x%02x\n", __func__, f, vfo); + "%s: freq = %"PRIfreq" Hz for vfo 0x%02x\n", __func__, f, vfo); *freq = f; /* return displayed frequency */ @@ -1627,7 +1627,7 @@ static int ft900_send_dial_freq(RIG *rig, unsigned char ci, freq_t freq) { return -RIG_EINVAL; rig_debug(RIG_DEBUG_TRACE, "%s: passed ci = %i\n", __func__, ci); - rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %lli Hz\n", __func__, freq); + rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %"PRIfreq" Hz\n", __func__, freq); priv = (struct ft900_priv_data *)rig->state.priv; if (priv->pcs[ci].ncomp) { @@ -1645,7 +1645,7 @@ static int ft900_send_dial_freq(RIG *rig, unsigned char ci, freq_t freq) { to_bcd(priv->p_cmd, freq/10, FT900_BCD_DIAL); rig_debug(RIG_DEBUG_TRACE, - "%s: requested freq after conversion = %lli Hz\n", + "%s: requested freq after conversion = %"PRIll" Hz\n", __func__, from_bcd(priv->p_cmd, FT900_BCD_DIAL)* 10); err = write_block(&rig_s->rigport, (unsigned char *) &priv->p_cmd, diff --git a/yaesu/ft920.c b/yaesu/ft920.c index bc287286a..adecd659b 100644 --- a/yaesu/ft920.c +++ b/yaesu/ft920.c @@ -3,7 +3,7 @@ * * ft920.c - (C) Frank Singleton 2000 (javabear at users.sourceforge.net) * (C) Nate Bargmann 2002-2005 (n0nb at arrl.net) - * (C) Stephane Fillod 2002 (fillods at users.sourceforge.net) + * (C) Stephane Fillod 2002-2005 (fillods at users.sourceforge.net) * * This shared library provides an API for communicating * via serial interface to an FT-920 using the "CAT" interface @@ -12,7 +12,7 @@ * pages 86 to 90 * * - * $Id: ft920.c,v 1.17 2005-01-18 23:06:48 n0nb Exp $ + * $Id: ft920.c,v 1.18 2005-01-25 00:21:58 fillods Exp $ * * * This library is free software; you can redistribute it and/or @@ -396,7 +396,7 @@ static int ft920_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { priv = (struct ft920_priv_data *)rig->state.priv; rig_debug(RIG_DEBUG_TRACE, "%s: passed vfo = 0x%02x\n", __func__, vfo); - rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %lli Hz\n", __func__, freq); + rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %"PRIfreq" Hz\n", __func__, freq); if (vfo == RIG_VFO_CURR) { vfo = priv->current_vfo; /* from previous vfo cmd */ @@ -482,7 +482,7 @@ static int ft920_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { /* big endian integer */ f = (((((p[0]<<8) + p[1])<<8) + p[2])<<8) + p[3]; - rig_debug(RIG_DEBUG_TRACE, "%s: freq = %lli Hz for vfo 0x%02x\n", __func__, f, vfo); + rig_debug(RIG_DEBUG_TRACE, "%s: freq = %"PRIfreq" Hz for vfo 0x%02x\n", __func__, f, vfo); *freq = f; /* return displayed frequency */ @@ -1471,7 +1471,7 @@ static int ft920_send_dial_freq(RIG *rig, unsigned char ci, freq_t freq) { return -RIG_EINVAL; rig_debug(RIG_DEBUG_TRACE, "%s: passed ci = %i\n", __func__, ci); - rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %lli Hz\n", __func__, freq); + rig_debug(RIG_DEBUG_TRACE, "%s: passed freq = %"PRIfreq" Hz\n", __func__, freq); priv = (struct ft920_priv_data *)rig->state.priv; @@ -1493,7 +1493,7 @@ static int ft920_send_dial_freq(RIG *rig, unsigned char ci, freq_t freq) { to_bcd(priv->p_cmd, freq/10, FT920_BCD_DIAL); rig_debug(RIG_DEBUG_TRACE, - "%s: requested freq after conversion = %lli Hz\n", + "%s: requested freq after conversion = %"PRIll" Hz\n", __func__, from_bcd(priv->p_cmd, FT920_BCD_DIAL)* 10); err = write_block(&rig_s->rigport, (unsigned char *) &priv->p_cmd, YAESU_CMD_LENGTH); diff --git a/yaesu/ft990.c b/yaesu/ft990.c index 1693bc59b..93c711bbd 100644 --- a/yaesu/ft990.c +++ b/yaesu/ft990.c @@ -1,5 +1,5 @@ /* - * hamlib - (C) Stephane Fillod 2002-2004 (fillods at users.sourceforge.net) + * hamlib - (C) Stephane Fillod 2002-2005 (fillods at users.sourceforge.net) * * ft990.c - (C) Berndt Josef Wulf (wulf at ping.net.au) * @@ -7,7 +7,7 @@ * via serial interface to an FT-990 using the "CAT" interface * * - * $Id: ft990.c,v 1.14 2005-01-24 23:04:35 fillods Exp $ + * $Id: ft990.c,v 1.15 2005-01-25 00:22:14 fillods Exp $ * * * This library is free software; you can redistribute it and/or @@ -2639,7 +2639,7 @@ int ft990_send_dial_freq(RIG *rig, unsigned char ci, freq_t freq) { to_bcd(priv->p_cmd, freq/10, FT990_BCD_DIAL); rig_debug(RIG_DEBUG_TRACE, - "%s: requested freq after conversion = %lli Hz\n", + "%s: requested freq after conversion = %"PRIll" Hz\n", __func__, from_bcd(priv->p_cmd, FT990_BCD_DIAL) * 10); err = write_block(&rig_s->rigport, (unsigned char *) &priv->p_cmd,