56 |
gpointer arg); |
gpointer arg); |
57 |
|
|
58 |
const struct log_ops cabrillo_ops = { |
const struct log_ops cabrillo_ops = { |
59 |
open:cabrillo_open, |
.open = cabrillo_open, |
60 |
close:cabrillo_close, |
.close = cabrillo_close, |
61 |
create:cabrillo_create, |
.create = cabrillo_create, |
62 |
qso_append:cabrillo_qso_append, |
.qso_append = cabrillo_qso_append, |
63 |
qso_foreach:cabrillo_qso_foreach, |
.qso_foreach = cabrillo_qso_foreach, |
64 |
type:TYPE_CABRILLO, |
.type = TYPE_CABRILLO, |
65 |
name:"Cabrillo", |
.name = "Cabrillo", |
66 |
extension:".cbr", |
.extension = ".cbr", |
67 |
}; |
}; |
68 |
|
|
69 |
/* |
/* |
137 |
gchar freq[8]; |
gchar freq[8]; |
138 |
const gchar *mode; |
const gchar *mode; |
139 |
gint rst_len; |
gint rst_len; |
140 |
|
gchar *q_mode = q[MODE] ? q[MODE] : "SSB"; |
141 |
|
|
142 |
/* |
/* |
143 |
* there's no exchange fields in xlog. However, the exchange information |
* there's no exchange fields in xlog. However, the exchange information |
144 |
* may be piggybacked by the rst field. eg. "599ON". |
* may be piggybacked by the rst field. eg. "599ON". |
145 |
*/ |
*/ |
146 |
rst_len = strcmp (q[MODE], "CW") ? 2 : 3; |
rst_len = strcmp (q_mode, "CW") ? 2 : 3; |
147 |
|
|
148 |
strncpy (rst, q[RST], rst_len); |
strncpy (rst, q[RST], rst_len); |
149 |
rst[rst_len] = '\0'; |
rst[rst_len] = '\0'; |
170 |
} |
} |
171 |
|
|
172 |
/* translate mode */ |
/* translate mode */ |
173 |
if (!strcmp (q[MODE], "USB") || !strcmp (q[MODE], "LSB") || |
if (!strcmp (q_mode, "USB") || !strcmp (q_mode, "LSB") || |
174 |
!strcmp (q[MODE], "SSB")) |
!strcmp (q_mode, "SSB")) |
175 |
{ |
{ |
176 |
mode = "PH"; |
mode = "PH"; |
177 |
} |
} |
178 |
else if (!strcmp (q[MODE], "RTTY")) |
else if (!strcmp (q_mode, "RTTY")) |
179 |
{ |
{ |
180 |
mode = "RY"; |
mode = "RY"; |
181 |
} |
} |
182 |
else |
else |
183 |
mode = q[MODE]; |
mode = q_mode; |
184 |
|
|
185 |
fprintf (fp, "QSO: %-6s%-3s%-11s%-5s%-14s%-4s%-7s%-14s%-4s%-7s\n", |
fprintf (fp, "QSO: %-6s%-3s%-11s%-5s%-14s%-4s%-7s%-14s%-4s%-7s\n", |
186 |
freq, mode, date, q[GMT], |
freq, mode, date, q[GMT], |