1 /*
2  * Tlf - contest logging program for amateur radio operators
3  * Copyright (C) 2001-2002-2003 Rein Couperus <pa0rct@amsat.org>
4  *               2014, 2015     Thomas Beierlein <tb@forth-ev.de>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20 /* ------------------------------------------------------------
21  *     repeat previous_qsonr
22  *
23  *--------------------------------------------------------------*/
24 
25 
26 #include <string.h>
27 
28 #include <glib.h>
29 
30 #include "sendbuf.h"
31 
32 
prev_qso(void)33 void prev_qso(void) {
34     extern int qsonum;
35     extern char last_rst[];
36 
37     int i;
38     char *str;
39 
40     str = g_strdup_printf("%3s %03d ", last_rst, qsonum - 1);
41     for (i = 0; i < strlen(str); i++) {
42 	str[i] = short_number(str[i]);
43     }
44     sendmessage(str);
45     g_free(str);
46 }
47