MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / decode_modes

Function decode_modes

tests/dumpmem.c:110–156  ·  view source on GitHub ↗

* NB: this function is not reentrant, because of the static buf. * but who cares? --SF */

Source from the content-addressed store, hash-verified

108 * but who cares? --SF
109 */
110static char *decode_modes(rmode_t modes)
111{
112 static char buf[80];
113
114 buf[0] = '\0';
115
116 if (modes & RIG_MODE_AM)
117 {
118 strcat(buf, "AM ");
119 }
120
121 if (modes & RIG_MODE_CW)
122 {
123 strcat(buf, "CW ");
124 }
125
126 if (modes & RIG_MODE_USB)
127 {
128 strcat(buf, "USB ");
129 }
130
131 if (modes & RIG_MODE_LSB)
132 {
133 strcat(buf, "LSB ");
134 }
135
136 if (modes & RIG_MODE_RTTY)
137 {
138 strcat(buf, "RTTY ");
139 }
140
141 if (modes & RIG_MODE_FM)
142 {
143 strcat(buf, "FM ");
144 }
145
146#ifdef RIG_MODE_WFM
147
148 if (modes & RIG_MODE_WFM)
149 {
150 strcat(buf, "WFM ");
151 }
152
153#endif
154
155 return buf;
156}
157
158
159int dump_chan(RIG *rig, int chan_num)

Callers 1

dump_chanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected