@@ -198,6 +198,14 @@ void ExpandRst(char rst[4]) {
198198 replace_all (buffer , BUFSIZE , "[" , rst_out ); /* his RST */
199199}
200200
201+ static void expand_pipe_char () {
202+ if (trxmode == DIGIMODE )
203+ replace_all (buffer , BUFSIZE , "|" , "\r" ); /* CR */
204+ else
205+ replace_all (buffer , BUFSIZE , "|" , "" ); /* drop it */
206+ }
207+
208+
201209void ExpandMacro_CurrentQso (void ) {
202210
203211 replace_all (buffer , BUFSIZE , "%" , my .call ); /* mycall */
@@ -229,10 +237,7 @@ void ExpandMacro_CurrentQso(void) {
229237
230238 replace_all (buffer , BUFSIZE , "!" , current_qso .comment );
231239
232- if (trxmode == DIGIMODE )
233- replace_all (buffer , BUFSIZE , "|" , "\r" ); /* CR */
234- else
235- replace_all (buffer , BUFSIZE , "|" , "" ); /* drop it */
240+ expand_pipe_char ();
236241}
237242
238243struct qso_t * get_previous_qso () {
@@ -269,6 +274,8 @@ void ExpandMacro_PreviousQso(void) {
269274 ExpandQsoNumber (prevnr );
270275 g_free (prevnr );
271276 }
277+
278+ expand_pipe_char ();
272279}
273280
274281
0 commit comments