xlog-discussion
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ADIF support, was Re: [Xlog-discussion] Re: Xlog output format


From: Stephane Fillod
Subject: ADIF support, was Re: [Xlog-discussion] Re: Xlog output format
Date: Tue, 19 Mar 2002 23:25:16 +0100
User-agent: Mutt/1.3.24i

Hi Roger,

>  It looks like we should wait until the new fields are added, 
> especially the user-definable ones.  Then logfile/oldlog.c or flog.c can 
> be a starting point for the ADIF format.  Looks like some of the hooks 
> are already there for it.

yep, the hooks make it easier to add new formats. I've attached a patch
with basic support for the ADIF format (adif.patch.gz). 
It's done using lex, and works okay with the various examples at
 ftp://www.hosenose.com/radio/adif/

Please let me know how it works for you, the code is still not perfect
on field type handling and conversion (e.g. GMT format).

The patch is against 0.6rc2, but actualy meant to be included in 0.7.
The new fields will then need to be added.

I've tested it with a 8000+ qso file, and it looks like the scanner
performs well, while memory allocation starts to be an issue.
NOTE: I don't know why, REMARKS and QSLOUT columns are mixed-up.

Hand-patch the following's to test ADIF load and save. 
It will affect any ~/.xlog/*.xlog

diff -Nru xlog-0.6rc2/src/main.c xlog-0.6rc2-f8cfe/src/main.c
--- xlog-0.6rc2/src/main.c  Fri Mar 15 21:57:43 2002
+++ xlog-0.6rc2-f8cfe/src/main.c    Tue Mar 19 02:18:34 2002
@@ -273,7 +273,7 @@
            xlogfile = g_strconcat(preferences.savedir, G_DIR_SEPARATOR_S,
loglist[i], NULL);
        logwindow = new_logwindow(i);
        if ((logs->len) > 0)
-           lp = log_file_open(xlogfile, TYPE_FLOG);
+           lp = log_file_open(xlogfile, TYPE_ADIF);
        else
            lp = log_file_open(xlogfile, TYPE_OLD_LOG);
        if (!lp) /* create a new log */
diff -Nru xlog-0.6rc2/src/utils.c xlog-0.6rc2-f8cfe/src/utils.c
--- xlog-0.6rc2/src/utils.c Mon Mar 11 13:38:50 2002
+++ xlog-0.6rc2-f8cfe/src/utils.c   Tue Mar 19 22:23:18 2002
@@ -78,7 +78,7 @@

    item = g_new0(gchar *, 11);
    gtk_clist_freeze(GTK_CLIST(clist));
-   lp = log_file_create(logfile, TYPE_FLOG, qso_field_nr, qso_fields,
qso_widths);
+   lp = log_file_create(logfile, TYPE_ADIF, qso_field_nr, qso_fields,
qso_widths);
    if (lp) {
        for (i = GTK_CLIST(clist)->rows - 1 ; i >= 0 ; i--) {
            for (j = 0; j < 11; j++)

Attachment: adif.patch.gz
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]