[Xastir] dbfawk files on OSX

Luc Doré VA2KSH va2ksh at rac.ca
Sat Mar 19 23:52:40 EST 2005


Thanks to Jason and Tom for the suggestions.

Apologies for the posting earlier; the dbfinfo field was set correctly;  
I goofed up the copy/paste in my message from my xterm into my mail  
program.

To remove any issues with the Zone.* I modified the dbfawk as follows:

-- start of file --
BEGIN {
dbfinfo="NOMGEO:CLEBDTC:GENERIQUE:CONCIS:LATITUDE:LONGITUDE:REFERENCE: 
NUMEROSNRC:NOMREG";
dbffields="NOMGEO:CONCIS"}

BEGIN_RECORD {name=""; label_color=12;label_level=56; display_level=96;  
level=56; }

/^NOMGEO=(.*)$/ {name="$1"}
END_RECORD {}
END {}
-- end of file --

So instead of checking for the Zone.* data like before, I set in the  
begin_record label_color to 12, which is supposed to be red according  
to Tom's site and there's no changing that value for any reason in the  
awk file.  Well, on my copy of Xastir, the labels are black.

???


Luc D. -- VA2KSH
PGPid: 0x6A0DF068

On Mar 19, 2005, at 20:32, Tom Russo wrote:

> On Sat, Mar 19, 2005 at 03:31:47PM -0600, we recorded a  
> bogon-computron collision of the <jdw at eng.uah.edu> flavor, containing:
>>
>>> All if does is get the name of the NOMGEO field and put it in the  
>>> name
>>> variable;
>>
>> These are two different records, so the name variable will get reset
>> (by BEGIN_RECORD) between the NOMGEO record and the CONCIS record.
>> Here's what the sample dbfawk says:
>>
>>> # BEGIN_RECORD is called once per dbf record which contains multiple
>>> fields.
>>> # Use this rule to re-initialize variables between records.
>>
>
> No, each dbf record contains both NOMGEO and CONCIS fields.   
> BEGIN_RECORD
> only gets called once per record, not once per field in a record.  If  
> the
> dbfawk rules contained "skip" commands then it could go to the next  
> record and
> reset things, but that's not the case here.
>
> If the copy of the dbfawk file attached to the original post is  
> accurate, then
> I think I see a problem:
>
> BEGIN {
> dbfinfo="NOMGEO:CLEBDTC:GENERIQUE:CONCIS:LATITUDE:LONGITUDE:REFERENCE:
> NUMEROSNRC
> dbffields="NOMGEO:GENERIQUE:CONCIS"}
>
> The dbfinfo variable value is not terminated with a double quote.  Not  
> sure
> *what* dbfawk does when it encounters such a thing --- perhaps its  
> syntax
> checking isn't that good.  It should read:
>
> BEGIN {
> dbfinfo="NOMGEO:CLEBDTC:GENERIQUE:CONCIS:LATITUDE:LONGITUDE:REFERENCE: 
> NUMEROSNRC";
> dbffields="NOMGEO:GENERIQUE:CONCIS"}
>
> (i.e. there's a missing double quote and semicolon in what was in the  
> original
> post)
>
> If that was a transcription error in the post, then your other  
> suggestion may
> well be the issue:  CONCIS=(Zone.*) will only match if the CONCIS  
> field begins
> with Zone.  If there's any possibility of other characters preceding  
> "Zone"
> then one must wildcard, e.g. /^CONCIS=[ ]*(Zone.*)$/ or even
> /^CONCIS=.*(Zone.*)$/
>
> -- 
> Tom Russo    KM5VY     SAR502  DM64ux          
> http://www.swcp.com/~russo/
> Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1
>  "The only thing you can do easily is be wrong, and that's hardly
>   worth the effort." -- Norton Juster
>




More information about the Xastir mailing list