diff -Nru xlog-0.7beta2/src/callbacks_menu.c xlog-0.7beta2-f8cfe/src/callbacks_menu.c --- xlog-0.7beta2/src/callbacks_menu.c Thu Mar 28 19:54:16 2002 +++ xlog-0.7beta2-f8cfe/src/callbacks_menu.c Sun Mar 31 14:32:56 2002 @@ -491,51 +491,51 @@ powerhbox = lookup_widget(mainwindow, "powerhbox"); lecomboentry7 = lookup_widget(logeditor, "lecomboentry7"); if (GTK_WIDGET_VISIBLE(powerhbox)) - gtk_entry_set_text(GTK_ENTRY(lecomboentry7), "Show"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry7), _("Show")); else - gtk_entry_set_text(GTK_ENTRY(lecomboentry7), "Hide"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry7), _("Hide")); endhbox = lookup_widget(mainwindow, "endhbox"); lecomboentry10 = lookup_widget(logeditor, "lecomboentry10"); if (GTK_WIDGET_VISIBLE(endhbox)) - gtk_entry_set_text(GTK_ENTRY(lecomboentry10), "Show"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry10), _("Show")); else - gtk_entry_set_text(GTK_ENTRY(lecomboentry10), "Hide"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry10), _("Hide")); qslhbox = lookup_widget(mainwindow, "qslhbox"); lecomboentry11 = lookup_widget(logeditor, "lecomboentry11"); if (GTK_WIDGET_VISIBLE(qslhbox)) - gtk_entry_set_text(GTK_ENTRY(lecomboentry11), "Show"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry11), _("Show")); else - gtk_entry_set_text(GTK_ENTRY(lecomboentry11), "Hide"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry11), _("Hide")); namehbox = lookup_widget(mainwindow, "namehbox"); lecomboentry12 = lookup_widget(logeditor, "lecomboentry12"); if (GTK_WIDGET_VISIBLE(namehbox)) - gtk_entry_set_text(GTK_ENTRY(lecomboentry12), "Show"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry12), _("Show")); else - gtk_entry_set_text(GTK_ENTRY(lecomboentry12), "Hide"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry12), _("Hide")); qthhbox = lookup_widget(mainwindow, "qthhbox"); lecomboentry13 = lookup_widget(logeditor, "lecomboentry13"); if (GTK_WIDGET_VISIBLE(qthhbox)) - gtk_entry_set_text(GTK_ENTRY(lecomboentry13), "Show"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry13), _("Show")); else gtk_entry_set_text(GTK_ENTRY(lecomboentry13), "Hide"); locatorhbox = lookup_widget(mainwindow, "locatorhbox"); lecomboentry14 = lookup_widget(logeditor, "lecomboentry14"); if (GTK_WIDGET_VISIBLE(locatorhbox)) - gtk_entry_set_text(GTK_ENTRY(lecomboentry14), "Show"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry14), _("Show")); else - gtk_entry_set_text(GTK_ENTRY(lecomboentry14), "Hide"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry14), _("Hide")); unknown1hbox = lookup_widget(mainwindow, "unknown1hbox"); lecomboentry15 = lookup_widget(logeditor, "lecomboentry15"); if (GTK_WIDGET_VISIBLE(unknown1hbox)) - gtk_entry_set_text(GTK_ENTRY(lecomboentry15), "Show"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry15), _("Show")); else - gtk_entry_set_text(GTK_ENTRY(lecomboentry15), "Hide"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry15), _("Hide")); unknown2hbox = lookup_widget(mainwindow, "unknown2hbox"); lecomboentry16 = lookup_widget(logeditor, "lecomboentry16"); if (GTK_WIDGET_VISIBLE(unknown2hbox)) - gtk_entry_set_text(GTK_ENTRY(lecomboentry16), "Show"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry16), _("Show")); else - gtk_entry_set_text(GTK_ENTRY(lecomboentry16), "Hide"); + gtk_entry_set_text(GTK_ENTRY(lecomboentry16), _("Hide")); gtk_widget_show(logeditor); } diff -Nru xlog-0.7beta2/src/callbacks_qsoframe.c xlog-0.7beta2-f8cfe/src/callbacks_qsoframe.c --- xlog-0.7beta2/src/callbacks_qsoframe.c Thu Mar 28 19:30:37 2002 +++ xlog-0.7beta2-f8cfe/src/callbacks_qsoframe.c Sat Mar 30 20:12:08 2002 @@ -31,7 +31,9 @@ #include #include #include +#ifdef WANT_HAMLIB #include +#endif #include "callbacks_qsoframe.h" #include "interface.h" diff -Nru xlog-0.7beta2/src/interface.c xlog-0.7beta2-f8cfe/src/interface.c --- xlog-0.7beta2/src/interface.c Thu Mar 28 17:48:26 2002 +++ xlog-0.7beta2-f8cfe/src/interface.c Sun Mar 31 13:31:57 2002 @@ -1157,23 +1157,25 @@ gtk_signal_connect (GTK_OBJECT (callentry), "insert_text", GTK_SIGNAL_FUNC (on_callentry_insert_text), NULL); - gtk_signal_connect (GTK_OBJECT (mhzbutton), "clicked", - GTK_SIGNAL_FUNC (on_mhzbutton_clicked), - NULL); gtk_signal_connect (GTK_OBJECT (bandoptionmenu), "key_press_event", GTK_SIGNAL_FUNC (on_bandoptionmenu_key_press_event), NULL); +#ifdef WANT_HAMLIB + gtk_signal_connect (GTK_OBJECT (mhzbutton), "clicked", + GTK_SIGNAL_FUNC (on_mhzbutton_clicked), + NULL); gtk_signal_connect (GTK_OBJECT (modebutton), "clicked", GTK_SIGNAL_FUNC (on_modebutton_clicked), NULL); - gtk_signal_connect (GTK_OBJECT (modeoptionmenu), "key_press_event", - GTK_SIGNAL_FUNC (on_modeoptionmenu_key_press_event), - NULL); gtk_signal_connect (GTK_OBJECT (powerbutton), "clicked", GTK_SIGNAL_FUNC (on_powerbutton_clicked), NULL); gtk_signal_connect (GTK_OBJECT (rstbutton), "clicked", GTK_SIGNAL_FUNC (on_rstbutton_clicked), + NULL); +#endif + gtk_signal_connect (GTK_OBJECT (modeoptionmenu), "key_press_event", + GTK_SIGNAL_FUNC (on_modeoptionmenu_key_press_event), NULL); gtk_signal_connect (GTK_OBJECT (endbutton), "clicked", GTK_SIGNAL_FUNC (on_endbutton_clicked), diff -Nru xlog-0.7beta2/src/logfile/adif.l xlog-0.7beta2-f8cfe/src/logfile/adif.l --- xlog-0.7beta2/src/logfile/adif.l Thu Mar 21 10:23:54 2002 +++ xlog-0.7beta2-f8cfe/src/logfile/adif.l Sun Mar 31 19:53:49 2002 @@ -21,6 +21,7 @@ /* * adif.l - scanner for ADIF format - "Amateur Data Interchange Format" 1.0 * Reports to Stephane Fillod F8CFE + * Specifications from http://www.hosenose.com/adif/adif.html */ #ifdef HAVE_CONFIG_H @@ -38,9 +39,10 @@ /* * fields to be stored in the adif file */ -static const gint adif_fields[] = { DATE, GMT, CALL, BAND, MODE, RST, MYRST, QSLOUT, QSLIN, REMARKS }; -static const gint adif_widths[] = { 15, 8, 15, 15, 8, 8, 8, 8, 8, 80 }; -static const gint adif_field_nr = 10; +static const gint adif_fields[] = { DATE, GMT, CALL, BAND, MODE, RST, MYRST, QSLOUT, QSLIN, REMARKS, POWER, GMTEND, NAME, QTH, LOCATOR, U1, U2 }; +static const gint adif_widths[] = { 15, 8, 15, 15, 8, 8, 8, 8, 8, 80, + 8, 8, 8, 8, 6, 8, 8 }; +static const gint adif_field_nr = 17; static LOGDB *adif_handle; static gint (*adif_fn)(LOGDB*, qso_t*, gpointer); @@ -73,7 +75,8 @@ CALLLBL [Cc][Aa][Ll][Ll] MODELBL [Mm][Oo][Dd][Ee] DATELBL "QSO_DATE"|"qso_date" -BANDLBL "FREQ"|"freq" +FREQLBL "FREQ"|"freq" +BANDLBL "BAND"|"band" GMTLBL "TIME_ON"|"time_on" GMTENDLBL "TIME_OFF"|"time_off" POWERLBL "TX_POWER"|"tx_power" @@ -82,6 +85,9 @@ QSLOUTLBL "QSL_SENT"|"qsl_sent" QSLINLBL "QSL_RCVD"|"qsl_rcvd" REMARKSLBL "COMMENT"|"comment" +NAMELBL "NAME"|"name" +QTHLBL "QTH"|"qth" +LOCATORLBL "GRIDSQUARE"|"gridsquare" %x header record field @@ -139,12 +145,26 @@ /* TODO: optional data type */ BEGIN(field); } - "<"{BANDLBL}{FIELDTYPEND} { + "<"{FREQLBL}{FIELDTYPEND} { + /* prefer FREQ over BAND */ + if (q[BAND]) { + g_free(q[BAND]); + q[BAND] = NULL; + } adif_field = BAND; adif_field_len = atoi(yytext + 6); /* TODO: optional data type */ BEGIN(field); } + "<"{BANDLBL}{FIELDTYPEND} { + /* prefer FREQ over BAND */ + if (!q[BAND]) { + adif_field = BAND; + adif_field_len = atoi(yytext + 6); + } + /* TODO: optional data type */ + BEGIN(field); + } "<"{RSTLBL}{FIELDTYPEND} { adif_field = RST; adif_field_len = atoi(yytext + 10); @@ -175,6 +195,24 @@ /* TODO: optional data type */ BEGIN(field); } + "<"{NAMELBL}{FIELDTYPEND} { + adif_field = NAME; + adif_field_len = atoi(yytext + 6); + /* TODO: optional data type */ + BEGIN(field); + } + "<"{QTHLBL}{FIELDTYPEND} { + adif_field = QTH; + adif_field_len = atoi(yytext + 5); + /* TODO: optional data type */ + BEGIN(field); + } + "<"{LOCATORLBL}{FIELDTYPEND} { + adif_field = LOCATOR; + adif_field_len = atoi(yytext + 12); + /* TODO: optional data type */ + BEGIN(field); + } } @@ -194,8 +232,13 @@ ""|"" { /* End of Record */ if (adif_field != -1) { - gint ret; + gint ret, i; + /* fill in empty fields */ + for (i = 0; ipriv; - char *power = "", *gmtend = ""; - - if (POWER < QSO_FIELDS) - power = q[POWER]; - if (GMTEND < QSO_FIELDS) - gmtend = q[GMTEND]; fprintf(fp, "%-11s%-11s%-11s%-7s%-7s%-7s%-7s%-7s%-11s\n%-80s\n\n", - q[DATE], q[GMT], q[CALL], q[BAND], q[MODE], power, - q[RST], q[MYRST], gmtend, q[REMARKS]); + q[DATE], q[GMT], q[CALL], q[BAND], q[MODE], q[POWER], + q[RST], q[MYRST], q[GMTEND], q[REMARKS]); return 0; } @@ -156,9 +150,7 @@ for (i = 2; i < 9; i++) { end = find_field_end(field); if (*end) *end++ = '\0'; - /* don't store POWER if GMTEND if not supported by xlog */ - if (twlog_fields[i] < QSO_FIELDS) - q[twlog_fields[i]] = g_strdup(g_strstrip(field)); + q[twlog_fields[i]] = g_strdup(g_strstrip(field)); field = end; } /* ignore "GMT" keyword on last column */