From: parkrrrr Date: Wed, 17 May 2006 20:28:39 +0000 (+0000) Subject: added xcsv-derivative logic X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~2808 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=84100601f3257d8a2a47d99956df59c9fdba612c;p=gpsbabel.git added xcsv-derivative logic --- diff --git a/gpsbabel/xmldoc/makedoc b/gpsbabel/xmldoc/makedoc index 0b44516f2..2a7ad3710 100755 --- a/gpsbabel/xmldoc/makedoc +++ b/gpsbabel/xmldoc/makedoc @@ -73,6 +73,7 @@ print FORMATS qq(\n); @formats = `gpsbabel -^3`; $going = 0; +$dooptions = 0; for (@formats) { chomp; @@ -87,9 +88,12 @@ for (@formats) { close FILE; $going = 0; } + if ( $line[5] eq 'xcsv' ) { + $line[0] = 'file'; + } } - elsif (($line[0] eq 'file') || ($line[0] eq 'serial')) { + if (($line[0] eq 'file') || ($line[0] eq 'serial')) { if ($going) { print FILE "\n"; close FILE; @@ -111,8 +115,20 @@ END print FILE expandoptions($line[1]); include($id,'formats'); $going = 1; + $dooptions = 1; + if ( defined($line[5]) && ($line[5] ne $line[2]) ) { + print FILE < +This format is derived from the $line[5] +format, so it has all of the same objects as that format. + +END + if ($line[5] eq 'xcsv' ) { + $dooptions=0; + } + } } - elsif ($going && ($line[0] eq 'option')) { + elsif ($going && $dooptions && ($line[0] eq 'option')) { $nid = 'fmt_'.$id.'_o_'.$line[2]; print FILE <