[Top][All Lists]

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

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

From: Roger R. Darr
Subject: Re: ADIF support, was Re: [Xlog-discussion] Re: Xlog output format
Date: Fri, 22 Mar 2002 08:41:59 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1

Thanks Stephane,
It looks like Joop has already tried the patch. I will check out the 0.7Beta when I get back from my trip this weekend. (XYL and I are going on 6th aniversary vacation).


Stephane Fillod wrote:

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

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);
           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);
-   lp = log_file_create(logfile, TYPE_FLOG, qso_field_nr, qso_fields,
+   lp = log_file_create(logfile, TYPE_ADIF, qso_field_nr, qso_fields,
   if (lp) {
       for (i = GTK_CLIST(clist)->rows - 1 ; i >= 0 ; i--) {
           for (j = 0; j < 11; j++)

reply via email to

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