aboutdlg.h   aboutdlg.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: aboutdlg.h,v 1.1 2009/07/05 21:14:56 robertl Exp $ // $Id: aboutdlg.h,v 1.1 2009-07-05 21:14:56 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 advdlg.h   advdlg.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: advdlg.h,v 1.2 2009/11/02 20:38:02 robertl Exp $ // $Id: advdlg.h,v 1.2 2009-11-02 20:38:02 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 an1sym.h   an1sym.h 
skipping to change at line 33 skipping to change at line 33
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
*/ */
struct defguid { struct defguid {
GUID guid; GUID guid;
char *name; const char* name;
} default_guids[] = { } default_guids[] = {
{{0xb610bc70,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0xb610bc70,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
d}}, fd}},
"Hiker"}, "Hiker"
{{0xb610bc71,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0xb610bc71,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"Canoe"}, fd}},
{{0xb610bc72,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Canoe"
d}}, },
"Kayak"}, { {0xb610bc72,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0xb610bc73,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf fd}},
d}}, "Kayak"
"Bike"}, },
{{0xb610bc74,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0xb610bc73,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
d}}, fd}},
"Four wheeler"}, "Bike"
{{0xb610bc75,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0xb610bc74,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"Jeep"}, fd}},
{{0xb610bc76,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Four wheeler"
d}}, },
"Snowmobile"}, { {0xb610bc75,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0xb610bc78,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf fd}},
d}}, "Jeep"
"Rec Vehicle"}, },
{{0xb610bc79,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0xb610bc76,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
d}}, fd}},
"Fire"}, "Snowmobile"
{{0xb610bc7a,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0xb610bc78,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"Fishing"}, fd}},
{{0xb610bc7b,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Rec Vehicle"
d}}, },
"Tree"}, { {0xb610bc79,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0xb610bc7c,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf fd}},
d}}, "Fire"
"Pine Tree"}, },
{{0xb610bc7d,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0xb610bc7a,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
d}}, fd}},
"Birch"}, "Fishing"
{{0xb610bc7e,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0xb610bc7b,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"Deer"}, fd}},
{{0xb610bc7f,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Tree"
d}}, },
"Moose"}, { {0xb610bc7c,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0x99d8c163,{0x7622, 0x11d5, 0xe8ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf fd}},
d}}, "Pine Tree"
"Mud"}, },
{{0x012dfac2,{0xade8, 0x11d5, 0x0fb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0xb610bc7d,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
d}}, fd}},
"Tractor"}, "Birch"
{{0x012dfac3,{0xade8, 0x11d5, 0x0fb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0xb610bc7e,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"Combine Harvester"}, fd}},
{{0x012dfac7,{0xade8, 0x11d5, 0x0fb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Deer"
d}}, },
"Front-End Loader"}, { {0xb610bc7f,{0x377e, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0xfd163780,{0xb10a, 0x11d5, 0x11b3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf fd}},
d}}, "Moose"
"Power Shovel"}, },
{{0xfd163781,{0xb10a, 0x11d5, 0x11b3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0x99d8c163,{0x7622, 0x11d5, 0xe8ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
d}}, fd}},
"Road Grader"}, "Mud"
{{0xfd163784,{0xb10a, 0x11d5, 0x11b3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0x012dfac2,{0xade8, 0x11d5, 0x0fb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"Road Roller"}, fd}},
{{0xfd163787,{0xb10a, 0x11d5, 0x11b3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Tractor"
d}}, },
"Dump Truck"}, { {0x012dfac3,{0xade8, 0x11d5, 0x0fb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0x5673d712,{0xb28d, 0x11d5, 0x13b3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf fd}},
d}}, "Combine Harvester"
"Skid-Steer Loader"}, },
{{0xb86045ac,{0x390f, 0x420f, 0x91a7}, {0x76, 0x2f, 0x48, 0xea, 0xe2, 0xd { {0x012dfac7,{0xade8, 0x11d5, 0x0fb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
7}}, fd}},
"Highway Sign"}, "Front-End Loader"
{{0x1e129e95,{0x13b6, 0x48d8, 0x3fa3}, {0x9c, 0xc8, 0x20, 0x8e, 0x1d, 0x9 },
d}}, { {0xfd163780,{0xb10a, 0x11d5, 0x11b3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"Orange Cone"}, fd}},
{{0xadee7d54,{0xf7c9, 0x4ab6, 0xfb93}, {0x99, 0xc3, 0xbc, 0x9d, 0x15, 0x4 "Power Shovel"
7}}, },
"Barricade"}, { {0xfd163781,{0xb10a, 0x11d5, 0x11b3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0xa170000f,{0x8bd8, 0x4574, 0x58ac}, {0x55, 0x41, 0x67, 0xef, 0x64, 0x6 fd}},
2}}, "Road Grader"
"Flagger"}, },
{{0xa425f90e,{0x6ab6, 0x4ca9, 0x8997}, {0xbf, 0xca, 0xe0, 0xc2, 0x2b, 0x5 { {0xfd163784,{0xb10a, 0x11d5, 0x11b3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
3}}, fd}},
"Construction Sign"}, "Road Roller"
{{0x0805b240,{0x6b26, 0x4300, 0xebb1}, {0xea, 0x9b, 0xcf, 0x68, 0xc6, 0x1 },
8}}, { {0xfd163787,{0xb10a, 0x11d5, 0x11b3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"Construction Flasher"}, fd}},
{{0x56721a6c,{0x8e77, 0x4b62, 0x09aa}, {0xce, 0xdc, 0x69, 0x4a, 0x16, 0x0 "Dump Truck"
5}}, },
"Transit"}, { {0x5673d712,{0xb28d, 0x11d5, 0x13b3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0x623e1ee9,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 fd}},
2}}, "Skid-Steer Loader"
"Arrow Left"}, },
{{0x623e1eea,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 { {0xb86045ac,{0x390f, 0x420f, 0x91a7}, {0x76, 0x2f, 0x48, 0xea, 0xe2, 0x
2}}, d7}},
"Arrow Right"}, "Highway Sign"
{{0x623e1eeb,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 },
2}}, { {0x1e129e95,{0x13b6, 0x48d8, 0x3fa3}, {0x9c, 0xc8, 0x20, 0x8e, 0x1d, 0x
"Arrow Up"}, 9d}},
{{0x623e1eec,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 "Orange Cone"
2}}, },
"Arrow Down"}, { {0xadee7d54,{0xf7c9, 0x4ab6, 0xfb93}, {0x99, 0xc3, 0xbc, 0x9d, 0x15, 0x
{{0x623e1eed,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 47}},
2}}, "Barricade"
"Arrow Up Left"}, },
{{0x623e1eee,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 { {0xa170000f,{0x8bd8, 0x4574, 0x58ac}, {0x55, 0x41, 0x67, 0xef, 0x64, 0x
2}}, 62}},
"Arrow Up Right"}, "Flagger"
{{0x623e1eef,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 },
2}}, { {0xa425f90e,{0x6ab6, 0x4ca9, 0x8997}, {0xbf, 0xca, 0xe0, 0xc2, 0x2b, 0x
"Arrow Down Left"}, 53}},
{{0x623e1ef0,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 "Construction Sign"
2}}, },
"Arrow Down Right"}, { {0x0805b240,{0x6b26, 0x4300, 0xebb1}, {0xea, 0x9b, 0xcf, 0x68, 0xc6, 0x
{{0x83f91421,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf 18}},
d}}, "Construction Flasher"
"Small Arrow Left"}, },
{{0x83f91422,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0x56721a6c,{0x8e77, 0x4b62, 0x09aa}, {0xce, 0xdc, 0x69, 0x4a, 0x16, 0x
d}}, 05}},
"Small Arrow Right"}, "Transit"
{{0x83f91423,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0x623e1ee9,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
"Small Arrow Up"}, 32}},
{{0x83f91424,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Arrow Left"
d}}, },
"Small Arrow Down"}, { {0x623e1eea,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
{{0x83f91425,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf 32}},
d}}, "Arrow Right"
"Small Arrow Up Left"}, },
{{0x83f91426,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0x623e1eeb,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
d}}, 32}},
"Small Arrow Up Right"}, "Arrow Up"
{{0x83f91427,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0x623e1eec,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
"Small Arrow Down Left"}, 32}},
{{0x83f91428,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Arrow Down"
d}}, },
"Small Arrow Down Right"}, { {0x623e1eed,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
{{0x83f91429,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf 32}},
d}}, "Arrow Up Left"
"Large Arrow Left"}, },
{{0x83f9142a,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0x623e1eee,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
d}}, 32}},
"Large Arrow Right"}, "Arrow Up Right"
{{0x83f9142b,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0x623e1eef,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
"Large Arrow Up"}, 32}},
{{0x83f9142c,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Arrow Down Left"
d}}, },
"Large Arrow Down"}, { {0x623e1ef0,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
{{0x83f9142d,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf 32}},
d}}, "Arrow Down Right"
"Large Arrow Down Right"}, },
{{0x83f9142e,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0x83f91421,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
d}}, fd}},
"Large Arrow Down Left"}, "Small Arrow Left"
{{0x83f9142f,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0x83f91422,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"Large Arrow Up Left"}, fd}},
{{0x83f91430,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Small Arrow Right"
d}}, },
"Large Arrow Up Right"}, { {0x83f91423,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0x8ff0aad1,{0xc53d, 0x4998, 0x7ebd}, {0x06, 0x60, 0x25, 0x6c, 0x4f, 0x6 fd}},
d}}, "Small Arrow Up"
"Accommodation"}, },
{{0xaf7bf199,{0x6a8b, 0x49fe, 0xae92}, {0xa3, 0x09, 0x7b, 0xb8, 0x81, 0x6 { {0x83f91424,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
a}}, fd}},
"Australia"}, "Small Arrow Down"
{{0x6bbcc9d1,{0x6a19, 0x4c7b, 0xc6a2}, {0x3e, 0x17, 0x02, 0xd6, 0xee, 0x3 },
a}}, { {0x83f91425,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"Blue Dome Cross"}, fd}},
{{0xfff920fe,{0xd780, 0x49d4, 0x1bad}, {0x55, 0x2e, 0xc7, 0xdf, 0xa2, 0xa "Small Arrow Up Left"
a}}, },
"Green Dome Cross"}, { {0x83f91426,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0x57e75924,{0xd6fa, 0x4666, 0x84bf}, {0x5b, 0x76, 0xa1, 0xd0, 0x14, 0x5 fd}},
f}}, "Small Arrow Up Right"
"Business"}, },
{{0xb09ef4a7,{0x95e4, 0x4e5e, 0x5e84}, {0xbe, 0x2b, 0x86, 0xdd, 0x50, 0x6 { {0x83f91427,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
5}}, fd}},
"Airplane"}, "Small Arrow Down Left"
{{0xf2833c22,{0x3592, 0x4a8a, 0x5693}, {0xee, 0x6c, 0x83, 0xb6, 0x3c, 0x1 },
9}}, { {0x83f91428,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"Amusement Recreation"}, fd}},
{{0x6f0317d6,{0x7fa3, 0x4dcc, 0x6187}, {0x7e, 0xca, 0xcb, 0x65, 0x49, 0x1 "Small Arrow Down Right"
2}}, },
"Green Square"}, { {0x83f91429,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0x18a6d3c0,{0x45cb, 0x4d19, 0xf5b9}, {0xc7, 0x9c, 0xbf, 0x8f, 0x6d, 0x4 fd}},
6}}, "Large Arrow Left"
"Red Triangle"}, },
{{0x86e68ea7,{0xb9ab, 0x4bc8, 0xa1bf}, {0xc1, 0x22, 0x13, 0x97, 0x95, 0xe { {0x83f9142a,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
8}}, fd}},
"Red Triangle and Green Square"}, "Large Arrow Right"
{{0x6afd74bf,{0x0ea5, 0x4680, 0xcd88}, {0x15, 0x87, 0x2f, 0x6c, 0xd2, 0xd },
8}}, { {0x83f9142b,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"City 4"}, fd}},
{{0x49dfeb74,{0xbb09, 0x4df1, 0x5687}, {0xd8, 0xa0, 0xff, 0x36, 0x89, 0x3 "Large Arrow Up"
d}}, },
"White Square"}, { {0x83f9142c,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0x3eed62c6,{0xdab9, 0x42b0, 0xe4a3}, {0xd2, 0xf1, 0x7d, 0x54, 0xbf, 0x7 fd}},
7}}, "Large Arrow Down"
"White Triangle"}, },
{{0x6b521940,{0x4492, 0x4c48, 0x58a0}, {0xfc, 0xd1, 0x1f, 0x5e, 0x0c, 0xe { {0x83f9142d,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
a}}, fd}},
"Red Black Diamond Flag"}, "Large Arrow Down Right"
{{0xbb8ebaa3,{0xac59, 0x4411, 0x9c94}, {0x30, 0xd4, 0xe1, 0x21, 0x25, 0x4 },
6}}, { {0x83f9142e,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
"Yellow Diamond Flag"}, fd}},
{{0x8e118862,{0xf6aa, 0x4b34, 0x2b82}, {0x8f, 0x3b, 0x5a, 0x2b, 0x59, 0xe "Large Arrow Down Left"
b}}, },
"Small Pink Square"}, { {0x83f9142f,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
{{0xd0ef64c2,{0xe319, 0x4876, 0x1b85}, {0x0e, 0x90, 0x50, 0x89, 0xb7, 0xc fd}},
5}}, "Large Arrow Up Left"
"Store"}, },
{{0xa22b08fb,{0x6193, 0x4f5c, 0xdaa4}, {0xfa, 0xdf, 0xa7, 0x6e, 0x23, 0xe { {0x83f91430,{0x3772, 0x11d6, 0xaeb3}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
1}}, fd}},
"Camping"}, "Large Arrow Up Right"
{{0x27f57c69,{0x575b, 0x4b56, 0x288c}, {0xe8, 0xe1, 0xc7, 0x05, 0x1f, 0x1 },
f}}, { {0x8ff0aad1,{0xc53d, 0x4998, 0x7ebd}, {0x06, 0x60, 0x25, 0x6c, 0x4f, 0x
"Green Diamond Flag"}, 6d}},
{{0xe07abb38,{0x219f, 0x4b52, 0x868b}, {0x45, 0x0f, 0xbc, 0xc1, 0x4f, 0x6 "Accommodation"
a}}, },
"Red Diamond Flag"}, { {0xaf7bf199,{0x6a8b, 0x49fe, 0xae92}, {0xa3, 0x09, 0x7b, 0xb8, 0x81, 0x
{{0x3a124ac9,{0x3973, 0x4e27, 0x4b82}, {0xa6, 0x3a, 0x94, 0x5c, 0xf8, 0xb 6a}},
3}}, "Australia"
"Red Green Diamond Flag"}, },
{{0x64ed669b,{0x0db8, 0x4ec9, 0xd181}, {0x98, 0x50, 0xb3, 0x8b, 0x2f, 0x2 { {0x6bbcc9d1,{0x6a19, 0x4c7b, 0xc6a2}, {0x3e, 0x17, 0x02, 0xd6, 0xee, 0x
e}}, 3a}},
"White Globe"}, "Blue Dome Cross"
{{0x3cb10adc,{0xb090, 0x4960, 0x9f8a}, {0xec, 0xaf, 0x6c, 0xd7, 0xaa, 0x8 },
b}}, { {0xfff920fe,{0xd780, 0x49d4, 0x1bad}, {0x55, 0x2e, 0xc7, 0xdf, 0xa2, 0x
"Yellow Globe"}, aa}},
{{0x2779347d,{0x17d4, 0x4021, 0xa6a8}, {0x51, 0x9a, 0xb6, 0xf8, 0x21, 0xf "Green Dome Cross"
f}}, },
""}, { {0x57e75924,{0xd6fa, 0x4666, 0x84bf}, {0x5b, 0x76, 0xa1, 0xd0, 0x14, 0x
{{0x3ad63f7b,{0x4339, 0x427d, 0x5797}, {0xce, 0xa9, 0x96, 0x33, 0x8b, 0x3 5f}},
c}}, "Business"
"Black Cross"}, },
{{0x3e89481e,{0x35ff, 0x48b6, 0xc7ae}, {0xb0, 0x75, 0xf6, 0x43, 0xc4, 0xc { {0xb09ef4a7,{0x95e4, 0x4e5e, 0x5e84}, {0xbe, 0x2b, 0x86, 0xdd, 0x50, 0x
7}}, 65}},
"Church"}, "Airplane"
{{0x68622c10,{0x79b6, 0x466d, 0xa8a3}, {0x27, 0xc6, 0x25, 0x34, 0xfa, 0xa },
9}}, { {0xf2833c22,{0x3592, 0x4a8a, 0x5693}, {0xee, 0x6c, 0x83, 0xb6, 0x3c, 0x
"Small Dark Green Square"}, 19}},
{{0x42c6a873,{0x2d0c, 0x46e7, 0x9989}, {0xdd, 0x86, 0x01, 0x6e, 0xa4, 0xc "Amusement Recreation"
9}}, },
"Small Black Square"}, { {0x6f0317d6,{0x7fa3, 0x4dcc, 0x6187}, {0x7e, 0xca, 0xcb, 0x65, 0x49, 0x
{{0x50e3b06e,{0xbe81, 0x4b2c, 0x1f92}, {0x80, 0xa5, 0x72, 0x9b, 0x33, 0x0 12}},
5}}, "Green Square"
"Danger"}, },
{{0x369d0b22,{0xed07, 0x421f, 0x8780}, {0x33, 0x0e, 0xbd, 0x27, 0x4f, 0x3 { {0x18a6d3c0,{0x45cb, 0x4d19, 0xf5b9}, {0xc7, 0x9c, 0xbf, 0x8f, 0x6d, 0x
c}}, 46}},
"Construction Business"}, "Red Triangle"
{{0x10603b6c,{0xb02e, 0x49ee, 0x60b9}, {0xed, 0x7e, 0x31, 0x16, 0x27, 0x8 },
9}}, { {0x86e68ea7,{0xb9ab, 0x4bc8, 0xa1bf}, {0xc1, 0x22, 0x13, 0x97, 0x95, 0x
"Airport"}, e8}},
{{0x8328aab7,{0xfe04, 0x46dc, 0x7bbf}, {0x29, 0x34, 0x30, 0xd3, 0x4d, 0xe "Red Triangle and Green Square"
b}}, },
"City 5"}, { {0x6afd74bf,{0x0ea5, 0x4680, 0xcd88}, {0x15, 0x87, 0x2f, 0x6c, 0xd2, 0x
{{0x96411287,{0xda33, 0x40e3, 0xaa9c}, {0x75, 0x83, 0x78, 0x2d, 0xa6, 0xf d8}},
3}}, "City 4"
"USA"}, },
{{0xb2f98627,{0x1211, 0x40e8, 0xb287}, {0x6d, 0x66, 0xfd, 0x15, 0x1e, 0xd { {0x49dfeb74,{0xbb09, 0x4df1, 0x5687}, {0xd8, 0xa0, 0xff, 0x36, 0x89, 0x
4}}, 3d}},
"Diver Down"}, "White Square"
{{0x3fce26d0,{0xfec6, 0x4f8b, 0x55a2}, {0x89, 0x3a, 0x8e, 0x59, 0x08, 0x0 },
a}}, { {0x3eed62c6,{0xdab9, 0x42b0, 0xe4a3}, {0xd2, 0xf1, 0x7d, 0x54, 0xbf, 0x
"Light Yellow Square"}, 77}},
{{0xb4b68597,{0x1aed, 0x4918, 0xd492}, {0x1f, 0xd1, 0x5e, 0xf2, 0x55, 0xc "White Triangle"
1}}, },
"Education Technology"}, { {0x6b521940,{0x4492, 0x4c48, 0x58a0}, {0xfc, 0xd1, 0x1f, 0x5e, 0x0c, 0x
{{0x35d2e6a8,{0xda88, 0x4edb, 0x4b80}, {0x2b, 0x1b, 0xcf, 0xc0, 0xd4, 0x6 ea}},
d}}, "Red Black Diamond Flag"
"Computer"}, },
{{0x4ddc4e96,{0x8d19, 0x4079, 0x4488}, {0xc0, 0x8f, 0x0f, 0x8e, 0xb5, 0xd { {0xbb8ebaa3,{0xac59, 0x4411, 0x9c94}, {0x30, 0xd4, 0xe1, 0x21, 0x25, 0x
7}}, 46}},
"Amusement Recreation Red"}, "Yellow Diamond Flag"
{{0x79f58929,{0x46c6, 0x4337, 0xc0b1}, {0xf0, 0x09, 0x55, 0xbb, 0x1f, 0xc },
3}}, { {0x8e118862,{0xf6aa, 0x4b34, 0x2b82}, {0x8f, 0x3b, 0x5a, 0x2b, 0x59, 0x
"Telephone Red"}, eb}},
{{0x0083b377,{0xfb80, 0x4a83, 0x3593}, {0x56, 0xe5, 0xfe, 0xc4, 0xcd, 0x4 "Small Pink Square"
3}}, },
"Exit"}, { {0xd0ef64c2,{0xe319, 0x4876, 0x1b85}, {0x0e, 0x90, 0x50, 0x89, 0xb7, 0x
{{0x0c232891,{0xab4d, 0x440e, 0x7083}, {0x05, 0x63, 0x3a, 0xf5, 0x66, 0x1 c5}},
1}}, "Store"
"Exit with Services"}, },
{{0xaf63e7c2,{0x03fa, 0x418e, 0xc68b}, {0x02, 0xb8, 0xf5, 0x61, 0xb6, 0x6 { {0xa22b08fb,{0x6193, 0x4f5c, 0xdaa4}, {0xfa, 0xdf, 0xa7, 0x6e, 0x23, 0x
1}}, e1}},
"Pizza"}, "Camping"
{{0xd419c693,{0x39e6, 0x43db, 0xa1b8}, {0x7f, 0xcc, 0x2c, 0xb8, 0x51, 0x4 },
a}}, { {0x27f57c69,{0x575b, 0x4b56, 0x288c}, {0xe8, 0xe1, 0xc7, 0x05, 0x1f, 0x
"Financial Services"}, 1f}},
{{0x70740a81,{0xe4ca, 0x4ac2, 0xa498}, {0x21, 0xc8, 0x5b, 0xc0, 0xb7, 0xa "Green Diamond Flag"
e}}, },
"City 3"}, { {0xe07abb38,{0x219f, 0x4b52, 0x868b}, {0x45, 0x0f, 0xbc, 0xc1, 0x4f, 0x
{{0x9a582ff6,{0x34c4, 0x41c6, 0xf0a3}, {0x99, 0x69, 0x9d, 0xbe, 0x2e, 0x0 6a}},
8}}, "Red Diamond Flag"
"Food Store"}, },
{{0x3cd31689,{0x2f8f, 0x4fb0, 0xcb88}, {0x34, 0x84, 0xfc, 0x8b, 0x03, 0xe { {0x3a124ac9,{0x3973, 0x4e27, 0x4b82}, {0xa6, 0x3a, 0x94, 0x5c, 0xf8, 0x
4}}, b3}},
""}, "Red Green Diamond Flag"
{{0x952557a6,{0xe29e, 0x4512, 0x1184}, {0x1a, 0x3c, 0x9c, 0xd4, 0x83, 0x7 },
d}}, { {0x64ed669b,{0x0db8, 0x4ec9, 0xd181}, {0x98, 0x50, 0xb3, 0x8b, 0x2f, 0x
""}, 2e}},
{{0x03dc278c,{0xe8ff, 0x46ac, 0x3daa}, {0x9f, 0xe9, 0x1e, 0xcf, 0x10, 0x3 "White Globe"
5}}, },
"Driving Range"}, { {0x3cb10adc,{0xb090, 0x4960, 0x9f8a}, {0xec, 0xaf, 0x6c, 0xd7, 0xaa, 0x
{{0xacd28bab,{0x0ec0, 0x4393, 0xaf8b}, {0xbb, 0x5e, 0x74, 0xb3, 0x87, 0x1 8b}},
2}}, "Yellow Globe"
"Golf Municipal"}, },
{{0x984e7139,{0xeab8, 0x49f6, 0x55a0}, {0x8d, 0x51, 0xe6, 0xdd, 0xcc, 0xf { {0x2779347d,{0x17d4, 0x4021, 0xa6a8}, {0x51, 0x9a, 0xb6, 0xf8, 0x21, 0x
4}}, ff}},
"Golf Private"}, ""
{{0xec5828ab,{0x2a9d, 0x48f8, 0xd79b}, {0xc9, 0xc3, 0x30, 0x8e, 0xe4, 0xe },
a}}, { {0x3ad63f7b,{0x4339, 0x427d, 0x5797}, {0xce, 0xa9, 0x96, 0x33, 0x8b, 0x
"Golf Public"}, 3c}},
{{0xb0120d99,{0x683a, 0x4ecc, 0x129a}, {0x29, 0x94, 0x1f, 0x04, 0xae, 0x1 "Black Cross"
0}}, },
"Golf Resort"}, { {0x3e89481e,{0x35ff, 0x48b6, 0xc7ae}, {0xb0, 0x75, 0xf6, 0x43, 0xc4, 0x
{{0x2ce7685a,{0x6eaf, 0x4061, 0x29a5}, {0x87, 0x5e, 0xfa, 0x41, 0x75, 0x1 c7}},
a}}, "Church"
"Golf Semi Private"}, },
{{0x10397049,{0x9fc9, 0x4380, 0x5680}, {0x81, 0xd9, 0xe7, 0x43, 0x1f, 0x1 { {0x68622c10,{0x79b6, 0x466d, 0xa8a3}, {0x27, 0xc6, 0x25, 0x34, 0xfa, 0x
1}}, a9}},
"Medical Service"}, "Small Dark Green Square"
{{0x2fc28df6,{0xe806, 0x436e, 0xe0b9}, {0x46, 0x1d, 0xeb, 0xad, 0x56, 0x6 },
0}}, { {0x42c6a873,{0x2d0c, 0x46e7, 0x9989}, {0xdd, 0x86, 0x01, 0x6e, 0xa4, 0x
"Home Furnishings"}, c9}},
{{0x910313db,{0xafce, 0x4019, 0x1aa4}, {0xe6, 0x2c, 0xe6, 0xd1, 0xfd, 0xf "Small Black Square"
7}}, },
"Industrial"}, { {0x50e3b06e,{0xbe81, 0x4b2c, 0x1f92}, {0x80, 0xa5, 0x72, 0x9b, 0x33, 0x
{{0x9e442c6e,{0xe12a, 0x4407, 0xd68a}, {0x1c, 0x5e, 0x19, 0xe7, 0xfe, 0x0 05}},
1}}, "Danger"
""}, },
{{0x37e2fe4a,{0xcd71, 0x413f, 0x0cad}, {0x81, 0xc5, 0x2c, 0xf4, 0x78, 0x7 { {0x369d0b22,{0xed07, 0x421f, 0x8780}, {0x33, 0x0e, 0xbd, 0x27, 0x4f, 0x
9}}, 3c}},
""}, "Construction Business"
{{0x3c756e09,{0xb2dc, 0x48a6, 0x04a9}, {0x20, 0xb7, 0xc9, 0x9d, 0x14, 0x5 },
1}}, { {0x10603b6c,{0xb02e, 0x49ee, 0x60b9}, {0xed, 0x7e, 0x31, 0x16, 0x27, 0x
""}, 89}},
{{0xa1245b1c,{0x156a, 0x48fc, 0x6f96}, {0xa5, 0xa3, 0x22, 0x54, 0x13, 0x9 "Airport"
7}}, },
"Manufacturing"}, { {0x8328aab7,{0xfe04, 0x46dc, 0x7bbf}, {0x29, 0x34, 0x30, 0xd3, 0x4d, 0x
{{0x5bddbd7a,{0xf3cb, 0x454c, 0x06af}, {0x46, 0x1a, 0x68, 0xea, 0x60, 0x1 eb}},
a}}, "City 5"
"Note"}, },
{{0xcb6777e1,{0xe0e0, 0x45ce, 0x309f}, {0x8d, 0x61, 0x7a, 0xd9, 0x89, 0xf { {0x96411287,{0xda33, 0x40e3, 0xaa9c}, {0x75, 0x83, 0x78, 0x2d, 0xa6, 0x
5}}, f3}},
"City"}, "USA"
{{0xbc168c08,{0x2b7f, 0x44be, 0x3883}, {0x81, 0x31, 0x4a, 0x09, 0xf5, 0x7 },
8}}, { {0xb2f98627,{0x1211, 0x40e8, 0xb287}, {0x6d, 0x66, 0xfd, 0x15, 0x1e, 0x
"Air Base"}, d4}},
{{0xa8857b0f,{0xfc3b, 0x4cd1, 0x9e91}, {0xf5, 0x3b, 0x21, 0xa8, 0x3b, 0xb "Diver Down"
9}}, },
"Battlefield"}, { {0x3fce26d0,{0xfec6, 0x4f8b, 0x55a2}, {0x89, 0x3a, 0x8e, 0x59, 0x08, 0x
{{0x06db55c1,{0xf687, 0x4840, 0x7c80}, {0x95, 0x58, 0x77, 0x8e, 0x5a, 0xd 0a}},
d}}, "Light Yellow Square"
"Mining"}, },
{{0xcc61b277,{0xa48c, 0x445a, 0xd9b9}, {0xe5, 0x91, 0x36, 0x18, 0x4e, 0x0 { {0xb4b68597,{0x1aed, 0x4918, 0xd492}, {0x1f, 0xd1, 0x5e, 0xf2, 0x55, 0x
9}}, c1}},
"Mountain"}, "Education Technology"
{{0xfde13186,{0xb6cb, 0x4374, 0xc880}, {0x56, 0x99, 0xeb, 0x51, 0x68, 0x8 },
7}}, { {0x35d2e6a8,{0xda88, 0x4edb, 0x4b80}, {0x2b, 0x1b, 0xcf, 0xc0, 0xd4, 0x
"Capital"}, 6d}},
{{0xb14d90d1,{0xd943, 0x40ff, 0x9fb7}, {0x9b, 0x92, 0xd1, 0x23, 0xca, 0xe "Computer"
f}}, },
"Route"}, { {0x4ddc4e96,{0x8d19, 0x4079, 0x4488}, {0xc0, 0x8f, 0x0f, 0x8e, 0xb5, 0x
{{0x7eabc63f,{0x05d0, 0x4465, 0xb1b0}, {0x61, 0x2a, 0xf7, 0x4d, 0x0f, 0x4 d7}},
e}}, "Amusement Recreation Red"
"Overnight"}, },
{{0xac39d8b9,{0xfcdc, 0x4b50, 0x9ca6}, {0xea, 0x6c, 0x4b, 0xb5, 0x96, 0x0 { {0x79f58929,{0x46c6, 0x4337, 0xc0b1}, {0xf0, 0x09, 0x55, 0xbb, 0x1f, 0x
f}}, c3}},
"Route End Active"}, "Telephone Red"
{{0xe1b9d86b,{0x95e6, 0x4bd8, 0xd880}, {0x7b, 0x6c, 0xc6, 0xd2, 0x00, 0x3 },
4}}, { {0x0083b377,{0xfb80, 0x4a83, 0x3593}, {0x56, 0xe5, 0xfe, 0xc4, 0xcd, 0x
"Route End Inactive"}, 43}},
{{0x98712315,{0x7e1e, 0x4024, 0x8392}, {0xe3, 0xb8, 0x5a, 0x51, 0x45, 0xb "Exit"
4}}, },
"Fuel Stop"}, { {0x0c232891,{0xab4d, 0x440e, 0x7083}, {0x05, 0x63, 0x3a, 0xf5, 0x66, 0x
{{0xe5ea5b38,{0x7b80, 0x4b42, 0x0aba}, {0x3d, 0x38, 0xf0, 0xe1, 0x17, 0x9 11}},
a}}, "Exit with Services"
"Route Start Active"}, },
{{0x18fd0d49,{0x0a29, 0x433a, 0xd584}, {0xe5, 0xb7, 0x5b, 0xe8, 0x25, 0xb { {0xaf63e7c2,{0x03fa, 0x418e, 0xc68b}, {0x02, 0xb8, 0xf5, 0x61, 0xb6, 0x
c}}, 61}},
"Route Start Inactive"}, "Pizza"
{{0x2f52144b,{0x903e, 0x4dd9, 0x79af}, {0xe1, 0x66, 0x9b, 0xfc, 0xa9, 0xc },
1}}, { {0xd419c693,{0x39e6, 0x43db, 0xa1b8}, {0x7f, 0xcc, 0x2c, 0xb8, 0x51, 0x
"Route Stop Active"}, 4a}},
{{0xfaf8d826,{0xd27d, 0x4316, 0x0e92}, {0xce, 0x8d, 0x85, 0x93, 0x4c, 0xf "Financial Services"
5}}, },
"Route Stop Inactive"}, { {0x70740a81,{0xe4ca, 0x4ac2, 0xa498}, {0x21, 0xc8, 0x5b, 0xc0, 0xb7, 0x
{{0xff44cae2,{0x707c, 0x4a1c, 0x43af}, {0x8b, 0xb6, 0xb1, 0x19, 0x9c, 0xf ae}},
2}}, "City 3"
"Route Via"}, },
{{0x5a50d59b,{0xc15b, 0x49c4, 0x9faa}, {0xc4, 0x1c, 0x4f, 0xe2, 0x95, 0x2 { {0x9a582ff6,{0x34c4, 0x41c6, 0xf0a3}, {0x99, 0x69, 0x9d, 0xbe, 0x2e, 0x
a}}, 08}},
"Radiation Green"}, "Food Store"
{{0x19556023,{0xb1e5, 0x4c9c, 0x49ba}, {0x08, 0x52, 0xa1, 0x24, 0x3d, 0x9 },
f}}, { {0x3cd31689,{0x2f8f, 0x4fb0, 0xcb88}, {0x34, 0x84, 0xfc, 0x8b, 0x03, 0x
"Radiation Red"}, e4}},
{{0xa54be251,{0x6688, 0x49fb, 0x60b3}, {0x89, 0x56, 0x37, 0x68, 0xc5, 0xb ""
0}}, },
"Electricity"}, { {0x952557a6,{0xe29e, 0x4512, 0x1184}, {0x1a, 0x3c, 0x9c, 0xd4, 0x83, 0x
{{0xd793ff0c,{0xfbe0, 0x4383, 0x3183}, {0xcf, 0x4f, 0x04, 0xb7, 0xee, 0x0 7d}},
a}}, ""
"Personal Furnishings"}, },
{{0x00f90733,{0x7ab5, 0x42cf, 0x468c}, {0xbf, 0x91, 0x27, 0xd3, 0xa8, 0x9 { {0x03dc278c,{0xe8ff, 0x46ac, 0x3daa}, {0x9f, 0xe9, 0x1e, 0xcf, 0x10, 0x
c}}, 35}},
"Personal Services"}, "Driving Range"
{{0xea677f24,{0xbbe8, 0x4238, 0xee9c}, {0x6c, 0x0a, 0xec, 0x0e, 0x34, 0xf },
4}}, { {0xacd28bab,{0x0ec0, 0x4393, 0xaf8b}, {0xbb, 0x5e, 0x74, 0xb3, 0x87, 0x
"Telephone Black"}, 12}},
{{0x2d8a05b5,{0x8baf, 0x4f28, 0xf58b}, {0xfb, 0x7f, 0x37, 0x34, 0x28, 0xa "Golf Municipal"
7}}, },
"Government Light"}, { {0x984e7139,{0xeab8, 0x49f6, 0x55a0}, {0x8d, 0x51, 0xe6, 0xdd, 0xcc, 0x
{{0x40c64dfc,{0xc2d0, 0x4b0e, 0x6582}, {0x3f, 0x26, 0x9c, 0xcb, 0x6f, 0x1 f4}},
d}}, "Golf Private"
"Airport Red Square"}, },
{{0xf27adb5d,{0x3629, 0x44c7, 0x95a2}, {0x25, 0x2c, 0x95, 0x24, 0x98, 0x2 { {0xec5828ab,{0x2a9d, 0x48f8, 0xd79b}, {0xc9, 0xc3, 0x30, 0x8e, 0xe4, 0x
f}}, ea}},
"Propeller Aircraft"}, "Golf Public"
{{0x5a718e13,{0x3547, 0x42c5, 0x6d9d}, {0xb2, 0x82, 0xa5, 0x53, 0xbd, 0x3 },
a}}, { {0xb0120d99,{0x683a, 0x4ecc, 0x129a}, {0x29, 0x94, 0x1f, 0x04, 0xae, 0x
"Jet Aircraft"}, 10}},
{{0x0a471039,{0x2dfe, 0x447e, 0x54be}, {0xa3, 0x93, 0xae, 0x9a, 0xdd, 0xa "Golf Resort"
c}}, },
"Government"}, { {0x2ce7685a,{0x6eaf, 0x4061, 0x29a5}, {0x87, 0x5e, 0xfa, 0x41, 0x75, 0x
{{0x4a59da2f,{0xe1c3, 0x42c3, 0x6ca1}, {0x06, 0xb9, 0x14, 0x1b, 0x89, 0x9 1a}},
9}}, "Golf Semi Private"
"USA Regional"}, },
{{0xf16500a9,{0xa845, 0x4293, 0xae89}, {0x5c, 0x29, 0xbb, 0x0d, 0x06, 0xf { {0x10397049,{0x9fc9, 0x4380, 0x5680}, {0x81, 0xd9, 0xe7, 0x43, 0x1f, 0x
7}}, 11}},
"House 2"}, "Medical Service"
{{0x7b05524d,{0xcb5a, 0x456f, 0x96b3}, {0x03, 0x61, 0x24, 0x54, 0x6a, 0x5 },
4}}, { {0x2fc28df6,{0xe806, 0x436e, 0xe0b9}, {0x46, 0x1d, 0xeb, 0xad, 0x56, 0x
"Picnic"}, 60}},
{{0xb88ad7a1,{0xb94d, 0x42e8, 0x2b9d}, {0xf5, 0x4c, 0x2b, 0xff, 0x57, 0xd "Home Furnishings"
c}}, },
"Restaurant"}, { {0x910313db,{0xafce, 0x4019, 0x1aa4}, {0xe6, 0x2c, 0xe6, 0xd1, 0xfd, 0x
{{0xdc48a20a,{0x54a2, 0x4c61, 0x1fbe}, {0x02, 0x74, 0x5b, 0xe9, 0x18, 0x9 f7}},
9}}, "Industrial"
"Store 2"}, },
{{0x6b5ab040,{0x96df, 0x46ae, 0xacb8}, {0xe4, 0x47, 0x66, 0x3f, 0xec, 0x9 { {0x9e442c6e,{0xe12a, 0x4407, 0xd68a}, {0x1c, 0x5e, 0x19, 0xe7, 0xfe, 0x
b}}, 01}},
""}, ""
{{0x153b2cff,{0x6232, 0x4294, 0xd59a}, {0xc5, 0xa0, 0x7b, 0xe0, 0x16, 0xe },
b}}, { {0x37e2fe4a,{0xcd71, 0x413f, 0x0cad}, {0x81, 0xc5, 0x2c, 0xf4, 0x78, 0x
"Blue Star"}, 79}},
{{0xf276f6b3,{0x586a, 0x4bf8, 0x2f82}, {0xf2, 0x69, 0xe3, 0x76, 0x7e, 0xd ""
5}}, },
""}, { {0x3c756e09,{0xb2dc, 0x48a6, 0x04a9}, {0x20, 0xb7, 0xc9, 0x9d, 0x14, 0x
{{0x91d242c8,{0x0986, 0x4fad, 0x8286}, {0xec, 0x79, 0x79, 0xcd, 0xab, 0x0 51}},
2}}, ""
"Running"}, },
{{0x8b0078db,{0x6ee0, 0x4caa, 0xd3b5}, {0xfe, 0xe1, 0xc2, 0xbf, 0x94, 0x7 { {0xa1245b1c,{0x156a, 0x48fc, 0x6f96}, {0xa5, 0xa3, 0x22, 0x54, 0x13, 0x
d}}, 97}},
"Transportation"}, "Manufacturing"
{{0x0599f6c9,{0x478e, 0x4f63, 0x78a5}, {0xed, 0x31, 0xb5, 0xae, 0xda, 0x8 },
9}}, { {0x5bddbd7a,{0xf3cb, 0x454c, 0x06af}, {0x46, 0x1a, 0x68, 0xea, 0x60, 0x
"Fishing 2"}, 1a}},
{{0x7389128c,{0x0e78, 0x4d5d, 0x4189}, {0xb8, 0xf3, 0xb5, 0xbd, 0x70, 0xb "Note"
1}}, },
"Automotive"}, { {0xcb6777e1,{0xe0e0, 0x45ce, 0x309f}, {0x8d, 0x61, 0x7a, 0xd9, 0x89, 0x
{{0x0362b593,{0x3df6, 0x48ed, 0xc489}, {0x85, 0x13, 0xc1, 0xc0, 0xb9, 0x0 f5}},
d}}, "City"
"Cloudy"}, },
{{0xf0717a94,{0xd048, 0x4770, 0x9bab}, {0x80, 0x09, 0xbd, 0x4b, 0x1e, 0x7 { {0xbc168c08,{0x2b7f, 0x44be, 0x3883}, {0x81, 0x31, 0x4a, 0x09, 0xf5, 0x
5}}, 78}},
"Partly Cloudy"}, "Air Base"
{{0x14486bbc,{0xae6b, 0x44ea, 0xd6b9}, {0xbf, 0x9a, 0x39, 0x7a, 0x51, 0x6 },
c}}, { {0xa8857b0f,{0xfc3b, 0x4cd1, 0x9e91}, {0xf5, 0x3b, 0x21, 0xa8, 0x3b, 0x
"Mostly Cloudy"}, b9}},
{{0x7a258c70,{0xabec, 0x4cff, 0x4983}, {0x84, 0xdc, 0x2f, 0x2e, 0xff, 0x2 "Battlefield"
8}}, },
"Hurricane"}, { {0x06db55c1,{0xf687, 0x4840, 0x7c80}, {0x95, 0x58, 0x77, 0x8e, 0x5a, 0x
{{0xeff260d4,{0x46d5, 0x4fb5, 0xc79c}, {0x5e, 0x06, 0xc8, 0xab, 0x7a, 0x2 dd}},
b}}, "Mining"
"Lightning"}, },
{{0xc3d70220,{0x5154, 0x4766, 0xf0af}, {0xdf, 0x86, 0x74, 0x40, 0x5f, 0x8 { {0xcc61b277,{0xa48c, 0x445a, 0xd9b9}, {0xe5, 0x91, 0x36, 0x18, 0x4e, 0x
c}}, 09}},
"Rain"}, "Mountain"
{{0xf2dfbc91,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0xfde13186,{0xb6cb, 0x4374, 0xc880}, {0x56, 0x99, 0xeb, 0x51, 0x68, 0x
"Blue Flag"}, 87}},
{{0xf2dfbc92,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Capital"
d}}, },
"Dark Blue Flag"}, { {0xb14d90d1,{0xd943, 0x40ff, 0x9fb7}, {0x9b, 0x92, 0xd1, 0x23, 0xca, 0x
{{0xf2dfbc93,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf ef}},
d}}, "Route"
"Brown Flag"}, },
{{0xf2dfbc94,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0x7eabc63f,{0x05d0, 0x4465, 0xb1b0}, {0x61, 0x2a, 0xf7, 0x4d, 0x0f, 0x
d}}, 4e}},
"Yellow Flag"}, "Overnight"
{{0xf2dfbc95,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0xac39d8b9,{0xfcdc, 0x4b50, 0x9ca6}, {0xea, 0x6c, 0x4b, 0xb5, 0x96, 0x
"Red Flag 2"}, 0f}},
{{0xf2dfbc96,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Route End Active"
d}}, },
"Dark Red Flag"}, { {0xe1b9d86b,{0x95e6, 0x4bd8, 0xd880}, {0x7b, 0x6c, 0xc6, 0xd2, 0x00, 0x
{{0xf2dfbc97,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf 34}},
d}}, "Route End Inactive"
"Dark Green Flag"}, },
{{0xf2dfbc98,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0x98712315,{0x7e1e, 0x4024, 0x8392}, {0xe3, 0xb8, 0x5a, 0x51, 0x45, 0x
d}}, b4}},
"Green Flag"}, "Fuel Stop"
{{0xf2dfbc99,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0xe5ea5b38,{0x7b80, 0x4b42, 0x0aba}, {0x3d, 0x38, 0xf0, 0xe1, 0x17, 0x
"Blue-Green Flag"}, 9a}},
{{0xf2dfbc9a,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Route Start Active"
d}}, },
"Light Blue Flag"}, { {0x18fd0d49,{0x0a29, 0x433a, 0xd584}, {0xe5, 0xb7, 0x5b, 0xe8, 0x25, 0x
{{0x623e1ee1,{0xaf27, 0x100f, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 bc}},
2}}, "Route Start Inactive"
"Dark Blue Map Pin"}, },
{{0xf2dfbc9d,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0x2f52144b,{0x903e, 0x4dd9, 0x79af}, {0xe1, 0x66, 0x9b, 0xfc, 0xa9, 0x
d}}, c1}},
"Blue Map Pin"}, "Route Stop Active"
{{0xf2dfbc9e,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0xfaf8d826,{0xd27d, 0x4316, 0x0e92}, {0xce, 0x8d, 0x85, 0x93, 0x4c, 0x
"Yellow Map Pin"}, f5}},
{{0xf2dfbc9f,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Route Stop Inactive"
d}}, },
"Brown Map Pin"}, { {0xff44cae2,{0x707c, 0x4a1c, 0x43af}, {0x8b, 0xb6, 0xb1, 0x19, 0x9c, 0x
{{0xf2dfbca0,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf f2}},
d}}, "Route Via"
"Red Map Pin"}, },
{{0xf2dfbca1,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0x5a50d59b,{0xc15b, 0x49c4, 0x9faa}, {0xc4, 0x1c, 0x4f, 0xe2, 0x95, 0x
d}}, 2a}},
"Dark Red Map Pin"}, "Radiation Green"
{{0xf2dfbca2,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0x19556023,{0xb1e5, 0x4c9c, 0x49ba}, {0x08, 0x52, 0xa1, 0x24, 0x3d, 0x
"Green Map Pin"}, 9f}},
{{0xf2dfbca3,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Radiation Red"
d}}, },
"Dark Green Map Pin"}, { {0xa54be251,{0x6688, 0x49fb, 0x60b3}, {0x89, 0x56, 0x37, 0x68, 0xc5, 0x
{{0xf2dfbca4,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf b0}},
d}}, "Electricity"
"Gray Map Pin"}, },
{{0xf2dfbca5,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0xd793ff0c,{0xfbe0, 0x4383, 0x3183}, {0xcf, 0x4f, 0x04, 0xb7, 0xee, 0x
d}}, 0a}},
"Dark Gray Map Pin"}, "Personal Furnishings"
{{0xd1703de0,{0x5c45, 0x11d5, 0xb8ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0x00f90733,{0x7ab5, 0x42cf, 0x468c}, {0xbf, 0x91, 0x27, 0xd3, 0xa8, 0x
"Green Dot"}, 9c}},
{{0xd1703de1,{0x5c45, 0x11d5, 0xb8ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Personal Services"
d}}, },
"Dark Green Dot"}, { {0xea677f24,{0xbbe8, 0x4238, 0xee9c}, {0x6c, 0x0a, 0xec, 0x0e, 0x34, 0x
{{0xd1703de2,{0x5c45, 0x11d5, 0xb8ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf f4}},
d}}, "Telephone Black"
"Blue Dot"}, },
{{0xd1703de3,{0x5c45, 0x11d5, 0xb8ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0x2d8a05b5,{0x8baf, 0x4f28, 0xf58b}, {0xfb, 0x7f, 0x37, 0x34, 0x28, 0x
d}}, a7}},
"Dark Blue Dot"}, "Government Light"
{{0xd1703de5,{0x5c45, 0x11d5, 0xb8ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0x40c64dfc,{0xc2d0, 0x4b0e, 0x6582}, {0x3f, 0x26, 0x9c, 0xcb, 0x6f, 0x
"Red Dot"}, 1d}},
{{0x45c088e0,{0x672d, 0x11d5, 0xcbae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Airport Red Square"
d}}, },
"Dark Red Dot"}, { {0xf27adb5d,{0x3629, 0x44c7, 0x95a2}, {0x25, 0x2c, 0x95, 0x24, 0x98, 0x
{{0x45c088e1,{0x672d, 0x11d5, 0xcbae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf 2f}},
d}}, "Propeller Aircraft"
"Yellow Dot"}, },
{{0x45c088e2,{0x672d, 0x11d5, 0xcbae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0x5a718e13,{0x3547, 0x42c5, 0x6d9d}, {0xb2, 0x82, 0xa5, 0x53, 0xbd, 0x
d}}, 3a}},
"Brown Dot"}, "Jet Aircraft"
{{0x45c088e3,{0x672d, 0x11d5, 0xcbae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0x0a471039,{0x2dfe, 0x447e, 0x54be}, {0xa3, 0x93, 0xae, 0x9a, 0xdd, 0x
"Light Blue Dot"}, ac}},
{{0xbde3a8a1,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Government"
d}}, },
"Blue-Green Dot"}, { {0x4a59da2f,{0xe1c3, 0x42c3, 0x6ca1}, {0x06, 0xb9, 0x14, 0x1b, 0x89, 0x
{{0xbde3a8a2,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf 99}},
d}}, "USA Regional"
"Small Green Dot"}, },
{{0xbde3a8a3,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0xf16500a9,{0xa845, 0x4293, 0xae89}, {0x5c, 0x29, 0xbb, 0x0d, 0x06, 0x
d}}, f7}},
"Small Dark Green Dot"}, "House 2"
{{0xbde3a8a4,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0x7b05524d,{0xcb5a, 0x456f, 0x96b3}, {0x03, 0x61, 0x24, 0x54, 0x6a, 0x
"Small Blue Dot"}, 54}},
{{0xbde3a8a5,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf "Picnic"
d}}, },
"Small Dark Blue Dot"}, { {0xb88ad7a1,{0xb94d, 0x42e8, 0x2b9d}, {0xf5, 0x4c, 0x2b, 0xff, 0x57, 0x
{{0xbde3a8a6,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf dc}},
d}}, "Restaurant"
"Small Red Dot"}, },
{{0xbde3a8a7,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0xdc48a20a,{0x54a2, 0x4c61, 0x1fbe}, {0x02, 0x74, 0x5b, 0xe9, 0x18, 0x
d}}, 99}},
"Small Dark Red Dot"}, "Store 2"
{{0xbde3a8a8,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf },
d}}, { {0x6b5ab040,{0x96df, 0x46ae, 0xacb8}, {0xe4, 0x47, 0x66, 0x3f, 0xec, 0x
"Small Yellow Dot"}, 9b}},
{{0xbde3a8a9,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf ""
d}}, },
"Small Brown Dot"}, { {0x153b2cff,{0x6232, 0x4294, 0xd59a}, {0xc5, 0xa0, 0x7b, 0xe0, 0x16, 0x
{{0xbde3a8aa,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf eb}},
d}}, "Blue Star"
"Small Light Blue Dot"}, },
{{0xbde3a8ab,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0xf { {0xf276f6b3,{0x586a, 0x4bf8, 0x2f82}, {0xf2, 0x69, 0xe3, 0x76, 0x7e, 0x
d}}, d5}},
"Small Blue-Green Dot"}, ""
{{0x623e1ee0,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 },
2}}, { {0x91d242c8,{0x0986, 0x4fad, 0x8286}, {0xec, 0x79, 0x79, 0xcd, 0xab, 0x
"Red Flag"}, 02}},
{{0x623e1ee1,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 "Running"
2}}, },
"Map Pin"}, { {0x8b0078db,{0x6ee0, 0x4caa, 0xd3b5}, {0xfe, 0xe1, 0xc2, 0xbf, 0x94, 0x
{{0x623e1ee2,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 7d}},
2}}, "Transportation"
"Yellow Square"}, },
{{0x623e1ee3,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 { {0x0599f6c9,{0x478e, 0x4f63, 0x78a5}, {0xed, 0x31, 0xb5, 0xae, 0xda, 0x
2}}, 89}},
"Red X"}, "Fishing 2"
{{0x623e1ee4,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 },
2}}, { {0x7389128c,{0x0e78, 0x4d5d, 0x4189}, {0xb8, 0xf3, 0xb5, 0xbd, 0x70, 0x
"Blue Circle"}, b1}},
{{0x623e1ee5,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 "Automotive"
2}}, },
"House"}, { {0x0362b593,{0x3df6, 0x48ed, 0xc489}, {0x85, 0x13, 0xc1, 0xc0, 0xb9, 0x
{{0x623e1ee7,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 0d}},
2}}, "Cloudy"
"Triangle"}, },
{{0x623e1ee8,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x3 { {0xf0717a94,{0xd048, 0x4770, 0x9bab}, {0x80, 0x09, 0xbd, 0x4b, 0x1e, 0x
2}}, 75}},
"Green Star"}, "Partly Cloudy"
{{0x9d277805,{0xe2f8, 0x4f43, 0x3f97}, {0x35, 0x0d, 0x40, 0xae, 0x5c, 0xd },
3}}, { {0x14486bbc,{0xae6b, 0x44ea, 0xd6b9}, {0xbf, 0x9a, 0x39, 0x7a, 0x51, 0x
"Geocache"}, 6c}},
{{0xcb8aad04,{0xcc2d, 0x47f2, 0x428a}, {0x80, 0xf7, 0xd6, 0x68, 0xed, 0x3 "Mostly Cloudy"
2}}, },
"Geocache Found"}, { {0x7a258c70,{0xabec, 0x4cff, 0x4983}, {0x84, 0xdc, 0x2f, 0x2e, 0xff, 0x
{{0x7341c1f4,{0xdecd, 0x4d35, 0x45a5}, {0x52, 0x25, 0x5e, 0xbf, 0xe6, 0x5 28}},
1}}, "Hurricane"
"Tent"}, },
{{0x835b84e2,{0xf10c, 0x45cb, 0x958f}, {0x18, 0x3a, 0xc2, 0x2a, 0xe5, 0x2 { {0xeff260d4,{0x46d5, 0x4fb5, 0xc79c}, {0x5e, 0x06, 0xc8, 0xab, 0x7a, 0x
8}}, 2b}},
"Tipup Up"}, "Lightning"
{{0xce06fc92,{0xbb0c, 0x4ec1, 0xda93}, {0x64, 0x4a, 0x60, 0xbe, 0x40, 0x9 },
0}}, { {0xc3d70220,{0x5154, 0x4766, 0xf0af}, {0xdf, 0x86, 0x74, 0x40, 0x5f, 0x
"Topup Down"}, 8c}},
"Rain"
},
{ {0xf2dfbc91,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Blue Flag"
},
{ {0xf2dfbc92,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Dark Blue Flag"
},
{ {0xf2dfbc93,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Brown Flag"
},
{ {0xf2dfbc94,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Yellow Flag"
},
{ {0xf2dfbc95,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Red Flag 2"
},
{ {0xf2dfbc96,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Dark Red Flag"
},
{ {0xf2dfbc97,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Dark Green Flag"
},
{ {0xf2dfbc98,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Green Flag"
},
{ {0xf2dfbc99,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Blue-Green Flag"
},
{ {0xf2dfbc9a,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Light Blue Flag"
},
{ {0x623e1ee1,{0xaf27, 0x100f, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
32}},
"Dark Blue Map Pin"
},
{ {0xf2dfbc9d,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Blue Map Pin"
},
{ {0xf2dfbc9e,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Yellow Map Pin"
},
{ {0xf2dfbc9f,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Brown Map Pin"
},
{ {0xf2dfbca0,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Red Map Pin"
},
{ {0xf2dfbca1,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Dark Red Map Pin"
},
{ {0xf2dfbca2,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Green Map Pin"
},
{ {0xf2dfbca3,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Dark Green Map Pin"
},
{ {0xf2dfbca4,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Gray Map Pin"
},
{ {0xf2dfbca5,{0x7ae6, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Dark Gray Map Pin"
},
{ {0xd1703de0,{0x5c45, 0x11d5, 0xb8ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Green Dot"
},
{ {0xd1703de1,{0x5c45, 0x11d5, 0xb8ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Dark Green Dot"
},
{ {0xd1703de2,{0x5c45, 0x11d5, 0xb8ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Blue Dot"
},
{ {0xd1703de3,{0x5c45, 0x11d5, 0xb8ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Dark Blue Dot"
},
{ {0xd1703de5,{0x5c45, 0x11d5, 0xb8ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Red Dot"
},
{ {0x45c088e0,{0x672d, 0x11d5, 0xcbae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Dark Red Dot"
},
{ {0x45c088e1,{0x672d, 0x11d5, 0xcbae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Yellow Dot"
},
{ {0x45c088e2,{0x672d, 0x11d5, 0xcbae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Brown Dot"
},
{ {0x45c088e3,{0x672d, 0x11d5, 0xcbae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Light Blue Dot"
},
{ {0xbde3a8a1,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Blue-Green Dot"
},
{ {0xbde3a8a2,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Small Green Dot"
},
{ {0xbde3a8a3,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Small Dark Green Dot"
},
{ {0xbde3a8a4,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Small Blue Dot"
},
{ {0xbde3a8a5,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Small Dark Blue Dot"
},
{ {0xbde3a8a6,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Small Red Dot"
},
{ {0xbde3a8a7,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Small Dark Red Dot"
},
{ {0xbde3a8a8,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Small Yellow Dot"
},
{ {0xbde3a8a9,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Small Brown Dot"
},
{ {0xbde3a8aa,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Small Light Blue Dot"
},
{ {0xbde3a8ab,{0x7aeb, 0x11d5, 0xf3ae}, {0x00, 0x01, 0x02, 0x31, 0x5f, 0x
fd}},
"Small Blue-Green Dot"
},
{ {0x623e1ee0,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
32}},
"Red Flag"
},
{ {0x623e1ee1,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
32}},
"Map Pin"
},
{ {0x623e1ee2,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
32}},
"Yellow Square"
},
{ {0x623e1ee3,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
32}},
"Red X"
},
{ {0x623e1ee4,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
32}},
"Blue Circle"
},
{ {0x623e1ee5,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
32}},
"House"
},
{ {0x623e1ee7,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
32}},
"Triangle"
},
{ {0x623e1ee8,{0xaf27, 0x11d3, 0x29bc}, {0x00, 0x50, 0x04, 0x02, 0xf5, 0x
32}},
"Green Star"
},
{ {0x9d277805,{0xe2f8, 0x4f43, 0x3f97}, {0x35, 0x0d, 0x40, 0xae, 0x5c, 0x
d3}},
"Geocache"
},
{ {0xcb8aad04,{0xcc2d, 0x47f2, 0x428a}, {0x80, 0xf7, 0xd6, 0x68, 0xed, 0x
32}},
"Geocache Found"
},
{ {0x7341c1f4,{0xdecd, 0x4d35, 0x45a5}, {0x52, 0x25, 0x5e, 0xbf, 0xe6, 0x
51}},
"Tent"
},
{ {0x835b84e2,{0xf10c, 0x45cb, 0x958f}, {0x18, 0x3a, 0xc2, 0x2a, 0xe5, 0x
28}},
"Tipup Up"
},
{ {0xce06fc92,{0xbb0c, 0x4ec1, 0xda93}, {0x64, 0x4a, 0x60, 0xbe, 0x40, 0x
90}},
"Topup Down"
},
}; };
int FindIconByName( const char *name, GUID *guid ) { int FindIconByName(const char* name, GUID* guid)
int i = 0; {
for ( i = 0; i < (sizeof(default_guids)/sizeof(struct defguid)); i++ int i = 0;
) for (i = 0; i < (sizeof(default_guids)/sizeof(struct defguid)); i++) {
{ if (!case_ignore_strcmp(name, default_guids[i].name)) {
if ( !case_ignore_strcmp(name, default_guids[i].name)) { memcpy(guid, &(default_guids[i].guid), sizeof(GUID));
memcpy( guid, &(default_guids[i].guid), sizeof(GUID) return 1;
); }
return 1; }
} return 0;
}
return 0;
} }
int FindIconByGuid( GUID *guid, char **name ) { int FindIconByGuid(GUID* guid, char** name)
int i = 0; {
for ( i = 0; i < (sizeof(default_guids)/sizeof(struct defguid)); i++ int i = 0;
) for (i = 0; i < (sizeof(default_guids)/sizeof(struct defguid)); i++) {
{ if (!memcmp(guid, &default_guids[i].guid, sizeof(GUID))) {
if ( !memcmp(guid, &default_guids[i].guid, sizeof(GUID))) { *name = (char*) default_guids[i].name;
*name = default_guids[i].name; return 1;
return 1; }
} }
} return 0;
return 0;
} }
 End of changes. 4 change blocks. 
667 lines changed or deleted 878 lines changed or added


 ansi_x3_4_1968.h   ansi_x3_4_1968.h 
skipping to change at line 39 skipping to change at line 39
{ {
"ANSI_X3.4-1968", "367", "ANSI_X3.4-1986", "ASCII", "ANSI_X3.4-1968", "367", "ANSI_X3.4-1986", "ASCII",
"CP367", "csASCII", "IBM367", "ISO646-US", "CP367", "csASCII", "IBM367", "ISO646-US",
"ISO646.1991-IRV", "iso-ir-6", "ISO_646.irv:1991", "us", "ISO646.1991-IRV", "iso-ir-6", "ISO_646.irv:1991", "us",
NULL NULL
}; };
#define cet_ucs4_ofs_ansi_x3_4_1968 128 #define cet_ucs4_ofs_ansi_x3_4_1968 128
#define cet_ucs4_cnt_ansi_x3_4_1968 1 #define cet_ucs4_cnt_ansi_x3_4_1968 1
const int cet_ucs4_map_ansi_x3_4_1968[cet_ucs4_cnt_ansi_x3_4_1968]; const int cet_ucs4_map_ansi_x3_4_1968[cet_ucs4_cnt_ansi_x3_4_1968] = {0};
#define cet_ucs4_to_ansi_x3_4_1968_ct 1 #define cet_ucs4_to_ansi_x3_4_1968_ct 1
const cet_ucs4_link_t cet_ucs4_to_ansi_x3_4_1968_links[cet_ucs4_to_ansi_x3_ 4_1968_ct]; const cet_ucs4_link_t cet_ucs4_to_ansi_x3_4_1968_links[cet_ucs4_to_ansi_x3_ 4_1968_ct] = {{0}};
// #define cet_ucs4_to_ansi_x3_4_1968_extra_ct 200 // #define cet_ucs4_to_ansi_x3_4_1968_extra_ct 200
const cet_ucs4_link_t cet_ucs4_to_ansi_x3_4_1968_extra[] = const cet_ucs4_link_t cet_ucs4_to_ansi_x3_4_1968_extra[] =
/* ------------------------------------------*/ /* ------------------------------------------*/
/* !!! sorted by UCS-4 value !!! */ /* !!! sorted by UCS-4 value !!! */
/* ------------------------------------------*/ /* ------------------------------------------*/
{ {
{0x00C0, (unsigned char) 'A'}, // latin capital letter a with grave {0x00C0, (unsigned char) 'A'}, // latin capital letter a with grave
{0x00C1, (unsigned char) 'A'}, // latin capital letter a with acute {0x00C1, (unsigned char) 'A'}, // latin capital letter a with acute
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 appname.h   appname.h 
// $Id: appname.h,v 1.2 2009/09/06 17:04:36 robertl Exp $ // $Id: appname.h,v 1.2 2009-09-06 17:04:36 robertl Exp $
// //
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 avltree.h   avltree.h 
skipping to change at line 30 skipping to change at line 30
*/ */
#ifndef AVLTREE_H_INCLUDED #ifndef AVLTREE_H_INCLUDED
#define AVLTREE_H_INCLUDED #define AVLTREE_H_INCLUDED
#include "defs.h" #include "defs.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
typedef int (*avltree_compare_cb) (const char *, const char *); typedef int (*avltree_compare_cb)(const char*, const char*);
typedef struct avltree_s typedef struct avltree_s {
{
#ifdef MEM_DEBUG #ifdef MEM_DEBUG
const int magic; const int magic;
#endif #endif
struct avlnode_s *root; struct avlnode_s* root;
const char *module; const char* module;
int count; /* number of items in tree */ int count; /* number of items in tree */
int options; int options;
const char *key; const char* key;
int key_sz; int key_sz;
avltree_compare_cb compare; avltree_compare_cb compare;
} avltree_t; } avltree_t;
typedef struct avlnode_s { typedef struct avlnode_s {
int balance; int balance;
const char *key; const char* key;
const void *data; const void* data;
struct avlnode_s *left; struct avlnode_s* left;
struct avlnode_s *right; struct avlnode_s* right;
} avlnode_t; } avlnode_t;
/* options for avltree_init */ /* options for avltree_init */
#define AVLTREE_ASCENDING 0 /* default */ #define AVLTREE_ASCENDING 0 /* default */
#define AVLTREE_DESCENDING 1 #define AVLTREE_DESCENDING 1
#define AVLTREE_CASE_SENSITIVE 0 /* default */ #define AVLTREE_CASE_SENSITIVE 0 /* default */
#define AVLTREE_NON_CASE_SENSITIVE 2 #define AVLTREE_NON_CASE_SENSITIVE 2
#define AVLTREE_STATIC_KEYS 128 #define AVLTREE_STATIC_KEYS 128
#define AVLTREE_PARANOIAC 256 /* STOP on "duplicate key" ( insert) or on "not found" (delete) */ #define AVLTREE_PARANOIAC 256 /* STOP on "duplicate key" ( insert) or on "not found" (delete) */
/* Allocate and initialize an AVL Tree */ /* Allocate and initialize an AVL Tree */
avltree_t *avltree_init(const int options, const char *module); avltree_t* avltree_init(const int options, const char* module);
/* Destroy an AVL Tree */ /* Destroy an AVL Tree */
void avltree_done(avltree_t *tree); void avltree_done(avltree_t* tree);
/* Delete all items of tree [tree]; returns number of deleted items */ /* Delete all items of tree [tree]; returns number of deleted items */
int avltree_clear(avltree_t *tree); int avltree_clear(avltree_t* tree);
/* Get number of items in tree */ /* Get number of items in tree */
int avltree_count(const avltree_t *tree); int avltree_count(const avltree_t* tree);
/* Delete item with key [key] */ /* Delete item with key [key] */
int avltree_delete(avltree_t *tree, const char *key); int avltree_delete(avltree_t* tree, const char* key);
/* Duplicate an existing tree */ /* Duplicate an existing tree */
avltree_t *avltree_dupe(const avltree_t *tree, const char *module); avltree_t* avltree_dupe(const avltree_t* tree, const char* module);
/* Find key [key] in tree */ /* Find key [key] in tree */
int avltree_find(const avltree_t *tree, const char *key, const void **data) ; int avltree_find(const avltree_t* tree, const char* key, const void** data) ;
/* Get the first (the MIN-) entry of the tree */ /* Get the first (the MIN-) entry of the tree */
const char *avltree_first(const avltree_t *tree, const void **data); const char* avltree_first(const avltree_t* tree, const void** data);
/* Get the current height of the tree */ /* Get the current height of the tree */
int avltree_height(const avltree_t *tree); int avltree_height(const avltree_t* tree);
/* Insert key [key] and [data] into tree */ /* Insert key [key] and [data] into tree */
int avltree_insert(avltree_t *tree, const char *key, const void *data); int avltree_insert(avltree_t* tree, const char* key, const void* data);
/* Get the next (the entry above [key]) */ /* Get the next (the entry above [key]) */
const char *avltree_next(const avltree_t *tree, const char *key, const void **data); const char* avltree_next(const avltree_t* tree, const char* key, const void ** data);
#endif /* AVLTREE_H_INCLUDED */ #endif /* AVLTREE_H_INCLUDED */
 End of changes. 16 change blocks. 
27 lines changed or deleted 26 lines changed or added


 babeldata.h   babeldata.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: babeldata.h,v 1.8 2010/06/19 23:59:06 robertl Exp $ // $Id: babeldata.h,v 1.8 2010-06-19 23:59:06 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 cet.h   cet.h 
skipping to change at line 31 skipping to change at line 31
#ifndef CET_H #ifndef CET_H
#define CET_H #define CET_H
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>
#define CET_ERROR 1 #define CET_ERROR 1
#define CET_SUCCESS 0 #define CET_SUCCESS 0
typedef struct cet_ucs4_link_s typedef struct cet_ucs4_link_s {
{ int value; /* UCS-4 value */
int value; /* UCS-4 value */ short origin; /* associeted character */
short origin; /* associeted character */
} cet_ucs4_link_t; } cet_ucs4_link_t;
typedef struct cet_cs_vec_s typedef struct cet_cs_vec_s {
{ const char* name; /* name of character set */
const char *name; /* name of character set const char** alias; /* alias table */
*/ struct cet_cs_vec_s* fallback; /* fallback character set
const char **alias; /* alias table */
*/ void* unused;
struct cet_cs_vec_s *fallback; /* fallback character set const int* ucs4_map; /* char to UCS-4 value table */
*/ const int ucs4_offset; /* first non standard charac
void *unused; ter */
const int *ucs4_map; /* char to UCS-4 value table const int ucs4_count; /* values in table
*/ */
const int ucs4_offset; /* first non standard charac const cet_ucs4_link_t* ucs4_link; /* UCS-4 to char backward links */
ter */ const int ucs4_links; /* number of links
const int ucs4_count; /* values in table */
*/ const cet_ucs4_link_t* ucs4_extra; /* Non standard UCS-4 to ... */
const cet_ucs4_link_t *ucs4_link; /* UCS-4 to char backward li const int ucs4_extras; /* number of extra links
nks */ */
const int ucs4_links; /* number of links struct cet_cs_vec_s* next;
*/
const cet_ucs4_link_t *ucs4_extra; /* Non standard UCS-4 to ...
*/
const int ucs4_extras; /* number of extra links
*/
struct cet_cs_vec_s *next;
} cet_cs_vec_t; } cet_cs_vec_t;
/* single char/value transmission */ /* single char/value transmission */
int cet_utf8_to_ucs4(const char *str, int *bytes, int *value); int cet_utf8_to_ucs4(const char* str, int* bytes, int* value);
int cet_ucs4_to_utf8(char *dest, size_t dest_size, int value); int cet_ucs4_to_utf8(char* dest, size_t dest_size, int value);
/* single char/value transmission - vec based */ /* single char/value transmission - vec based */
int cet_char_to_ucs4(const char src, const cet_cs_vec_t *vec, int *value); int cet_char_to_ucs4(const char src, const cet_cs_vec_t* vec, int* value);
short cet_utf8_to_char(const char *str, const cet_cs_vec_t *vecint, int *by short cet_utf8_to_char(const char* str, const cet_cs_vec_t* vecint, int* by
tes, int *value); tes, int* value);
short cet_ucs4_to_char(const int value, const cet_cs_vec_t *vec); short cet_ucs4_to_char(const int value, const cet_cs_vec_t* vec);
/* string to string - vector based */ /* string to string - vector based */
char *cet_str_utf8_to_any(const char *src, const cet_cs_vec_t *vec); char* cet_str_utf8_to_any(const char* src, const cet_cs_vec_t* vec);
char *cet_str_any_to_utf8(const char *src, const cet_cs_vec_t *vec); char* cet_str_any_to_utf8(const char* src, const cet_cs_vec_t* vec);
char *cet_str_uni_to_utf8(const short *src, const int length); char* cet_str_uni_to_utf8(const short* src, const int length);
/* UTF-8 string manipulation functions */ /* UTF-8 string manipulation functions */
unsigned int cet_utf8_strlen(const char *str); unsigned int cet_utf8_strlen(const char* str);
char *cet_utf8_strdup(const char *str); char* cet_utf8_strdup(const char* str);
char *cet_utf8_strndup(const char *str, const int maxlen); char* cet_utf8_strndup(const char* str, const int maxlen);
/* unicode functions */ /* unicode functions */
short *cet_str_any_to_uni(const char *src, const cet_cs_vec_t *vec, int *le ngth); short* cet_str_any_to_uni(const char* src, const cet_cs_vec_t* vec, int* le ngth);
#endif #endif
 End of changes. 8 change blocks. 
41 lines changed or deleted 34 lines changed or added


 cet_util.h   cet_util.h 
skipping to change at line 39 skipping to change at line 39
#endif #endif
#if HAVE_LIBEXPAT #if HAVE_LIBEXPAT
# include <expat.h> # include <expat.h>
#else #else
typedef char XML_Char; typedef char XML_Char;
#endif #endif
#include "cet.h" #include "cet.h"
cet_cs_vec_t *cet_find_cs_by_name(const char *name); cet_cs_vec_t* cet_find_cs_by_name(const char* name);
void cet_register(void); void cet_register(void);
void cet_deregister(void); void cet_deregister(void);
/* short hand transmissions */ /* short hand transmissions */
char *cet_str_utf8_to_cp1252(const char *src); char* cet_str_utf8_to_cp1252(const char* src);
char *cet_str_cp1252_to_utf8(const char *src); char* cet_str_cp1252_to_utf8(const char* src);
extern cet_cs_vec_t cet_cs_vec_cp1252; extern cet_cs_vec_t cet_cs_vec_cp1252;
char *cet_str_iso8859_1_to_utf8(const char *src); char* cet_str_iso8859_1_to_utf8(const char* src);
char *cet_str_utf8_to_iso8859_1(const char *src); char* cet_str_utf8_to_iso8859_1(const char* src);
extern cet_cs_vec_t cet_cs_vec_iso8859_1; extern cet_cs_vec_t cet_cs_vec_iso8859_1;
char *cet_str_iso8859_15_to_utf8(const char *src); char* cet_str_iso8859_15_to_utf8(const char* src);
char *cet_str_utf8_to_iso8859_15(const char *src); char* cet_str_utf8_to_iso8859_15(const char* src);
extern const cet_cs_vec_t cet_cs_vec_iso8859_15; extern const cet_cs_vec_t cet_cs_vec_iso8859_15;
char *cet_str_utf8_to_us_ascii(const char *src); char* cet_str_utf8_to_us_ascii(const char* src);
char *cet_str_us_ascii_to_utf8(const char *src); char* cet_str_us_ascii_to_utf8(const char* src);
extern cet_cs_vec_t cet_cs_vec_ansi_x3_4_1968; extern cet_cs_vec_t cet_cs_vec_ansi_x3_4_1968;
short *cet_str_utf8_to_uni(const char *src, int *length); short* cet_str_utf8_to_uni(const char* src, int* length);
extern cet_cs_vec_t cet_cs_vec_utf8; extern cet_cs_vec_t cet_cs_vec_utf8;
/* Missing defines in older expat libraries | CET-REVIEW */ /* Missing defines in older expat libraries | CET-REVIEW */
/* Taken from expat_external.h (Expat 1.95.7) */ /* Taken from expat_external.h (Expat 1.95.7) */
#ifndef XML_STATUS_OK #ifndef XML_STATUS_OK
# define XML_STATUS_OK 1 # define XML_STATUS_OK 1
#endif #endif
skipping to change at line 97 skipping to change at line 97
If this is the case for your platform, please file a bug report If this is the case for your platform, please file a bug report
with information on how to identify your platform via the C with information on how to identify your platform via the C
pre-processor and how to specify the same calling convention as the pre-processor and how to specify the same calling convention as the
platform's malloc() implementation. platform's malloc() implementation.
*/ */
#define XMLCALL #define XMLCALL
#endif #endif
#endif /* not defined XMLCALL */ #endif /* not defined XMLCALL */
#if HAVE_LIBEXPAT #if HAVE_LIBEXPAT
int XMLCALL cet_lib_expat_UnknownEncodingHandler(void *data, const XML_Char *encoding, XML_Encoding *info); int XMLCALL cet_lib_expat_UnknownEncodingHandler(void* data, const XML_Char * encoding, XML_Encoding* info);
#endif #endif
/* helpers */ /* helpers */
char *cet_str_uni_to_any(const short *src, int length, const cet_cs_vec_t * char* cet_str_uni_to_any(const short* src, int length, const cet_cs_vec_t*
dest_vec); dest_vec);
char *cet_str_any_to_any(const char *src, const cet_cs_vec_t *src_vec, cons char* cet_str_any_to_any(const char* src, const cet_cs_vec_t* src_vec, cons
t cet_cs_vec_t *dest_vec); t cet_cs_vec_t* dest_vec);
int cet_valid_char(const char *src, const cet_cs_vec_t *vec); int cet_valid_char(const char* src, const cet_cs_vec_t* vec);
int cet_gbfprintf(gbfile *stream, const cet_cs_vec_t *src_vec, const char * fmt, ...); int cet_gbfprintf(gbfile* stream, const cet_cs_vec_t* src_vec, const char* fmt, ...);
/* cet_convert_string: !!! ONLY VALID WITHIN 'cet_convert_strings' process !!! */ /* cet_convert_string: !!! ONLY VALID WITHIN 'cet_convert_strings' process !!! */
char *cet_convert_string(char *str); char* cet_convert_string(char* str);
/* gpsbabel extensions */ /* gpsbabel extensions */
void cet_convert_init(const char *cs_name, const int force); void cet_convert_init(const char* cs_name, const int force);
void cet_convert_strings(const cet_cs_vec_t *source, const cet_cs_vec_t *ta void cet_convert_strings(const cet_cs_vec_t* source, const cet_cs_vec_t* ta
rget, const char *format); rget, const char* format);
void cet_convert_deinit(void); void cet_convert_deinit(void);
void cet_disp_character_set_names(FILE *fout); void cet_disp_character_set_names(FILE* fout);
/* /*
* Conversion from XML_Char string to char string. If XML_Char is the * Conversion from XML_Char string to char string. If XML_Char is the
* same as char, these routines do nothing. If XML_Char is a wide * same as char, these routines do nothing. If XML_Char is a wide
* character, xml_convert_to_char_string converts the string to a * character, xml_convert_to_char_string converts the string to a
* newly allocated char string, and xml_free_converted_string frees * newly allocated char string, and xml_free_converted_string frees
* it. * it.
*/ */
const char *xml_convert_to_char_string_n(const XML_Char *str, int *nbytes); const char* xml_convert_to_char_string_n(const XML_Char* str, int* nbytes);
const char *xml_convert_to_char_string(const XML_Char *str); const char* xml_convert_to_char_string(const XML_Char* str);
void xml_free_converted_string(const char *str); void xml_free_converted_string(const char* str);
const char **xml_convert_attrs_to_char_string(const XML_Char **xml_attr); const char** xml_convert_attrs_to_char_string(const XML_Char** xml_attr);
void xml_free_converted_attrs(const char **attr); void xml_free_converted_attrs(const char** attr);
#endif #endif
 End of changes. 14 change blocks. 
27 lines changed or deleted 27 lines changed or added


 config.h   config.h 
skipping to change at line 34 skipping to change at line 34
/* Define to 1 if you have the `z' library (-lz). */ /* Define to 1 if you have the `z' library (-lz). */
/* #undef HAVE_LIBZ */ /* #undef HAVE_LIBZ */
/* Define to 1 if you have the `nanosleep' function. */ /* Define to 1 if you have the `nanosleep' function. */
#define HAVE_NANOSLEEP 1 #define HAVE_NANOSLEEP 1
/* Define to 1 if you have the `sleep' function. */ /* Define to 1 if you have the `sleep' function. */
#define HAVE_SLEEP 1 #define HAVE_SLEEP 1
/* Define to 1 if you have the `glob' function. */
#define HAVE_GLOB 1
/* Define to 1 if you have the `uname' function. */ /* Define to 1 if you have the `uname' function. */
#define HAVE_UNAME 1 #define HAVE_UNAME 1
/* Define if we have va_copy */ /* Define if we have va_copy */
#define HAVE_VA_COPY 1 #define HAVE_VA_COPY 1
/* Define if we have __va_copy */ /* Define if we have __va_copy */
#define HAVE___VA_COPY 1 #define HAVE___VA_COPY 1
/* Define as 1 if your va_list type is an array */ /* Define as 1 if your va_list type is an array */
skipping to change at line 59 skipping to change at line 62
/* Define to the address where bug reports for this package should be sent. */ /* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS" #define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS"
/* Define to the full name of this package. */ /* Define to the full name of this package. */
#define PACKAGE_NAME "GPSBabel" #define PACKAGE_NAME "GPSBabel"
/* Define to the release name of this package. */ /* Define to the release name of this package. */
#define PACKAGE_RELEASE "" #define PACKAGE_RELEASE ""
/* Define to the full name and version of this package. */ /* Define to the full name and version of this package. */
#define PACKAGE_STRING "GPSBabel 1.4.2" #define PACKAGE_STRING "GPSBabel 1.4.4"
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "gpsbabel" #define PACKAGE_TARNAME "gpsbabel"
/* Define to the version of this package. */ /* Define to the version of this package. */
#define PACKAGE_VERSION "1.4.2" #define PACKAGE_VERSION "1.4.4"
/* 1 to enable Palm PDB support */ /* 1 to enable Palm PDB support */
#define PDBFMTS_ENABLED 1 #define PDBFMTS_ENABLED 1
/* 1 to enable shapefile support */ /* 1 to enable shapefile support */
#define SHAPELIB_ENABLED 1 #define SHAPELIB_ENABLED 1
/* Define to 1 if your processor stores words with the most significant byt e /* Define to 1 if your processor stores words with the most significant byt e
first (like Motorola and SPARC, unlike Intel and VAX). */ first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */ /* #undef WORDS_BIGENDIAN */
/* 1 to inhibit our use of zlib. */ /* 1 to inhibit our use of zlib. */
/* #undef ZLIB_INHIBITED */ /* #undef ZLIB_INHIBITED */
/* #undef HAVE_WDK */
 End of changes. 4 change blocks. 
2 lines changed or deleted 5 lines changed or added


 csv_util.h   csv_util.h 
skipping to change at line 22 skipping to change at line 22
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
*/ */
/* function prototypes */ /* function prototypes */
char * char*
#ifndef DEBUG_MEM #ifndef DEBUG_MEM
csv_stringtrim(const char *string, const char *enclosure, int strip_max); csv_stringtrim(const char* string, const char* enclosure, int strip_max);
#else #else
CSV_STRINGTRIM(const char *string, const char *enclosure, int strip_max, DE BUG_PARAMS); CSV_STRINGTRIM(const char* string, const char* enclosure, int strip_max, DE BUG_PARAMS);
#define csv_stringtrim( s, e,m ) CSV_STRINGTRIM( s, e, m, __FILE__, __LINE_ _) #define csv_stringtrim( s, e,m ) CSV_STRINGTRIM( s, e, m, __FILE__, __LINE_ _)
#endif #endif
char * char*
csv_lineparse(const char *stringstart, const char *delimited_by, const char csv_lineparse(const char* stringstart, const char* delimited_by, const char
*enclosed_in, const int line_no); * enclosed_in, const int line_no);
void void
human_to_dec( const char *instr, double *outlat, double *outlon, int which ); human_to_dec(const char* instr, double* outlat, double* outlon, int which);
char * char*
#ifndef DEBUG_MEM #ifndef DEBUG_MEM
csv_stringclean(const char *string, const char *chararray); csv_stringclean(const char* string, const char* chararray);
#else #else
CSV_STRINGCLEAN(const char *string, const char *chararray,DEBUG_PARAMS); CSV_STRINGCLEAN(const char* string, const char* chararray,DEBUG_PARAMS);
#define csv_stringclean(s,c) CSV_STRINGCLEAN(s,c,__FILE__,__LINE__) #define csv_stringclean(s,c) CSV_STRINGCLEAN(s,c,__FILE__,__LINE__)
#endif #endif
void void
xcsv_data_read(void); xcsv_data_read(void);
void void
xcsv_data_write(void); xcsv_data_write(void);
void void
xcsv_file_init(void); xcsv_file_init(void);
void void
xcsv_prologue_add(char *); xcsv_prologue_add(char*);
void void
xcsv_epilogue_add(char *); xcsv_epilogue_add(char*);
void void
xcsv_ifield_add(char *, char *, char *); xcsv_ifield_add(char*, char*, char*);
void void
xcsv_ofield_add(char *, char *, char *, int options); xcsv_ofield_add(char*, char*, char*, int options);
void void
xcsv_destroy_style(void); xcsv_destroy_style(void);
const char * const char*
xcsv_get_char_from_constant_table(char *key); xcsv_get_char_from_constant_table(char* key);
/************************************************************************** **/ /************************************************************************** **/
/* types required for various xcsv functions */ /* types required for various xcsv functions */
/************************************************************************** **/ /************************************************************************** **/
/* something to map fields to waypts */ /* something to map fields to waypts */
#define OPTIONS_NODELIM 1 #define OPTIONS_NODELIM 1
#define OPTIONS_ABSOLUTE 2 #define OPTIONS_ABSOLUTE 2
#define OPTIONS_OPTIONAL 3 #define OPTIONS_OPTIONAL 3
typedef struct field_map { typedef struct field_map {
queue Q; queue Q;
char * key; char* key;
char * val; char* val;
char * printfc; char* printfc;
int hashed_key; int hashed_key;
int options; int options;
} field_map_t; } field_map_t;
/* a queuing struct for prologues / epilogues */ /* a queuing struct for prologues / epilogues */
typedef struct ogue { typedef struct ogue {
queue Q; queue Q;
char * val; char* val;
} ogue_t; } ogue_t;
/* something to map config file constants to chars */ /* something to map config file constants to chars */
typedef struct char_map { typedef struct char_map {
const char * key; const char* key;
const char * chars; const char* chars;
} char_map_t; } char_map_t;
/* /*
* a type describing all the wonderful elements of xcsv files, in a * a type describing all the wonderful elements of xcsv files, in a
* nutshell. * nutshell.
*/ */
typedef struct { typedef struct {
int is_internal; /* bool - is internal (1) or parsed (0) */ int is_internal; /* bool - is internal (1) or parsed (0) */
int prologue_lines; /* # of lines to ignore at top of th int prologue_lines; /* # of lines to ignore at top of the file *
e file */ /
int epilogue_lines; /* # of lines to ignore at bottom of int epilogue_lines; /* # of lines to ignore at bottom of file */
file */
/* header lines for writing at the top of the file. */ /* header lines for writing at the top of the file. */
queue prologue; queue prologue;
/* footer lines for writing at the bottom of the file. */ /* footer lines for writing at the bottom of the file. */
queue epilogue; queue epilogue;
char * field_delimiter; /* comma, quote, etc... */ char* field_delimiter; /* comma, quote, etc... */
char * record_delimiter; /* newline, c/r, etc... */ char* field_encloser; /* doublequote, etc... */
char* record_delimiter; /* newline, c/r, etc... */
char * badchars; /* characters we never write to output */ char* badchars; /* characters we never write to output */
queue ifield; /* input field mapping */ queue ifield; /* input field mapping */
queue * ofield; /* output field mapping */ queue* ofield; /* output field mapping */
int ifield_ct; /* actual # of ifields */ int ifield_ct; /* actual # of ifields */
int ofield_ct; /* actual # of ofields */ int ofield_ct; /* actual # of ofields */
gbfile * xcsvfp; /* ptr to current *open* data file */ gbfile* xcsvfp; /* ptr to current *open* data file */
char * fname; /* ptr to filename of above. */ char* fname; /* ptr to filename of above. */
char * description; /* Description for help text */ char* description; /* Description for help text */
char * extension; /* preferred filename extension (for wrapper char* extension; /* preferred filename extension (for wrapper
s)*/ s)*/
short_handle mkshort_handle;/* handle for mkshort() */ short_handle mkshort_handle;/* handle for mkshort() */
ff_type type; /* format type for GUI wrappers. */ ff_type type; /* format type for GUI wrappers. */
int gps_datum; /* result of GPS_Lookup_Datum_Index */ int gps_datum; /* result of GPS_Lookup_Datum_Index */
gpsdata_type datatype; /* can be wptdata, rtedata or trkdata */ gpsdata_type datatype; /* can be wptdata, rtedata or trkdata */
/* ... or ZERO to keep the old behaviour */ /* ... or ZERO to keep the old behaviour */
} xcsv_file_t; } xcsv_file_t;
/************************************************************************** **/ /************************************************************************** **/
/* obligatory global struct */ /* obligatory global struct */
/************************************************************************** **/ /************************************************************************** **/
extern xcsv_file_t xcsv_file; extern xcsv_file_t xcsv_file;
 End of changes. 28 change blocks. 
52 lines changed or deleted 52 lines changed or added


 deflate.h   deflate.h 
/* deflate.h -- internal compression state /* deflate.h -- internal compression state
* Copyright (C) 1995-2004 Jean-loup Gailly * Copyright (C) 1995-2004 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
/* WARNING: this file should *not* be used by applications. It is /* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h. subject to change. Applications should only use zlib.h.
*/ */
/* @(#) $Id: deflate.h,v 1.1 2006/07/22 20:34:07 oliskoli Exp $ */ /* @(#) $Id: deflate.h,v 1.1 2006-07-22 20:34:07 oliskoli Exp $ */
#ifndef DEFLATE_H #ifndef DEFLATE_H
#define DEFLATE_H #define DEFLATE_H
#include "zutil.h" #include "zutil.h"
/* define NO_GZIP when compiling if you want to disable gzip header and /* define NO_GZIP when compiling if you want to disable gzip header and
trailer creation by deflate(). NO_GZIP would be used to avoid linking i n trailer creation by deflate(). NO_GZIP would be used to avoid linking i n
the crc code when it is not needed. For shared libraries, gzip encoding the crc code when it is not needed. For shared libraries, gzip encoding
should be left enabled. */ should be left enabled. */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 defs.h   defs.h 
skipping to change at line 160 skipping to change at line 160
#endif #endif
/* /*
* Common definitions. There should be no protocol or file-specific * Common definitions. There should be no protocol or file-specific
* data in this file. * data in this file.
*/ */
#define BASE_STRUCT(memberp, struct_type, member_name) \ #define BASE_STRUCT(memberp, struct_type, member_name) \
((struct_type *)((char *)(memberp) - offsetof(struct_type, member_name)) ) ((struct_type *)((char *)(memberp) - offsetof(struct_type, member_name)) )
typedef enum { typedef enum {
fix_unknown=-1, fix_unknown=-1,
fix_none=0, fix_none=0,
fix_2d=1, fix_2d=1,
fix_3d, fix_3d,
fix_dgps, fix_dgps,
fix_pps fix_pps
} fix_type; } fix_type;
typedef enum { typedef enum {
status_unknown=0, status_unknown=0,
status_true, status_true,
status_false status_false
} status_type; } status_type;
/* /*
* Define globally on which kind of data gpsbabel is working. * Define globally on which kind of data gpsbabel is working.
* Important for "file types" that are essentially a communication * Important for "file types" that are essentially a communication
* protocol for a receiver, like the Magellan serial data. * protocol for a receiver, like the Magellan serial data.
*/ */
typedef enum { typedef enum {
trkdata = 1 , unknown_gpsdata = 0,
wptdata, trkdata = 1 ,
rtedata, wptdata,
posndata rtedata,
posndata
} gpsdata_type; } gpsdata_type;
#define NOTHINGMASK 0 #define NOTHINGMASK 0
#define WPTDATAMASK 1 #define WPTDATAMASK 1
#define TRKDATAMASK 2 #define TRKDATAMASK 2
#define RTEDATAMASK 4 #define RTEDATAMASK 4
#define POSNDATAMASK 8 #define POSNDATAMASK 8
/* mask objective testing */ /* mask objective testing */
#define doing_nothing (global_opts.masked_objective == NOTHINGMASK) #define doing_nothing (global_opts.masked_objective == NOTHINGMASK)
#define doing_wpts ((global_opts.masked_objective & WPTDATAMASK) == WPTDATAMASK) #define doing_wpts ((global_opts.masked_objective & WPTDATAMASK) == WPTDATAMASK)
#define doing_trks ((global_opts.masked_objective & TRKDATAMASK) == TRKDATAMASK) #define doing_trks ((global_opts.masked_objective & TRKDATAMASK) == TRKDATAMASK)
#define doing_rtes ((global_opts.masked_objective & RTEDATAMASK) == RTEDATAMASK) #define doing_rtes ((global_opts.masked_objective & RTEDATAMASK) == RTEDATAMASK)
#define doing_posn ((global_opts.masked_objective & POSNDATAMASK) == POSNDATAMASK) #define doing_posn ((global_opts.masked_objective & POSNDATAMASK) == POSNDATAMASK)
typedef struct { typedef struct {
int synthesize_shortnames; int synthesize_shortnames;
int debug_level; int debug_level;
gpsdata_type objective; gpsdata_type objective;
unsigned int masked_objective; unsigned int masked_objective;
int verbose_status; /* set by GUI wrappers for status */ int verbose_status; /* set by GUI wrappers for status */
int smart_icons; int smart_icons;
int smart_names; int smart_names;
cet_cs_vec_t *charset; cet_cs_vec_t* charset;
char *charset_name; char* charset_name;
inifile_t *inifile; inifile_t* inifile;
} global_options; } global_options;
extern global_options global_opts; extern global_options global_opts;
extern const char gpsbabel_version[]; extern const char gpsbabel_version[];
extern time_t gpsbabel_now; /* gpsbabel startup-time; initialized in mai n.c with time() */ extern time_t gpsbabel_now; /* gpsbabel startup-time; initialized in mai n.c with time() */
extern time_t gpsbabel_time; /* gpsbabel startup-time; initialized in mai n.c with current_time(), ! ZERO within testo ! */ extern time_t gpsbabel_time; /* gpsbabel startup-time; initialized in mai n.c with current_time(), ! ZERO within testo ! */
extern int geocaches_present; extern int geocaches_present;
#define MILLI_TO_MICRO(t) (t * 1000) /* Milliseconds to Microseconds */ #define MILLI_TO_MICRO(t) (t * 1000) /* Milliseconds to Microseconds */
#define MICRO_TO_MILLI(t) (t / 1000) /* Microseconds to Milliseconds*/ #define MICRO_TO_MILLI(t) (t / 1000) /* Microseconds to Milliseconds*/
skipping to change at line 233 skipping to change at line 234
/* Short or Long XML Times */ /* Short or Long XML Times */
#define XML_SHORT_TIME 1 #define XML_SHORT_TIME 1
#define XML_LONG_TIME 2 #define XML_LONG_TIME 2
/* /*
* Extended data if waypoint happens to represent a geocache. This is * Extended data if waypoint happens to represent a geocache. This is
* totally voluntary data... * totally voluntary data...
*/ */
typedef enum { typedef enum {
gt_unknown = 0 , gt_unknown = 0 ,
gt_traditional, gt_traditional,
gt_multi, gt_multi,
gt_virtual, gt_virtual,
gt_letterbox, gt_letterbox,
gt_event, gt_event,
gt_suprise, gt_suprise,
gt_webcam, gt_webcam,
gt_earth, gt_earth,
gt_locationless, gt_locationless,
gt_benchmark, /* Extension to Groundspeak for GSAK */ gt_benchmark, /* Extension to Groundspeak for GSAK */
gt_cito, gt_cito,
gt_ape, gt_ape,
gt_mega, gt_mega,
gt_wherigo gt_wherigo
} geocache_type; } geocache_type;
typedef enum { typedef enum {
gc_unknown = 0, gc_unknown = 0,
gc_micro, gc_micro,
gc_other, gc_other,
gc_regular, gc_regular,
gc_large, gc_large,
gc_virtual, gc_virtual,
gc_small gc_small
} geocache_container; } geocache_container;
typedef struct { typedef struct {
int is_html; int is_html;
char *utfstring; char* utfstring;
} utf_string; } utf_string;
typedef struct { typedef struct {
int id; /* The decimal cache number */ int id; /* The decimal cache number */
geocache_type type:5; geocache_type type:5;
geocache_container container:4; geocache_container container:4;
unsigned int diff:6; /* (multiplied by ten internally) */ unsigned int diff:6; /* (multiplied by ten internally) */
unsigned int terr:6; /* (likewise) */ unsigned int terr:6; /* (likewise) */
status_type is_archived:2; status_type is_archived:2;
status_type is_available:2; status_type is_available:2;
time_t exported; status_type is_memberonly:2;
time_t last_found; status_type has_customcoords:2;
char *placer; /* Placer name */ time_t exported;
int placer_id; /* Placer id */ time_t last_found;
char *hint; /* all these UTF8, XML entities removed, May be not HTML char* placer; /* Placer name */
. */ int placer_id; /* Placer id */
utf_string desc_short; char* hint; /* all these UTF8, XML entities removed, May be not HTML. */
utf_string desc_long; utf_string desc_short;
utf_string desc_long;
int favorite_points;
char* personal_note;
} geocache_data ; } geocache_data ;
typedef struct xml_tag { typedef struct xml_tag {
char *tagname; char* tagname;
char *cdata; char* cdata;
int cdatalen; int cdatalen;
char *parentcdata; char* parentcdata;
int parentcdatalen; int parentcdatalen;
char **attributes; char** attributes;
struct xml_tag *parent; struct xml_tag* parent;
struct xml_tag *sibling; struct xml_tag* sibling;
struct xml_tag *child; struct xml_tag* child;
} xml_tag ; } xml_tag ;
typedef void (*fs_destroy)(void *); typedef void (*fs_destroy)(void*);
typedef void (*fs_copy)(void **, void *); typedef void (*fs_copy)(void**, void*);
typedef void (*fs_convert)(void *); typedef void (*fs_convert)(void*);
typedef struct format_specific_data { typedef struct format_specific_data {
long type; long type;
struct format_specific_data *next; struct format_specific_data* next;
fs_destroy destroy; fs_destroy destroy;
fs_copy copy; fs_copy copy;
fs_convert convert; fs_convert convert;
} format_specific_data; } format_specific_data;
typedef struct { typedef struct {
int bbggrr; // 32 bit color: Blue/Green/Red. < 0 == unknown. int bbggrr; // 32 bit color: Blue/Green/Red. < 0 == unknown.
unsigned char opacity; // 0 == transparent. 255 == opaque. unsigned char opacity; // 0 == transparent. 255 == opaque.
} gb_color; } gb_color;
format_specific_data *fs_chain_copy( format_specific_data *source ); format_specific_data* fs_chain_copy(format_specific_data* source);
void fs_chain_destroy( format_specific_data *chain ); void fs_chain_destroy(format_specific_data* chain);
format_specific_data *fs_chain_find( format_specific_data *chain, long type format_specific_data* fs_chain_find(format_specific_data* chain, long type)
); ;
void fs_chain_add( format_specific_data **chain, format_specific_data *data void fs_chain_add(format_specific_data** chain, format_specific_data* data)
); ;
typedef struct fs_xml { typedef struct fs_xml {
format_specific_data fs; format_specific_data fs;
xml_tag *tag; xml_tag* tag;
} fs_xml; } fs_xml;
fs_xml *fs_xml_alloc( long type ); fs_xml* fs_xml_alloc(long type);
#define FS_GPX 0x67707800L #define FS_GPX 0x67707800L
#define FS_AN1W 0x616e3177L #define FS_AN1W 0x616e3177L
#define FS_AN1L 0x616e316cL #define FS_AN1L 0x616e316cL
#define FS_AN1V 0x616e3176L #define FS_AN1V 0x616e3176L
#define FS_OZI 0x6f7a6900L #define FS_OZI 0x6f7a6900L
#define FS_GMSD 0x474d5344L /* GMSD = Garmin specific data */ #define FS_GMSD 0x474d5344L /* GMSD = Garmin specific data */
#define FS_LOWRANCEUSR4 0x615f234cL
/* /*
* Structures and functions for multiple URLs per waypoint. * Structures and functions for multiple URLs per waypoint.
*/ */
typedef struct url_link { typedef struct url_link {
struct url_link *url_next; struct url_link* url_next;
char *url; char* url;
char *url_link_text; char* url_link_text;
} url_link; } url_link;
/* /*
* Misc bitfields inside struct waypoint; * Misc bitfields inside struct waypoint;
*/ */
typedef struct { typedef struct {
unsigned int icon_descr_is_dynamic:1; unsigned int icon_descr_is_dynamic:1;
unsigned int shortname_is_synthetic:1; unsigned int shortname_is_synthetic:1;
unsigned int cet_converted:1; /* strings are converted to unsigned int cet_converted:1; /* strings are converted to
UTF8; interesting only for input */ UTF8; interesting only for input */
unsigned int fmt_use:1; /* lightweight "extra data" unsigned int fmt_use:1; /* lightweight "extra data"
*/ */
/* "flagged fields" */ /* "flagged fields" */
unsigned int temperature:1; /* temperature field is set unsigned int temperature:1; /* temperature field is set */
*/ unsigned int proximity:1; /* proximity field is set */
unsigned int proximity:1; /* proximity field is set */ unsigned int course:1; /* course field is set */
unsigned int course:1; /* course field is set */ unsigned int speed:1; /* speed field is set */
unsigned int speed:1; /* speed field is set */ unsigned int depth:1; /* depth field is set */
unsigned int depth:1; /* depth field is set */ /* !ToDo!
/* !ToDo! unsigned int altitude:1; /+ altitude field is set +/
unsigned int altitude:1; /+ altitude field is set +/ ... and others
... and others */
*/ unsigned int is_split:1; /* the waypoint represents a split *
unsigned int is_split:1; /* the waypoint represents a /
split */ unsigned int new_trkseg:1; /* True if first in new trkseg. */
unsigned int new_trkseg:1; /* True if first in new trks
eg. */
} wp_flags; } wp_flags;
// These are dicey as they're collected on read. Subsequent filters may cha nge // These are dicey as they're collected on read. Subsequent filters may cha nge
// things, though it's u nlikely to matter in practical terms. Don't use t hese // things, though it's u nlikely to matter in practical terms. Don't use t hese
// if a false positive would be deleterious. // if a false positive would be deleterious.
typedef struct { typedef struct {
unsigned int trait_geocaches:1; unsigned int trait_geocaches:1;
unsigned int trait_heartrate:1; unsigned int trait_heartrate:1;
unsigned int trait_cadence:1; unsigned int trait_cadence:1;
skipping to change at line 388 skipping to change at line 394
#define WAYPT_UNSET(wpt,member) wpt->wpt_flags.member = 0 #define WAYPT_UNSET(wpt,member) wpt->wpt_flags.member = 0
#define WAYPT_HAS(wpt,member) (wpt->wpt_flags.member) #define WAYPT_HAS(wpt,member) (wpt->wpt_flags.member)
/* /*
* This is a waypoint, as stored in the GPSR. It tries to not * This is a waypoint, as stored in the GPSR. It tries to not
* cater to any specific model or protocol. Anything that needs to * cater to any specific model or protocol. Anything that needs to
* be truncated, edited, or otherwise trimmed should be done on the * be truncated, edited, or otherwise trimmed should be done on the
* way to the target. * way to the target.
*/ */
typedef struct { typedef struct {
queue Q; /* Master waypoint q. Not for use queue Q; /* Master waypoint q. Not for use
by modules. */ by modules. */
double latitude; /* Degrees */ double latitude; /* Degrees */
double longitude; /* Degrees */ double longitude; /* Degrees */
double altitude; /* Meters. */ double altitude; /* Meters. */
/* /*
* The "thickness" of a waypoint; adds an element of 3D. Can be * The "thickness" of a waypoint; adds an element of 3D. Can be
* used to construct rudimentary polygons for, say, airspace * used to construct rudimentary polygons for, say, airspace
* definitions. The units are meters. * definitions. The units are meters.
*/ */
double depth; double depth;
/* /*
* An alarm trigger value that can be considered to be a circle * An alarm trigger value that can be considered to be a circle
* surrounding a waypoint (or cylinder if depth is also defined). * surrounding a waypoint (or cylinder if depth is also defined).
* The units are meters. * The units are meters.
*/ */
double proximity; double proximity;
/* shortname is a waypoint name as stored in receiver. It should /* shortname is a waypoint name as stored in receiver. It should
* strive to be, well, short, and unique. Enforcing length and * strive to be, well, short, and unique. Enforcing length and
* character restrictions is the job of the output. A typical * character restrictions is the job of the output. A typical
* minimum length for shortname is 6 characters for NMEA units, * minimum length for shortname is 6 characters for NMEA units,
* 8 for Magellan and 10 for Vista. These are only guidelines. * 8 for Magellan and 10 for Vista. These are only guidelines.
*/ */
char *shortname; char* shortname;
/* /*
* description is typically a human readable description of the * description is typically a human readable description of the
* waypoint. It may be used as a comment field in some receivers. * waypoint. It may be used as a comment field in some receivers.
* These are probably under 40 bytes, but that's only a guideline. * These are probably under 40 bytes, but that's only a guideline.
*/ */
char *description; char* description;
/* /*
* notes are relatively long - over 100 characters - prose associate * notes are relatively long - over 100 characters - prose associated
d * with the above. Unlike shortname and description, these are never
* with the above. Unlike shortname and description, these are nev * used to compute anything else and are strictly "passed through".
er * Few formats support this.
* used to compute anything else and are strictly "passed through". */
* Few formats support this. char* notes;
*/
char *notes; /* This is a bit icky. Multiple waypoint support is an
* afterthought and I don't want to change our data structures.
/* This is a bit icky. Multiple waypoint support is an * So we have the first in the waypoint itself and subsequent
* afterthought and I don't want to change our data structures. * ones in a linked list.
* So we have the first in the waypoint itself and subsequent * We also use an implicit anonymous union here, so these three
* ones in a linked list. * members must match struct url_link...
* We also use an implicit anonymous union here, so these three */
* members must match struct url_link... struct url_link* url_next;
*/ char* url;
struct url_link *url_next; char* url_link_text;
char *url;
char *url_link_text; wp_flags wpt_flags;
const char* icon_descr;
wp_flags wpt_flags; time_t creation_time; /* standardized in UTC/GMT */
const char *icon_descr; int microseconds; /* Optional millionths of a second. */
time_t creation_time; /* standardized in UTC/GMT */
int microseconds; /* Optional millionths of a second. */ /*
* route priority is for use by the simplify filter. If we have
/* * some reason to believe that the route point is more important,
* route priority is for use by the simplify filter. If we have * we can give it a higher (numerically; 0 is the lowest) priority.
* some reason to believe that the route point is more important, * This causes it to be removed last.
* we can give it a higher (numerically; 0 is the lowest) priority. * This is currently used by the saroute input filter to give named
* This causes it to be removed last. * waypoints (representing turns) a higher priority.
* This is currently used by the saroute input filter to give named * This is also used by the google input filter because they were
* waypoints (representing turns) a higher priority. * nice enough to use exactly the same priority scheme.
* This is also used by the google input filter because they were */
* nice enough to use exactly the same priority scheme. int route_priority;
*/
int route_priority; /* Optional dilution of precision: positional, horizontal, veritcal.
* 1 <= dop <= 50
/* Optional dilution of precision: positional, horizontal, veritcal */
. float hdop;
* 1 <= dop <= 50 float vdop;
*/ float pdop;
float hdop; float course; /* Optional: degrees true */
float vdop; float speed; /* Optional: meters per second. */
float pdop; fix_type fix; /* Optional: 3d, 2d, etc. */
float course; /* Optional: degrees true */ int sat; /* Optional: number of sats used for fix */
float speed; /* Optional: meters per second. */
fix_type fix; /* Optional: 3d, 2d, etc. */ unsigned char heartrate; /* Beats/min. likely to get moved to fs. */
int sat; /* Optional: number of sats used for fix */ unsigned char cadence; /* revolutions per minute */
float power; /* watts, as measured by cyclists */
unsigned char heartrate; /* Beats/min. likely to get moved to fs. */ float temperature; /* Degrees celsius */
unsigned char cadence; /* revolutions per minute */ float odometer_distance; /* Meters? */
float power; /* watts, as measured by cyclists */ const geocache_data* gc_data;
float temperature; /* Degrees celsius */ format_specific_data* fs;
const geocache_data *gc_data; session_t* session; /* pointer to a session struct */
format_specific_data *fs; void* extra_data; /* Extra data added by, say, a filter. */
session_t *session; /* pointer to a session struct */
void *extra_data; /* Extra data added by, say, a filter. */
} waypoint; } waypoint;
typedef struct { typedef struct {
queue Q; /* Link onto parent list. */ queue Q; /* Link onto parent list. */
queue waypoint_list; /* List of child waypoints */ queue waypoint_list; /* List of child waypoints */
char *rte_name; char* rte_name;
char *rte_desc; char* rte_desc;
char *rte_url; char* rte_url;
int rte_num; int rte_num;
int rte_waypt_ct; /* # waypoints in waypoint list */ int rte_waypt_ct; /* # waypoints in waypoint list */
format_specific_data *fs; format_specific_data* fs;
unsigned short cet_converted; /* strings are converted to UTF8; in unsigned short cet_converted; /* strings are converted to UTF8; in
teresting only for input */ teresting only for input */
gb_color line_color; /* Optional line color for rendering * gb_color line_color; /* Optional line color for rendering */
/ int line_width; /* in pixels (sigh). < 0 is unknown. */
int line_width; /* in pixels (sigh). < 0 is unknown. */ session_t* session; /* pointer to a session struct */
session_t *session; /* pointer to a session struct */
} route_head; } route_head;
/* /*
* Structure of recomputed track/roue data. * Structure of recomputed track/roue data.
*/ */
typedef struct { typedef struct {
double distance_meters; double distance_meters;
double max_alt; double max_alt; /* unknown_alt => invalid */
double min_alt; double min_alt; /* -unknown_alt => invalid */
double max_spd; /* Meters/sec */ double max_spd; /* Meters/sec */
double min_spd; /* Meters/sec */ double min_spd; /* Meters/sec */
double avg_hrt; /* Avg Heartrate */ double avg_hrt; /* Avg Heartrate */
double avg_cad; /* Avg Cadence */ double avg_cad; /* Avg Cadence */
time_t start; /* Min time */ time_t start; /* Min time */
time_t end; /* Max time */ time_t end; /* Max time */
int min_hrt; /* Min Heartrate */ int min_hrt; /* Min Heartrate */
int max_hrt; /* Max Heartrate */ int max_hrt; /* Max Heartrate */
int max_cad; /* Max Cadence */ int max_cad; /* Max Cadence */
} computed_trkdata; } computed_trkdata;
/* /*
* Bounding box information. * Bounding box information.
*/ */
typedef struct { typedef struct {
double max_lat; double max_lat;
double max_lon; double max_lon;
double max_alt; double max_alt; /* unknown_alt => invalid */
double min_lat; double min_lat;
double min_lon; double min_lon;
double min_alt; double min_alt; /* -unknown_alt => invalid */
} bounds; } bounds;
typedef struct { typedef struct {
volatile int request_terminate; volatile int request_terminate;
} posn_status; } posn_status;
extern posn_status tracking_status; extern posn_status tracking_status;
typedef void (*ff_init) (char const *); typedef void (*ff_init)(char const*);
typedef void (*ff_deinit) (void); typedef void (*ff_deinit)(void);
typedef void (*ff_read) (void); typedef void (*ff_read)(void);
typedef void (*ff_write) (void); typedef void (*ff_write)(void);
typedef void (*ff_exit) (void); typedef void (*ff_exit)(void);
typedef void (*ff_writeposn) (waypoint *); typedef void (*ff_writeposn)(waypoint*);
typedef waypoint * (*ff_readposn) (posn_status *); typedef waypoint* (*ff_readposn)(posn_status*);
#ifndef DEBUG_MEM #ifndef DEBUG_MEM
char * get_option(const char *iarglist, const char *argname); char* get_option(const char* iarglist, const char* argname);
#else #else
#define DEBUG_PARAMS const char *file, const int line #define DEBUG_PARAMS const char *file, const int line
char *GET_OPTION(const char *iarglist, const char *argname, DEBUG_PARAMS); char* GET_OPTION(const char* iarglist, const char* argname, DEBUG_PARAMS);
#define get_option(iarglist, argname) GET_OPTION(iarglist, argname, __FILE_ _, __LINE__) #define get_option(iarglist, argname) GET_OPTION(iarglist, argname, __FILE_ _, __LINE__)
#endif #endif
typedef void (*filter_init) (char const *); typedef void (*filter_init)(char const*);
typedef void (*filter_process) (void); typedef void (*filter_process)(void);
typedef void (*filter_deinit) (void); typedef void (*filter_deinit)(void);
typedef void (*filter_exit) (void); typedef void (*filter_exit)(void);
typedef void (*waypt_cb) (const waypoint *); typedef void (*waypt_cb)(const waypoint*);
typedef void (*route_hdr)(const route_head *); typedef void (*route_hdr)(const route_head*);
typedef void (*route_trl)(const route_head *); typedef void (*route_trl)(const route_head*);
void waypt_add (waypoint *); void waypt_add(waypoint*);
waypoint * waypt_dupe (const waypoint *); waypoint* waypt_dupe(const waypoint*);
waypoint * waypt_new(void); waypoint* waypt_new(void);
void waypt_del (waypoint *); void waypt_del(waypoint*);
void waypt_free (waypoint *); void waypt_free(waypoint*);
void waypt_disp_all(waypt_cb); void waypt_disp_all(waypt_cb);
void waypt_disp_session(const session_t *se, waypt_cb cb); void waypt_disp_session(const session_t* se, waypt_cb cb);
void waypt_init_bounds(bounds *bounds); void waypt_init_bounds(bounds* bounds);
int waypt_bounds_valid(bounds *bounds); int waypt_bounds_valid(bounds* bounds);
void waypt_add_to_bounds(bounds *bounds, const waypoint *waypointp); void waypt_add_to_bounds(bounds* bounds, const waypoint* waypointp);
void waypt_compute_bounds(bounds *); void waypt_compute_bounds(bounds*);
double gcgeodist(const double lat1, const double lon1, double gcgeodist(const double lat1, const double lon1,
const double lat2, const double lon2); const double lat2, const double lon2);
void waypt_flush(queue *); void waypt_flush(queue*);
void waypt_flush_all(void); void waypt_flush_all(void);
unsigned int waypt_count(void); unsigned int waypt_count(void);
void set_waypt_count(unsigned int nc); void set_waypt_count(unsigned int nc);
void waypt_add_url(waypoint *wpt, char *link, char *url_link_text); void waypt_add_url(waypoint* wpt, char* link, char* url_link_text);
void free_gpx_extras (xml_tag * tag); void free_gpx_extras(xml_tag* tag);
void xcsv_setup_internal_style(const char *style_buf); void xcsv_setup_internal_style(const char* style_buf);
void xcsv_read_internal_style(const char *style_buf); void xcsv_read_internal_style(const char* style_buf);
waypoint * find_waypt_by_name(const char *name); waypoint* find_waypt_by_name(const char* name);
void waypt_backup(signed int *count, queue **head_bak); void waypt_backup(signed int* count, queue** head_bak);
void waypt_restore(signed int count, queue *head_bak); void waypt_restore(signed int count, queue* head_bak);
geocache_data *waypt_alloc_gc_data(waypoint *wpt); geocache_data* waypt_alloc_gc_data(waypoint* wpt);
int waypt_empty_gc_data(const waypoint *wpt); int waypt_empty_gc_data(const waypoint* wpt);
geocache_type gs_mktype(const char *t); geocache_type gs_mktype(const char* t);
geocache_container gs_mkcont(const char *t); geocache_container gs_mkcont(const char* t);
route_head *route_head_alloc(void); route_head* route_head_alloc(void);
void route_add (waypoint *); void route_add(waypoint*);
void route_add_wpt(route_head *rte, waypoint *wpt); void route_add_wpt(route_head* rte, waypoint* wpt);
void route_del_wpt(route_head *rte, waypoint *wpt); void route_del_wpt(route_head* rte, waypoint* wpt);
void track_add_wpt(route_head *rte, waypoint *wpt); void track_add_wpt(route_head* rte, waypoint* wpt);
void track_del_wpt(route_head *rte, waypoint *wpt); void track_del_wpt(route_head* rte, waypoint* wpt);
void route_add_head(route_head *rte); void route_add_head(route_head* rte);
void route_del_head(route_head *rte); void route_del_head(route_head* rte);
void route_reverse(const route_head *rte_hd); void route_reverse(const route_head* rte_hd);
waypoint * route_find_waypt_by_name(route_head *rh, const char *name); waypoint* route_find_waypt_by_name(route_head* rh, const char* name);
void track_add_head(route_head *rte); void track_add_head(route_head* rte);
void track_del_head(route_head *rte); void track_del_head(route_head* rte);
void track_insert_head(route_head *rte, route_head *predecessor); void track_insert_head(route_head* rte, route_head* predecessor);
void route_disp(const route_head *rte, waypt_cb); void route_disp(const route_head* rte, waypt_cb);
void route_disp_all(route_hdr, route_trl, waypt_cb); void route_disp_all(route_hdr, route_trl, waypt_cb);
void track_disp_all(route_hdr, route_trl, waypt_cb); void track_disp_all(route_hdr, route_trl, waypt_cb);
void route_disp_session(const session_t *se, route_hdr rh, route_trl rt, wa void route_disp_session(const session_t* se, route_hdr rh, route_trl rt, wa
ypt_cb wc); ypt_cb wc);
void track_disp_session(const session_t *se, route_hdr rh, route_trl rt, wa void track_disp_session(const session_t* se, route_hdr rh, route_trl rt, wa
ypt_cb wc); ypt_cb wc);
void route_flush( queue *); void route_flush(queue*);
void route_flush_all(void); void route_flush_all(void);
void route_flush_all_routes(void); void route_flush_all_routes(void);
void route_flush_all_tracks(void); void route_flush_all_tracks(void);
route_head * route_find_route_by_name(const char *name); route_head* route_find_route_by_name(const char* name);
route_head * route_find_track_by_name(const char *name); route_head* route_find_track_by_name(const char* name);
unsigned int route_waypt_count(void); unsigned int route_waypt_count(void);
unsigned int route_count(void); unsigned int route_count(void);
unsigned int track_waypt_count(void); unsigned int track_waypt_count(void);
unsigned int track_count(void); unsigned int track_count(void);
void route_copy( int *dst_count, int *dst_wpt_count, queue **dst, queue *sr void route_copy(int* dst_count, int* dst_wpt_count, queue** dst, queue* src
c ); );
void route_backup(signed int *count, queue **head_bak); void route_backup(signed int* count, queue** head_bak);
void route_restore( queue *head_bak); void route_restore(queue* head_bak);
void route_append( queue *src ); void route_append(queue* src);
void track_backup(signed int *count, queue **head_bak); void track_backup(signed int* count, queue** head_bak);
void track_restore( queue *head_bak); void track_restore(queue* head_bak);
void track_append( queue *src ); void track_append(queue* src);
void route_flush( queue *head ); void route_flush(queue* head);
void track_recompute( const route_head *trk, computed_trkdata **); void track_recompute(const route_head* trk, computed_trkdata**);
/* /*
* All shortname functions take a shortname handle as the first arg. * All shortname functions take a shortname handle as the first arg.
* This is an opaque pointer. Callers must not fondle the contents of it. * This is an opaque pointer. Callers must not fondle the contents of it.
*/ */
typedef struct short_handle * short_handle; // This is a crutch until the new C++ shorthandle goes in.
#define PRIME 37
typedef struct {
unsigned int target_len;
char* badchars;
char* goodchars;
char* defname;
queue namelist[PRIME];
/* Various internal flags at end to allow alignment flexibility. */
unsigned int mustupper:1;
unsigned int whitespaceok:1;
unsigned int repeating_whitespaceok:1;
unsigned int must_uniq:1;
unsigned int is_utf8:1;
} mkshort_handle_imp;
typedef mkshort_handle_imp* short_handle;
#ifndef DEBUG_MEM #ifndef DEBUG_MEM
char *mkshort (short_handle, const char *); char* mkshort(short_handle, const char*);
void *mkshort_new_handle(void); short_handle mkshort_new_handle(void);
#else #else
char *MKSHORT(short_handle, const char *, DEBUG_PARAMS); char* MKSHORT(short_handle, const char*, DEBUG_PARAMS);
void *MKSHORT_NEW_HANDLE(DEBUG_PARAMS); short_handle MKSHORT_NEW_HANDLE(DEBUG_PARAMS);
#define mkshort( a, b) MKSHORT(a,b,__FILE__, __LINE__) #define mkshort( a, b) MKSHORT(a,b,__FILE__, __LINE__)
#define mkshort_new_handle() MKSHORT_NEW_HANDLE(__FILE__,__LINE__) #define mkshort_new_handle() MKSHORT_NEW_HANDLE(__FILE__,__LINE__)
#endif #endif
char *mkshort_from_wpt(short_handle h, const waypoint *wpt); char* mkshort_from_wpt(short_handle h, const waypoint* wpt);
void mkshort_del_handle(short_handle *h); void mkshort_del_handle(short_handle* h);
void setshort_length(short_handle, int n); void setshort_length(short_handle, int n);
void setshort_badchars(short_handle, const char *); void setshort_badchars(short_handle, const char*);
void setshort_goodchars(short_handle, const char *); void setshort_goodchars(short_handle, const char*);
void setshort_mustupper(short_handle, int n); void setshort_mustupper(short_handle, int n);
void setshort_mustuniq(short_handle, int n); void setshort_mustuniq(short_handle, int n);
void setshort_whitespace_ok(short_handle, int n); void setshort_whitespace_ok(short_handle, int n);
void setshort_repeating_whitespace_ok(short_handle, int n); void setshort_repeating_whitespace_ok(short_handle, int n);
void setshort_defname(short_handle, const char *s); void setshort_defname(short_handle, const char* s);
void setshort_is_utf8(short_handle h, const int is_utf8); void setshort_is_utf8(short_handle h, const int is_utf8);
/* /*
* Vmem flags values. * Vmem flags values.
*/ */
#define VMFL_NOZERO (1 << 0) #define VMFL_NOZERO (1 << 0)
typedef struct vmem { typedef struct vmem {
void *mem; /* visible memory object */ char* mem; /* visible memory object */
size_t size; /* allocated size of object */ size_t size; /* allocated size of object */
} vmem_t; } vmem_t;
vmem_t vmem_alloc(size_t, int flags); vmem_t vmem_alloc(size_t, int flags);
void vmem_free(vmem_t*); void vmem_free(vmem_t*);
void vmem_realloc(vmem_t*, size_t); void vmem_realloc(vmem_t*, size_t);
#define ARGTYPE_UNKNOWN 0x00000000 #define ARGTYPE_UNKNOWN 0x00000000
#define ARGTYPE_INT 0x00000001 #define ARGTYPE_INT 0x00000001
#define ARGTYPE_FLOAT 0x00000002 #define ARGTYPE_FLOAT 0x00000002
#define ARGTYPE_STRING 0x00000003 #define ARGTYPE_STRING 0x00000003
#define ARGTYPE_BOOL 0x00000004 #define ARGTYPE_BOOL 0x00000004
skipping to change at line 698 skipping to change at line 722
#define ARGTYPE_BEGIN_REQ 0x04000000 #define ARGTYPE_BEGIN_REQ 0x04000000
#define ARGTYPE_END_REQ 0x02000000 #define ARGTYPE_END_REQ 0x02000000
#define ARGTYPE_TYPEMASK 0x00000fff #define ARGTYPE_TYPEMASK 0x00000fff
#define ARGTYPE_FLAGMASK 0xfffff000 #define ARGTYPE_FLAGMASK 0xfffff000
#define ARG_NOMINMAX NULL, NULL #define ARG_NOMINMAX NULL, NULL
#define ARG_TERMINATOR {0, 0, 0, 0, 0, ARG_NOMINMAX} #define ARG_TERMINATOR {0, 0, 0, 0, 0, ARG_NOMINMAX}
typedef struct arglist { typedef struct arglist {
const char *argstring; const char* argstring;
char **argval; char** argval;
const char *helpstring; const char* helpstring;
const char *defaultvalue; const char* defaultvalue;
const gbuint32 argtype; const gbuint32 argtype;
const char *minvalue; /* minimum value for numeric options const char* minvalue; /* minimum value for numeric options
*/ */
const char *maxvalue; /* maximum value for numeric options const char* maxvalue; /* maximum value for numeric options
*/ */
char *argvalptr; /* !!! internal helper. Not used in definiti char* argvalptr; /* !!! internal helper. Not used in definitions !!!
ons !!! */ */
} arglist_t; } arglist_t;
typedef enum { typedef enum {
ff_type_file = 1, /* normal format: useful to a GUI. */ ff_type_file = 1, /* normal format: useful to a GUI. */
ff_type_internal, /* fmt not useful with default options */ ff_type_internal, /* fmt not useful with default options */
ff_type_serial /* format describes a serial protocol (GUI c ff_type_serial /* format describes a serial protocol (GUI c
an display port names) */ an display port names) */
} ff_type; } ff_type;
typedef enum { typedef enum {
ff_cap_rw_wpt, ff_cap_rw_wpt,
ff_cap_rw_trk, ff_cap_rw_trk,
ff_cap_rw_rte ff_cap_rw_rte
} ff_cap_array; } ff_cap_array;
typedef enum { typedef enum {
ff_cap_none, ff_cap_none,
ff_cap_read = 1, ff_cap_read = 1,
ff_cap_write = 2 ff_cap_write = 2
} ff_cap; } ff_cap;
#define FF_CAP_RW_ALL \ #define FF_CAP_RW_ALL \
{ ff_cap_read | ff_cap_write, ff_cap_read | ff_cap_write, ff_cap_rea d | ff_cap_write } { (ff_cap) (ff_cap_read | ff_cap_write), (ff_cap) (ff_cap_read | ff_ cap_write), (ff_cap) (ff_cap_read | ff_cap_write) }
#define FF_CAP_RW_WPT \ #define FF_CAP_RW_WPT \
{ ff_cap_read | ff_cap_write, ff_cap_none, ff_cap_none} { (ff_cap) (ff_cap_read | ff_cap_write), ff_cap_none, ff_cap_none}
/* /*
* Format capabilities for realtime positioning. * Format capabilities for realtime positioning.
*/ */
typedef struct position_ops { typedef struct position_ops {
ff_init rd_init; ff_init rd_init;
ff_readposn rd_position; ff_readposn rd_position;
ff_deinit rd_deinit; ff_deinit rd_deinit;
ff_init wr_init; ff_init wr_init;
ff_writeposn wr_position; ff_writeposn wr_position;
ff_deinit wr_deinit; ff_deinit wr_deinit;
} position_ops_t; } position_ops_t;
/* /*
* Describe the file format to the caller. * Describe the file format to the caller.
*/ */
typedef struct ff_vecs { typedef struct ff_vecs {
ff_type type; ff_type type;
ff_cap cap[3]; ff_cap cap[3];
ff_init rd_init; ff_init rd_init;
ff_init wr_init; ff_init wr_init;
ff_deinit rd_deinit; ff_deinit rd_deinit;
ff_deinit wr_deinit; ff_deinit wr_deinit;
ff_read read; ff_read read;
ff_write write; ff_write write;
ff_exit exit; ff_exit exit;
arglist_t *args; arglist_t* args;
const char *encode; const char* encode;
int fixed_encode; int fixed_encode;
position_ops_t position_ops; position_ops_t position_ops;
const char *name; /* dyn. initialized by find_vec */ const char* name; /* dyn. initialized by find_vec */
} ff_vecs_t; } ff_vecs_t;
typedef struct style_vecs { typedef struct style_vecs {
const char *name; const char* name;
const char *style_buf; const char* style_buf;
} style_vecs_t; } style_vecs_t;
extern style_vecs_t style_list[]; extern style_vecs_t style_list[];
void waypt_init(void); void waypt_init(void);
void route_init(void); void route_init(void);
void waypt_disp(const waypoint *); void waypt_disp(const waypoint*);
void waypt_status_disp(int total_ct, int myct); void waypt_status_disp(int total_ct, int myct);
double waypt_time(const waypoint *wpt); double waypt_time(const waypoint* wpt);
double waypt_speed(const waypoint *A, const waypoint *B); double waypt_speed(const waypoint* A, const waypoint* B);
double waypt_speed_ex(const waypoint *A, const waypoint *B); double waypt_speed_ex(const waypoint* A, const waypoint* B);
double waypt_course(const waypoint *A, const waypoint *B); double waypt_course(const waypoint* A, const waypoint* B);
double waypt_distance(const waypoint *A, const waypoint *B); double waypt_distance(const waypoint* A, const waypoint* B);
double waypt_distance_ex(const waypoint *A, const waypoint *B); double waypt_distance_ex(const waypoint* A, const waypoint* B);
NORETURN fatal(const char *, ...) PRINTFLIKE(1, 2); NORETURN fatal(const char*, ...) PRINTFLIKE(1, 2);
void is_fatal(const int condition, const char *, ...) PRINTFLIKE(2, 3); void is_fatal(const int condition, const char*, ...) PRINTFLIKE(2, 3);
void warning(const char *, ...) PRINTFLIKE(1, 2); void warning(const char*, ...) PRINTFLIKE(1, 2);
void debug_print(int level, const char* fmt, ...) PRINTFLIKE(2,3);
ff_vecs_t *find_vec(char * const, char **);
void assign_option(const char *vecname, arglist_t *ap, const char *val); ff_vecs_t* find_vec(char* const, char**);
void disp_vec_options(const char *vecname, arglist_t *ap); void assign_option(const char* vecname, arglist_t* ap, const char* val);
void disp_vec_options(const char* vecname, arglist_t* ap);
void disp_vecs(void); void disp_vecs(void);
void disp_vec( const char *vecname ); void disp_vec(const char* vecname);
void init_vecs(void); void init_vecs(void);
void exit_vecs(void); void exit_vecs(void);
void disp_formats(int version); void disp_formats(int version);
const char * name_option(long type); const char* name_option(long type);
void printposn(const double c, int is_lat); void printposn(const double c, int is_lat);
#ifndef DEBUG_MEM #ifndef DEBUG_MEM
void *xcalloc(size_t nmemb, size_t size); void* xcalloc(size_t nmemb, size_t size);
void *xmalloc(size_t size); void* xmalloc(size_t size);
void *xrealloc(void *p, size_t s); void* xrealloc(void* p, size_t s);
void xfree(void *mem); void xfree(void* mem);
char *xstrdup(const char *s); char* xstrdup(const char* s);
char *xstrndup(const char *s, size_t n); char* xstrndup(const char* s, size_t n);
char *xstrndupt(const char *s, size_t n); char* xstrndupt(const char* s, size_t n);
char *xstrappend(char *src, const char *addon); char* xstrappend(char* src, const char* addon);
#define xxcalloc(nmemb, size, file, line) xcalloc(nmemb, size) #define xxcalloc(nmemb, size, file, line) xcalloc(nmemb, size)
#define xxmalloc(size, file, line) xmalloc(size) #define xxmalloc(size, file, line) xmalloc(size)
#define xxrealloc(p, s, file, line) xrealloc(p,s) #define xxrealloc(p, s, file, line) xrealloc(p,s)
#define xxfree(mem, file, line) xfree(mem) #define xxfree(mem, file, line) xfree(mem)
#define xxstrdup(s, file, line) xstrdup(s) #define xxstrdup(s, file, line) xstrdup(s)
#define xxstrappend(src, addon, file, line) xstrappend(src, addon) #define xxstrappend(src, addon, file, line) xstrappend(src, addon)
#else /* DEBUG_MEM */ #else /* DEBUG_MEM */
void *XCALLOC(size_t nmemb, size_t size, DEBUG_PARAMS ); void* XCALLOC(size_t nmemb, size_t size, DEBUG_PARAMS);
void *XMALLOC(size_t size, DEBUG_PARAMS ); void* XMALLOC(size_t size, DEBUG_PARAMS);
void *XREALLOC(void *p, size_t s, DEBUG_PARAMS ); void* XREALLOC(void* p, size_t s, DEBUG_PARAMS);
void XFREE(void *mem, DEBUG_PARAMS ); void XFREE(void* mem, DEBUG_PARAMS);
char *XSTRDUP(const char *s, DEBUG_PARAMS ); char* XSTRDUP(const char* s, DEBUG_PARAMS);
char *XSTRNDUP(const char *src, size_t size, DEBUG_PARAMS ); char* XSTRNDUP(const char* src, size_t size, DEBUG_PARAMS);
char *XSTRNDUPT(const char *src, size_t size, DEBUG_PARAMS ); char* XSTRNDUPT(const char* src, size_t size, DEBUG_PARAMS);
char *XSTRAPPEND(char *src, const char *addon, DEBUG_PARAMS ); char* XSTRAPPEND(char* src, const char* addon, DEBUG_PARAMS);
void debug_mem_open(); void debug_mem_open();
void debug_mem_output( char *format, ... ); void debug_mem_output(char* format, ...);
void debug_mem_close(); void debug_mem_close();
#define xcalloc(nmemb, size) XCALLOC(nmemb, size, __FILE__, __LINE__) #define xcalloc(nmemb, size) XCALLOC(nmemb, size, __FILE__, __LINE__)
#define xmalloc(size) XMALLOC(size, __FILE__, __LINE__) #define xmalloc(size) XMALLOC(size, __FILE__, __LINE__)
#define xrealloc(p, s) XREALLOC(p,s,__FILE__,__LINE__) #define xrealloc(p, s) XREALLOC(p,s,__FILE__,__LINE__)
#define xfree(mem) XFREE(mem, __FILE__, __LINE__) #define xfree(mem) XFREE(mem, __FILE__, __LINE__)
#define xstrdup(s) XSTRDUP(s, __FILE__, __LINE__) #define xstrdup(s) XSTRDUP(s, __FILE__, __LINE__)
#define xstrndup(s, z) XSTRNDUP(s, z, __FILE__, __LINE__) #define xstrndup(s, z) XSTRNDUP(s, z, __FILE__, __LINE__)
#define xstrndupt(s, z) XSTRNDUPT(s, z, __FILE__, __LINE__) #define xstrndupt(s, z) XSTRNDUPT(s, z, __FILE__, __LINE__)
#define xstrappend(src,addon) XSTRAPPEND(src, addon, __FILE__, __LINE__) #define xstrappend(src,addon) XSTRAPPEND(src, addon, __FILE__, __LINE__)
#define xxcalloc XCALLOC #define xxcalloc XCALLOC
#define xxmalloc XMALLOC #define xxmalloc XMALLOC
#define xxrealloc XREALLOC #define xxrealloc XREALLOC
#define xxfree XFREE #define xxfree XFREE
#define xxstrdup XSTRDUP #define xxstrdup XSTRDUP
#define xxstrndupt XSTRNDUPT #define xxstrndupt XSTRNDUPT
#define xxstrappend XSTRAPPEND #define xxstrappend XSTRAPPEND
#endif /* DEBUG_MEM */ #endif /* DEBUG_MEM */
FILE *xfopen(const char *fname, const char *type, const char *errtxt); FILE* xfopen(const char* fname, const char* type, const char* errtxt);
void xfprintf(const char *errtxt, FILE *stream, const char *format, ...); void xfprintf(const char* errtxt, FILE* stream, const char* format, ...);
void xfputs(const char *errtxt, const char *s, FILE *stream); void xfputs(const char* errtxt, const char* s, FILE* stream);
int case_ignore_strcmp(const char *s1, const char *s2); int case_ignore_strcmp(const char* s1, const char* s2);
int case_ignore_strncmp(const char *s1, const char *s2, int n); int case_ignore_strncmp(const char* s1, const char* s2, int n);
int str_match(const char *str, const char *match); int str_match(const char* str, const char* match);
int case_ignore_str_match(const char *str, const char *match); int case_ignore_str_match(const char* str, const char* match);
char * strenquote(const char *str, const char quot_char); char* strenquote(const char* str, const char quot_char);
char *strsub(const char *s, const char *search, const char *replace); char* strsub(const char* s, const char* search, const char* replace);
char *gstrsub(const char *s, const char *search, const char *replace); char* gstrsub(const char* s, const char* search, const char* replace);
char *xstrrstr(const char *s1, const char *s2); char* xstrrstr(const char* s1, const char* s2);
void rtrim(char *s); void rtrim(char* s);
char * lrtrim(char *s); char* lrtrim(char* s);
int xasprintf(char **strp, const char *fmt, ...); int xasprintf(char** strp, const char* fmt, ...) PRINTFLIKE(2, 3);
int xvasprintf(char **strp, const char *fmt, va_list ap); int xvasprintf(char** strp, const char* fmt, va_list ap);
char *strupper(char *src); char* strupper(char* src);
char *strlower(char *src); char* strlower(char* src);
signed int get_tz_offset(void); signed int get_tz_offset(void);
time_t mklocaltime(struct tm *t); time_t mklocaltime(struct tm* t);
time_t mkgmtime(struct tm *t); time_t mkgmtime(struct tm* t);
time_t current_time(void); time_t current_time(void);
void dotnet_time_to_time_t(double dotnet, time_t *t, int *ms); void dotnet_time_to_time_t(double dotnet, time_t* t, int* ms);
signed int month_lookup(const char *m); signed int month_lookup(const char* m);
const char *get_cache_icon(const waypoint *waypointp); const char* get_cache_icon(const waypoint* waypointp);
const char *gs_get_cachetype(geocache_type t); const char* gs_get_cachetype(geocache_type t);
const char *gs_get_container(geocache_container t); const char* gs_get_container(geocache_container t);
char * xml_entitize(const char * str); char* xml_entitize(const char* str);
char * html_entitize(const char * str); char* html_entitize(const char* str);
char * strip_html(const utf_string*); char* strip_html(const utf_string*);
char * strip_nastyhtml(const char * in); char* strip_nastyhtml(const char* in);
char * convert_human_date_format(const char *human_datef); /* "MM,YYYY, char* convert_human_date_format(const char* human_datef); /* "MM,YYYY,
DD" -> "%m,%Y,%d" */ DD" -> "%m,%Y,%d" */
char * convert_human_time_format(const char *human_timef); /* "HH+mm+ss char* convert_human_time_format(const char* human_timef); /* "HH+mm+ss
" -> "%H+%M+%S" */ " -> "%H+%M+%S" */
char * pretty_deg_format(double lat, double lon, char fmt, const char *sep, char* pretty_deg_format(double lat, double lon, char fmt, const char* sep,
int html); /* decimal -> dd.dddd or dd mm.mmm or dd mm ss */ int html); /* decimal -> dd.dddd or dd mm.mmm or dd mm ss */
char * get_filename(const char *fname); /* e xtract the filename portion */ char* get_filename(const char* fname); /* extract t he filename portion */
/* /*
* Character encoding transformations. * Character encoding transformations.
*/ */
#define CET_NOT_CONVERTABLE_DEFAULT '$' #define CET_NOT_CONVERTABLE_DEFAULT '$'
#define CET_CHARSET_ASCII "US-ASCII" #define CET_CHARSET_ASCII "US-ASCII"
#define CET_CHARSET_UTF8 "UTF-8" #define CET_CHARSET_UTF8 "UTF-8"
#define CET_CHARSET_HEBREW "CP1255" #define CET_CHARSET_HEBREW "CP1255"
#define CET_CHARSET_MS_ANSI "MS-ANSI" #define CET_CHARSET_MS_ANSI "MS-ANSI"
#define CET_CHARSET_LATIN1 "ISO-8859-1" #define CET_CHARSET_LATIN1 "ISO-8859-1"
#define str_utf8_to_cp1252(str) cet_str_utf8_to_cp1252((str)) #define str_utf8_to_cp1252(str) cet_str_utf8_to_cp1252((str))
#define str_cp1252_to_utf8(str) cet_str_cp1252_to_utf8((str)) #define str_cp1252_to_utf8(str) cet_str_cp1252_to_utf8((str))
#define str_utf8_to_iso8859_1(str) cet_str_utf8_to_iso8859_1((str)) #define str_utf8_to_iso8859_1(str) cet_str_utf8_to_iso8859_1((str))
#define str_iso8859_1_to_utf8(str) cet_str_iso8859_1_to_utf8((str)) #define str_iso8859_1_to_utf8(str) cet_str_iso8859_1_to_utf8((str))
/* this lives in gpx.c */ /* this lives in gpx.c */
time_t xml_parse_time( const char *cdatastr, int * microsecs ); time_t xml_parse_time(const char* cdatastr, int* microsecs);
xml_tag *xml_findfirst( xml_tag *root, const char *tagname ); xml_tag* xml_findfirst(xml_tag* root, const char* tagname);
xml_tag *xml_findnext( xml_tag *root, xml_tag *cur, const char *tagname ); xml_tag* xml_findnext(xml_tag* root, xml_tag* cur, const char* tagname);
char *xml_attribute( xml_tag *tag, const char *attrname ); char* xml_attribute(xml_tag* tag, const char* attrname);
char * rot13( const char *str ); char* rot13(const char* str);
/* /*
* PalmOS records like fixed-point numbers, which should be rounded * PalmOS records like fixed-point numbers, which should be rounded
* to deal with possible floating-point representation errors. * to deal with possible floating-point representation errors.
*/ */
signed int si_round( double d ); signed int si_round(double d);
/* /*
* Data types for Palm/OS files. * Data types for Palm/OS files.
*/ */
typedef struct { typedef struct {
unsigned char data[4]; unsigned char data[4];
} pdb_32; } pdb_32;
typedef struct { typedef struct {
unsigned char data[2]; unsigned char data[2];
} pdb_16; } pdb_16;
typedef struct { typedef struct {
unsigned char data[8]; unsigned char data[8];
} pdb_double; } pdb_double;
typedef struct { typedef struct {
unsigned char data[4]; unsigned char data[4];
} pdb_float; } pdb_float;
/* /*
* Protypes for Endianness helpers. * Protypes for Endianness helpers.
*/ */
signed int be_read16(const void *p); signed int be_read16(const void* p);
unsigned int be_readu16(const void *p); unsigned int be_readu16(const void* p);
signed int be_read32(const void *p); signed int be_read32(const void* p);
signed int le_read16(const void *p); signed int le_read16(const void* p);
unsigned int le_readu16(const void *p); unsigned int le_readu16(const void* p);
signed int le_read32(const void *p); signed int le_read32(const void* p);
unsigned int le_readu32(const void *p); unsigned int le_readu32(const void* p);
void le_read64(void *dest, const void *src); void le_read64(void* dest, const void* src);
void be_write16(void *pp, const unsigned i); void be_write16(void* pp, const unsigned i);
void be_write32(void *pp, const unsigned i); void be_write32(void* pp, const unsigned i);
void le_write16(void *pp, const unsigned i); void le_write16(void* pp, const unsigned i);
void le_write32(void *pp, const unsigned i); void le_write32(void* pp, const unsigned i);
double endian_read_double(const void* ptr, int read_le); double endian_read_double(const void* ptr, int read_le);
float endian_read_float(const void* ptr, int read_le); float endian_read_float(const void* ptr, int read_le);
void endian_write_double(void* ptr, double d, int write_le); void endian_write_double(void* ptr, double d, int write_le);
void endian_write_float(void* ptr, float f, int write_le); void endian_write_float(void* ptr, float f, int write_le);
float be_read_float(void *p); float be_read_float(void* p);
double be_read_double(void *p); double be_read_double(void* p);
void be_write_float(void *pp, float d); void be_write_float(void* pp, float d);
void be_write_double(void *pp, double d); void be_write_double(void* pp, double d);
float le_read_float(const void *p); float le_read_float(const void* p);
double le_read_double(const void *p); double le_read_double(const void* p);
void le_write_float(void *ptr, float f); void le_write_float(void* ptr, float f);
void le_write_double(void *p, double d); void le_write_double(void* p, double d);
#define pdb_write_float be_write_float #define pdb_write_float be_write_float
#define pdb_read_float be_read_float #define pdb_read_float be_read_float
#define pdb_write_double be_write_double #define pdb_write_double be_write_double
#define pdb_read_double be_read_double #define pdb_read_double be_read_double
/* /*
* Prototypes for generic conversion routines (util.c). * Prototypes for generic conversion routines (util.c).
*/ */
double ddmm2degrees(double ddmm_val); double ddmm2degrees(double ddmm_val);
double degrees2ddmm(double deg_val); double degrees2ddmm(double deg_val);
typedef enum { typedef enum {
grid_unknown = -1, grid_unknown = -1,
grid_lat_lon_ddd = 0, grid_lat_lon_ddd = 0,
grid_lat_lon_dmm = 1, grid_lat_lon_dmm = 1,
grid_lat_lon_dms = 2, grid_lat_lon_dms = 2,
grid_bng = 3, grid_bng = 3,
grid_utm = 4, grid_utm = 4,
grid_swiss = 5 grid_swiss = 5
} grid_type; } grid_type;
#define GRID_INDEX_MIN grid_lat_lon_ddd #define GRID_INDEX_MIN grid_lat_lon_ddd
#define GRID_INDEX_MAX grid_swiss #define GRID_INDEX_MAX grid_swiss
#define DATUM_OSGB36 86 #define DATUM_OSGB36 86
#define DATUM_WGS84 118 #define DATUM_WGS84 118
/* bit manipulation functions (util.c) */ /* bit manipulation functions (util.c) */
char gb_getbit(const void *buf, const gbuint32 nr); char gb_getbit(const void* buf, const gbuint32 nr);
void gb_setbit(void *buf, const gbuint32 nr); void gb_setbit(void* buf, const gbuint32 nr);
void *gb_int2ptr(const int i); void* gb_int2ptr(const int i);
int gb_ptr2int(const void *p); int gb_ptr2int(const void* p);
/* /*
* From parse.c * From parse.c
*/ */
int parse_coordinates(const char *str, int datum, const grid_type grid, int parse_coordinates(const char* str, int datum, const grid_type grid,
double *latitude, double *longitude, const char *module); double* latitude, double* longitude, const char* modu
int parse_distance(const char *str, double *val, double scale, const char * le);
module); int parse_distance(const char* str, double* val, double scale, const char*
int parse_speed(const char *str, double *val, const double scale, const cha module);
r *module); int parse_speed(const char* str, double* val, const double scale, const cha
time_t parse_date(const char *str, const char *format, const char *module); r* module);
time_t parse_date(const char* str, const char* format, const char* module);
/* /*
* From util_crc.c * From util_crc.c
*/ */
unsigned long get_crc32(const void * data, int datalen); unsigned long get_crc32(const void* data, int datalen);
unsigned long get_crc32_s(const void * data); unsigned long get_crc32_s(const void* data);
/* /*
* From units.c * From units.c
*/ */
typedef enum { typedef enum {
units_unknown = 0, units_unknown = 0,
units_statute = 1, units_statute = 1,
units_metric = 2, units_metric = 2,
units_nautical =3 units_nautical =3,
units_aviation =4
} fmt_units; } fmt_units;
int fmt_setunits(fmt_units); int fmt_setunits(fmt_units);
double fmt_distance(const double, char **tag); double fmt_distance(const double, char** tag);
double fmt_speed(const double, char **tag); double fmt_altitude(const double, char** tag);
double fmt_speed(const double, char** tag);
/* /*
* From gbsleep.c * From gbsleep.c
*/ */
void gb_sleep(unsigned long microseconds); void gb_sleep(unsigned long microseconds);
/* /*
* From nmea.c * From nmea.c
*/ */
int nmea_cksum(const char *const buf); int nmea_cksum(const char* const buf);
/* /*
* Color helpers. * Color helpers.
*/ */
int color_to_bbggrr(const char *cname); int color_to_bbggrr(const char* cname);
/* /*
* A constant for unknown altitude. It's tempting to just use zero * A constant for unknown altitude. It's tempting to just use zero
* but that's not very nice for the folks near sea level. * but that's not very nice for the folks near sea level.
*/ */
#define unknown_alt -99999999.0 #define unknown_alt -99999999.0
#define unknown_color -1 #define unknown_color -1
#endif /* gpsbabel_defs_h_included */ #endif /* gpsbabel_defs_h_included */
 End of changes. 80 change blocks. 
495 lines changed or deleted 516 lines changed or added


 dpencode.h   dpencode.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: dpencode.h,v 1.2 2009/09/08 16:06:32 robertl Exp $ // $Id: dpencode.h,v 1.2 2009-09-08 16:06:32 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 filterdata.h   filterdata.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: filterdata.h,v 1.4 2009/11/02 20:38:02 robertl Exp $ // $Id: filterdata.h,v 1.4 2009-11-02 20:38:02 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 filterdefs.h   filterdefs.h 
skipping to change at line 30 skipping to change at line 30
*/ */
/* /*
* Filters can do some things that modules really shouldn't do. * Filters can do some things that modules really shouldn't do.
* This is our (weak) attempt to make that distinction. * This is our (weak) attempt to make that distinction.
*/ */
extern queue waypt_head; extern queue waypt_head;
typedef struct filter_vecs { typedef struct filter_vecs {
filter_init f_init; filter_init f_init;
filter_process f_process; filter_process f_process;
filter_deinit f_deinit; filter_deinit f_deinit;
filter_exit f_exit; filter_exit f_exit;
arglist_t *args; arglist_t* args;
} filter_vecs_t; } filter_vecs_t;
filter_vecs_t * find_filter_vec(char * const, char **); filter_vecs_t* find_filter_vec(char* const, char**);
void free_filter_vec(filter_vecs_t *); void free_filter_vec(filter_vecs_t*);
void disp_filters(int version); void disp_filters(int version);
void disp_filter( const char *vecname ); void disp_filter(const char* vecname);
void disp_filter_vec( const char *vecname ); void disp_filter_vec(const char* vecname);
void disp_filter_vecs(void); void disp_filter_vecs(void);
void init_filter_vecs(void); void init_filter_vecs(void);
void exit_filter_vecs(void); void exit_filter_vecs(void);
 End of changes. 3 change blocks. 
9 lines changed or deleted 9 lines changed or added


 filterdlg.h   filterdlg.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: filterdlg.h,v 1.1 2009/07/05 21:14:56 robertl Exp $ // $Id: filterdlg.h,v 1.1 2009-07-05 21:14:56 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 filterwidgets.h   filterwidgets.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: filterwidgets.h,v 1.2 2009/11/02 20:38:02 robertl Exp $ // $Id: filterwidgets.h,v 1.2 2009-11-02 20:38:02 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 format.h   format.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: format.h,v 1.6 2010/02/15 02:57:00 robertl Exp $ // $Id: format.h,v 1.6 2010-02-15 02:57:00 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 formatload.h   formatload.h 
// -*- c++ -*- // -*- c++ -*-
// $Id: formatload.h,v 1.1 2009/07/05 21:14:56 robertl Exp $ // $Id: formatload.h,v 1.1 2009-07-05 21:14:56 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 garmin_device_xml.h   garmin_device_xml.h 
skipping to change at line 27 skipping to change at line 27
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
*/ */
/* /*
* Describes a file on the unit. * Describes a file on the unit.
*/ */
typedef struct { typedef struct {
char *path; char* path;
char *basename; char* basename;
char *extension; char* extension;
char *canon; // full name, when applicable. char* canon; // full name, when applicable.
} gdx_file; } gdx_file;
/* /*
* The interesting traits of this device. * The interesting traits of this device.
*/ */
typedef struct { typedef struct {
const char *device_desc; const char* device_desc;
const char *device_id; const char* device_id;
const char *device_mounted_path; // Not from the file; about the fil const char* device_mounted_path; // Not from the file; about the file.
e. gdx_file from_device;
gdx_file from_device; gdx_file to_device;
gdx_file to_device;
// gdx_file geocache_logs; // gdx_file geocache_logs;
} gdx_info; } gdx_info;
const gdx_info* gdx_read(const char *fname); const gdx_info* gdx_read(const char* fname);
const gdx_info * gdx_get_info(void); const gdx_info* gdx_get_info(void);
const gdx_info * gdx_find_file(char **dirlist); const gdx_info* gdx_find_file(char** dirlist);
// This is so gross. By the time we know it's not a USB device // This is so gross. By the time we know it's not a USB device
// and could be one of our devices, we're so deep into the callstack // and could be one of our devices, we're so deep into the callstack
// that can't back out tracefully without bludgeoning most of the // that can't back out tracefully without bludgeoning most of the
// (Mac|Lin|Win) x (USB|Serial) matrix. Since we don't *really* want // (Mac|Lin|Win) x (USB|Serial) matrix. Since we don't *really* want
// to progress any further, we just longjump back to the caller... // to progress any further, we just longjump back to the caller...
#include <setjmp.h> #include <setjmp.h>
jmp_buf gdx_jmp_buf; extern jmp_buf gdx_jmp_buf;
#if 0 #if 0
/* /*
* The file-level information. * The file-level information.
*/ */
static static
struct gpx_global { struct gpx_global {
gpx_global_entry name; gpx_global_entry name;
gpx_global_entry desc; gpx_global_entry desc;
gpx_global_entry author; gpx_global_entry author;
gpx_global_entry email; gpx_global_entry email;
gpx_global_entry url; gpx_global_entry url;
gpx_global_entry urlname; gpx_global_entry urlname;
gpx_global_entry keywords; gpx_global_entry keywords;
/* time and bounds aren't here; they're recomputed. */ /* time and bounds aren't here; they're recomputed. */
} *gpx_global ; }* gpx_global ;
static void static void
gpx_add_to_global(gpx_global_entry *ge, char *cdata) gpx_add_to_global(gpx_global_entry* ge, char* cdata)
{ {
queue *elem, *tmp; queue* elem, *tmp;
gpx_global_entry * gep; gpx_global_entry* gep;
QUEUE_FOR_EACH(&ge->queue, elem, tmp) { QUEUE_FOR_EACH(&ge->queue, elem, tmp) {
gep = BASE_STRUCT(elem, gpx_global_entry, queue); gep = BASE_STRUCT(elem, gpx_global_entry, queue);
if (0 == strcmp(cdata, gep->tagdata)) if (0 == strcmp(cdata, gep->tagdata)) {
return; return;
} }
}
gep = xcalloc(sizeof(*gep), 1); gep = xcalloc(sizeof(*gep), 1);
QUEUE_INIT(&gep->queue); QUEUE_INIT(&gep->queue);
gep->tagdata = xstrdup(cdata); gep->tagdata = xstrdup(cdata);
ENQUEUE_TAIL(&ge->queue, &gep->queue); ENQUEUE_TAIL(&ge->queue, &gep->queue);
} }
static void static void
gpx_rm_from_global(gpx_global_entry *ge) gpx_rm_from_global(gpx_global_entry* ge)
{ {
queue *elem, *tmp; queue* elem, *tmp;
QUEUE_FOR_EACH(&ge->queue, elem, tmp) { QUEUE_FOR_EACH(&ge->queue, elem, tmp) {
gpx_global_entry *g = (gpx_global_entry *) dequeue(elem); gpx_global_entry* g = (gpx_global_entry*) dequeue(elem);
xfree(g->tagdata); xfree(g->tagdata);
xfree(g); xfree(g);
} }
} }
static void static void
gpx_write_gdata(gpx_global_entry *ge, char *tag) gpx_write_gdata(gpx_global_entry* ge, char* tag)
{ {
queue *elem, *tmp; queue* elem, *tmp;
gpx_global_entry * gep; gpx_global_entry* gep;
if (!gpx_global || QUEUE_EMPTY(&ge->queue)) { if (!gpx_global || QUEUE_EMPTY(&ge->queue)) {
return; return;
} }
gbfprintf(ofd, "<%s>", tag); gbfprintf(ofd, "<%s>", tag);
QUEUE_FOR_EACH(&ge->queue, elem, tmp) { QUEUE_FOR_EACH(&ge->queue, elem, tmp) {
gep = BASE_STRUCT(elem, gpx_global_entry, queue); gep = BASE_STRUCT(elem, gpx_global_entry, queue);
gbfprintf(ofd, "%s", gep->tagdata); gbfprintf(ofd, "%s", gep->tagdata);
/* Some tags we just output once. */ /* Some tags we just output once. */
if ((0 == strcmp(tag, "url")) || if ((0 == strcmp(tag, "url")) ||
(0 == strcmp(tag, "email"))) { (0 == strcmp(tag, "email"))) {
break; break;
} }
gbfprintf(ofd, " "); gbfprintf(ofd, " ");
} }
gbfprintf(ofd, "</%s>\n", tag); gbfprintf(ofd, "</%s>\n", tag);
} }
typedef struct tag_mapping { typedef struct tag_mapping {
tag_type tag_type; /* enum from above for this tag */ tag_type tag_type; /* enum from above for this tag */
int tag_passthrough; /* true if we don't generate this */ int tag_passthrough; /* true if we don't generate this */
const char *tag_name; /* xpath-ish tag name */ const char* tag_name; /* xpath-ish tag name */
unsigned long crc; /* Crc32 of tag_name */ unsigned long crc; /* Crc32 of tag_name */
} tag_mapping; } tag_mapping;
/* /*
* xpath(ish) mappings between full tag paths and internal identifers. * xpath(ish) mappings between full tag paths and internal identifers.
* These appear in the order they appear in the GPX specification. * These appear in the order they appear in the GPX specification.
* If it's not a tag we explictly handle, it doesn't go here. * If it's not a tag we explictly handle, it doesn't go here.
*/ */
tag_mapping tag_path_map[] = { tag_mapping tag_path_map[] = {
{ tt_gpx, 0, "/gpx", 0UL }, { tt_gpx, 0, "/gpx", 0UL },
{ tt_name, 0, "/gpx/name", 0UL }, { tt_name, 0, "/gpx/name", 0UL },
{ tt_desc, 0, "/gpx/desc", 0UL }, { tt_desc, 0, "/gpx/desc", 0UL },
{ tt_author, 0, "/gpx/author", 0UL }, { tt_author, 0, "/gpx/author", 0UL },
{ tt_email, 0, "/gpx/email", 0UL }, { tt_email, 0, "/gpx/email", 0UL },
{ tt_url, 0, "/gpx/url", 0UL }, { tt_url, 0, "/gpx/url", 0UL },
{ tt_urlname, 0, "/gpx/urlname", 0UL }, { tt_urlname, 0, "/gpx/urlname", 0UL },
{ tt_keywords, 0, "/gpx/keywords", 0UL }, { tt_keywords, 0, "/gpx/keywords", 0UL },
{ tt_wpt, 0, "/gpx/wpt", 0UL }, { tt_wpt, 0, "/gpx/wpt", 0UL },
{ tt_wpt_ele, 0, "/gpx/wpt/ele", 0UL }, { tt_wpt_ele, 0, "/gpx/wpt/ele", 0UL },
{ tt_wpt_time, 0, "/gpx/wpt/time", 0UL }, { tt_wpt_time, 0, "/gpx/wpt/time", 0UL },
{ tt_wpt_name, 0, "/gpx/wpt/name", 0UL }, { tt_wpt_name, 0, "/gpx/wpt/name", 0UL },
{ tt_wpt_cmt, 0, "/gpx/wpt/cmt", 0UL }, { tt_wpt_cmt, 0, "/gpx/wpt/cmt", 0UL },
{ tt_wpt_desc, 0, "/gpx/wpt/desc", 0UL }, { tt_wpt_desc, 0, "/gpx/wpt/desc", 0UL },
{ tt_wpt_url, 0, "/gpx/wpt/url", 0UL }, { tt_wpt_url, 0, "/gpx/wpt/url", 0UL },
{ tt_wpt_urlname, 0, "/gpx/wpt/urlname", 0UL }, { tt_wpt_urlname, 0, "/gpx/wpt/urlname", 0UL },
{ tt_wpt_link, 0, "/gpx/wpt/link", 0UL }, /* G { tt_wpt_link, 0, "/gpx/wpt/link", 0UL }, /* GPX 1.1 *
PX 1.1 */ /
{ tt_wpt_link_text, 0, "/gpx/wpt/link/text", 0UL }, /* G { tt_wpt_link_text, 0, "/gpx/wpt/link/text", 0UL }, /* GPX 1.1 *
PX 1.1 */ /
{ tt_wpt_sym, 0, "/gpx/wpt/sym", 0UL }, { tt_wpt_sym, 0, "/gpx/wpt/sym", 0UL },
{ tt_wpt_type, 1, "/gpx/wpt/type", 0UL }, { tt_wpt_type, 1, "/gpx/wpt/type", 0UL },
/* Double up the GPX 1.0 and GPX 1.1 styles */ /* Double up the GPX 1.0 and GPX 1.1 styles */
#define GEOTAG(type,name) \ #define GEOTAG(type,name) \
{type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:" name, 0UL }, \ {type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:" name, 0UL }, \
{type, 1, "/gpx/wpt/extensions/cache/" name, 0UL }, \ {type, 1, "/gpx/wpt/extensions/cache/" name, 0UL }, \
{type, 1, "/gpx/wpt/geocache/" name, 0UL } /* opencaching.de */ {type, 1, "/gpx/wpt/geocache/" name, 0UL } /* opencaching.de */
#define GARMIN_WPT_EXT "/gpx/wpt/extensions/gpxx:WaypointExtension" #define GARMIN_WPT_EXT "/gpx/wpt/extensions/gpxx:WaypointExtension"
// GEOTAG( tt_cache, "cache"), // GEOTAG( tt_cache, "cache"),
{ tt_cache, 1, "/gpx/wpt/groundspeak:cache" }, { tt_cache, 1, "/gpx/wpt/groundspeak:cache" },
GEOTAG( tt_cache_name, "name"), GEOTAG(tt_cache_name, "name"),
GEOTAG( tt_cache_container, "container"), GEOTAG(tt_cache_container, "container"),
GEOTAG( tt_cache_type, "type"), GEOTAG(tt_cache_type, "type"),
GEOTAG( tt_cache_difficulty, "difficulty"), GEOTAG(tt_cache_difficulty, "difficulty"),
GEOTAG( tt_cache_terrain, "terrain"), GEOTAG(tt_cache_terrain, "terrain"),
GEOTAG( tt_cache_hint, "encoded_hints"), GEOTAG(tt_cache_hint, "encoded_hints"),
GEOTAG( tt_cache_hint, "hints"), /* opencaching.de */ GEOTAG(tt_cache_hint, "hints"), /* opencaching.de */
GEOTAG( tt_cache_desc_short, "short_description"), GEOTAG(tt_cache_desc_short, "short_description"),
GEOTAG( tt_cache_desc_long, "long_description"), GEOTAG(tt_cache_desc_long, "long_description"),
GEOTAG( tt_cache_placer, "owner"), GEOTAG(tt_cache_placer, "owner"),
{ tt_cache_log_wpt, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/ { tt_cache_log_wpt, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/groun
groundspeak:log/groundspeak:log_wpt"}, dspeak:log/groundspeak:log_wpt"},
{ tt_cache_log_wpt, 1, "/gpx/wpt/extensions/cache/logs/log/log_wpt"} { tt_cache_log_wpt, 1, "/gpx/wpt/extensions/cache/logs/log/log_wpt"},
, { tt_cache_log_type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/grou
{ tt_cache_log_type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs ndspeak:log/groundspeak:type"},
/groundspeak:log/groundspeak:type"}, { tt_cache_log_type, 1, "/gpx/wpt/extensions/cache/logs/log/type"},
{ tt_cache_log_type, 1, "/gpx/wpt/extensions/cache/logs/log/type"}, { tt_cache_log_date, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs/grou
{ tt_cache_log_date, 1, "/gpx/wpt/groundspeak:cache/groundspeak:logs ndspeak:log/groundspeak:date"},
/groundspeak:log/groundspeak:date"}, { tt_cache_log_date, 1, "/gpx/wpt/extensions/cache/logs/log/date"},
{ tt_cache_log_date, 1, "/gpx/wpt/extensions/cache/logs/log/date"},
{ tt_wpt_extensions, 0, "/gpx/wpt/extensions", 0UL },
{ tt_wpt_extensions, 0, "/gpx/wpt/extensions", 0UL },
{ tt_garmin_wpt_extensions, 0, GARMIN_WPT_EXT, 0UL },
{ tt_garmin_wpt_extensions, 0, GARMIN_WPT_EXT, 0UL }, { tt_garmin_wpt_proximity, 0, GARMIN_WPT_EXT "/gpxx:Proximity", 0UL },
{ tt_garmin_wpt_proximity, 0, GARMIN_WPT_EXT "/gpxx:Proximity", 0UL { tt_garmin_wpt_temperature, 0, GARMIN_WPT_EXT "/gpxx:Temperature", 0UL }
}, ,
{ tt_garmin_wpt_temperature, 0, GARMIN_WPT_EXT "/gpxx:Temperature", { tt_garmin_wpt_depth, 0, GARMIN_WPT_EXT "/gpxx:Depth", 0UL },
0UL }, { tt_garmin_wpt_display_mode, 0, GARMIN_WPT_EXT "/gpxx:DisplayMode", 0UL
{ tt_garmin_wpt_depth, 0, GARMIN_WPT_EXT "/gpxx:Depth", 0UL }, },
{ tt_garmin_wpt_display_mode, 0, GARMIN_WPT_EXT "/gpxx:DisplayMode", { tt_garmin_wpt_categories, 0, GARMIN_WPT_EXT "/gpxx:Categories", 0UL },
0UL }, { tt_garmin_wpt_category, 0, GARMIN_WPT_EXT "/gpxx:Categories/gpxx:Catego
{ tt_garmin_wpt_categories, 0, GARMIN_WPT_EXT "/gpxx:Categories", 0U ry", 0UL },
L }, { tt_garmin_wpt_addr, 0, GARMIN_WPT_EXT "/gpxx:Address/gpxx:StreetAddress
{ tt_garmin_wpt_category, 0, GARMIN_WPT_EXT "/gpxx:Categories/gpxx:C ", 0UL },
ategory", 0UL }, { tt_garmin_wpt_city, 0, GARMIN_WPT_EXT "/gpxx:Address/gpxx:City", 0UL },
{ tt_garmin_wpt_addr, 0, GARMIN_WPT_EXT "/gpxx:Address/gpxx:StreetAd { tt_garmin_wpt_state, 0, GARMIN_WPT_EXT "/gpxx:Address/gpxx:State", 0UL
dress", 0UL }, },
{ tt_garmin_wpt_city, 0, GARMIN_WPT_EXT "/gpxx:Address/gpxx:City", 0 { tt_garmin_wpt_country, 0, GARMIN_WPT_EXT "/gpxx:Address/gpxx:Country",
UL }, 0UL },
{ tt_garmin_wpt_state, 0, GARMIN_WPT_EXT "/gpxx:Address/gpxx:State", { tt_garmin_wpt_postal_code, 0, GARMIN_WPT_EXT "/gpxx:Address/gpxx:Postal
0UL }, Code", 0UL },
{ tt_garmin_wpt_country, 0, GARMIN_WPT_EXT "/gpxx:Address/gpxx:Count { tt_garmin_wpt_phone_nr, 0, GARMIN_WPT_EXT "/gpxx:PhoneNumber", 0UL },
ry", 0UL },
{ tt_garmin_wpt_postal_code, 0, GARMIN_WPT_EXT "/gpxx:Address/gpxx:P { tt_rte, 0, "/gpx/rte", 0UL },
ostalCode", 0UL }, { tt_rte_name, 0, "/gpx/rte/name", 0UL },
{ tt_garmin_wpt_phone_nr, 0, GARMIN_WPT_EXT "/gpxx:PhoneNumber", 0UL { tt_rte_desc, 0, "/gpx/rte/desc", 0UL },
}, { tt_rte_number, 0, "/gpx/rte/number", 0UL },
{ tt_rte_rtept, 0, "/gpx/rte/rtept", 0UL },
{ tt_rte, 0, "/gpx/rte", 0UL }, { tt_rte_rtept_ele, 0, "/gpx/rte/rtept/ele", 0UL },
{ tt_rte_name, 0, "/gpx/rte/name", 0UL }, { tt_rte_rtept_time, 0, "/gpx/rte/rtept/time", 0UL },
{ tt_rte_desc, 0, "/gpx/rte/desc", 0UL }, { tt_rte_rtept_name, 0, "/gpx/rte/rtept/name", 0UL },
{ tt_rte_number, 0, "/gpx/rte/number", 0UL }, { tt_rte_rtept_cmt, 0, "/gpx/rte/rtept/cmt", 0UL },
{ tt_rte_rtept, 0, "/gpx/rte/rtept", 0UL }, { tt_rte_rtept_desc, 0, "/gpx/rte/rtept/desc", 0UL },
{ tt_rte_rtept_ele, 0, "/gpx/rte/rtept/ele", 0UL }, { tt_rte_rtept_url, 0, "/gpx/rte/rtept/url", 0UL },
{ tt_rte_rtept_time, 0, "/gpx/rte/rtept/time", 0UL }, { tt_rte_rtept_urlname, 0, "/gpx/rte/rtept/urlname", 0UL },
{ tt_rte_rtept_name, 0, "/gpx/rte/rtept/name", 0UL }, { tt_rte_rtept_sym, 0, "/gpx/rte/rtept/sym", 0UL },
{ tt_rte_rtept_cmt, 0, "/gpx/rte/rtept/cmt", 0UL },
{ tt_rte_rtept_desc, 0, "/gpx/rte/rtept/desc", 0UL }, { tt_trk, 0, "/gpx/trk", 0UL },
{ tt_rte_rtept_url, 0, "/gpx/rte/rtept/url", 0UL }, { tt_trk_name, 0, "/gpx/trk/name", 0UL },
{ tt_rte_rtept_urlname, 0, "/gpx/rte/rtept/urlname", 0UL }, { tt_trk_desc, 0, "/gpx/trk/desc", 0UL },
{ tt_rte_rtept_sym, 0, "/gpx/rte/rtept/sym", 0UL }, { tt_trk_trkseg, 0, "/gpx/trk/trkseg", 0UL },
{ tt_trk_number, 0, "/gpx/trk/number", 0UL },
{ tt_trk, 0, "/gpx/trk", 0UL }, { tt_trk_trkseg_trkpt, 0, "/gpx/trk/trkseg/trkpt", 0UL },
{ tt_trk_name, 0, "/gpx/trk/name", 0UL }, { tt_trk_trkseg_trkpt_ele, 0, "/gpx/trk/trkseg/trkpt/ele", 0UL },
{ tt_trk_desc, 0, "/gpx/trk/desc", 0UL }, { tt_trk_trkseg_trkpt_time, 0, "/gpx/trk/trkseg/trkpt/time", 0UL },
{ tt_trk_trkseg, 0, "/gpx/trk/trkseg", 0UL }, { tt_trk_trkseg_trkpt_name, 0, "/gpx/trk/trkseg/trkpt/name", 0UL },
{ tt_trk_number, 0, "/gpx/trk/number", 0UL }, { tt_trk_trkseg_trkpt_cmt, 0, "/gpx/trk/trkseg/trkpt/cmt", 0UL },
{ tt_trk_trkseg_trkpt, 0, "/gpx/trk/trkseg/trkpt", 0UL }, { tt_trk_trkseg_trkpt_desc, 0, "/gpx/trk/trkseg/trkpt/desc", 0UL },
{ tt_trk_trkseg_trkpt_ele, 0, "/gpx/trk/trkseg/trkpt/ele", 0UL }, { tt_trk_trkseg_trkpt_url, 0, "/gpx/trk/trkseg/trkpt/url", 0UL },
{ tt_trk_trkseg_trkpt_time, 0, "/gpx/trk/trkseg/trkpt/time", 0UL }, { tt_trk_trkseg_trkpt_urlname, 0, "/gpx/trk/trkseg/trkpt/urlname", 0UL },
{ tt_trk_trkseg_trkpt_name, 0, "/gpx/trk/trkseg/trkpt/name", 0UL }, { tt_trk_trkseg_trkpt_sym, 0, "/gpx/trk/trkseg/trkpt/sym", 0UL },
{ tt_trk_trkseg_trkpt_cmt, 0, "/gpx/trk/trkseg/trkpt/cmt", 0UL }, { tt_trk_trkseg_trkpt_course, 0, "/gpx/trk/trkseg/trkpt/course", 0UL },
{ tt_trk_trkseg_trkpt_desc, 0, "/gpx/trk/trkseg/trkpt/desc", 0UL }, { tt_trk_trkseg_trkpt_speed, 0, "/gpx/trk/trkseg/trkpt/speed", 0UL },
{ tt_trk_trkseg_trkpt_url, 0, "/gpx/trk/trkseg/trkpt/url", 0UL },
{ tt_trk_trkseg_trkpt_urlname, 0, "/gpx/trk/trkseg/trkpt/urlname", 0 /* Common to tracks, routes, and waypts */
UL }, { tt_fix, 0, "/gpx/wpt/fix", 0UL },
{ tt_trk_trkseg_trkpt_sym, 0, "/gpx/trk/trkseg/trkpt/sym", 0UL }, { tt_fix, 0, "/gpx/trk/trkseg/trkpt/fix", 0UL },
{ tt_trk_trkseg_trkpt_course, 0, "/gpx/trk/trkseg/trkpt/course", 0UL { tt_fix, 0, "/gpx/rte/rtept/fix", 0UL },
}, { tt_sat, 0, "/gpx/wpt/sat", 0UL },
{ tt_trk_trkseg_trkpt_speed, 0, "/gpx/trk/trkseg/trkpt/speed", 0UL } { tt_sat, 0, "/gpx/trk/trkseg/trkpt/sat", 0UL },
, { tt_sat, 0, "/gpx/rte/rtept/sat", 0UL },
{ tt_pdop, 0, "/gpx/wpt/pdop", 0UL },
/* Common to tracks, routes, and waypts */ { tt_pdop, 0, "/gpx/trk/trkseg/trkpt/pdop", 0UL },
{ tt_fix, 0, "/gpx/wpt/fix", 0UL }, { tt_pdop, 0, "/gpx/rte/rtept/pdop", 0UL },
{ tt_fix, 0, "/gpx/trk/trkseg/trkpt/fix", 0UL }, { tt_hdop, 0, "/gpx/wpt/hdop", 0UL },
{ tt_fix, 0, "/gpx/rte/rtept/fix", 0UL }, { tt_hdop, 0, "/gpx/trk/trkseg/trkpt/hdop", 0UL },
{ tt_sat, 0, "/gpx/wpt/sat", 0UL }, { tt_hdop, 0, "/gpx/rte/rtept/hdop", 0UL },
{ tt_sat, 0, "/gpx/trk/trkseg/trkpt/sat", 0UL }, { tt_vdop, 0, "/gpx/wpt/vdop", 0UL },
{ tt_sat, 0, "/gpx/rte/rtept/sat", 0UL }, { tt_vdop, 0, "/gpx/trk/trkseg/trkpt/vdop", 0UL },
{ tt_pdop, 0, "/gpx/wpt/pdop", 0UL }, { tt_vdop, 0, "/gpx/rte/rtept/hdop", 0UL },
{ tt_pdop, 0, "/gpx/trk/trkseg/trkpt/pdop", 0UL }, {0, 0, NULL, 0UL}
{ tt_pdop, 0, "/gpx/rte/rtept/pdop", 0UL },
{ tt_hdop, 0, "/gpx/wpt/hdop", 0UL },
{ tt_hdop, 0, "/gpx/trk/trkseg/trkpt/hdop", 0UL },
{ tt_hdop, 0, "/gpx/rte/rtept/hdop", 0UL },
{ tt_vdop, 0, "/gpx/wpt/vdop", 0UL },
{ tt_vdop, 0, "/gpx/trk/trkseg/trkpt/vdop", 0UL },
{ tt_vdop, 0, "/gpx/rte/rtept/hdop", 0UL },
{0, 0, NULL, 0UL}
}; };
static tag_type static tag_type
get_tag(const char *t, int *passthrough) get_tag(const char* t, int* passthrough)
{ {
tag_mapping *tm; tag_mapping* tm;
unsigned long tcrc = get_crc32_s(t); unsigned long tcrc = get_crc32_s(t);
for (tm = tag_path_map; tm->tag_type != 0; tm++) { for (tm = tag_path_map; tm->tag_type != 0; tm++) {
if ((tcrc == tm->crc) && (0 == strcmp(tm->tag_name, t))) { if ((tcrc == tm->crc) && (0 == strcmp(tm->tag_name, t))) {
*passthrough = tm->tag_passthrough; *passthrough = tm->tag_passthrough;
return tm->tag_type; return tm->tag_type;
} }
} }
*passthrough = 1; *passthrough = 1;
return tt_unknown; return tt_unknown;
} }
static void static void
prescan_tags(void) prescan_tags(void)
{ {
tag_mapping *tm; tag_mapping* tm;
for (tm = tag_path_map; tm->tag_type != 0; tm++) { for (tm = tag_path_map; tm->tag_type != 0; tm++) {
tm->crc = get_crc32_s(tm->tag_name); tm->crc = get_crc32_s(tm->tag_name);
} }
} }
static void static void
tag_gpx(const char **attrv) tag_gpx(const char** attrv)
{ {
const char **avp; const char** avp;
for (avp = &attrv[0]; *avp; avp += 2) { for (avp = &attrv[0]; *avp; avp += 2) {
if (strcmp(avp[0], "version") == 0) { if (strcmp(avp[0], "version") == 0) {
gpx_version = avp[1]; gpx_version = avp[1];
} } else if (strcmp(avp[0], "src") == 0) {
else if (strcmp(avp[0], "src") == 0) { gpx_creator = avp[1];
gpx_creator = avp[1]; }
} /*
/* * Our handling of schemaLocation really is weird.
* Our handling of schemaLocation really is weird. * If we see we have a "normal" GPX 1.1 header, on read,
* If we see we have a "normal" GPX 1.1 header, on read, * flip our default on write to use that and don't append
* flip our default on write to use that and don't append * it to the rest...
* it to the rest... */
*/ else if (strcmp(avp[0], "xsi:schemaLocation") == 0) {
else if (strcmp(avp[0], "xsi:schemaLocation") == 0) { if (0 == strcmp(avp[1], DEFAULT_XSI_SCHEMA_LOC_11)) {
if (0 == strcmp(avp[1], DEFAULT_XSI_SCHEMA_LOC_11)) if (0 == strcmp(xsi_schema_loc, DEFAULT_XSI_SCHEMA_LOC)) {
{ xfree(xsi_schema_loc);
if (0 == strcmp(xsi_schema_loc, DEFAULT_XSI_ }
SCHEMA_LOC)) xsi_schema_loc = xstrdup(DEFAULT_XSI_SCHEMA_LOC_11);
xfree(xsi_schema_loc); continue;
xsi_schema_loc = xstrdup(DEFAULT_XSI }
_SCHEMA_LOC_11); if (0 == strstr(xsi_schema_loc, avp[1])) {
continue; xsi_schema_loc = xstrappend(xsi_schema_loc, " ");
} xsi_schema_loc = xstrappend(xsi_schema_loc, avp[1]);
if (0 == strstr(xsi_schema_loc, avp[1])) { }
xsi_schema_loc = xstrappend(xsi_schema_loc, " ") }
; }
xsi_schema_loc = xstrappend(xsi_schema_loc, avp[ }
1]);
} static void
} tag_wpt(const char** attrv)
} {
} const char** avp = &attrv[0];
static void wpt_tmp = waypt_new();
tag_wpt(const char **attrv)
{ cur_tag = NULL;
const char **avp = &attrv[0]; while (*avp) {
if (strcmp(avp[0], "lat") == 0) {
wpt_tmp = waypt_new(); sscanf(avp[1], "%lf",
&wpt_tmp->latitude);
cur_tag = NULL; } else if (strcmp(avp[0], "lon") == 0) {
while (*avp) { sscanf(avp[1], "%lf",
if (strcmp(avp[0], "lat") == 0) { &wpt_tmp->longitude);
sscanf(avp[1], "%lf", }
&wpt_tmp->latitude); avp+=2;
} }
else if (strcmp(avp[0], "lon") == 0) { fs_ptr = &wpt_tmp->fs;
sscanf(avp[1], "%lf", }
&wpt_tmp->longitude);
} static void
avp+=2; tag_cache_desc(const char** attrv)
} {
fs_ptr = &wpt_tmp->fs; const char** avp;
}
cache_descr_is_html = 0;
static void for (avp = &attrv[0]; *avp; avp+=2) {
tag_cache_desc(const char ** attrv) if (strcmp(avp[0], "html") == 0) {
{ if (strcmp(avp[1], "True") == 0) {
const char **avp; cache_descr_is_html = 1;
}
cache_descr_is_html = 0; }
for (avp = &attrv[0]; *avp; avp+=2) { }
if (strcmp(avp[0], "html") == 0) { }
if (strcmp(avp[1], "True") == 0) {
cache_descr_is_html = 1; static void
} tag_gs_cache(const char** attrv)
} {
} const char** avp;
}
for (avp = &attrv[0]; *avp; avp+=2) {
static void if (strcmp(avp[0], "id") == 0) {
tag_gs_cache(const char **attrv) wpt_tmp->gc_data.id = atoi(avp[1]);
{ } else if (strcmp(avp[0], "available") == 0) {
const char **avp; if (case_ignore_strcmp(avp[1], "True") == 0) {
wpt_tmp->gc_data.is_available = status_true;
for (avp = &attrv[0]; *avp; avp+=2) { } else if (case_ignore_strcmp(avp[1], "False") == 0) {
if (strcmp(avp[0], "id") == 0) { wpt_tmp->gc_data.is_available = status_false;
wpt_tmp->gc_data.id = atoi(avp[1]); }
} else if (strcmp(avp[0], "available") == 0) { } else if (strcmp(avp[0], "archived") == 0) {
if (case_ignore_strcmp(avp[1], "True") == 0) { if (case_ignore_strcmp(avp[1], "True") == 0) {
wpt_tmp->gc_data.is_available = status_true; wpt_tmp->gc_data.is_archived = status_true;
} } else if (case_ignore_strcmp(avp[1], "False") == 0) {
else if (case_ignore_strcmp(avp[1], "False") == 0) { wpt_tmp->gc_data.is_archived = status_false;
wpt_tmp->gc_data.is_available = status_false }
; }
} }
} else if (strcmp(avp[0], "archived") == 0) { }
if (case_ignore_strcmp(avp[1], "True") == 0) {
wpt_tmp->gc_data.is_archived = status_true; static void
} start_something_else(const char* el, const char** attrv)
else if (case_ignore_strcmp(avp[1], "False") == 0) { {
wpt_tmp->gc_data.is_archived = status_false; const char** avp = attrv;
} char** avcp = NULL;
} int attr_count = 0;
} xml_tag* new_tag;
} fs_xml* fs_gpx;
static void if (!fs_ptr) {
start_something_else(const char *el, const char **attrv) return;
{ }
const char **avp = attrv;
char **avcp = NULL; new_tag = (xml_tag*)xcalloc(sizeof(xml_tag),1);
int attr_count = 0; new_tag->tagname = xstrdup(el);
xml_tag *new_tag;
fs_xml *fs_gpx; /* count attributes */
while (*avp) {
if ( !fs_ptr ) { attr_count++;
return; avp++;
} }
new_tag = (xml_tag *)xcalloc(sizeof(xml_tag),1); /* copy attributes */
new_tag->tagname = xstrdup(el); avp = attrv;
new_tag->attributes = (char**)xcalloc(sizeof(char*),attr_count+1);
/* count attributes */ avcp = new_tag->attributes;
while (*avp) { while (*avp) {
attr_count++; *avcp = xstrdup(*avp);
avp++; avcp++;
} avp++;
}
/* copy attributes */ *avcp = NULL;
avp = attrv;
new_tag->attributes = (char **)xcalloc(sizeof(char *),attr_count+1); if (cur_tag) {
avcp = new_tag->attributes; if (cur_tag->child) {
while (*avp) { cur_tag = cur_tag->child;
*avcp = xstrdup(*avp); while (cur_tag->sibling) {
avcp++; cur_tag = cur_tag->sibling;
avp++; }
} cur_tag->sibling = new_tag;
*avcp = NULL; new_tag->parent = cur_tag->parent;
} else {
if ( cur_tag ) { cur_tag->child = new_tag;
if ( cur_tag->child ) { new_tag->parent = cur_tag;
cur_tag = cur_tag->child; }
while ( cur_tag->sibling ) { } else {
cur_tag = cur_tag->sibling; fs_gpx = (fs_xml*)fs_chain_find(*fs_ptr, FS_GPX);
}
cur_tag->sibling = new_tag; if (fs_gpx && fs_gpx->tag) {
new_tag->parent = cur_tag->parent; cur_tag = fs_gpx->tag;
} while (cur_tag->sibling) {
else { cur_tag = cur_tag->sibling;
cur_tag->child = new_tag; }
new_tag->parent = cur_tag; cur_tag->sibling = new_tag;
} new_tag->parent = NULL;
} } else {
else { fs_gpx = fs_xml_alloc(FS_GPX);
fs_gpx = (fs_xml *)fs_chain_find( *fs_ptr, FS_GPX ); fs_gpx->tag = new_tag;
fs_chain_add(fs_ptr, (format_specific_data*)fs_gpx);
if ( fs_gpx && fs_gpx->tag ) { new_tag->parent = NULL;
cur_tag = fs_gpx->tag; }
while ( cur_tag->sibling ) { }
cur_tag = cur_tag->sibling; cur_tag = new_tag;
}
cur_tag->sibling = new_tag;
new_tag->parent = NULL;
}
else {
fs_gpx = fs_xml_alloc(FS_GPX);
fs_gpx->tag = new_tag;
fs_chain_add( fs_ptr, (format_specific_data *)fs_gpx
);
new_tag->parent = NULL;
}
}
cur_tag = new_tag;
} }
static void static void
end_something_else() end_something_else()
{ {
if ( cur_tag ) { if (cur_tag) {
cur_tag = cur_tag->parent; cur_tag = cur_tag->parent;
} }
} }
static void static void
tag_log_wpt(const char **attrv) tag_log_wpt(const char** attrv)
{ {
waypoint * lwp_tmp; waypoint* lwp_tmp;
const char **avp = &attrv[0]; const char** avp = &attrv[0];
/* create a new waypoint */ /* create a new waypoint */
lwp_tmp = waypt_new(); lwp_tmp = waypt_new();
/* extract the lat/lon attributes */ /* extract the lat/lon attributes */
while (*avp) { while (*avp) {
if (strcmp(avp[0], "lat") == 0) { if (strcmp(avp[0], "lat") == 0) {
sscanf(avp[1], "%lf", sscanf(avp[1], "%lf",
&lwp_tmp->latitude); &lwp_tmp->latitude);
} } else if (strcmp(avp[0], "lon") == 0) {
else if (strcmp(avp[0], "lon") == 0) { sscanf(avp[1], "%lf",
sscanf(avp[1], "%lf", &lwp_tmp->longitude);
&lwp_tmp->longitude); }
} avp+=2;
avp+=2; }
} /* Make a new shortname. Since this is a groundspeak extension,
/* Make a new shortname. Since this is a groundspeak extension, we assume that GCBLAH is the current shortname format and that
we assume that GCBLAH is the current shortname format and that wpt_tmp refers to the currently parsed waypoint. Unfortunatley,
wpt_tmp refers to the currently parsed waypoint. Unfortunatley, we need to keep track of log_wpt counts so we don't collide with
we need to keep track of log_wpt counts so we don't collide with dupe shortnames.
dupe shortnames. */
*/
if ((wpt_tmp->shortname) && (strlen(wpt_tmp->shortname) > 2)) {
if ((wpt_tmp->shortname) && (strlen(wpt_tmp->shortname) > 2)) { /* copy of the shortname */
/* copy of the shortname */ lwp_tmp->shortname = xcalloc(7, 1);
lwp_tmp->shortname = xcalloc(7, 1); sprintf(lwp_tmp->shortname, "%-4.4s%02d",
sprintf(lwp_tmp->shortname, "%-4.4s%02d", &wpt_tmp->shortname[2], logpoint_ct++);
&wpt_tmp->shortname[2], logpoint_ct++);
waypt_add(lwp_tmp);
waypt_add(lwp_tmp); }
} }
}
static void
static void gpx_start(void* data, const XML_Char* xml_el, const XML_Char** xml_attr)
gpx_start(void *data, const XML_Char *xml_el, const XML_Char **xml_attr) {
{ char* e;
char *e; char* ep;
char *ep; int passthrough;
int passthrough; const char* el = xml_convert_to_char_string(xml_el);
const char *el = xml_convert_to_char_string(xml_el); const char** attr = xml_convert_attrs_to_char_string(xml_attr);
const char **attr = xml_convert_attrs_to_char_string(xml_attr);
vmem_realloc(&current_tag, strlen(current_tag.mem) + 2 + strlen(el));
vmem_realloc(&current_tag, strlen(current_tag.mem) + 2 + strlen(el)) e = current_tag.mem;
; ep = e + strlen(e);
e = current_tag.mem; *ep++ = '/';
ep = e + strlen(e); strcpy(ep, el);
*ep++ = '/';
strcpy(ep, el); /*
* FIXME: Find out why a cdatastr[0] doesn't adequately reset the
/* * cdata handler.
* FIXME: Find out why a cdatastr[0] doesn't adequately reset the */
* cdata handler. memset(cdatastr.mem, 0, cdatastr.size);
*/
memset(cdatastr.mem, 0, cdatastr.size); switch (get_tag(current_tag.mem, &passthrough)) {
case tt_gpx:
switch (get_tag(current_tag.mem, &passthrough)) { tag_gpx(attr);
case tt_gpx: break;
tag_gpx(attr); case tt_wpt:
break; tag_wpt(attr);
case tt_wpt: break;
tag_wpt(attr); case tt_wpt_link:
break; if (0 == strcmp(attr[0], "href")) {
case tt_wpt_link: link_url = attr[1];
if (0 == strcmp(attr[0], "href")) { }
link_url = attr[1]; break;
} case tt_wpt_link_text:
break; link_text = cdatastr.mem;
case tt_wpt_link_text: break;
link_text = cdatastr.mem; case tt_rte:
break; rte_head = route_head_alloc();
case tt_rte: route_add_head(rte_head);
rte_head = route_head_alloc(); fs_ptr = &rte_head->fs;
route_add_head(rte_head); break;
fs_ptr = &rte_head->fs; case tt_rte_rtept:
break; tag_wpt(attr);
case tt_rte_rtept: break;
tag_wpt(attr); case tt_trk:
break; trk_head = route_head_alloc();
case tt_trk: track_add_head(trk_head);
trk_head = route_head_alloc(); fs_ptr = &trk_head->fs;
track_add_head(trk_head); break;
fs_ptr = &trk_head->fs; case tt_trk_trkseg_trkpt:
break; tag_wpt(attr);
case tt_trk_trkseg_trkpt: break;
tag_wpt(attr); case tt_unknown:
break; start_something_else(el, attr);
case tt_unknown: return;
start_something_else(el, attr); case tt_cache:
return; tag_gs_cache(attr);
case tt_cache: break;
tag_gs_cache(attr); case tt_cache_log_wpt:
break; if (opt_logpoint) {
case tt_cache_log_wpt: tag_log_wpt(attr);
if (opt_logpoint) }
tag_log_wpt(attr); break;
break; case tt_cache_desc_long:
case tt_cache_desc_long: case tt_cache_desc_short:
case tt_cache_desc_short: tag_cache_desc(attr);
tag_cache_desc(attr); break;
break; case tt_cache_placer:
case tt_cache_placer: if (*attr && (0 == strcmp(attr[0], "id"))) {
if (*attr && (0 == strcmp(attr[0], "id"))) { wpt_tmp->gc_data.placer_id = atoi(attr[1]);
wpt_tmp->gc_data.placer_id = atoi(attr[1]); }
} default:
default: break;
break; }
} if (passthrough) {
if (passthrough) { start_something_else(el, attr);
start_something_else(el, attr); }
} xml_free_converted_string(el);
xml_free_converted_string(el); xml_free_converted_attrs(attr);
xml_free_converted_attrs(attr);
} }
struct struct
gs_type_mapping{ gs_type_mapping {
geocache_type type; geocache_type type;
const char *name; const char* name;
} gs_type_map[] = { } gs_type_map[] = {
{ gt_traditional, "Traditional Cache" }, { gt_traditional, "Traditional Cache" },
{ gt_traditional, "Traditional" }, /* opencaching.de */ { gt_traditional, "Traditional" }, /* opencaching.de */
{ gt_multi, "Multi-cache" }, { gt_multi, "Multi-cache" },
{ gt_multi, "Multi" }, /* opencaching.de */ { gt_multi, "Multi" }, /* opencaching.de */
{ gt_virtual, "Virtual Cache" }, { gt_virtual, "Virtual Cache" },
{ gt_virtual, "Virtual" }, /* opencaching.de */ { gt_virtual, "Virtual" }, /* opencaching.de */
{ gt_event, "Event Cache" }, { gt_event, "Event Cache" },
{ gt_event, "Event" }, /* opencaching.de */ { gt_event, "Event" }, /* opencaching.de */
{ gt_webcam, "Webcam Cache" }, { gt_webcam, "Webcam Cache" },
{ gt_webcam, "Webcam" }, /* opencaching.de */ { gt_webcam, "Webcam" }, /* opencaching.de */
{ gt_suprise, "Unknown Cache" }, { gt_suprise, "Unknown Cache" },
{ gt_earth, "Earthcache" }, { gt_earth, "Earthcache" },
{ gt_earth, "Earth" }, /* opencaching.de */ { gt_earth, "Earth" }, /* opencaching.de */
{ gt_cito, "Cache In Trash Out Event" }, { gt_cito, "Cache In Trash Out Event" },
{ gt_letterbox, "Letterbox Hybrid" }, { gt_letterbox, "Letterbox Hybrid" },
{ gt_locationless, "Locationless (Reverse) Cache" }, { gt_locationless, "Locationless (Reverse) Cache" },
{ gt_ape, "Project APE Cache" }, { gt_ape, "Project APE Cache" },
{ gt_mega, "Mega-Event Cache" }, { gt_mega, "Mega-Event Cache" },
{ gt_benchmark, "Benchmark" }, /* Not Groundspeak; for GSAK */ { gt_benchmark, "Benchmark" }, /* Not Groundspeak; for GSAK */
}; };
struct struct
gs_container_mapping{ gs_container_mapping {
geocache_container type; geocache_container type;
const char *name; const char* name;
} gs_container_map[] = { } gs_container_map[] = {
{ gc_other, "Unknown" }, { gc_other, "Unknown" },
{ gc_other, "Other" }, /* Synonym on read. */ { gc_other, "Other" }, /* Synonym on read. */
{ gc_micro, "Micro" }, { gc_micro, "Micro" },
{ gc_regular, "Regular" }, { gc_regular, "Regular" },
{ gc_large, "Large" }, { gc_large, "Large" },
{ gc_small, "Small" }, { gc_small, "Small" },
{ gc_virtual, "Virtual" } { gc_virtual, "Virtual" }
}; };
geocache_type geocache_type
gs_mktype(const char *t) gs_mktype(const char* t)
{ {
int i; int i;
int sz = sizeof(gs_type_map) / sizeof(gs_type_map[0]); int sz = sizeof(gs_type_map) / sizeof(gs_type_map[0]);
for (i = 0; i < sz; i++) { for (i = 0; i < sz; i++) {
if (0 == case_ignore_strcmp(t, gs_type_map[i].name)) { if (0 == case_ignore_strcmp(t, gs_type_map[i].name)) {
return gs_type_map[i].type; return gs_type_map[i].type;
} }
} }
return gt_unknown; return gt_unknown;
} }
const char * const char*
gs_get_cachetype(geocache_type t) gs_get_cachetype(geocache_type t)
{ {
int i; int i;
int sz = sizeof(gs_type_map) / sizeof(gs_type_map[0]); int sz = sizeof(gs_type_map) / sizeof(gs_type_map[0]);
for (i = 0; i < sz; i++) { for (i = 0; i < sz; i++) {
if (t == gs_type_map[i].type) { if (t == gs_type_map[i].type) {
return gs_type_map[i].name; return gs_type_map[i].name;
} }
} }
return "Unknown"; return "Unknown";
} }
geocache_container geocache_container
gs_mkcont(const char *t) gs_mkcont(const char* t)
{ {
int i; int i;
int sz = sizeof(gs_container_map) / sizeof(gs_container_map[0]); int sz = sizeof(gs_container_map) / sizeof(gs_container_map[0]);
for (i = 0; i < sz; i++) { for (i = 0; i < sz; i++) {
if (0 == case_ignore_strcmp(t, gs_container_map[i].name)) { if (0 == case_ignore_strcmp(t, gs_container_map[i].name)) {
return gs_container_map[i].type; return gs_container_map[i].type;
} }
} }
return gc_unknown; return gc_unknown;
} }
const char * const char*
gs_get_container(geocache_container t) gs_get_container(geocache_container t)
{ {
int i; int i;
int sz = sizeof(gs_container_map) / sizeof(gs_container_map[0]); int sz = sizeof(gs_container_map) / sizeof(gs_container_map[0]);
for (i = 0; i < sz; i++) { for (i = 0; i < sz; i++) {
if (t == gs_container_map[i].type) { if (t == gs_container_map[i].type) {
return gs_container_map[i].name; return gs_container_map[i].name;
} }
} }
return "Unknown"; return "Unknown";
} }
time_t time_t
xml_parse_time( const char *cdatastr, int *microsecs ) xml_parse_time(const char* cdatastr, int* microsecs)
{ {
int off_hr = 0; int off_hr = 0;
int off_min = 0; int off_min = 0;
int off_sign = 1; int off_sign = 1;
char *offsetstr = NULL; char* offsetstr = NULL;
char *pointstr = NULL; char* pointstr = NULL;
struct tm tm; struct tm tm;
time_t rv = 0; time_t rv = 0;
char *timestr = xstrdup( cdatastr ); char* timestr = xstrdup(cdatastr);
memset(&tm, 0, sizeof(tm)); memset(&tm, 0, sizeof(tm));
offsetstr = strchr( timestr, 'Z' ); offsetstr = strchr(timestr, 'Z');
if ( offsetstr ) { if (offsetstr) {
/* zulu time; offsets stay at defaults */ /* zulu time; offsets stay at defaults */
*offsetstr = '\0'; *offsetstr = '\0';
} else { } else {
offsetstr = strchr( timestr, '+' ); offsetstr = strchr(timestr, '+');
if ( offsetstr ) { if (offsetstr) {
/* positive offset; parse it */ /* positive offset; parse it */
*offsetstr = '\0'; *offsetstr = '\0';
sscanf( offsetstr+1, "%d:%d", &off_hr, &off_min ); sscanf(offsetstr+1, "%d:%d", &off_hr, &off_min);
} else { } else {
offsetstr = strchr( timestr, 'T' ); offsetstr = strchr(timestr, 'T');
if ( offsetstr ) { if (offsetstr) {
offsetstr = strchr( offsetstr, '-' ); offsetstr = strchr(offsetstr, '-');
if ( offsetstr ) { if (offsetstr) {
/* negative offset; parse it */ /* negative offset; parse it */
*offsetstr = '\0'; *offsetstr = '\0';
sscanf( offsetstr+1, "%d:%d", sscanf(offsetstr+1, "%d:%d",
&off_hr, &off_min ); &off_hr, &off_min);
off_sign = -1; off_sign = -1;
} }
} }
} }
} }
pointstr = strchr( timestr, '.' ); pointstr = strchr(timestr, '.');
if ( pointstr ) { if (pointstr) {
if (microsecs) { if (microsecs) {
double fsec; double fsec;
sscanf(pointstr, "%le", &fsec); sscanf(pointstr, "%le", &fsec);
/* Round to avoid FP jitter */ /* Round to avoid FP jitter */
*microsecs = .5 + (fsec * 1000000.0) ; *microsecs = .5 + (fsec * 1000000.0) ;
} }
*pointstr = '\0'; *pointstr = '\0';
} }
sscanf(timestr, "%d-%d-%dT%d:%d:%d", sscanf(timestr, "%d-%d-%dT%d:%d:%d",
&tm.tm_year, &tm.tm_year,
&tm.tm_mon, &tm.tm_mon,
&tm.tm_mday, &tm.tm_mday,
&tm.tm_hour, &tm.tm_hour,
&tm.tm_min, &tm.tm_min,
&tm.tm_sec); &tm.tm_sec);
tm.tm_mon -= 1; tm.tm_mon -= 1;
tm.tm_year -= 1900; tm.tm_year -= 1900;
tm.tm_isdst = 0; tm.tm_isdst = 0;
rv = mkgmtime(&tm) - off_sign*off_hr*3600 - off_sign*off_min*60; rv = mkgmtime(&tm) - off_sign*off_hr*3600 - off_sign*off_min*60;
xfree(timestr); xfree(timestr);
return rv; return rv;
} }
static void static void
gpx_end(void *data, const XML_Char *xml_el) gpx_end(void* data, const XML_Char* xml_el)
{ {
const char *el = xml_convert_to_char_string(xml_el); const char* el = xml_convert_to_char_string(xml_el);
char *s = strrchr(current_tag.mem, '/'); char* s = strrchr(current_tag.mem, '/');
float x; float x;
char *cdatastrp = cdatastr.mem; char* cdatastrp = cdatastr.mem;
int passthrough; int passthrough;
static time_t gc_log_date; static time_t gc_log_date;
tag_type tag; tag_type tag;
if (strcmp(s + 1, el)) { if (strcmp(s + 1, el)) {
fprintf(stderr, "Mismatched tag %s\n", el); fprintf(stderr, "Mismatched tag %s\n", el);
} }
tag = get_tag(current_tag.mem, &passthrough); tag = get_tag(current_tag.mem, &passthrough);
switch(tag) { switch (tag) {
/* /*
* First, the tags that are file-global. * First, the tags that are file-global.
*/ */
case tt_name: case tt_name:
gpx_add_to_global(&gpx_global->name, cdatastrp); gpx_add_to_global(&gpx_global->name, cdatastrp);
break; break;
case tt_desc: case tt_desc:
gpx_add_to_global(&gpx_global->desc, cdatastrp); gpx_add_to_global(&gpx_global->desc, cdatastrp);
break; break;
case tt_author: case tt_author:
gpx_add_to_global(&gpx_global->author, cdatastrp); gpx_add_to_global(&gpx_global->author, cdatastrp);
break; break;
case tt_email: case tt_email:
gpx_add_to_global(&gpx_global->email, cdatastrp); gpx_add_to_global(&gpx_global->email, cdatastrp);
if (gpx_email == NULL) { if (gpx_email == NULL) {
gpx_email = xstrdup(cdatastrp); gpx_email = xstrdup(cdatastrp);
} }
break; break;
case tt_url: case tt_url:
gpx_add_to_global(&gpx_global->url, cdatastrp); gpx_add_to_global(&gpx_global->url, cdatastrp);
break; break;
case tt_urlname: case tt_urlname:
gpx_add_to_global(&gpx_global->urlname, cdatastrp); gpx_add_to_global(&gpx_global->urlname, cdatastrp);
break; break;
case tt_keywords: case tt_keywords:
gpx_add_to_global(&gpx_global->keywords, cdatastrp); gpx_add_to_global(&gpx_global->keywords, cdatastrp);
break; break;
/* /*
* Waypoint-specific tags. * Waypoint-specific tags.
*/ */
case tt_wpt: case tt_wpt:
waypt_add(wpt_tmp); waypt_add(wpt_tmp);
logpoint_ct = 0; logpoint_ct = 0;
cur_tag = NULL; cur_tag = NULL;
wpt_tmp = NULL; wpt_tmp = NULL;
break; break;
case tt_cache_name: case tt_cache_name:
if (wpt_tmp->notes != NULL) xfree(wpt_tmp->notes); if (wpt_tmp->notes != NULL) {
wpt_tmp->notes = xstrdup(cdatastrp); xfree(wpt_tmp->notes);
break; }
case tt_cache_container: wpt_tmp->notes = xstrdup(cdatastrp);
wpt_tmp->gc_data.container = gs_mkcont(cdatastrp); break;
break; case tt_cache_container:
case tt_cache_type: wpt_tmp->gc_data.container = gs_mkcont(cdatastrp);
wpt_tmp->gc_data.type = gs_mktype(cdatastrp); break;
break; case tt_cache_type:
case tt_cache_difficulty: wpt_tmp->gc_data.type = gs_mktype(cdatastrp);
sscanf(cdatastrp, "%f", &x); break;
wpt_tmp->gc_data.diff = x * 10; case tt_cache_difficulty:
break; sscanf(cdatastrp, "%f", &x);
case tt_cache_hint: wpt_tmp->gc_data.diff = x * 10;
rtrim(cdatastrp); break;
if (cdatastrp[0]) { case tt_cache_hint:
wpt_tmp->gc_data.hint = xstrdup(cdatastrp); rtrim(cdatastrp);
} if (cdatastrp[0]) {
break; wpt_tmp->gc_data.hint = xstrdup(cdatastrp);
case tt_cache_desc_long: }
rtrim(cdatastrp); break;
if (cdatastrp[0]) { case tt_cache_desc_long:
wpt_tmp->gc_data.desc_long.is_html = cache_descr_is_ rtrim(cdatastrp);
html; if (cdatastrp[0]) {
wpt_tmp->gc_data.desc_long.utfstring = xstrdup(cdata wpt_tmp->gc_data.desc_long.is_html = cache_descr_is_html;
strp); wpt_tmp->gc_data.desc_long.utfstring = xstrdup(cdatastrp);
} }
break; break;
case tt_cache_desc_short: case tt_cache_desc_short:
rtrim(cdatastrp); rtrim(cdatastrp);
if (cdatastrp[0]) { if (cdatastrp[0]) {
wpt_tmp->gc_data.desc_short.is_html = cache_descr_is wpt_tmp->gc_data.desc_short.is_html = cache_descr_is_html;
_html; wpt_tmp->gc_data.desc_short.utfstring = xstrdup(cdatastrp);
wpt_tmp->gc_data.desc_short.utfstring = xstrdup(cdat }
astrp); break;
} case tt_cache_terrain:
break; sscanf(cdatastrp, "%f", &x);
case tt_cache_terrain: wpt_tmp->gc_data.terr = x * 10;
sscanf(cdatastrp, "%f", &x); break;
wpt_tmp->gc_data.terr = x * 10; case tt_cache_placer:
break; wpt_tmp->gc_data.placer = xstrdup(cdatastrp);
case tt_cache_placer: break;
wpt_tmp->gc_data.placer = xstrdup(cdatastrp); case tt_cache_log_date:
break; gc_log_date = xml_parse_time(cdatastrp, NULL);
case tt_cache_log_date: break;
gc_log_date = xml_parse_time( cdatastrp, NULL ); /*
break; * "Found it" logs follow the date according to the schema,
/* * if this is the first "found it" for this waypt, just use the
* "Found it" logs follow the date according to the schema, * last date we saw in this log.
* if this is the first "found it" for this waypt, just use the */
* last date we saw in this log. case tt_cache_log_type:
*/ if ((0 == strcmp(cdatastrp, "Found it")) &&
case tt_cache_log_type: (0 == wpt_tmp->gc_data.last_found)) {
if ((0 == strcmp(cdatastrp, "Found it")) && wpt_tmp->gc_data.last_found = gc_log_date;
(0 == wpt_tmp->gc_data.last_found)) { }
wpt_tmp->gc_data.last_found = gc_log_date; gc_log_date = 0;
} break;
gc_log_date = 0;
break; /*
* Garmin-waypoint-specific tags.
/* */
* Garmin-waypoint-specific tags. case tt_garmin_wpt_proximity:
*/ case tt_garmin_wpt_temperature:
case tt_garmin_wpt_proximity: case tt_garmin_wpt_depth:
case tt_garmin_wpt_temperature: case tt_garmin_wpt_display_mode:
case tt_garmin_wpt_depth: case tt_garmin_wpt_category:
case tt_garmin_wpt_display_mode: case tt_garmin_wpt_addr:
case tt_garmin_wpt_category: case tt_garmin_wpt_city:
case tt_garmin_wpt_addr: case tt_garmin_wpt_state:
case tt_garmin_wpt_city: case tt_garmin_wpt_country:
case tt_garmin_wpt_state: case tt_garmin_wpt_postal_code:
case tt_garmin_wpt_country: case tt_garmin_wpt_phone_nr:
case tt_garmin_wpt_postal_code: garmin_fs_xml_convert(tt_garmin_wpt_extensions, tag, cdatastrp, wpt_tmp
case tt_garmin_wpt_phone_nr: );
garmin_fs_xml_convert(tt_garmin_wpt_extensions, tag, cdatast break;
rp, wpt_tmp);
break; /*
* Route-specific tags.
/* */
* Route-specific tags. case tt_rte_name:
*/ rte_head->rte_name = xstrdup(cdatastrp);
case tt_rte_name: break;
rte_head->rte_name = xstrdup(cdatastrp); case tt_rte:
break; break;
case tt_rte: case tt_rte_rtept:
break; route_add_wpt(rte_head, wpt_tmp);
case tt_rte_rtept: wpt_tmp = NULL;
route_add_wpt(rte_head, wpt_tmp); break;
wpt_tmp = NULL; case tt_rte_desc:
break; rte_head->rte_desc = xstrdup(cdatastrp);
case tt_rte_desc: break;
rte_head->rte_desc = xstrdup(cdatastrp); case tt_rte_number:
break; rte_head->rte_num = atoi(cdatastrp);
case tt_rte_number: break;
rte_head->rte_num = atoi(cdatastrp); /*
break; * Track-specific tags.
/* */
* Track-specific tags. case tt_trk_name:
*/ trk_head->rte_name = xstrdup(cdatastrp);
case tt_trk_name: break;
trk_head->rte_name = xstrdup(cdatastrp); case tt_trk:
break; break;
case tt_trk: case tt_trk_trkseg_trkpt:
break; track_add_wpt(trk_head, wpt_tmp);
case tt_trk_trkseg_trkpt: wpt_tmp = NULL;
track_add_wpt(trk_head, wpt_tmp); break;
wpt_tmp = NULL; case tt_trk_desc:
break; trk_head->rte_desc = xstrdup(cdatastrp);
case tt_trk_desc: break;
trk_head->rte_desc = xstrdup(cdatastrp); case tt_trk_number:
break; trk_head->rte_num = atoi(cdatastrp);
case tt_trk_number: break;
trk_head->rte_num = atoi(cdatastrp); case tt_trk_trkseg_trkpt_course:
break; WAYPT_SET(wpt_tmp, course, atof(cdatastrp));
case tt_trk_trkseg_trkpt_course: break;
WAYPT_SET(wpt_tmp, course, atof(cdatastrp)); case tt_trk_trkseg_trkpt_speed:
break; WAYPT_SET(wpt_tmp, speed, atof(cdatastrp));
case tt_trk_trkseg_trkpt_speed: break;
WAYPT_SET(wpt_tmp, speed, atof(cdatastrp));
break; /*
* Items that are actually in multiple categories.
/* */
* Items that are actually in multiple categories. case tt_wpt_ele:
*/ case tt_rte_rtept_ele:
case tt_wpt_ele: case tt_trk_trkseg_trkpt_ele:
case tt_rte_rtept_ele: sscanf(cdatastrp, "%lf", &wpt_tmp->altitude);
case tt_trk_trkseg_trkpt_ele: break;
sscanf(cdatastrp, "%lf", &wpt_tmp->altitude); case tt_wpt_name:
break; case tt_rte_rtept_name:
case tt_wpt_name: case tt_trk_trkseg_trkpt_name:
case tt_rte_rtept_name: wpt_tmp->shortname = xstrdup(cdatastrp);
case tt_trk_trkseg_trkpt_name: break;
wpt_tmp->shortname = xstrdup(cdatastrp); case tt_wpt_sym:
break; case tt_rte_rtept_sym:
case tt_wpt_sym: case tt_trk_trkseg_trkpt_sym:
case tt_rte_rtept_sym: wpt_tmp->icon_descr = xstrdup(cdatastrp);
case tt_trk_trkseg_trkpt_sym: wpt_tmp->wpt_flags.icon_descr_is_dynamic = 1;
wpt_tmp->icon_descr = xstrdup(cdatastrp); break;
wpt_tmp->wpt_flags.icon_descr_is_dynamic = 1; case tt_wpt_time:
break; case tt_trk_trkseg_trkpt_time:
case tt_wpt_time: case tt_rte_rtept_time:
case tt_trk_trkseg_trkpt_time: wpt_tmp->creation_time = xml_parse_time(cdatastrp, &wpt_tmp->microsecon
case tt_rte_rtept_time: ds);
wpt_tmp->creation_time = xml_parse_time( cdatastrp, &wpt_tmp break;
->microseconds ); case tt_wpt_cmt:
break; case tt_rte_rtept_cmt:
case tt_wpt_cmt: case tt_trk_trkseg_trkpt_cmt:
case tt_rte_rtept_cmt: wpt_tmp->description = xstrdup(cdatastrp);
case tt_trk_trkseg_trkpt_cmt: break;
wpt_tmp->description = xstrdup(cdatastrp); case tt_wpt_desc:
break; case tt_trk_trkseg_trkpt_desc:
case tt_wpt_desc: case tt_rte_rtept_desc:
case tt_trk_trkseg_trkpt_desc: if (wpt_tmp->notes != NULL) {
case tt_rte_rtept_desc: xfree(wpt_tmp->notes);
if (wpt_tmp->notes != NULL) xfree(wpt_tmp->notes); }
wpt_tmp->notes = xstrdup(cdatastrp); wpt_tmp->notes = xstrdup(cdatastrp);
break; break;
case tt_pdop: case tt_pdop:
wpt_tmp->pdop = atof(cdatastrp); wpt_tmp->pdop = atof(cdatastrp);
break; break;
case tt_hdop: case tt_hdop:
wpt_tmp->hdop = atof(cdatastrp); wpt_tmp->hdop = atof(cdatastrp);
break; break;
case tt_vdop: case tt_vdop:
wpt_tmp->vdop = atof(cdatastrp); wpt_tmp->vdop = atof(cdatastrp);
break; break;
case tt_sat: case tt_sat:
wpt_tmp->sat = atof(cdatastrp); wpt_tmp->sat = atof(cdatastrp);
break; break;
case tt_fix: case tt_fix:
wpt_tmp->fix = atoi(cdatastrp)-1; wpt_tmp->fix = atoi(cdatastrp)-1;
if ( wpt_tmp->fix < fix_2d) { if (wpt_tmp->fix < fix_2d) {
if (!case_ignore_strcmp(cdatastrp, "none")) if (!case_ignore_strcmp(cdatastrp, "none")) {
wpt_tmp->fix = fix_none; wpt_tmp->fix = fix_none;
else if (!case_ignore_strcmp(cdatastrp, "dgps")) } else if (!case_ignore_strcmp(cdatastrp, "dgps")) {
wpt_tmp->fix = fix_dgps; wpt_tmp->fix = fix_dgps;
else if (!case_ignore_strcmp(cdatastrp, "pps")) } else if (!case_ignore_strcmp(cdatastrp, "pps")) {
wpt_tmp->fix = fix_pps; wpt_tmp->fix = fix_pps;
else } else {
wpt_tmp->fix = fix_unknown; wpt_tmp->fix = fix_unknown;
} }
break; }
case tt_wpt_url: break;
case tt_trk_trkseg_trkpt_url: case tt_wpt_url:
case tt_rte_rtept_url: case tt_trk_trkseg_trkpt_url:
wpt_tmp->url = xstrdup(cdatastrp); case tt_rte_rtept_url:
break; wpt_tmp->url = xstrdup(cdatastrp);
case tt_wpt_urlname: break;
case tt_trk_trkseg_trkpt_urlname: case tt_wpt_urlname:
case tt_rte_rtept_urlname: case tt_trk_trkseg_trkpt_urlname:
wpt_tmp->url_link_text = xstrdup(cdatastrp); case tt_rte_rtept_urlname:
break; wpt_tmp->url_link_text = xstrdup(cdatastrp);
case tt_wpt_link: break;
case tt_wpt_link:
//TODO: implement GPX 1.1 case tt_trk_trkseg_trkpt_link: //TODO: implement GPX 1.1 case tt_trk_trkseg_trkpt_link:
//TODO: implement GPX 1.1 case tt_rte_rtept_link: //TODO: implement GPX 1.1 case tt_rte_rtept_link:
{ {
char *lt = link_text; char* lt = link_text;
if (lt) { if (lt) {
lt = xstrdup(lrtrim(link_text)); lt = xstrdup(lrtrim(link_text));
} }
waypt_add_url(wpt_tmp, xstrdup(link_url), lt); waypt_add_url(wpt_tmp, xstrdup(link_url), lt);
link_text = NULL; link_text = NULL;
} }
break; break;
case tt_unknown: case tt_unknown:
end_something_else(); end_something_else();
*s = 0; *s = 0;
return; return;
default: default:
break; break;
} }
if (passthrough) { if (passthrough) {
end_something_else(); end_something_else();
} }
*s = 0; *s = 0;
xml_free_converted_string(el); xml_free_converted_string(el);
} }
#if ! HAVE_LIBEXPAT #if ! HAVE_LIBEXPAT
static void static void
gpx_rd_init(const char *fname) gpx_rd_init(const char* fname)
{ {
fatal(MYNAME ": This build excluded GPX support because expat was no t installed.\n"); fatal(MYNAME ": This build excluded GPX support because expat was not ins talled.\n");
} }
static void static void
gpx_rd_deinit(void) gpx_rd_deinit(void)
{ {
} }
#else /* NO_EXPAT */ #else /* NO_EXPAT */
static void static void
gpx_cdata(void *dta, const XML_Char *xml_el, int len) gpx_cdata(void* dta, const XML_Char* xml_el, int len)
{ {
char *estr; char* estr;
int *cdatalen; int* cdatalen;
char **cdata; char** cdata;
xml_tag *tmp_tag; xml_tag* tmp_tag;
size_t slen = strlen(cdatastr.mem); size_t slen = strlen(cdatastr.mem);
const char *s = xml_convert_to_char_string_n(xml_el, &len); const char* s = xml_convert_to_char_string_n(xml_el, &len);
vmem_realloc(&cdatastr, 1 + len + slen); vmem_realloc(&cdatastr, 1 + len + slen);
estr = ((char *) cdatastr.mem) + slen; estr = ((char*) cdatastr.mem) + slen;
memcpy(estr, s, len); memcpy(estr, s, len);
estr[len] = 0; estr[len] = 0;
if (!cur_tag) if (!cur_tag) {
return; return;
}
if ( cur_tag->child ) {
tmp_tag = cur_tag->child; if (cur_tag->child) {
while ( tmp_tag->sibling ) { tmp_tag = cur_tag->child;
tmp_tag = tmp_tag->sibling; while (tmp_tag->sibling) {
} tmp_tag = tmp_tag->sibling;
cdata = &(tmp_tag->parentcdata); }
cdatalen = &(tmp_tag->parentcdatalen); cdata = &(tmp_tag->parentcdata);
} cdatalen = &(tmp_tag->parentcdatalen);
else { } else {
cdata = &(cur_tag->cdata); cdata = &(cur_tag->cdata);
cdatalen = &(cur_tag->cdatalen); cdatalen = &(cur_tag->cdatalen);
} }
estr = *cdata; estr = *cdata;
*cdata = xcalloc( *cdatalen + len + 1, 1); *cdata = xcalloc(*cdatalen + len + 1, 1);
if ( estr ) { if (estr) {
memcpy( *cdata, estr, *cdatalen); memcpy(*cdata, estr, *cdatalen);
xfree( estr ); xfree(estr);
} }
estr = *cdata + *cdatalen; estr = *cdata + *cdatalen;
memcpy( estr, s, len ); memcpy(estr, s, len);
*(estr+len) = '\0'; *(estr+len) = '\0';
*cdatalen += len; *cdatalen += len;
xml_free_converted_string(s); xml_free_converted_string(s);
} }
static void static void
gpx_rd_init(const char *fname) gpx_rd_init(const char* fname)
{ {
if ( fname[0] ) { if (fname[0]) {
fd = gbfopen(fname, "r", MYNAME); fd = gbfopen(fname, "r", MYNAME);
input_fname = fname; input_fname = fname;
} } else {
else { fd = NULL;
fd = NULL; input_string = fname+1;
input_string = fname+1; input_string_len = strlen(input_string);
input_string_len = strlen(input_string); input_fname = NULL;
input_fname = NULL; }
}
file_time = 0;
file_time = 0; current_tag = vmem_alloc(1, 0);
current_tag = vmem_alloc(1, 0); *((char*)current_tag.mem) = '\0';
*((char *)current_tag.mem) = '\0';
prescan_tags();
prescan_tags();
psr = XML_ParserCreate(NULL);
psr = XML_ParserCreate(NULL); if (!psr) {
if (!psr) { fatal(MYNAME ": Cannot create XML Parser\n");
fatal(MYNAME ": Cannot create XML Parser\n"); }
} XML_SetUnknownEncodingHandler(psr, cet_lib_expat_UnknownEncodingHandler,
XML_SetUnknownEncodingHandler(psr, cet_lib_expat_UnknownEncodingHand NULL);
ler, NULL);
cdatastr = vmem_alloc(1, 0);
cdatastr = vmem_alloc(1, 0); *((char*)cdatastr.mem) = '\0';
*((char *)cdatastr.mem) = '\0';
if (!xsi_schema_loc) {
if (!xsi_schema_loc) { xsi_schema_loc = xstrdup(DEFAULT_XSI_SCHEMA_LOC);
xsi_schema_loc = xstrdup(DEFAULT_XSI_SCHEMA_LOC); }
} if (!xsi_schema_loc) {
if (!xsi_schema_loc) { fatal("gpx: Unable to allocate %ld bytes of memory.\n",
fatal("gpx: Unable to allocate %ld bytes of memory.\n", (unsigned long) strlen(DEFAULT_XSI_SCHEMA_LOC) + 1);
(unsigned long) strlen(DEFAULT_XSI_SCHEMA_LOC) + 1); }
}
if (NULL == gpx_global) {
if (NULL == gpx_global) { gpx_global = xcalloc(sizeof(*gpx_global), 1);
gpx_global = xcalloc(sizeof(*gpx_global), 1); QUEUE_INIT(&gpx_global->name.queue);
QUEUE_INIT(&gpx_global->name.queue); QUEUE_INIT(&gpx_global->desc.queue);
QUEUE_INIT(&gpx_global->desc.queue); QUEUE_INIT(&gpx_global->author.queue);
QUEUE_INIT(&gpx_global->author.queue); QUEUE_INIT(&gpx_global->email.queue);
QUEUE_INIT(&gpx_global->email.queue); QUEUE_INIT(&gpx_global->url.queue);
QUEUE_INIT(&gpx_global->url.queue); QUEUE_INIT(&gpx_global->urlname.queue);
QUEUE_INIT(&gpx_global->urlname.queue); QUEUE_INIT(&gpx_global->keywords.queue);
QUEUE_INIT(&gpx_global->keywords.queue); }
}
XML_SetElementHandler(psr, gpx_start, gpx_end);
XML_SetElementHandler(psr, gpx_start, gpx_end); XML_SetCharacterDataHandler(psr, gpx_cdata);
XML_SetCharacterDataHandler(psr, gpx_cdata); fs_ptr = NULL;
fs_ptr = NULL;
} }
static static
void void
gpx_rd_deinit(void) gpx_rd_deinit(void)
{ {
vmem_free(&current_tag); vmem_free(&current_tag);
vmem_free(&cdatastr); vmem_free(&cdatastr);
/* /*
* Don't free schema_loc. It really is important that we preserve * Don't free schema_loc. It really is important that we preserve
* this across reads or else merges/copies of files with different * this across reads or else merges/copies of files with different
* schemas won't retain the headers. * schemas won't retain the headers.
* *
* moved to gpx_exit * moved to gpx_exit
if ( xsi_schema_loc ) { if ( xsi_schema_loc ) {
xfree(xsi_schema_loc); xfree(xsi_schema_loc);
xsi_schema_loc = NULL; xsi_schema_loc = NULL;
} }
*/ */
if ( gpx_email ) { if (gpx_email) {
xfree(gpx_email); xfree(gpx_email);
gpx_email = NULL; gpx_email = NULL;
} }
if ( gpx_author ) { if (gpx_author) {
xfree(gpx_author); xfree(gpx_author);
gpx_author = NULL; gpx_author = NULL;
} }
if (fd) { if (fd) {
gbfclose(fd); gbfclose(fd);
} }
XML_ParserFree(psr); XML_ParserFree(psr);
psr = NULL; psr = NULL;
wpt_tmp = NULL; wpt_tmp = NULL;
cur_tag = NULL; cur_tag = NULL;
input_fname = NULL; input_fname = NULL;
} }
#endif #endif
static void static void
gpx_wr_init(const char *fname) gpx_wr_init(const char* fname)
{ {
mkshort_handle = mkshort_new_handle(); mkshort_handle = mkshort_new_handle();
ofd = gbfopen(fname, "w", MYNAME); ofd = gbfopen(fname, "w", MYNAME);
} }
static void static void
gpx_wr_deinit(void) gpx_wr_deinit(void)
{ {
gbfclose(ofd); gbfclose(ofd);
mkshort_del_handle(&mkshort_handle); mkshort_del_handle(&mkshort_handle);
} }
void void
gpx_read(void) gpx_read(void)
{ {
#if HAVE_LIBEXPAT #if HAVE_LIBEXPAT
int len; int len;
int done = 0; int done = 0;
char *buf = xmalloc(MY_CBUF_SZ); char* buf = xmalloc(MY_CBUF_SZ);
int result = 0; int result = 0;
int extra; int extra;
while (!done) { while (!done) {
if ( fd ) { if (fd) {
/* /*
* The majority of this block (in fact, all but the * The majority of this block (in fact, all but the
* call to XML_Parse) are a disgusting hack to * call to XML_Parse) are a disgusting hack to
* correct defective GPX files that Geocaching.com * correct defective GPX files that Geocaching.com
* issues as pocket queries. They contain escape * issues as pocket queries. They contain escape
* characters as entities (&#x00-&#x1f) which makes * characters as entities (&#x00-&#x1f) which makes
* them not validate which croaks expat and torments * them not validate which croaks expat and torments
* users. * users.
* *
* Look for '&' in the last maxentlength chars. If * Look for '&' in the last maxentlength chars. If
* we find it, strip it, then read byte-at-a-time * we find it, strip it, then read byte-at-a-time
* until we find a non-entity. * until we find a non-entity.
*/ */
char *badchar; char* badchar;
char *semi; char* semi;
int maxentlength = 8; int maxentlength = 8;
len = gbfread(buf, 1, MY_CBUF_SZ - maxentlength, fd) len = gbfread(buf, 1, MY_CBUF_SZ - maxentlength, fd);
; done = gbfeof(fd) || !len;
done = gbfeof(fd) || !len; buf[len] = '\0';
buf[len] = '\0'; if (len < maxentlength) {
if (len < maxentlength) { maxentlength = len;
maxentlength = len; }
} badchar = buf+len-maxentlength;
badchar = buf+len-maxentlength; badchar = strchr(badchar, '&');
badchar = strchr( badchar, '&' ); extra = maxentlength - 1; /* for terminator */
extra = maxentlength - 1; /* for terminator */ while (badchar && len < MY_CBUF_SZ-1) {
while ( badchar && len < MY_CBUF_SZ-1) { semi = strchr(badchar, ';');
semi = strchr( badchar, ';'); while (extra && !semi) {
while ( extra && !semi ) { len += gbfread(buf+len, 1, 1, fd);
len += gbfread( buf+len, 1, 1, fd); buf[len]='\0';
buf[len]='\0'; extra--;
extra--; if (buf[len-1] == ';') {
if ( buf[len-1] == ';') semi= buf+len-1;
semi= buf+len-1; }
} }
badchar = strchr( badchar+1, '&' ); badchar = strchr(badchar+1, '&');
} }
{ {
char *hex="0123456789abcdef"; char* hex="0123456789abcdef";
badchar = strstr( buf, "&#x" ); badchar = strstr(buf, "&#x");
while ( badchar ) { while (badchar) {
int val = 0; int val = 0;
char *hexit = badchar+3; char* hexit = badchar+3;
semi = strchr( badchar, ';' ); semi = strchr(badchar, ';');
if ( semi ) { if (semi) {
while (*hexit && *hexit != ' while (*hexit && *hexit != ';') {
;') { char hc = isalpha(*hexit) ? tolower(*hexit) : *hexit;
char hc = isalpha(*h val *= 16;
exit) ? tolower (*hexit) : *hexit; val += strchr(hex, hc)-hex;
val *= 16; hexit++;
val += strchr( hex, }
hc)-hex;
hexit++; if (val < 32) {
} warning(MYNAME ": Ignoring illegal character %s;\n\tConsider
emailing %s at <%s>\n\tabout illegal characters in their GPX files.\n", bad
if ( val < 32 ) { char, gpx_author?gpx_author:"(unknown author)", gpx_email?gpx_email:"(unkno
warning( MYNAME ": I wn email address)");
gnoring illegal character %s;\n\tConsider emailing %s at <%s>\n\tabout ille memmove(badchar, semi+1, strlen(semi+1)+1);
gal characters in their GPX files.\n", badchar, gpx_author?gpx_author:"(unk len -= (semi-badchar)+1;
nown author)", gpx_email?gpx_email:"(unknown email address)" ); badchar--;
memmove( badchar, se }
mi+1, strlen(semi+1)+1 ); }
len -= (semi-badchar badchar = strstr(badchar+1, "&#x");
)+1; }
badchar--; }
} result = XML_Parse(psr, buf, len, done);
} } else if (input_string) {
badchar = strstr( badchar+1, "&#x" ) done = 0;
; result = XML_Parse(psr, input_string,
} input_string_len, done);
} done = 1;
result = XML_Parse(psr, buf, len, done); } else {
} done = 1;
else if (input_string) { result = -1;
done = 0; }
result = XML_Parse(psr, input_string, if (!result) {
input_string_len, done ); fatal(MYNAME ": XML parse error at line %d of '%s' : %s\n",
done = 1; (int) XML_GetCurrentLineNumber(psr),
} input_fname ? input_fname : "unknown file",
else { XML_ErrorString(XML_GetErrorCode(psr)));
done = 1; }
result = -1; }
} xfree(buf);
if (!result) {
fatal(MYNAME ": XML parse error at line %d of '%s' :
%s\n",
(int) XML_GetCurrentLineNumber(psr),
input_fname ? input_fname : "unknown file",
XML_ErrorString(XML_GetErrorCode(psr)));
}
}
xfree(buf);
#endif /* HAVE_LIBEXPAT */ #endif /* HAVE_LIBEXPAT */
} }
static void static void
fprint_tag_and_attrs( char *prefix, char *suffix, xml_tag *tag ) fprint_tag_and_attrs(char* prefix, char* suffix, xml_tag* tag)
{ {
char **pa; char** pa;
gbfprintf( ofd, "%s%s", prefix, tag->tagname ); gbfprintf(ofd, "%s%s", prefix, tag->tagname);
pa = tag->attributes; pa = tag->attributes;
if ( pa ) { if (pa) {
while ( *pa ) { while (*pa) {
gbfprintf( ofd, " %s=\"%s\"", pa[0], pa[1] ); gbfprintf(ofd, " %s=\"%s\"", pa[0], pa[1]);
pa += 2; pa += 2;
} }
} }
gbfprintf( ofd, "%s", suffix ); gbfprintf(ofd, "%s", suffix);
} }
static void static void
fprint_xml_chain( xml_tag *tag, const waypoint *wpt ) fprint_xml_chain(xml_tag* tag, const waypoint* wpt)
{ {
char *tmp_ent; char* tmp_ent;
while ( tag ) { while (tag) {
if ( !tag->cdata && !tag->child ) { if (!tag->cdata && !tag->child) {
fprint_tag_and_attrs( "<", " />", tag ); fprint_tag_and_attrs("<", " />", tag);
} } else {
else { fprint_tag_and_attrs("<", ">", tag);
fprint_tag_and_attrs( "<", ">", tag );
if (tag->cdata) {
if ( tag->cdata ) { tmp_ent = xml_entitize(tag->cdata);
tmp_ent = xml_entitize( tag->cdata ); gbfprintf(ofd, "%s", tmp_ent);
gbfprintf( ofd, "%s", tmp_ent ); xfree(tmp_ent);
xfree(tmp_ent); }
} if (tag->child) {
if ( tag->child ) { fprint_xml_chain(tag->child, wpt);
fprint_xml_chain(tag->child, wpt); }
} if (wpt && wpt->gc_data.exported &&
if ( wpt && wpt->gc_data.exported && strcmp(tag->tagname, "groundspeak:cache") == 0) {
strcmp(tag->tagname, "groundspeak:cache" ) == 0 xml_write_time(ofd, wpt->gc_data.exported, 0,
) { "groundspeak:exported");
xml_write_time( ofd, wpt->gc_data.exported, }
0, gbfprintf(ofd, "</%s>\n", tag->tagname);
"groundspeak:exported" ); }
} if (tag->parentcdata) {
gbfprintf( ofd, "</%s>\n", tag->tagname); tmp_ent = xml_entitize(tag->parentcdata);
} gbfprintf(ofd, "%s", tmp_ent);
if ( tag->parentcdata ) { xfree(tmp_ent);
tmp_ent = xml_entitize(tag->parentcdata); }
gbfprintf(ofd, "%s", tmp_ent ); tag = tag->sibling;
xfree(tmp_ent); }
} }
tag = tag->sibling;
} void free_gpx_extras(xml_tag* tag)
} {
xml_tag* next = NULL;
void free_gpx_extras( xml_tag *tag ) char** ap;
{
xml_tag *next = NULL; while (tag) {
char **ap; if (tag->cdata) {
xfree(tag->cdata);
while ( tag ) { }
if (tag->cdata) { if (tag->child) {
xfree(tag->cdata); free_gpx_extras(tag->child);
} }
if (tag->child) { if (tag->parentcdata) {
free_gpx_extras(tag->child); xfree(tag->parentcdata);
} }
if (tag->parentcdata) { if (tag->tagname) {
xfree(tag->parentcdata); xfree(tag->tagname);
} }
if (tag->tagname) { if (tag->attributes) {
xfree(tag->tagname); ap = tag->attributes;
}
if (tag->attributes) { while (*ap) {
ap = tag->attributes; xfree(*ap++);
}
while (*ap)
xfree(*ap++); xfree(tag->attributes);
}
xfree(tag->attributes);
} next = tag->sibling;
xfree(tag);
next = tag->sibling; tag = next;
xfree(tag); }
tag = next;
}
} }
/* /*
* Handle the grossness of GPX 1.0 vs. 1.1 handling of linky links. * Handle the grossness of GPX 1.0 vs. 1.1 handling of linky links.
*/ */
static void static void
write_gpx_url(const waypoint *waypointp) write_gpx_url(const waypoint* waypointp)
{ {
char *tmp_ent; char* tmp_ent;
if (waypointp->url == NULL) { if (waypointp->url == NULL) {
return; return;
} }
if (gpx_wversion_num > 10) { if (gpx_wversion_num > 10) {
url_link *tail; url_link* tail;
for (tail = (url_link *)&waypointp->url_next; tail; tail = t for (tail = (url_link*)&waypointp->url_next; tail; tail = tail->url_nex
ail->url_next) { t) {
tmp_ent = xml_entitize(tail->url); tmp_ent = xml_entitize(tail->url);
gbfprintf(ofd, " <link href=\"%s%s\">\n", gbfprintf(ofd, " <link href=\"%s%s\">\n",
urlbase ? urlbase : "", tmp_ent); urlbase ? urlbase : "", tmp_ent);
write_optional_xml_entity(ofd, " ", "text", write_optional_xml_entity(ofd, " ", "text",
tail->url_link_text); tail->url_link_text);
gbfprintf(ofd, " </link>\n"); gbfprintf(ofd, " </link>\n");
xfree(tmp_ent); xfree(tmp_ent);
} }
} else { } else {
tmp_ent = xml_entitize(waypointp->url); tmp_ent = xml_entitize(waypointp->url);
gbfprintf(ofd, " <url>%s%s</url>\n", gbfprintf(ofd, " <url>%s%s</url>\n",
urlbase ? urlbase : "", tmp_ent); urlbase ? urlbase : "", tmp_ent);
write_optional_xml_entity(ofd, " ", "urlname", write_optional_xml_entity(ofd, " ", "urlname",
waypointp->url_link_text); waypointp->url_link_text);
xfree(tmp_ent); xfree(tmp_ent);
} }
} }
/* /*
* Write optional accuracy information for a given (way|track|route)point * Write optional accuracy information for a given (way|track|route)point
* to the output stream. Done in one place since it's common for all three . * to the output stream. Done in one place since it's common for all three .
* Order counts. * Order counts.
*/ */
static void static void
gpx_write_common_acc(const waypoint *waypointp, const char *indent) gpx_write_common_acc(const waypoint* waypointp, const char* indent)
{ {
char *fix = NULL; char* fix = NULL;
switch (waypointp->fix) { switch (waypointp->fix) {
case fix_2d: case fix_2d:
fix = "2d"; fix = "2d";
break; break;
case fix_3d: case fix_3d:
fix = "3d"; fix = "3d";
break; break;
case fix_dgps: case fix_dgps:
fix = "dgps"; fix = "dgps";
break; break;
case fix_pps: case fix_pps:
fix = "pps"; fix = "pps";
break; break;
case fix_none: case fix_none:
fix = "none"; fix = "none";
break; break;
/* GPX spec says omit if we don't know. */ /* GPX spec says omit if we don't know. */
case fix_unknown: case fix_unknown:
default: default:
break; break;
} }
if (fix) { if (fix) {
gbfprintf(ofd, "%s<fix>%s</fix>\n", indent, fix); gbfprintf(ofd, "%s<fix>%s</fix>\n", indent, fix);
} }
if (waypointp->sat > 0) { if (waypointp->sat > 0) {
gbfprintf(ofd, "%s<sat>%d</sat>\n", indent, waypointp->sat); gbfprintf(ofd, "%s<sat>%d</sat>\n", indent, waypointp->sat);
} }
if (waypointp->hdop) { if (waypointp->hdop) {
gbfprintf(ofd, "%s<hdop>%f</hdop>\n", indent, waypointp->hdo gbfprintf(ofd, "%s<hdop>%f</hdop>\n", indent, waypointp->hdop);
p); }
} if (waypointp->vdop) {
if (waypointp->vdop) { gbfprintf(ofd, "%s<vdop>%f</vdop>\n", indent, waypointp->vdop);
gbfprintf(ofd, "%s<vdop>%f</vdop>\n", indent, waypointp->vdo }
p); if (waypointp->pdop) {
} gbfprintf(ofd, "%s<pdop>%f</pdop>\n", indent, waypointp->pdop);
if (waypointp->pdop) { }
gbfprintf(ofd, "%s<pdop>%f</pdop>\n", indent, waypointp->pdo }
p);
} static void
} gpx_write_common_position(const waypoint* waypointp, const char* indent)
{
static void if (waypointp->altitude != unknown_alt) {
gpx_write_common_position(const waypoint *waypointp, const char *indent) gbfprintf(ofd, "%s<ele>%f</ele>\n",
{ indent, waypointp->altitude);
if (waypointp->altitude != unknown_alt) { }
gbfprintf(ofd, "%s<ele>%f</ele>\n", if (waypointp->creation_time) {
indent, waypointp->altitude); xml_write_time(ofd, waypointp->creation_time, waypointp->microseconds,
} "time");
if (waypointp->creation_time) { }
xml_write_time(ofd, waypointp->creation_time, waypointp->mic }
roseconds, "time");
} static void
} gpx_write_common_description(const waypoint* waypointp, const char* indent,
const char* oname)
static void {
gpx_write_common_description(const waypoint *waypointp, const char *indent, write_optional_xml_entity(ofd, indent, "name", oname);
const char *oname) write_optional_xml_entity(ofd, indent, "cmt", waypointp->description);
{ if (waypointp->notes && waypointp->notes[0]) {
write_optional_xml_entity(ofd, indent, "name", oname); write_xml_entity(ofd, indent, "desc", waypointp->notes);
write_optional_xml_entity(ofd, indent, "cmt", waypointp->description } else {
); write_optional_xml_entity(ofd, indent, "desc", waypointp->description);
if (waypointp->notes && waypointp->notes[0]) }
write_xml_entity(ofd, indent, "desc", waypointp->notes); write_gpx_url(waypointp);
else write_optional_xml_entity(ofd, indent , "sym", waypointp->icon_descr);
write_optional_xml_entity(ofd, indent, "desc", waypointp->de }
scription);
write_gpx_url(waypointp); static void
write_optional_xml_entity(ofd, indent , "sym", waypointp->icon_descr gpx_waypt_pr(const waypoint* waypointp)
); {
} const char* oname;
char* odesc;
static void fs_xml* fs_gpx;
gpx_waypt_pr(const waypoint *waypointp) garmin_fs_t* gmsd; /* gARmIN sPECIAL dATA */
{
const char *oname; /*
char *odesc; * Desparation time, try very hard to get a good shortname
fs_xml *fs_gpx; */
garmin_fs_t *gmsd; /* gARmIN sPECIAL dATA */ odesc = waypointp->notes;
if (!odesc) {
/* odesc = waypointp->description;
* Desparation time, try very hard to get a good shortname }
*/ if (!odesc) {
odesc = waypointp->notes; odesc = waypointp->shortname;
if (!odesc) { }
odesc = waypointp->description;
} oname = global_opts.synthesize_shortnames ?
if (!odesc) { mkshort(mkshort_handle, odesc) :
odesc = waypointp->shortname; waypointp->shortname;
}
gbfprintf(ofd, "<wpt lat=\"" FLT_FMT "\" lon=\"" FLT_FMT "\">\n",
oname = global_opts.synthesize_shortnames ? waypointp->latitude,
mkshort(mkshort_handle, odesc) : waypointp->longitude);
waypointp->shortname;
gpx_write_common_position(waypointp, " ");
gbfprintf(ofd, "<wpt lat=\"" FLT_FMT "\" lon=\"" FLT_FMT "\">\n", gpx_write_common_description(waypointp, " ", oname);
waypointp->latitude, gpx_write_common_acc(waypointp, " ");
waypointp->longitude);
fs_gpx = (fs_xml*)fs_chain_find(waypointp->fs, FS_GPX);
gpx_write_common_position(waypointp, " "); gmsd = GMSD_FIND(waypointp);
gpx_write_common_description(waypointp, " ", oname); if (fs_gpx) {
gpx_write_common_acc(waypointp, " "); if (! gmsd) {
fprint_xml_chain(fs_gpx->tag, waypointp);
fs_gpx = (fs_xml *)fs_chain_find( waypointp->fs, FS_GPX ); }
gmsd = GMSD_FIND(waypointp); }
if ( fs_gpx ) { if (gmsd && (gpx_wversion_num > 10)) {
if (! gmsd) fprint_xml_chain( fs_gpx->tag, waypointp ); /* MapSource doesn't accepts extensions from 1.0 */
} garmin_fs_xml_fprint(ofd, waypointp);
if (gmsd && (gpx_wversion_num > 10)) { }
/* MapSource doesn't accepts extensions from 1.0 */ gbfprintf(ofd, "</wpt>\n");
garmin_fs_xml_fprint(ofd, waypointp); }
}
gbfprintf(ofd, "</wpt>\n"); static void
} gpx_track_hdr(const route_head* rte)
{
static void fs_xml* fs_gpx;
gpx_track_hdr(const route_head *rte)
{ gbfprintf(ofd, "<trk>\n");
fs_xml *fs_gpx; write_optional_xml_entity(ofd, " ", "name", rte->rte_name);
write_optional_xml_entity(ofd, " ", "desc", rte->rte_desc);
gbfprintf(ofd, "<trk>\n"); if (rte->rte_num) {
write_optional_xml_entity(ofd, " ", "name", rte->rte_name); gbfprintf(ofd, "<number>%d</number>\n", rte->rte_num);
write_optional_xml_entity(ofd, " ", "desc", rte->rte_desc); }
if (rte->rte_num) { gbfprintf(ofd, "<trkseg>\n");
gbfprintf(ofd, "<number>%d</number>\n", rte->rte_num);
} fs_gpx = (fs_xml*)fs_chain_find(rte->fs, FS_GPX);
gbfprintf(ofd, "<trkseg>\n"); if (fs_gpx) {
fprint_xml_chain(fs_gpx->tag, NULL);
fs_gpx = (fs_xml *)fs_chain_find( rte->fs, FS_GPX ); }
if ( fs_gpx ) { }
fprint_xml_chain( fs_gpx->tag, NULL );
} static void
} gpx_track_disp(const waypoint* waypointp)
{
static void fs_xml* fs_gpx;
gpx_track_disp(const waypoint *waypointp)
{ gbfprintf(ofd, "<trkpt lat=\"" FLT_FMT_T "\" lon=\"" FLT_FMT_T "\">\n",
fs_xml *fs_gpx; waypointp->latitude,
waypointp->longitude);
gbfprintf(ofd, "<trkpt lat=\"" FLT_FMT_T "\" lon=\"" FLT_FMT_T "\">\
n", gpx_write_common_position(waypointp, " ");
waypointp->latitude,
waypointp->longitude); /* These were accidentally removed from 1.1 */
if (gpx_wversion_num == 10) {
gpx_write_common_position(waypointp, " "); if WAYPT_HAS(waypointp, course) {
gbfprintf(ofd, " <course>%f</course>\n",
/* These were accidentally removed from 1.1 */ waypointp->course);
if (gpx_wversion_num == 10) { }
if WAYPT_HAS(waypointp, course) { if WAYPT_HAS(waypointp, speed) {
gbfprintf(ofd, " <course>%f</course>\n", gbfprintf(ofd, " <speed>%f</speed>\n",
waypointp->course); waypointp->speed);
} }
if WAYPT_HAS(waypointp, speed) { }
gbfprintf(ofd, " <speed>%f</speed>\n",
waypointp->speed); /* GPX doesn't require a name on output, so if we made one up
} * on input, we might as well say nothing.
} */
gpx_write_common_description(waypointp, " ",
/* GPX doesn't require a name on output, so if we made one up waypointp->wpt_flags.shortname_is_synthetic
* on input, we might as well say nothing. ?
*/ NULL : waypointp->shortname);
gpx_write_common_description(waypointp, " ", gpx_write_common_acc(waypointp, " ");
waypointp->wpt_flags.shortname_is_synthetic ?
NULL : waypointp->shortname); fs_gpx = (fs_xml*)fs_chain_find(waypointp->fs, FS_GPX);
gpx_write_common_acc(waypointp, " "); if (fs_gpx) {
fprint_xml_chain(fs_gpx->tag, waypointp);
fs_gpx = (fs_xml *)fs_chain_find( waypointp->fs, FS_GPX ); }
if ( fs_gpx ) {
fprint_xml_chain( fs_gpx->tag, waypointp );
}
gbfprintf(ofd, "</trkpt>\n"); gbfprintf(ofd, "</trkpt>\n");
} }
static void static void
gpx_track_tlr(const route_head *rte) gpx_track_tlr(const route_head* rte)
{ {
gbfprintf(ofd, "</trkseg>\n"); gbfprintf(ofd, "</trkseg>\n");
gbfprintf(ofd, "</trk>\n"); gbfprintf(ofd, "</trk>\n");
} }
static static
void gpx_track_pr() void gpx_track_pr()
{ {
track_disp_all(gpx_track_hdr, gpx_track_tlr, gpx_track_disp); track_disp_all(gpx_track_hdr, gpx_track_tlr, gpx_track_disp);
} }
static void static void
gpx_route_hdr(const route_head *rte) gpx_route_hdr(const route_head* rte)
{ {
fs_xml *fs_gpx; fs_xml* fs_gpx;
gbfprintf(ofd, "<rte>\n"); gbfprintf(ofd, "<rte>\n");
write_optional_xml_entity(ofd, " ", "name", rte->rte_name); write_optional_xml_entity(ofd, " ", "name", rte->rte_name);
write_optional_xml_entity(ofd, " ", "desc", rte->rte_desc); write_optional_xml_entity(ofd, " ", "desc", rte->rte_desc);
if (rte->rte_num) { if (rte->rte_num) {
gbfprintf(ofd, " <number>%d</number>\n", rte->rte_num); gbfprintf(ofd, " <number>%d</number>\n", rte->rte_num);
} }
fs_gpx = (fs_xml *)fs_chain_find( rte->fs, FS_GPX ); fs_gpx = (fs_xml*)fs_chain_find(rte->fs, FS_GPX);
if ( fs_gpx ) { if (fs_gpx) {
fprint_xml_chain( fs_gpx->tag, NULL ); fprint_xml_chain(fs_gpx->tag, NULL);
} }
} }
static void static void
gpx_route_disp(const waypoint *waypointp) gpx_route_disp(const waypoint* waypointp)
{ {
fs_xml *fs_gpx; fs_xml* fs_gpx;
gbfprintf(ofd, " <rtept lat=\"" FLT_FMT_R "\" lon=\"" FLT_FMT_R "\" gbfprintf(ofd, " <rtept lat=\"" FLT_FMT_R "\" lon=\"" FLT_FMT_R "\">\n",
>\n", waypointp->latitude,
waypointp->latitude, waypointp->longitude);
waypointp->longitude);
gpx_write_common_position(waypointp, " "); gpx_write_common_position(waypointp, " ");
gpx_write_common_description(waypointp, " ", waypointp->shortname gpx_write_common_description(waypointp, " ", waypointp->shortname);
); gpx_write_common_acc(waypointp, " ");
gpx_write_common_acc(waypointp, " ");
fs_gpx = (fs_xml *)fs_chain_find( waypointp->fs, FS_GPX ); fs_gpx = (fs_xml*)fs_chain_find(waypointp->fs, FS_GPX);
if ( fs_gpx ) { if (fs_gpx) {
fprint_xml_chain( fs_gpx->tag, waypointp ); fprint_xml_chain(fs_gpx->tag, waypointp);
} }
gbfprintf(ofd, " </rtept>\n"); gbfprintf(ofd, " </rtept>\n");
} }
static void static void
gpx_route_tlr(const route_head *rte) gpx_route_tlr(const route_head* rte)
{ {
gbfprintf(ofd, "</rte>\n"); gbfprintf(ofd, "</rte>\n");
} }
static static
void gpx_route_pr() void gpx_route_pr()
{ {
/* output routes */ /* output routes */
route_disp_all(gpx_route_hdr, gpx_route_tlr, gpx_route_disp); route_disp_all(gpx_route_hdr, gpx_route_tlr, gpx_route_disp);
} }
static void static void
gpx_waypt_bound_calc(const waypoint *waypointp) gpx_waypt_bound_calc(const waypoint* waypointp)
{ {
waypt_add_to_bounds(&all_bounds, waypointp); waypt_add_to_bounds(&all_bounds, waypointp);
} }
static void static void
gpx_write_bounds(void) gpx_write_bounds(void)
{ {
waypt_init_bounds(&all_bounds); waypt_init_bounds(&all_bounds);
waypt_disp_all(gpx_waypt_bound_calc); waypt_disp_all(gpx_waypt_bound_calc);
route_disp_all(NULL, NULL, gpx_waypt_bound_calc); route_disp_all(NULL, NULL, gpx_waypt_bound_calc);
track_disp_all(NULL, NULL, gpx_waypt_bound_calc); track_disp_all(NULL, NULL, gpx_waypt_bound_calc);
if (waypt_bounds_valid(&all_bounds)) { if (waypt_bounds_valid(&all_bounds)) {
gbfprintf(ofd, "<bounds minlat=\"%0.9f\" minlon=\"%0.9f\" " gbfprintf(ofd, "<bounds minlat=\"%0.9f\" minlon=\"%0.9f\" "
"maxlat=\"%0.9f\" maxlon=\"%0.9f\"/>\n", "maxlat=\"%0.9f\" maxlon=\"%0.9f\"/>\n",
all_bounds.min_lat, all_bounds.min_lon, all_bounds.min_lat, all_bounds.min_lon,
all_bounds.max_lat, all_bounds.max_lon); all_bounds.max_lat, all_bounds.max_lon);
} }
} }
static void static void
gpx_write(void) gpx_write(void)
{ {
time_t now = 0; time_t now = 0;
int short_length; int short_length;
gpx_wversion_num = strtod(gpx_wversion, NULL) * 10; gpx_wversion_num = strtod(gpx_wversion, NULL) * 10;
if (gpx_wversion_num <= 0) { if (gpx_wversion_num <= 0) {
fatal(MYNAME ": gpx version number of '%s' not valid.\n", gp fatal(MYNAME ": gpx version number of '%s' not valid.\n", gpx_wversion)
x_wversion); ;
} }
now = current_time(); now = current_time();
short_length = atoi(snlen); short_length = atoi(snlen);
if (suppresswhite) { if (suppresswhite) {
setshort_whitespace_ok(mkshort_handle, 0); setshort_whitespace_ok(mkshort_handle, 0);
} }
setshort_length(mkshort_handle, short_length); setshort_length(mkshort_handle, short_length);
gbfprintf(ofd, "<?xml version=\"1.0\" encoding=\"%s\"?>\n", global_o gbfprintf(ofd, "<?xml version=\"1.0\" encoding=\"%s\"?>\n", global_opts.c
pts.charset_name); harset_name);
gbfprintf(ofd, "<gpx\n version=\"%s\"\n", gpx_wversion); gbfprintf(ofd, "<gpx\n version=\"%s\"\n", gpx_wversion);
gbfprintf(ofd, "creator=\"" CREATOR_NAME_URL "\"\n"); gbfprintf(ofd, "creator=\"" CREATOR_NAME_URL "\"\n");
gbfprintf(ofd, "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instanc gbfprintf(ofd, "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n
e\"\n"); ");
gbfprintf(ofd, "xmlns=\"http://www.topografix.com/GPX/%c/%c\"\n", gp gbfprintf(ofd, "xmlns=\"http://www.topografix.com/GPX/%c/%c\"\n", gpx_wve
x_wversion[0], gpx_wversion[2]); rsion[0], gpx_wversion[2]);
if (xsi_schema_loc) { if (xsi_schema_loc) {
gbfprintf(ofd, "xsi:schemaLocation=\"%s\">\n", xsi_schema_lo gbfprintf(ofd, "xsi:schemaLocation=\"%s\">\n", xsi_schema_loc);
c); } else {
} else { gbfprintf(ofd,
gbfprintf(ofd, "xsi:schemaLocation=" DEFAULT_XSI_SCHEMA_LOC_FMT">\n",
"xsi:schemaLocation=" DEFAULT_XSI_SCHEMA_LOC_FMT">\n gpx_wversion[0], gpx_wversion[2],
", gpx_wversion[0], gpx_wversion[2]);
gpx_wversion[0], gpx_wversion[2], }
gpx_wversion[0], gpx_wversion[2]);
} if (gpx_wversion_num > 10) {
gbfprintf(ofd, "<metadata>\n");
if (gpx_wversion_num > 10) { }
gbfprintf(ofd, "<metadata>\n"); gpx_write_gdata(&gpx_global->name, "name");
} gpx_write_gdata(&gpx_global->desc, "desc");
gpx_write_gdata(&gpx_global->name, "name"); /* In GPX 1.1, author changed from a string to a PersonType.
gpx_write_gdata(&gpx_global->desc, "desc"); * since it's optional, we just drop it instead of rewriting it.
/* In GPX 1.1, author changed from a string to a PersonType. */
* since it's optional, we just drop it instead of rewriting it. if (gpx_wversion_num < 11) {
*/ gpx_write_gdata(&gpx_global->author, "author");
if (gpx_wversion_num < 11) { }
gpx_write_gdata(&gpx_global->author, "author"); gpx_write_gdata(&gpx_global->email, "email");
} gpx_write_gdata(&gpx_global->url, "url");
gpx_write_gdata(&gpx_global->email, "email"); gpx_write_gdata(&gpx_global->urlname, "urlname");
gpx_write_gdata(&gpx_global->url, "url"); xml_write_time(ofd, now, 0, "time");
gpx_write_gdata(&gpx_global->urlname, "urlname"); gpx_write_gdata(&gpx_global->keywords, "keywords");
xml_write_time( ofd, now, 0, "time" );
gpx_write_gdata(&gpx_global->keywords, "keywords"); gpx_write_bounds();
gpx_write_bounds(); if (gpx_wversion_num > 10) {
gbfprintf(ofd, "</metadata>\n");
if (gpx_wversion_num > 10) { }
gbfprintf(ofd, "</metadata>\n");
} waypt_disp_all(gpx_waypt_pr);
gpx_route_pr();
waypt_disp_all(gpx_waypt_pr); gpx_track_pr();
gpx_route_pr();
gpx_track_pr();
gbfprintf(ofd, "</gpx>\n"); gbfprintf(ofd, "</gpx>\n");
} }
static void static void
gpx_free_gpx_global(void) gpx_free_gpx_global(void)
{ {
gpx_rm_from_global(&gpx_global->name); gpx_rm_from_global(&gpx_global->name);
gpx_rm_from_global(&gpx_global->desc); gpx_rm_from_global(&gpx_global->desc);
gpx_rm_from_global(&gpx_global->author); gpx_rm_from_global(&gpx_global->author);
gpx_rm_from_global(&gpx_global->email); gpx_rm_from_global(&gpx_global->email);
gpx_rm_from_global(&gpx_global->url); gpx_rm_from_global(&gpx_global->url);
gpx_rm_from_global(&gpx_global->urlname); gpx_rm_from_global(&gpx_global->urlname);
gpx_rm_from_global(&gpx_global->keywords); gpx_rm_from_global(&gpx_global->keywords);
xfree(gpx_global); xfree(gpx_global);
} }
static void static void
gpx_exit(void) gpx_exit(void)
{ {
if ( xsi_schema_loc ) { if (xsi_schema_loc) {
xfree(xsi_schema_loc); xfree(xsi_schema_loc);
xsi_schema_loc = NULL; xsi_schema_loc = NULL;
} }
if (gpx_global) { if (gpx_global) {
gpx_free_gpx_global(); gpx_free_gpx_global();
gpx_global = NULL; gpx_global = NULL;
} }
} }
static static
arglist_t gpx_args[] = { arglist_t gpx_args[] = {
{ "snlen", &snlen, "Length of generated shortnames", {
"32", ARGTYPE_INT, "1", NULL }, "snlen", &snlen, "Length of generated shortnames",
{ "suppresswhite", &suppresswhite, "32", ARGTYPE_INT, "1", NULL
"No whitespace in generated shortnames", },
NULL, ARGTYPE_BOOL, ARG_NOMINMAX }, {
{ "logpoint", &opt_logpoint, "suppresswhite", &suppresswhite,
"Create waypoints from geocache log entries", "No whitespace in generated shortnames",
NULL, ARGTYPE_BOOL, ARG_NOMINMAX }, NULL, ARGTYPE_BOOL, ARG_NOMINMAX
{ "urlbase", &urlbase, "Base URL for link tag in output", },
NULL, ARGTYPE_STRING, ARG_NOMINMAX}, {
{ "gpxver", &gpx_wversion, "Target GPX version for output", "logpoint", &opt_logpoint,
"1.0", ARGTYPE_STRING, ARG_NOMINMAX}, "Create waypoints from geocache log entries",
ARG_TERMINATOR NULL, ARGTYPE_BOOL, ARG_NOMINMAX
},
{
"urlbase", &urlbase, "Base URL for link tag in output",
NULL, ARGTYPE_STRING, ARG_NOMINMAX
},
{
"gpxver", &gpx_wversion, "Target GPX version for output",
"1.0", ARGTYPE_STRING, ARG_NOMINMAX
},
ARG_TERMINATOR
}; };
ff_vecs_t gpx_vecs = { ff_vecs_t gpx_vecs = {
ff_type_file, ff_type_file,
FF_CAP_RW_ALL, FF_CAP_RW_ALL,
gpx_rd_init, gpx_rd_init,
gpx_wr_init, gpx_wr_init,
gpx_rd_deinit, gpx_rd_deinit,
gpx_wr_deinit, gpx_wr_deinit,
gpx_read, gpx_read,
gpx_write, gpx_write,
gpx_exit, gpx_exit,
gpx_args, gpx_args,
CET_CHARSET_UTF8, 0 /* non-fixed to create non UTF-8 XML's for t CET_CHARSET_UTF8, 0 /* non-fixed to create non UTF-8 XML's for testing |
esting | CET-REVIEW */ CET-REVIEW */
}; };
#endif #endif
 End of changes. 94 change blocks. 
1565 lines changed or deleted 1535 lines changed or added


 garmin_fs.h   garmin_fs.h 
skipping to change at line 62 skipping to change at line 62
/* GMSD_SETSTR(a,b): a = gmsd field, b = null terminated source */ /* GMSD_SETSTR(a,b): a = gmsd field, b = null terminated source */
#define GMSD_SETSTR(a,b) if (gmsd && (b) && (b)[0]) { gmsd->a = xstrdup((b) ); gmsd->flags.a = 1; } #define GMSD_SETSTR(a,b) if (gmsd && (b) && (b)[0]) { gmsd->a = xstrdup((b) ); gmsd->flags.a = 1; }
/* GMSD_SETNSTR(a,b,c): a = gmsd field, b = source, c = sizeof(source) */ /* GMSD_SETNSTR(a,b,c): a = gmsd field, b = source, c = sizeof(source) */
#define GMSD_SETNSTR(a,b,c) if (gmsd && (b) && (b)[0]) { gmsd->a = xstrndup ((b),(c)); gmsd->flags.a = 1; } #define GMSD_SETNSTR(a,b,c) if (gmsd && (b) && (b)[0]) { gmsd->a = xstrndup ((b),(c)); gmsd->flags.a = 1; }
/* GMSD_GETNSTR(a,b,c): a = gmsd field, b = target, c = sizeof(target) */ /* GMSD_GETNSTR(a,b,c): a = gmsd field, b = target, c = sizeof(target) */
#define GMSD_GETNSTR(a,b,c) if (gmsd && gmsd->flags.a) strncpy((b),gmsd->a, (c)) #define GMSD_GETNSTR(a,b,c) if (gmsd && gmsd->flags.a) strncpy((b),gmsd->a, (c))
typedef struct garmin_ilink_s { typedef struct garmin_ilink_s {
int ref_count; int ref_count;
double lat, lon, alt; double lat, lon, alt;
struct garmin_ilink_s *next; struct garmin_ilink_s* next;
} garmin_ilink_t; } garmin_ilink_t;
typedef struct { typedef struct {
unsigned int icon:1; unsigned int icon:1;
unsigned int wpt_class:1; unsigned int wpt_class:1;
unsigned int display:1; unsigned int display:1;
unsigned int category:1; unsigned int category:1;
unsigned int city:1; unsigned int city:1;
unsigned int state:1; unsigned int state:1;
unsigned int facility:1; unsigned int facility:1;
unsigned int cc:1; unsigned int cc:1;
unsigned int cross_road:1; unsigned int cross_road:1;
unsigned int addr:1; unsigned int addr:1;
unsigned int country:1; unsigned int country:1;
unsigned int phone_nr:1; unsigned int phone_nr:1;
unsigned int phone_nr2:1; unsigned int phone_nr2:1;
unsigned int fax_nr:1; unsigned int fax_nr:1;
unsigned int postal_code:1; unsigned int postal_code:1;
unsigned int email:1; unsigned int email:1;
#ifdef GMSD_EXPERIMENTAL #ifdef GMSD_EXPERIMENTAL
unsigned int subclass:1; unsigned int subclass:1;
#endif #endif
} garmin_fs_flags_t; } garmin_fs_flags_t;
typedef struct garmin_fs_s typedef struct garmin_fs_s {
{ format_specific_data fs;
format_specific_data fs; garmin_fs_flags_t flags;
garmin_fs_flags_t flags;
int protocol; /* ... used by device (-1 is MapSource) */
int protocol; /* ... used by device (-1 is MapSource) */
gbint32 icon;
gbint32 icon; int wpt_class;
int wpt_class; gbint32 display;
gbint32 display; gbint16 category;
gbint16 category; char* city; /* city name */
char *city; /* city name */ char* facility; /* facility name */
char *facility; /* facility name */ char* state; /* state */
char *state; /* state */ char* cc; /* country code */
char *cc; /* country code */ char* cross_road; /* Intersection road label */
char *cross_road; /* Intersection road label */ char* addr; /* address + number */
char *addr; /* address + number */ char* country; /* country */
char *country; /* country */ char* phone_nr; /* phone number */
char *phone_nr; /* phone number */ char* phone_nr2; /* phone number (2) */
char *phone_nr2; /* phone number (2) */ char* fax_nr; /* fax number */
char *fax_nr; /* fax number */ char* postal_code; /* postal code */
char *postal_code; /* postal code */ char* email; /* email address */
char *email; /* email address */ garmin_ilink_t* ilinks;
garmin_ilink_t *ilinks;
#ifdef GMSD_EXPERIMENTAL #ifdef GMSD_EXPERIMENTAL
char subclass[22]; char subclass[22];
#endif #endif
} garmin_fs_t, *garmin_fs_p; } garmin_fs_t, *garmin_fs_p;
garmin_fs_t *garmin_fs_alloc(const int protocol); garmin_fs_t* garmin_fs_alloc(const int protocol);
void garmin_fs_destroy(void *fs); void garmin_fs_destroy(void* fs);
void garmin_fs_copy(garmin_fs_t **dest, garmin_fs_t *src); void garmin_fs_copy(garmin_fs_t** dest, garmin_fs_t* src);
void garmin_fs_convert(void *fs); void garmin_fs_convert(void* fs);
char *garmin_fs_xstrdup(const char *src, size_t size); char* garmin_fs_xstrdup(const char* src, size_t size);
/* for GPX */ /* for GPX */
void garmin_fs_xml_convert(const int base_tag, int tag, const char *cdatast void garmin_fs_xml_convert(const int base_tag, int tag, const char* cdatast
r, waypoint *waypt); r, waypoint* waypt);
void garmin_fs_xml_fprint(gbfile *ofd, const waypoint *waypt); void garmin_fs_xml_fprint(gbfile* ofd, const waypoint* waypt);
/* common garmin_fs utilities */ /* common garmin_fs utilities */
/* ..convert_category: returns 1=OK; 0=Unable to convert category */ /* ..convert_category: returns 1=OK; 0=Unable to convert category */
unsigned char garmin_fs_convert_category(const char *category_name, gbuint1 6 *category); unsigned char garmin_fs_convert_category(const char* category_name, gbuint1 6* category);
/* ..merge_category: returns 1=OK; 0=Unable to convert category */ /* ..merge_category: returns 1=OK; 0=Unable to convert category */
unsigned char garmin_fs_merge_category(const char *category_name, waypoint *waypt); unsigned char garmin_fs_merge_category(const char* category_name, waypoint* waypt);
#define GMSD_SECTION_CATEGORIES "Garmin Categories" #define GMSD_SECTION_CATEGORIES "Garmin Categories"
void garmin_fs_garmin_after_read(const GPS_PWay way, waypoint *wpt, const i void garmin_fs_garmin_after_read(const GPS_PWay way, waypoint* wpt, const i
nt protoid); nt protoid);
void garmin_fs_garmin_before_write(const waypoint *wpt, GPS_PWay way, const void garmin_fs_garmin_before_write(const waypoint* wpt, GPS_PWay way, const
int protoid); int protoid);
#endif #endif
 End of changes. 10 change blocks. 
59 lines changed or deleted 58 lines changed or added


 garmin_gpi.h   garmin_gpi.h 
#ifndef GARMIN_GPI_H #ifndef GARMIN_GPI_H
#define GARMIN_GPI_H #define GARMIN_GPI_H
static char gpi_bitmap[] = { static char gpi_bitmap[] = {
0x00,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x08,0x00,0x00,0x00,0x40,0x0 0x00,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x08,0x00,0x00,0x00,0x40,0x02,0x0
2,0x00,0x00, 0,0x00,
0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0xff,0x00,0xff,0x00,0x01,0x0 0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0xff,0x00,0xff,0x00,0x01,0x00,0x0
0,0x00,0x00, 0,0x00,
0x6c,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x6c,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,0x7 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,0x7e,0x7
e,0x7e,0x7e, e,0x7e,
0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7 0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7
e,0x7e,0x7e, e,0x7e,
0x7e,0x7e,0x00,0x7e,0x00,0x7e,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7 0x7e,0x7e,0x00,0x7e,0x00,0x7e,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7
f,0x7f,0x7f, f,0x7f,
0x7f,0x7f,0x59,0x67,0x65,0x7f,0x7f,0x7f,0x7f,0x7f,0x00,0x7e,0x00,0x7 0x7f,0x7f,0x59,0x67,0x65,0x7f,0x7f,0x7f,0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7
e,0x7f,0x7f, f,0x7f,
0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x74,0x3d,0x42,0x56,0x7 0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x74,0x3d,0x42,0x56,0x7e,0x7
e,0x7e,0x7f, e,0x7f,
0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7 0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7
f,0x7f,0x7f, f,0x7f,
0x7f,0x72,0x38,0x49,0x47,0x7e,0x7e,0x7f,0x7f,0x7f,0x00,0x7e,0x00,0x7 0x7f,0x72,0x38,0x49,0x47,0x7e,0x7e,0x7f,0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7
e,0x7f,0x7f, f,0x7f,
0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7d,0x37,0x47,0x7d,0x7 0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7d,0x37,0x47,0x7d,0x7e,0x7
e,0x7e,0x7f, e,0x7f,
0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7 0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7
f,0x7f,0x7f, f,0x7f,
0x7f,0x7d,0x37,0x47,0x7d,0x7e,0x7e,0x7f,0x7f,0x7f,0x00,0x7e,0x00,0x7 0x7f,0x7d,0x37,0x47,0x7d,0x7e,0x7e,0x7f,0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7
e,0x7f,0x7f, f,0x7f,
0x7f,0x7f,0x7f,0x7f,0x7f,0x7c,0x6c,0x50,0x44,0x5e,0x4f,0x76,0x7e,0x7 0x7f,0x7f,0x7f,0x7f,0x7f,0x7c,0x6c,0x50,0x44,0x5e,0x4f,0x76,0x7e,0x7f,0x7
f,0x7f,0x7f, f,0x7f,
0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7f,0x77,0x7e,0x7f,0x7f,0x7e,0x62,0x0 0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7f,0x77,0x7e,0x7f,0x7f,0x7e,0x62,0x0d,0x0
d,0x00,0x05, 0,0x05,
0x10,0x08,0x09,0x59,0x7e,0x7e,0x7e,0x7f,0x7f,0x7f,0x00,0x7e,0x00,0x7 0x10,0x08,0x09,0x59,0x7e,0x7e,0x7e,0x7f,0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x2
e,0x29,0x1c, 9,0x1c,
0x4c,0x7f,0x7f,0x60,0x02,0x0c,0x2a,0x37,0x51,0x63,0x57,0x15,0x58,0x7 0x4c,0x7f,0x7f,0x60,0x02,0x0c,0x2a,0x37,0x51,0x63,0x57,0x15,0x58,0x7e,0x7
e,0x7e,0x7f, e,0x7f,
0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x68,0x5a,0x41,0x5f,0x5f,0x07,0x0e,0x3 0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x68,0x5a,0x41,0x5f,0x5f,0x07,0x0e,0x3d,0x4
d,0x41,0x41, 1,0x41,
0x4d,0x55,0x6b,0x61,0x26,0x57,0x57,0x2b,0x2f,0x30,0x00,0x7e,0x00,0x7 0x4d,0x55,0x6b,0x61,0x26,0x57,0x57,0x2b,0x2f,0x30,0x00,0x7e,0x00,0x7e,0x7
e,0x77,0x7d, 7,0x7d,
0x4e,0x3d,0x3d,0x16,0x35,0x41,0x7d,0x49,0x18,0x48,0x52,0x54,0x5b,0x3 0x4e,0x3d,0x3d,0x16,0x35,0x41,0x7d,0x49,0x18,0x48,0x52,0x54,0x5b,0x31,0x3
1,0x31,0x63, 1,0x63,
0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x40,0x7d,0x75,0x47,0x47,0x41,0x35,0x4 0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x40,0x7d,0x75,0x47,0x47,0x41,0x35,0x40,0x7
0,0x72,0x1e, 2,0x1e,
0x7c,0x5d,0x1d,0x20,0x49,0x3d,0x3d,0x5b,0x7f,0x7f,0x00,0x7e,0x00,0x7 0x7c,0x5d,0x1d,0x20,0x49,0x3d,0x3d,0x5b,0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x6
e,0x60,0x5c, 0,0x5c,
0x7a,0x1a,0x1a,0x3b,0x38,0x5d,0x0e,0x59,0x7d,0x3c,0x72,0x37,0x78,0x6 0x7a,0x1a,0x1a,0x3b,0x38,0x5d,0x0e,0x59,0x7d,0x3c,0x72,0x37,0x78,0x60,0x6
0,0x60,0x28, 0,0x28,
0x4f,0x71,0x00,0x7e,0x00,0x7e,0x7e,0x43,0x33,0x69,0x69,0x17,0x22,0x7 0x4f,0x71,0x00,0x7e,0x00,0x7e,0x7e,0x43,0x33,0x69,0x69,0x17,0x22,0x7d,0x2
d,0x2c,0x27, c,0x27,
0x2a,0x2b,0x7d,0x32,0x61,0x4f,0x4f,0x36,0x3f,0x4c,0x00,0x7e,0x00,0x7 0x2a,0x2b,0x7d,0x32,0x61,0x4f,0x4f,0x36,0x3f,0x4c,0x00,0x7e,0x00,0x7e,0x7
e,0x7f,0x7e, f,0x7e,
0x3a,0x2b,0x2b,0x45,0x1a,0x40,0x47,0x7d,0x37,0x41,0x12,0x25,0x5e,0x4 0x3a,0x2b,0x2b,0x45,0x1a,0x40,0x47,0x7d,0x37,0x41,0x12,0x25,0x5e,0x46,0x4
6,0x46,0x4d, 6,0x4d,
0x62,0x53,0x00,0x7e,0x00,0x7e,0x7f,0x7e,0x73,0x71,0x71,0x6a,0x13,0x3 0x62,0x53,0x00,0x7e,0x00,0x7e,0x7f,0x7e,0x73,0x71,0x71,0x6a,0x13,0x39,0x1
9,0x1b,0x45, b,0x45,
0x62,0x50,0x3a,0x7e,0x7e,0x7b,0x7b,0x5c,0x5b,0x49,0x00,0x7e,0x00,0x7 0x62,0x50,0x3a,0x7e,0x7e,0x7b,0x7b,0x5c,0x5b,0x49,0x00,0x7e,0x00,0x7e,0x7
e,0x7f,0x7e, f,0x7e,
0x59,0x01,0x01,0x06,0x64,0x35,0x4e,0x3e,0x26,0x21,0x66,0x7f,0x45,0x0 0x59,0x01,0x01,0x06,0x64,0x35,0x4e,0x3e,0x26,0x21,0x66,0x7f,0x45,0x04,0x0
4,0x04,0x11, 4,0x11,
0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7f,0x7e,0x59,0x01,0x01,0x06,0x64,0x3 0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7f,0x7e,0x59,0x01,0x01,0x06,0x64,0x35,0x4
5,0x4e,0x3e, e,0x3e,
0x26,0x21,0x66,0x7f,0x45,0x04,0x04,0x11,0x7f,0x7f,0x00,0x7e,0x00,0x7 0x26,0x21,0x66,0x7f,0x45,0x04,0x04,0x11,0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7
e,0x7f,0x7e, f,0x7e,
0x7c,0x0a,0x0a,0x0f,0x65,0x7d,0x74,0x71,0x7c,0x7e,0x7e,0x7e,0x58,0x0 0x7c,0x0a,0x0a,0x0f,0x65,0x7d,0x74,0x71,0x7c,0x7e,0x7e,0x7e,0x58,0x03,0x0
3,0x03,0x2b, 3,0x2b,
0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7f,0x7f,0x7f,0x6d,0x6d,0x6f,0x2d,0x1 0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7f,0x7f,0x7f,0x6d,0x6d,0x6f,0x2d,0x1d,0x6
d,0x63,0x7a, 3,0x7a,
0x7e,0x75,0x5d,0x19,0x32,0x70,0x70,0x6f,0x7f,0x7f,0x00,0x7e,0x00,0x7 0x7e,0x75,0x5d,0x19,0x32,0x70,0x70,0x6f,0x7f,0x7f,0x00,0x7e,0x00,0x7e,0x7
e,0x7f,0x7f, f,0x7f,
0x7f,0x7f,0x7f,0x7e,0x7d,0x53,0x35,0x0b,0x1f,0x0e,0x34,0x5a,0x7f,0x7 0x7f,0x7f,0x7f,0x7e,0x7d,0x53,0x35,0x0b,0x1f,0x0e,0x34,0x5a,0x7f,0x7f,0x7
f,0x7f,0x7f, f,0x7f,
0x7f,0x7f,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x7f,0x7f,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x7f,0x7 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x7f,0x7e,0x7
e,0x7e,0x7e, e,0x7e,
0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7 0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7
e,0x7e,0x7e, e,0x7e,
0x7e,0x7e,0x7e,0x7e,0x0a,0x0a,0x0a,0x00,0x0b,0x0b,0x0b,0x00,0x16,0x1 0x7e,0x7e,0x7e,0x7e,0x0a,0x0a,0x0a,0x00,0x0b,0x0b,0x0b,0x00,0x16,0x16,0x1
6,0x16,0x00, 6,0x00,
0x1f,0x1f,0x1f,0x00,0x28,0x28,0x28,0x00,0x2d,0x2d,0x2d,0x00,0x35,0x3 0x1f,0x1f,0x1f,0x00,0x28,0x28,0x28,0x00,0x2d,0x2d,0x2d,0x00,0x35,0x35,0x3
5,0x35,0x00, 5,0x00,
0x3d,0x3d,0x3d,0x00,0x40,0x40,0x40,0x00,0x41,0x41,0x41,0x00,0x43,0x4 0x3d,0x3d,0x3d,0x00,0x40,0x40,0x40,0x00,0x41,0x41,0x41,0x00,0x43,0x43,0x4
3,0x43,0x00, 3,0x00,
0x46,0x46,0x46,0x00,0x47,0x47,0x47,0x00,0x4b,0x4b,0x4b,0x00,0x4e,0x4 0x46,0x46,0x46,0x00,0x47,0x47,0x47,0x00,0x4b,0x4b,0x4b,0x00,0x4e,0x4e,0x4
e,0x4e,0x00, e,0x00,
0x53,0x53,0x53,0x00,0x54,0x54,0x54,0x00,0x56,0x56,0x56,0x00,0x59,0x5 0x53,0x53,0x53,0x00,0x54,0x54,0x54,0x00,0x56,0x56,0x56,0x00,0x59,0x59,0x5
9,0x59,0x00, 9,0x00,
0x5a,0x5a,0x5a,0x00,0x5f,0x5f,0x5f,0x00,0x60,0x60,0x60,0x00,0x62,0x6 0x5a,0x5a,0x5a,0x00,0x5f,0x5f,0x5f,0x00,0x60,0x60,0x60,0x00,0x62,0x62,0x6
2,0x62,0x00, 2,0x00,
0x63,0x63,0x63,0x00,0x6a,0x6a,0x6a,0x00,0x74,0x74,0x74,0x00,0x75,0x7 0x63,0x63,0x63,0x00,0x6a,0x6a,0x6a,0x00,0x74,0x74,0x74,0x00,0x75,0x75,0x7
5,0x75,0x00, 5,0x00,
0x76,0x76,0x76,0x00,0x78,0x78,0x78,0x00,0x79,0x79,0x79,0x00,0x7a,0x7 0x76,0x76,0x76,0x00,0x78,0x78,0x78,0x00,0x79,0x79,0x79,0x00,0x7a,0x7a,0x7
a,0x7a,0x00, a,0x00,
0x7c,0x7c,0x7c,0x00,0x7d,0x7d,0x7d,0x00,0x7e,0x7e,0x7e,0x00,0x80,0x8 0x7c,0x7c,0x7c,0x00,0x7d,0x7d,0x7d,0x00,0x7e,0x7e,0x7e,0x00,0x80,0x80,0x8
0,0x80,0x00, 0,0x00,
0x81,0x81,0x81,0x00,0x82,0x82,0x82,0x00,0x83,0x83,0x83,0x00,0x84,0x8 0x81,0x81,0x81,0x00,0x82,0x82,0x82,0x00,0x83,0x83,0x83,0x00,0x84,0x84,0x8
4,0x84,0x00, 4,0x00,
0x85,0x85,0x85,0x00,0x87,0x87,0x87,0x00,0x88,0x88,0x88,0x00,0x89,0x8 0x85,0x85,0x85,0x00,0x87,0x87,0x87,0x00,0x88,0x88,0x88,0x00,0x89,0x89,0x8
9,0x89,0x00, 9,0x00,
0x8a,0x8a,0x8a,0x00,0x8b,0x8b,0x8b,0x00,0x8e,0x8e,0x8e,0x00,0x90,0x9 0x8a,0x8a,0x8a,0x00,0x8b,0x8b,0x8b,0x00,0x8e,0x8e,0x8e,0x00,0x90,0x90,0x9
0,0x90,0x00, 0,0x00,
0x91,0x91,0x91,0x00,0x92,0x92,0x92,0x00,0x94,0x94,0x94,0x00,0x95,0x9 0x91,0x91,0x91,0x00,0x92,0x92,0x92,0x00,0x94,0x94,0x94,0x00,0x95,0x95,0x9
5,0x95,0x00, 5,0x00,
0x96,0x96,0x96,0x00,0x97,0x97,0x97,0x00,0x98,0x98,0x98,0x00,0x9b,0x9 0x96,0x96,0x96,0x00,0x97,0x97,0x97,0x00,0x98,0x98,0x98,0x00,0x9b,0x9b,0x9
b,0x9b,0x00, b,0x00,
0x9c,0x9c,0x9c,0x00,0x9d,0x9d,0x9d,0x00,0xa0,0xa0,0xa0,0x00,0xa1,0xa 0x9c,0x9c,0x9c,0x00,0x9d,0x9d,0x9d,0x00,0xa0,0xa0,0xa0,0x00,0xa1,0xa1,0xa
1,0xa1,0x00, 1,0x00,
0xa2,0xa2,0xa2,0x00,0xa4,0xa4,0xa4,0x00,0xa6,0xa6,0xa6,0x00,0xa7,0xa 0xa2,0xa2,0xa2,0x00,0xa4,0xa4,0xa4,0x00,0xa6,0xa6,0xa6,0x00,0xa7,0xa7,0xa
7,0xa7,0x00, 7,0x00,
0xab,0xab,0xab,0x00,0xac,0xac,0xac,0x00,0xad,0xad,0xad,0x00,0xae,0xa 0xab,0xab,0xab,0x00,0xac,0xac,0xac,0x00,0xad,0xad,0xad,0x00,0xae,0xae,0xa
e,0xae,0x00, e,0x00,
0xaf,0xaf,0xaf,0x00,0xb0,0xb0,0xb0,0x00,0xb1,0xb1,0xb1,0x00,0xb2,0xb 0xaf,0xaf,0xaf,0x00,0xb0,0xb0,0xb0,0x00,0xb1,0xb1,0xb1,0x00,0xb2,0xb2,0xb
2,0xb2,0x00, 2,0x00,
0xb3,0xb3,0xb3,0x00,0xb4,0xb4,0xb4,0x00,0xb5,0xb5,0xb5,0x00,0xb6,0xb 0xb3,0xb3,0xb3,0x00,0xb4,0xb4,0xb4,0x00,0xb5,0xb5,0xb5,0x00,0xb6,0xb6,0xb
6,0xb6,0x00, 6,0x00,
0xb7,0xb7,0xb7,0x00,0xb9,0xb9,0xb9,0x00,0xbb,0xbb,0xbb,0x00,0xbc,0xb 0xb7,0xb7,0xb7,0x00,0xb9,0xb9,0xb9,0x00,0xbb,0xbb,0xbb,0x00,0xbc,0xbc,0xb
c,0xbc,0x00, c,0x00,
0xbe,0xbe,0xbe,0x00,0xbf,0xbf,0xbf,0x00,0xc0,0xc0,0xc0,0x00,0xc1,0xc 0xbe,0xbe,0xbe,0x00,0xbf,0xbf,0xbf,0x00,0xc0,0xc0,0xc0,0x00,0xc1,0xc1,0xc
1,0xc1,0x00, 1,0x00,
0xc2,0xc2,0xc2,0x00,0xc3,0xc3,0xc3,0x00,0xc4,0xc4,0xc4,0x00,0xc5,0xc 0xc2,0xc2,0xc2,0x00,0xc3,0xc3,0xc3,0x00,0xc4,0xc4,0xc4,0x00,0xc5,0xc5,0xc
5,0xc5,0x00, 5,0x00,
0xc9,0xc9,0xc9,0x00,0xcb,0xcb,0xcb,0x00,0xcc,0xcc,0xcc,0x00,0xce,0xc 0xc9,0xc9,0xc9,0x00,0xcb,0xcb,0xcb,0x00,0xcc,0xcc,0xcc,0x00,0xce,0xce,0xc
e,0xce,0x00, e,0x00,
0xcf,0xcf,0xcf,0x00,0xd0,0xd0,0xd0,0x00,0xd1,0xd1,0xd1,0x00,0xd2,0xd 0xcf,0xcf,0xcf,0x00,0xd0,0xd0,0xd0,0x00,0xd1,0xd1,0xd1,0x00,0xd2,0xd2,0xd
2,0xd2,0x00, 2,0x00,
0xd4,0xd4,0xd4,0x00,0xd5,0xd5,0xd5,0x00,0xd6,0xd6,0xd6,0x00,0xd9,0xd 0xd4,0xd4,0xd4,0x00,0xd5,0xd5,0xd5,0x00,0xd6,0xd6,0xd6,0x00,0xd9,0xd9,0xd
9,0xd9,0x00, 9,0x00,
0xda,0xda,0xda,0x00,0xdb,0xdb,0xdb,0x00,0xdc,0xdc,0xdc,0x00,0xdd,0xd 0xda,0xda,0xda,0x00,0xdb,0xdb,0xdb,0x00,0xdc,0xdc,0xdc,0x00,0xdd,0xdd,0xd
d,0xdd,0x00, d,0x00,
0xe0,0xe0,0xe0,0x00,0xe1,0xe1,0xe1,0x00,0xe2,0xe2,0xe2,0x00,0xe3,0xe 0xe0,0xe0,0xe0,0x00,0xe1,0xe1,0xe1,0x00,0xe2,0xe2,0xe2,0x00,0xe3,0xe3,0xe
3,0xe3,0x00, 3,0x00,
0xe4,0xe4,0xe4,0x00,0xe6,0xe6,0xe6,0x00,0xe8,0xe8,0xe8,0x00,0xe9,0xe 0xe4,0xe4,0xe4,0x00,0xe6,0xe6,0xe6,0x00,0xe8,0xe8,0xe8,0x00,0xe9,0xe9,0xe
9,0xe9,0x00, 9,0x00,
0xea,0xea,0xea,0x00,0xeb,0xeb,0xeb,0x00,0xec,0xec,0xec,0x00,0xed,0xe 0xea,0xea,0xea,0x00,0xeb,0xeb,0xeb,0x00,0xec,0xec,0xec,0x00,0xed,0xed,0xe
d,0xed,0x00, d,0x00,
0xee,0xee,0xee,0x00,0xf0,0xf0,0xf0,0x00,0xf3,0xf3,0xf3,0x00,0xf4,0xf 0xee,0xee,0xee,0x00,0xf0,0xf0,0xf0,0x00,0xf3,0xf3,0xf3,0x00,0xf4,0xf4,0xf
4,0xf4,0x00, 4,0x00,
0xf5,0xf5,0xf5,0x00,0xf7,0xf7,0xf7,0x00,0xf8,0xf8,0xf8,0x00,0xf9,0xf 0xf5,0xf5,0xf5,0x00,0xf7,0xf7,0xf7,0x00,0xf8,0xf8,0xf8,0x00,0xf9,0xf9,0xf
9,0xf9,0x00, 9,0x00,
0xfa,0xfa,0xfa,0x00,0xfb,0xfb,0xfb,0x00,0xfc,0xfc,0xfc,0x00,0xff,0xf 0xfa,0xfa,0xfa,0x00,0xfb,0xfb,0xfb,0x00,0xfc,0xfc,0xfc,0x00,0xff,0xff,0xf
f,0xff,0x00, f,0x00,
0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
0,0x00,0x00, 0,0x00,
0x00,0x00,0x00,0x00 0x00,0x00,0x00,0x00
}; };
#define GPI_BITMAP_SIZE sizeof(gpi_bitmap) #define GPI_BITMAP_SIZE sizeof(gpi_bitmap)
#endif #endif
 End of changes. 1 change blocks. 
205 lines changed or deleted 205 lines changed or added


 garmin_tables.h   garmin_tables.h 
skipping to change at line 32 skipping to change at line 32
#ifndef GARMIN_TABLES_H #ifndef GARMIN_TABLES_H
#define GARMIN_TABLES_H #define GARMIN_TABLES_H
#include "defs.h" #include "defs.h"
#define DEFAULT_ICON_DESCR "Waypoint" #define DEFAULT_ICON_DESCR "Waypoint"
#define DEFAULT_ICON_VALUE 18 #define DEFAULT_ICON_VALUE 18
typedef struct icon_mapping { typedef struct icon_mapping {
const int mpssymnum; const int mpssymnum;
const int pcxsymnum; const int pcxsymnum;
const char *icon; const char* icon;
} icon_mapping_t; } icon_mapping_t;
typedef enum {MAPSOURCE, PCX, GARMIN_SERIAL, GDB} garmin_formats_e; typedef enum {MAPSOURCE, PCX, GARMIN_SERIAL, GDB} garmin_formats_e;
char *gt_find_desc_from_icon_number(const int icon, garmin_formats_e garmin char* gt_find_desc_from_icon_number(const int icon, garmin_formats_e garmin
_format, int *dynamic); _format, int* dynamic);
int gt_find_icon_number_from_desc(const char *desc, garmin_formats_e garmin int gt_find_icon_number_from_desc(const char* desc, garmin_formats_e garmin
_format); _format);
extern icon_mapping_t garmin_icon_table[]; extern icon_mapping_t garmin_icon_table[];
typedef enum { typedef enum {
gt_waypt_class_user_waypoint = 0, gt_waypt_class_user_waypoint = 0,
gt_waypt_class_airport, gt_waypt_class_airport,
gt_waypt_class_intersection, gt_waypt_class_intersection,
gt_waypt_class_ndb, gt_waypt_class_ndb,
gt_waypt_class_vor, gt_waypt_class_vor,
gt_waypt_class_runway_threshold, gt_waypt_class_runway_threshold,
gt_waypt_class_airport_intersection, gt_waypt_class_airport_intersection,
gt_waypt_class_airport_ndb, gt_waypt_class_airport_ndb,
gt_waypt_class_map_point, gt_waypt_class_map_point,
gt_waypt_class_map_area, gt_waypt_class_map_area,
gt_waypt_class_map_intersection, gt_waypt_class_map_intersection,
gt_waypt_class_map_address, gt_waypt_class_map_address,
gt_waypt_class_map_line gt_waypt_class_map_line
} gt_waypt_classes_e; } gt_waypt_classes_e;
extern char *gt_waypt_class_names[]; extern char* gt_waypt_class_names[];
typedef struct gt_country_code_s typedef struct gt_country_code_s {
{ const char* cc;
const char *cc; const char* country;
const char *country;
} gt_country_code_t; } gt_country_code_t;
extern gt_country_code_t gt_country_codes[]; extern gt_country_code_t gt_country_codes[];
const char *gt_get_icao_country(const char *cc); const char* gt_get_icao_country(const char* cc);
const char *gt_get_icao_cc(const char *country, const char *shortname); const char* gt_get_icao_cc(const char* country, const char* shortname);
/* this order is used by most devices */ /* this order is used by most devices */
typedef enum { typedef enum {
gt_display_mode_symbol_and_name = 0, gt_display_mode_symbol_and_name = 0,
gt_display_mode_symbol, gt_display_mode_symbol,
gt_display_mode_symbol_and_comment gt_display_mode_symbol_and_comment
} gt_display_modes_e; } gt_display_modes_e;
extern char *gt_display_mode_names[]; extern char* gt_display_mode_names[];
#define GT_DISPLAY_MODE_MIN gt_display_mode_symbol_and_name #define GT_DISPLAY_MODE_MIN gt_display_mode_symbol_and_name
#define GT_DISPLAY_MODE_MAX gt_display_mode_symbol_and_comment #define GT_DISPLAY_MODE_MAX gt_display_mode_symbol_and_comment
typedef enum { typedef enum {
gt_gdb_display_mode_symbol = 0, gt_gdb_display_mode_symbol = 0,
gt_gdb_display_mode_symbol_and_name, gt_gdb_display_mode_symbol_and_name,
gt_gdb_display_mode_symbol_and_comment gt_gdb_display_mode_symbol_and_comment
} gt_gdb_display_modes_e; } gt_gdb_display_modes_e;
unsigned char gt_convert_category(const char *name, int *category); unsigned char gt_convert_category(const char* name, int* category);
unsigned char gt_switch_display_mode_value(const unsigned char display_mode , const int protoid, const char device); unsigned char gt_switch_display_mode_value(const unsigned char display_mode , const int protoid, const char device);
grid_type gt_lookup_grid_type(const char *grid_name, const char *module); grid_type gt_lookup_grid_type(const char* grid_name, const char* module);
const char *gt_get_mps_grid_longname(const grid_type grid, const char *modu const char* gt_get_mps_grid_longname(const grid_type grid, const char* modu
le); le);
int gt_lookup_datum_index(const char *datum_str, const char *module); int gt_lookup_datum_index(const char* datum_str, const char* module);
const char *gt_get_mps_datum_name(const int datum_index); const char* gt_get_mps_datum_name(const int datum_index);
gbuint32 gt_color_value(const int garmin_index); gbuint32 gt_color_value(const int garmin_index);
gbuint32 gt_color_value_by_name(const char *name); gbuint32 gt_color_value_by_name(const char* name);
int gt_color_index_by_name(const char *name); int gt_color_index_by_name(const char* name);
int gt_color_index_by_rgb(const int rgb); int gt_color_index_by_rgb(const int rgb);
const char *gt_color_name(const int garmin_index); const char* gt_color_name(const int garmin_index);
#endif #endif
 End of changes. 13 change blocks. 
43 lines changed or deleted 42 lines changed or added


 garminusb.h   garminusb.h 
skipping to change at line 30 skipping to change at line 30
*/ */
#include <stdio.h> #include <stdio.h>
/* This structure is a bit funny looking to avoid variable length /* This structure is a bit funny looking to avoid variable length
* arrays which aren't present in C89. This contains the visible * arrays which aren't present in C89. This contains the visible
* fields in the USB packets of the Garmin USB receivers (60C, 76C, etc.) * fields in the USB packets of the Garmin USB receivers (60C, 76C, etc.)
* All data are little endian. * All data are little endian.
*/ */
typedef typedef
union { union {
struct { struct {
unsigned char type; unsigned char type;
unsigned char reserved1; unsigned char reserved1;
unsigned char reserved2; unsigned char reserved2;
unsigned char reserved3; unsigned char reserved3;
unsigned char pkt_id[2]; unsigned char pkt_id[2];
unsigned char reserved6; unsigned char reserved6;
unsigned char reserved7; unsigned char reserved7;
unsigned char datasz[4]; unsigned char datasz[4];
unsigned char databuf[1]; /* actually an variable length array... */ unsigned char databuf[1]; /* actually an variable length array... */
} gusb_pkt; } gusb_pkt;
unsigned char dbuf[1024]; unsigned char dbuf[1024];
} garmin_usb_packet; } garmin_usb_packet;
/* /*
* Internal interfaces that are common regardless of underlying * Internal interfaces that are common regardless of underlying
* OS implementation. * OS implementation.
*/ */
#define GUSB_MAX_UNITS 20 #define GUSB_MAX_UNITS 20
struct garmin_unit_info { typedef struct {
unsigned long serial_number; unsigned long serial_number;
unsigned long unit_id; unsigned long unit_id;
unsigned long unit_version; unsigned long unit_version;
char *os_identifier; /* In case the OS has another name for it. */ char* os_identifier; /* In case the OS has another name for it. */
char *product_identifier; /* From the hardware itself. */ char* product_identifier; /* From the hardware itself. */
} garmin_unit_info[GUSB_MAX_UNITS]; } garmin_unit_info_t;
int gusb_cmd_send(const garmin_usb_packet *obuf, size_t sz); extern garmin_unit_info_t garmin_unit_info[GUSB_MAX_UNITS];
int gusb_cmd_get(garmin_usb_packet *ibuf, size_t sz);
int gusb_init(const char *portname, gpsdevh **dh); int gusb_cmd_send(const garmin_usb_packet* obuf, size_t sz);
int gusb_close(gpsdevh *); int gusb_cmd_get(garmin_usb_packet* ibuf, size_t sz);
int gusb_init(const char* portname, gpsdevh** dh);
int gusb_close(gpsdevh*);
/* /*
* New packet types in USB. * New packet types in USB.
*/ */
#define GUSB_SESSION_START 5 /* We request units attention */ #define GUSB_SESSION_START 5 /* We request units attention */
#define GUSB_SESSION_ACK 6 /* Unit responds that we have its attention */ #define GUSB_SESSION_ACK 6 /* Unit responds that we have its attention */
#define GUSB_REQUEST_BULK 2 /* Unit requests we read from bulk pipe */ #define GUSB_REQUEST_BULK 2 /* Unit requests we read from bulk pipe */
 End of changes. 3 change blocks. 
23 lines changed or deleted 25 lines changed or added


 gbfile.h   gbfile.h 
skipping to change at line 35 skipping to change at line 35
#include <ctype.h> #include <ctype.h>
#include <stdarg.h> #include <stdarg.h>
#include <string.h> #include <string.h>
#include "defs.h" #include "defs.h"
#include "cet.h" #include "cet.h"
struct gbfile_s; struct gbfile_s;
typedef struct gbfile_s gbfile; typedef struct gbfile_s gbfile;
typedef void (*gbfclearerr_cb) (gbfile *self); typedef void (*gbfclearerr_cb)(gbfile* self);
typedef int (*gbfclose_cb) (gbfile *self); typedef int (*gbfclose_cb)(gbfile* self);
typedef int (*gbfeof_cb) (gbfile *self); typedef int (*gbfeof_cb)(gbfile* self);
typedef int (*gbferror_cb) (gbfile *self); typedef int (*gbferror_cb)(gbfile* self);
typedef int (*gbfflush_cb) (gbfile *self); typedef int (*gbfflush_cb)(gbfile* self);
typedef gbfile* (*gbfopen_cb) (gbfile *self, const char *mode); typedef gbfile* (*gbfopen_cb)(gbfile* self, const char* mode);
typedef gbsize_t (*gbfread_cb) (void *buf, const gbsize_t size, const gbsiz typedef gbsize_t (*gbfread_cb)(void* buf, const gbsize_t size, const gbsize
e_t members, gbfile *self); _t members, gbfile* self);
typedef int (*gbfseek_cb) (gbfile *self, gbint32 offset, int whence); typedef int (*gbfseek_cb)(gbfile* self, gbint32 offset, int whence);
typedef gbsize_t (*gbftell_cb) (gbfile *self); typedef gbsize_t (*gbftell_cb)(gbfile* self);
typedef gbsize_t (*gbfwrite_cb) (const void *buf, const gbsize_t size, cons typedef gbsize_t (*gbfwrite_cb)(const void* buf, const gbsize_t size, const
t gbsize_t members, gbfile *self); gbsize_t members, gbfile* self);
typedef int (*gbfungetc_cb) (const int c, gbfile *self); typedef int (*gbfungetc_cb)(const int c, gbfile* self);
typedef struct gbfile_s { typedef struct gbfile_s {
#ifdef DEBUG_MEM #ifdef DEBUG_MEM
void *dummy; /* ZERO pointer for stdio oop's */ void* dummy; /* ZERO pointer for stdio oop's */
#endif #endif
union { union {
FILE *std; FILE* std;
unsigned char *mem; unsigned char* mem;
#if !ZLIB_INHIBITED #if !ZLIB_INHIBITED
gzFile *gz; gzFile* gz;
#endif #endif
} handle; } handle;
char *name; char* name;
char *module; char* module;
char *buff; /* static growing buffer, primary used by gbprintf * char* buff; /* static growing buffer, primary used by gbprintf *
/ /
int buffsz; int buffsz;
char mode; char mode;
int back; int back;
gbsize_t mempos; /* curr. position in memory */ gbsize_t mempos; /* curr. position in memory */
gbsize_t memlen; /* max. number of written bytes to memory */ gbsize_t memlen; /* max. number of written bytes to memory */
gbsize_t memsz; /* curr. size of allocated memory */ gbsize_t memsz; /* curr. size of allocated memory */
unsigned char big_endian:1; unsigned char big_endian:1;
unsigned char binary:1; unsigned char binary:1;
unsigned char gzapi:1; unsigned char gzapi:1;
unsigned char memapi:1; unsigned char memapi:1;
unsigned char unicode:1; unsigned char unicode:1;
unsigned char unicode_checked:1; unsigned char unicode_checked:1;
unsigned char is_pipe:1; unsigned char is_pipe:1;
gbfclearerr_cb fileclearerr; gbfclearerr_cb fileclearerr;
gbfclose_cb fileclose; gbfclose_cb fileclose;
gbfeof_cb fileeof; gbfeof_cb fileeof;
gbferror_cb fileerror; gbferror_cb fileerror;
gbfflush_cb fileflush; gbfflush_cb fileflush;
gbfopen_cb fileopen; gbfopen_cb fileopen;
gbfread_cb fileread; gbfread_cb fileread;
gbfseek_cb fileseek; gbfseek_cb fileseek;
gbftell_cb filetell; gbftell_cb filetell;
gbfungetc_cb fileungetc; gbfungetc_cb fileungetc;
gbfwrite_cb filewrite; gbfwrite_cb filewrite;
} gbfile_t; } gbfile_t;
gbfile *gbfopen(const char *filename, const char *mode, const char *module) gbfile* gbfopen(const char* filename, const char* mode, const char* module)
; ;
gbfile *gbfopen_be(const char *filename, const char *mode, const char *modu gbfile* gbfopen_be(const char* filename, const char* mode, const char* modu
le); le);
#define gbfopen_le gbfopen #define gbfopen_le gbfopen
void gbfclose(gbfile *file); void gbfclose(gbfile* file);
gbsize_t gbfread(void *buf, const gbsize_t size, const gbsize_t members, gb gbsize_t gbfread(void* buf, const gbsize_t size, const gbsize_t members, gb
file *file); file* file);
int gbfgetc(gbfile *file); int gbfgetc(gbfile* file);
char *gbfgets(char *buf, int len, gbfile *file); char* gbfgets(char* buf, int len, gbfile* file);
int gbvfprintf(gbfile *file, const char *format, va_list ap); int gbvfprintf(gbfile* file, const char* format, va_list ap);
int gbfprintf(gbfile *file, const char *format, ...); int gbfprintf(gbfile* file, const char* format, ...);
int gbfputc(int c, gbfile *file); int gbfputc(int c, gbfile* file);
int gbfputs(const char *s, gbfile *file); int gbfputs(const char* s, gbfile* file);
int gbfwrite(const void *buf, const gbsize_t size, const gbsize_t members, int gbfwrite(const void* buf, const gbsize_t size, const gbsize_t members,
gbfile *file); gbfile* file);
int gbfflush(gbfile *file); int gbfflush(gbfile* file);
void gbfclearerr(gbfile *file); void gbfclearerr(gbfile* file);
int gbferror(gbfile *file); int gbferror(gbfile* file);
void gbfrewind(gbfile *file); void gbfrewind(gbfile* file);
int gbfseek(gbfile *file, gbint32 offset, int whence); int gbfseek(gbfile* file, gbint32 offset, int whence);
gbsize_t gbftell(gbfile *file); gbsize_t gbftell(gbfile* file);
int gbfeof(gbfile *file); int gbfeof(gbfile* file);
int gbfungetc(const int c, gbfile *file); int gbfungetc(const int c, gbfile* file);
gbint32 gbfgetint32(gbfile *file); gbint32 gbfgetint32(gbfile* file);
#define gbfgetuint32 (gbuint32)gbfgetint32 #define gbfgetuint32 (gbuint32)gbfgetint32
gbint16 gbfgetint16(gbfile *file); gbint16 gbfgetint16(gbfile* file);
#define gbfgetuint16 (gbuint16)gbfgetint16 #define gbfgetuint16 (gbuint16)gbfgetint16
double gbfgetdbl(gbfile *file); // read a double val double gbfgetdbl(gbfile* file); // read a double val
ue ue
float gbfgetflt(gbfile *file); // read a float value float gbfgetflt(gbfile* file); // read a float value
char *gbfgetstr(gbfile *file); // read until any type of li char* gbfgetstr(gbfile* file); // read until any type of li
ne-breaks or EOF ne-breaks or EOF
char *gbfgetpstr(gbfile *file); // read a pascal str char* gbfgetpstr(gbfile* file); // read a pascal str
ing ing
char *gbfgetcstr(gbfile *file); // read a null termi char* gbfgetcstr(gbfile* file); // read a null termi
nated string nated string
int gbfputint16(const gbint16 i, gbfile *file); int gbfputint16(const gbint16 i, gbfile* file);
#define gbfputuint16(a,b) gbfputint16((gbuint16)(a),(b)) #define gbfputuint16(a,b) gbfputint16((gbuint16)(a),(b))
int gbfputint32(const gbint32 i, gbfile *file); int gbfputint32(const gbint32 i, gbfile* file);
#define gbfputuint32(a,b) gbfputint32((gbuint32)(a),(b)) #define gbfputuint32(a,b) gbfputint32((gbuint32)(a),(b))
int gbfputdbl(const double d, gbfile *file); // write a double value int gbfputdbl(const double d, gbfile* file); // write a double value
int gbfputflt(const float f, gbfile *file); // write a float value int gbfputflt(const float f, gbfile* file); // write a float value
int gbfputcstr(const char *s, gbfile *file); // write string including '\ int gbfputcstr(const char* s, gbfile* file); // write string including '\
0' 0'
int gbfputpstr(const char *s, gbfile *file); // write as pascal string int gbfputpstr(const char* s, gbfile* file); // write as pascal string
gbsize_t gbfcopyfrom(gbfile *file, gbfile *src, gbsize_t count); gbsize_t gbfcopyfrom(gbfile* file, gbfile* src, gbsize_t count);
#endif #endif
 End of changes. 15 change blocks. 
91 lines changed or deleted 91 lines changed or added


 gbser.h   gbser.h 
skipping to change at line 41 skipping to change at line 41
#define WINSERIAL 1 #define WINSERIAL 1
#else #else
#define POSIXSERIAL 1 #define POSIXSERIAL 1
#endif #endif
/* Open a serial port. |port_name| is the (platform specific) name /* Open a serial port. |port_name| is the (platform specific) name
* of the serial device to open. Under WIN32 familiar DOS port names * of the serial device to open. Under WIN32 familiar DOS port names
* ('com1:') are translated into the equivalent name required by * ('com1:') are translated into the equivalent name required by
* WIN32 * WIN32
*/ */
void *gbser_init(const char *port_name); void* gbser_init(const char* port_name);
/* Close a serial port /* Close a serial port
*/ */
void gbser_deinit(void *handle); void gbser_deinit(void* handle);
/* Set the serial port speed. /* Set the serial port speed.
*/ */
int gbser_set_speed(void *handle, unsigned speed); int gbser_set_speed(void* handle, unsigned speed);
/* Set the serial port speed, start, parity and stop bits */ /* Set the serial port speed, start, parity and stop bits */
int gbser_set_port(void *handle, unsigned speed, int gbser_set_port(void* handle, unsigned speed,
unsigned bits, unsigned bits,
unsigned parity, unsigned parity,
unsigned stop); unsigned stop);
/* Set the serial port up by parsing the supplied parameter string. /* Set the serial port up by parsing the supplied parameter string.
* Valid parameter strings look like '4800,8,N,1'. Parsing is case- * Valid parameter strings look like '4800,8,N,1'. Parsing is case-
* insensitive, spaces are allowed around the commas and omitted * insensitive, spaces are allowed around the commas and omitted
* trailing fields will default to '8', 'N' and '1' * trailing fields will default to '8', 'N' and '1'
*/ */
int gbser_setup(void *handle, const char *spec); int gbser_setup(void* handle, const char* spec);
/* Return true if there are characters available on the serial port /* Return true if there are characters available on the serial port
*/ */
int gbser_avail(void *handle); int gbser_avail(void* handle);
/* Read as many bytes as are available without blocking. At most |len| /* Read as many bytes as are available without blocking. At most |len|
* bytes will be read. Returns the number of bytes read or gbser_ERROR if a n * bytes will be read. Returns the number of bytes read or gbser_ERROR if a n
* error occurs. * error occurs.
*/ */
int gbser_read(void *handle, void *buf, unsigned len); int gbser_read(void* handle, void* buf, unsigned len);
/* Read the specified number of bytes. Block until the requested number /* Read the specified number of bytes. Block until the requested number
* of bytes have been read or the timeout (in ms) is exceeded. * of bytes have been read or the timeout (in ms) is exceeded.
*/ */
int gbser_read_wait(void *handle, void *buf, unsigned len, unsigned ms); int gbser_read_wait(void* handle, void* buf, unsigned len, unsigned ms);
/* Read from the serial port until the specified |eol| character is /* Read from the serial port until the specified |eol| character is
* found. Any character matching |discard| will be discarded. To * found. Any character matching |discard| will be discarded. To
* read lines terminated by 0x0A0x0D discarding linefeeds use * read lines terminated by 0x0A0x0D discarding linefeeds use
* gbser_read_line(h, buf, len, 1000, 0x0D, 0x0A); * gbser_read_line(h, buf, len, 1000, 0x0D, 0x0A);
*/ */
int gbser_read_line(void *handle, void *buf, int gbser_read_line(void* handle, void* buf,
unsigned len, unsigned ms, unsigned len, unsigned ms,
int eol, int discard); int eol, int discard);
/* Read a single character from the port, returning immediately if /* Read a single character from the port, returning immediately if
* none are available. TODO: Define return values * none are available. TODO: Define return values
*/ */
int gbser_readc(void *handle); int gbser_readc(void* handle);
/* Read a single character from the port, waiting up to |ms| /* Read a single character from the port, waiting up to |ms|
* milliseconds for a character to be available. * milliseconds for a character to be available.
*/ */
int gbser_readc_wait(void *handle, unsigned ms); int gbser_readc_wait(void* handle, unsigned ms);
/* Discard any pending input on the serial port. /* Discard any pending input on the serial port.
*/ */
int gbser_flush(void *handle); int gbser_flush(void* handle);
/* Write |len| bytes from |buf| to the serial port. /* Write |len| bytes from |buf| to the serial port.
*/ */
int gbser_write(void *handle, const void *buf, unsigned len); int gbser_write(void* handle, const void* buf, unsigned len);
/* Write a null terminated string in |str| to the serial /* Write a null terminated string in |str| to the serial
* port. * port.
*/ */
int gbser_print(void *handle, const char *str); int gbser_print(void* handle, const char* str);
/* Write a single character to the serial port. /* Write a single character to the serial port.
*/ */
int gbser_writec(void *handle, int c); int gbser_writec(void* handle, int c);
/* Return true if a port name seems to refer to a serial port. /* Return true if a port name seems to refer to a serial port.
* On Windows this tests the filename (against the regex * On Windows this tests the filename (against the regex
* /^(\\\\\.\\\\)?com\d+:?$/i). On Posix it returns the value of * /^(\\\\\.\\\\)?com\d+:?$/i). On Posix it returns the value of
* isatty() * isatty()
*/ */
int gbser_is_serial(const char *port_name); int gbser_is_serial(const char* port_name);
/* This isn't part of the above abstraction; it's just a helper for /* This isn't part of the above abstraction; it's just a helper for
* the other serial modules in the tree. * the other serial modules in the tree.
* *
* Windows does a weird thing with serial ports. * Windows does a weird thing with serial ports.
* COM ports 1 - 9 are "COM1:" through "COM9:" * COM ports 1 - 9 are "COM1:" through "COM9:"
* The one after that is \\.\\com10 - this function tries to plaster over * The one after that is \\.\\com10 - this function tries to plaster over
* that. * that.
* It returns a pointer to a staticly allocated buffer and is therefore not * It returns a pointer to a staticly allocated buffer and is therefore not
* thread safe. The buffer pointed to remains valid only until the next * thread safe. The buffer pointed to remains valid only until the next
* call to this function. * call to this function.
*/ */
const char *fix_win_serial_name_r(const char *comname, char *obuf, size_t l const char* fix_win_serial_name_r(const char* comname, char* obuf, size_t l
en); en);
const char *fix_win_serial_name(const char *comname); const char* fix_win_serial_name(const char* comname);
#endif /* GBSER_H */ #endif /* GBSER_H */
 End of changes. 17 change blocks. 
22 lines changed or deleted 22 lines changed or added


 gbser_private.h   gbser_private.h 
skipping to change at line 25 skipping to change at line 25
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
*/ */
#define MYMAGIC 0x91827364 #define MYMAGIC 0x91827364
#define BUFSIZE 512 #define BUFSIZE 512
void gbser__db(int l, const char *msg, ...); void gbser__db(int l, const char* msg, ...);
int gbser__fill_buffer(void *h, unsigned want, unsigned *ms); int gbser__fill_buffer(void* h, unsigned want, unsigned* ms);
unsigned gbser__read_buffer(void *handle, void **buf, unsigned *len); unsigned gbser__read_buffer(void* handle, void** buf, unsigned* len);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 gbversion.h   gbversion.h 
/* /*
* gbversion.h is generated from gbversion.h.in which uses autoconf voodoo * gbversion.h is generated from gbversion.h.in which uses autoconf voodoo
* to get the version number from configure.in. * to get the version number from configure.in.
* *
* Isn't simplification via automation grand? * Isn't simplification via automation grand?
*/ */
#define VERSION "1.4.2" #define VERSION "1.4.4"
#define WEB_DOC_DIR "http://www.gpsbabel.org/htmldoc-1.4.2" #define WEB_DOC_DIR "http://www.gpsbabel.org/htmldoc-1.4.4"
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 gmapdlg.h   gmapdlg.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: gmapdlg.h,v 1.2 2009/11/02 20:38:02 robertl Exp $ // $Id: gmapdlg.h,v 1.2 2009-11-02 20:38:02 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 gps.h   gps.h 
#ifdef __cplusplus #ifdef __cplusplus
extern "C" // extern "C"
{ //{
#endif #endif
#ifndef gps_h #ifndef gps_h
#define gps_h #define gps_h
#include "../defs.h" #include "../defs.h"
#include "gpsport.h" #include "gpsport.h"
#include <time.h> #include <time.h>
#define FRAMING_ERROR -1 #define FRAMING_ERROR -1
skipping to change at line 37 skipping to change at line 37
#define DLE 0x10 #define DLE 0x10
#define ETX 0x03 #define ETX 0x03
extern int32 gps_errno; extern int32 gps_errno;
extern int32 gps_warning; extern int32 gps_warning;
extern int32 gps_error; extern int32 gps_error;
extern int32 gps_user; extern int32 gps_user;
extern int32 gps_show_bytes; extern int32 gps_show_bytes;
extern char gps_categories[16][17]; extern char gps_categories[16][17];
typedef struct GPS_SPacket typedef struct GPS_SPacket {
{ US type;
US type; uint32 n;
uint32 n; UC* data;
UC *data;
} GPS_OPacket, *GPS_PPacket; } GPS_OPacket, *GPS_PPacket;
typedef struct GPS_Serial_SPacket typedef struct GPS_Serial_SPacket {
{ UC dle;
UC dle; UC type;
UC type; UC n;
UC n; UC* data;
UC *data; UC chk;
UC chk; UC edle;
UC edle; UC etx;
UC etx;
} GPS_Serial_OPacket, *GPS_Serial_PPacket; } GPS_Serial_OPacket, *GPS_Serial_PPacket;
typedef struct GPS_SProduct_Data_Type typedef struct GPS_SProduct_Data_Type {
{ int16 id;
int16 id; int16 version;
int16 version; char desc[MAX_GPS_PACKET_SIZE];
char desc[MAX_GPS_PACKET_SIZE];
} GPS_OProduct_Data_Type, *GPS_PProduct_Data_Type; } GPS_OProduct_Data_Type, *GPS_PProduct_Data_Type;
typedef struct GPS_SPvt_Data_Type typedef struct GPS_SPvt_Data_Type {
{ float alt;
float alt; float epe;
float epe; float eph;
float eph; float epv;
float epv; int16 fix;
int16 fix; double tow;
double tow; double lat;
double lat; double lon;
double lon; float east;
float east; float north;
float north; float up;
float up; float msl_hght;
float msl_hght; int16 leap_scnds;
int16 leap_scnds; int32 wn_days;
int32 wn_days;
} GPS_OPvt_Data, *GPS_PPvt_Data; } GPS_OPvt_Data, *GPS_PPvt_Data;
typedef struct GPS_STrack typedef struct GPS_STrack {
{ double lat; /* Degrees */
double lat; /* Degrees */ double lon; /* Degrees */
double lon; /* Degrees */ time_t Time; /* Unix time */
time_t Time; /* Unix time */ float alt; /* Altitude */
float alt; /* Altitude */ float dpth; /* Depth */
float dpth; /* Depth */ float temperature; /* Temperature. Degrees Celsius. */
float temperature; /* Temperature. Degrees Celsius. */ int temperature_populated; /* True if above is valid. */
int temperature_populated; /* True if above is valid. */ unsigned char heartrate; /* Heartrate as in Garmin 301 */
unsigned char heartrate; /* Heartrate as in Garmin 301 */ unsigned char cadence; /* Crank cadence as in Edge 305 */
unsigned char cadence; /* Crank cadence as in Edge 305 */ unsigned int wsensor_pres:1; /* Wheel sensor present */
unsigned int wsensor_pres:1; /* Wheel sensor present */ unsigned int tnew:1; /* New track? */
unsigned int tnew:1; /* New track? */ unsigned int ishdr:1; /* Track header? */
unsigned int ishdr:1; /* Track header? */ unsigned int no_latlon:1; /* True if no valid lat/lon found. */
unsigned int no_latlon:1; /* True if no valid lat/lon found. * int32 dspl; /* Display on map? */
/ int32 colour; /* Colour */
int32 dspl; /* Display on map? */ float distance; /* distance traveled in meters.*/
int32 colour; /* Colour */ int distance_populated; /* True if above is valid. */
float distance; /* distance traveled in meters.*/ char trk_ident[256]; /* Track identifier */
int distance_populated; /* True if above is valid. */
char trk_ident[256]; /* Track identifier */
} }
GPS_OTrack, *GPS_PTrack; GPS_OTrack, *GPS_PTrack;
typedef struct GPS_SAlmanac typedef struct GPS_SAlmanac {
{ UC svid;
UC svid; int16 wn;
int16 wn; float toa;
float toa; float af0;
float af0; float af1;
float af1; float e;
float e; float sqrta;
float sqrta; float m0;
float m0; float w;
float w; float omg0;
float omg0; float odot;
float odot; float i;
float i; UC hlth;
UC hlth;
} GPS_OAlmanac, *GPS_PAlmanac; } GPS_OAlmanac, *GPS_PAlmanac;
typedef struct GPS_SWay typedef struct GPS_SWay {
{ char ident[256];
char ident[256]; double lat;
double lat; double lon;
double lon; char cmnt[256];
char cmnt[256]; float dst;
float dst; int32 smbl;
int32 smbl; int32 dspl;
int32 dspl; char wpt_ident[256];
char wpt_ident[256]; char lnk_ident[256];
char lnk_ident[256]; UC subclass[18];
UC subclass[18]; int32 colour;
int32 colour; char cc[2];
char cc[2]; UC wpt_class;
UC wpt_class; UC alt_is_unknown;
UC alt_is_unknown; float alt;
float alt; char city[24];
char city[24]; char state[2];
char state[2]; char name[30];
char name[30]; char facility[32];
char facility[32]; char addr[52];
char addr[52]; char cross_road[52];
char cross_road[52]; int32 attr;
int32 attr; float dpth;
float dpth; int32 idx;
int32 idx; int32 prot;
int32 prot; int32 isrte;
int32 isrte; int32 rte_prot;
int32 rte_prot; UC rte_num;
UC rte_num; char rte_cmnt[20];
char rte_cmnt[20]; char rte_ident[256];
char rte_ident[256]; int32 islink;
int32 islink; int32 rte_link_class;
int32 rte_link_class; char rte_link_subclass[18];
char rte_link_subclass[18]; char rte_link_ident[256];
char rte_link_ident[256];
char time_populated; /* 1 if true */
char time_populated; /* 1 if true */ time_t time; /* Unix time */
time_t time; /* Unix time */ char temperature_populated;
char temperature_populated; float temperature; /* Degrees celsius. */
float temperature; /* Degrees celsius. */ uint16 category;
uint16 category;
} GPS_OWay, *GPS_PWay; } GPS_OWay, *GPS_PWay;
/* /*
* Forerunner/Edge Lap data. * Forerunner/Edge Lap data.
*/ */
typedef struct GPS_SLap { typedef struct GPS_SLap {
uint32 index; /* unique index in device or -1 */ uint32 index; /* unique index in device or -1 */
time_t start_time; time_t start_time;
uint32 total_time; /* Hundredths of a second */ uint32 total_time; /* Hundredths of a second */
float total_distance; /* In meters */ float total_distance; /* In meters */
double begin_lat; double begin_lat;
double begin_lon; double begin_lon;
double end_lat; double end_lat;
double end_lon; double end_lon;
int16 calories; int16 calories;
uint32 track_index; /* ref to track or -1 */ uint32 track_index; /* ref to track or -1 */
float max_speed; /* In meters per second */ float max_speed; /* In meters per second */
unsigned char avg_heart_rate; /* In beats-per-minute, 0 if invalid * unsigned char avg_heart_rate; /* In beats-per-minute, 0 if invalid */
/ unsigned char max_heart_rate; /* In beats-per-minute, 0 if invalid */
unsigned char max_heart_rate; /* In beats-per-minute, 0 if invalid * unsigned char intensity; /* Same as D1001 */
/ unsigned char avg_cadence; /* In revolutions-per-minute, 0xFF if invalid
unsigned char intensity; /* Same as D1001 */ */
unsigned char avg_cadence; /* In revolutions-per-minute, 0xFF if inv unsigned char trigger_method;
alid */ /*Some D1015 unknown */
unsigned char trigger_method; /* unsigned char unk1015_1;
/*Some D1015 unknown */ int16 unk1015_2;
/* unsigned char unk1015_1; int16 unk1015_3;
int16 unk1015_2; */
int16 unk1015_3;
*/
} GPS_OLap, *GPS_PLap; } GPS_OLap, *GPS_PLap;
typedef struct GPS_SCourse typedef struct GPS_SCourse {
{ uint32 index; /* Unique among courses on device */
uint32 index; /* Unique among courses on device * char course_name[16]; /* Null-terminated unique course name
/ */
char course_name[16]; /* Null-terminated unique course na uint32 track_index; /* Index of the associated track
me */
uint32 track_index; /* Index of the associated track
* Must be 0xFFFFFFFF if there is n one*/ * Must be 0xFFFFFFFF if there is n one*/
} GPS_OCourse, *GPS_PCourse; } GPS_OCourse, *GPS_PCourse;
typedef struct GPS_SCourse_Lap typedef struct GPS_SCourse_Lap {
{ uint32 course_index; /* Index of associated course */
uint32 course_index; /* Index of associated course */ uint32 lap_index; /* This lap's index in the course */
uint32 lap_index; /* This lap's index in the course * uint32 total_time; /* In hundredths of a second */
/ float total_dist; /* [m] */
uint32 total_time; /* In hundredths of a second */ double begin_lat; /* Starting position of the lap */
float total_dist; /* [m] */ double begin_lon; /* Invalid if lat,lon are 0x7FFFFFFF.
double begin_lat; /* Starting position of the lap */ */
double begin_lon; /* Invalid if lat,lon are 0x7FFFFFF double end_lat; /* Final position of the lap */
F.*/ double end_lon; /* Invalid if lat,lon are 0x7FFFFFFF.
double end_lat; /* Final position of the lap */ */
double end_lon; /* Invalid if lat,lon are 0x7FFFFFF UC avg_heart_rate; /* In beats-per-minute, >0 */
F.*/ UC max_heart_rate; /* In beats-per-minute, >0 */
UC avg_heart_rate; /* In beats-per-minute, >0 */ UC intensity; /* 0=standard, active lap.
UC max_heart_rate; /* In beats-per-minute, >0 */
UC intensity; /* 0=standard, active lap.
1=rest lap in a workout */ 1=rest lap in a workout */
UC avg_cadence; /* In revolutions-per-minute */ UC avg_cadence; /* In revolutions-per-minute */
} GPS_OCourse_Lap, *GPS_PCourse_Lap; } GPS_OCourse_Lap, *GPS_PCourse_Lap;
typedef struct GPS_SCourse_Point typedef struct GPS_SCourse_Point {
{ char name[11]; /* Null-terminated name */
char name[11]; /* Null-terminated name */ uint32 course_index; /* Index of associated course */
uint32 course_index; /* Index of associated course */ time_t track_point_time; /* Time */
time_t track_point_time; /* Time */ UC point_type; /* generic = 0,
UC point_type; /* generic = 0,
* summit = 1, * summit = 1,
* valley = 2, * valley = 2,
* water = 3, * water = 3,
* food = 4, * food = 4,
* danger = 5, * danger = 5,
* left = 6, * left = 6,
* right = 7, * right = 7,
* straight = 8, * straight = 8,
* first_aid = 9, * first_aid = 9,
* fourth_category = 10, * fourth_category = 10,
* third_category = 11, * third_category = 11,
* second_category = 12, * second_category = 12,
* first_category = 13, * first_category = 13,
* hors_category = 14, * hors_category = 14,
* sprint = 15 */ * sprint = 15 */
} GPS_OCourse_Point, *GPS_PCourse_Point; } GPS_OCourse_Point, *GPS_PCourse_Point;
typedef struct GPS_SCourse_Limits typedef struct GPS_SCourse_Limits {
{ uint32 max_courses;
uint32 max_courses; uint32 max_course_laps;
uint32 max_course_laps; uint32 max_course_pnt;
uint32 max_course_pnt; uint32 max_course_trk_pnt;
uint32 max_course_trk_pnt;
} GPS_OCourse_Limits, *GPS_PCourse_Limits; } GPS_OCourse_Limits, *GPS_PCourse_Limits;
typedef int (*pcb_fn) (int, struct GPS_SWay **); typedef int (*pcb_fn)(int, struct GPS_SWay**);
#include "gpsdevice.h" #include "gpsdevice.h"
#include "gpssend.h" #include "gpssend.h"
#include "gpsread.h" #include "gpsread.h"
#include "gpsutil.h" #include "gpsutil.h"
#include "gpsapp.h" #include "gpsapp.h"
#include "gpsprot.h" #include "gpsprot.h"
#include "gpscom.h" #include "gpscom.h"
#include "gpsfmt.h" #include "gpsfmt.h"
#include "gpsmath.h" #include "gpsmath.h"
#include "gpsmem.h" #include "gpsmem.h"
#include "gpsrqst.h" #include "gpsrqst.h"
#include "gpsinput.h" #include "gpsinput.h"
#include "gpsproj.h" #include "gpsproj.h"
time_t gps_save_time; extern time_t gps_save_time;
double gps_save_lat; extern double gps_save_lat;
double gps_save_lon; extern double gps_save_lon;
extern int32 gps_save_id; extern int32 gps_save_id;
extern double gps_save_version; extern double gps_save_version;
extern char gps_save_string[GPS_ARB_LEN]; extern char gps_save_string[GPS_ARB_LEN];
extern int gps_is_usb; extern int gps_is_usb;
extern struct COMMANDDATA COMMAND_ID[2]; extern struct COMMANDDATA COMMAND_ID[2];
extern struct LINKDATA LINK_ID[3]; extern struct LINKDATA LINK_ID[3];
extern struct GPS_MODEL_PROTOCOL GPS_MP[]; extern struct GPS_MODEL_PROTOCOL GPS_MP[];
extern char *gps_marine_sym[]; extern char* gps_marine_sym[];
extern char *gps_land_sym[]; extern char* gps_land_sym[];
extern char *gps_aviation_sym[]; extern char* gps_aviation_sym[];
extern char *gps_16_sym[]; extern char* gps_16_sym[];
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} // }
#endif #endif
 End of changes. 18 change blocks. 
184 lines changed or deleted 168 lines changed or added


 gpsapp.h   gpsapp.h 
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef gpsapp_h #ifndef gpsapp_h
#define gpsapp_h #define gpsapp_h
#include "gps.h" #include "gps.h"
int32 GPS_Init(const char *port); int32 GPS_Init(const char* port);
int32 GPS_A100_Get(const char *port, GPS_PWay **way, int (*cb)(int ct, GPS int32 GPS_A100_Get(const char* port, GPS_PWay** way, int (*cb)(int ct, G
_PWay *)); PS_PWay*));
int32 GPS_A101_Get(const char *port); int32 GPS_A101_Get(const char* port);
int32 GPS_A100_Send(const char *port, GPS_PWay *way, int32 n, int (*cb)(GP int32 GPS_A100_Send(const char* port, GPS_PWay* way, int32 n, int (*cb)(
S_PWay *)); GPS_PWay*));
int32 GPS_A200_Get(const char *port, GPS_PWay **way); int32 GPS_A200_Get(const char* port, GPS_PWay** way);
int32 GPS_A201_Get(const char *port, GPS_PWay **way); int32 GPS_A201_Get(const char* port, GPS_PWay** way);
int32 GPS_A200_Send(const char *port, GPS_PWay *way, int32 n); int32 GPS_A200_Send(const char* port, GPS_PWay* way, int32 n);
int32 GPS_A201_Send(const char *port, GPS_PWay *way, int32 n); int32 GPS_A201_Send(const char* port, GPS_PWay* way, int32 n);
int32 GPS_A300_Get(const char *port, GPS_PTrack **trk, pcb_fn cb); int32 GPS_A300_Get(const char* port, GPS_PTrack** trk, pcb_fn cb);
int32 GPS_A301_Get(const char *port, GPS_PTrack **trk, pcb_fn cb, int prot int32 GPS_A301_Get(const char* port, GPS_PTrack** trk, pcb_fn cb, int pr
oid); otoid);
int32 GPS_A300_Send(const char *port, GPS_PTrack *trk, int32 n); int32 GPS_A300_Send(const char* port, GPS_PTrack* trk, int32 n);
int32 GPS_A301_Send(const char *port, GPS_PTrack *trk, int32 n, int protoi int32 GPS_A301_Send(const char* port, GPS_PTrack* trk, int32 n, int prot
d, oid,
gpsdevh *fd); gpsdevh* fd);
int32 GPS_D300_Get(GPS_PTrack *trk, int32 entries, gpsdevh *h); int32 GPS_D300_Get(GPS_PTrack* trk, int32 entries, gpsdevh* h);
void GPS_D300b_Get(GPS_PTrack *trk, UC *data); void GPS_D300b_Get(GPS_PTrack* trk, UC* data);
void GPS_D301b_Get(GPS_PTrack *trk, UC *data); void GPS_D301b_Get(GPS_PTrack* trk, UC* data);
void GPS_D302b_Get(GPS_PTrack *trk, UC *data); void GPS_D302b_Get(GPS_PTrack* trk, UC* data);
void GPS_D303b_Get(GPS_PTrack *trk, UC *data); /*D304*/ void GPS_D303b_Get(GPS_PTrack* trk, UC* data); /*D304*/
void GPS_D310_Get(GPS_PTrack *trk, UC *s); void GPS_D310_Get(GPS_PTrack* trk, UC* s);
void GPS_D311_Get(GPS_PTrack *trk, UC *s); void GPS_D311_Get(GPS_PTrack* trk, UC* s);
void GPS_D300_Send(UC *data, GPS_PTrack trk, int32 *len); void GPS_D300_Send(UC* data, GPS_PTrack trk, int32* len);
void GPS_D301_Send(UC *data, GPS_PTrack trk, int32 *len, int type); void GPS_D301_Send(UC* data, GPS_PTrack trk, int32* len, int type);
void GPS_D303_Send(UC *data, GPS_PTrack trk, int32 *len, int protoid); void GPS_D303_Send(UC* data, GPS_PTrack trk, int32* len, int protoid);
void GPS_D310_Send(UC *data, GPS_PTrack trk, int32 *len); void GPS_D310_Send(UC* data, GPS_PTrack trk, int32* len);
void GPS_D311_Send(UC *data, GPS_PTrack trk, int32 *len); void GPS_D311_Send(UC* data, GPS_PTrack trk, int32* len);
int32 GPS_A400_Get(const char *port, GPS_PWay **way); int32 GPS_A400_Get(const char* port, GPS_PWay** way);
int32 GPS_A400_Send(const char *port, GPS_PWay *way, int32 n); int32 GPS_A400_Send(const char* port, GPS_PWay* way, int32 n);
int32 GPS_A500_Get(const char *port, GPS_PAlmanac **alm); int32 GPS_A500_Get(const char* port, GPS_PAlmanac** alm);
int32 GPS_A500_Send(const char *port, GPS_PAlmanac *alm, int32 n); int32 GPS_A500_Send(const char* port, GPS_PAlmanac* alm, int32 n);
time_t GPS_A600_Get(const char *port); time_t GPS_A600_Get(const char* port);
time_t GPS_D600_Get(GPS_PPacket packet); time_t GPS_D600_Get(GPS_PPacket packet);
int32 GPS_A600_Send(const char *port, time_t Time); int32 GPS_A600_Send(const char* port, time_t Time);
void GPS_D600_Send(GPS_PPacket *packet, time_t Time); void GPS_D600_Send(GPS_PPacket* packet, time_t Time);
int32 GPS_A700_Get(const char *port, double *lat, double *lon); int32 GPS_A700_Get(const char* port, double* lat, double* lon);
int32 GPS_A700_Send(const char *port, double lat, double lon); int32 GPS_A700_Send(const char* port, double lat, double lon);
void GPS_D700_Get(GPS_PPacket packet, double *lat, double *lon); void GPS_D700_Get(GPS_PPacket packet, double* lat, double* lon);
void GPS_D700_Send(GPS_PPacket *packet, double lat, double lon); void GPS_D700_Send(GPS_PPacket* packet, double lat, double lon);
int32 GPS_A800_On(const char *port, gpsdevh **fd); int32 GPS_A800_On(const char* port, gpsdevh** fd);
int32 GPS_A800_Off(const char *port, gpsdevh **fd); int32 GPS_A800_Off(const char* port, gpsdevh** fd);
int32 GPS_A800_Get(gpsdevh **fd, GPS_PPvt_Data *packet); int32 GPS_A800_Get(gpsdevh** fd, GPS_PPvt_Data* packet);
void GPS_D800_Get(GPS_PPacket packet, GPS_PPvt_Data *pvt); void GPS_D800_Get(GPS_PPacket packet, GPS_PPvt_Data* pvt);
int32 GPS_A906_Get(const char *port, GPS_PLap **lap, pcb_fn cb); int32 GPS_A906_Get(const char* port, GPS_PLap** lap, pcb_fn cb);
void GPS_D1011b_Get(GPS_PLap *Lap,UC *data); /*D906 D1001 D1015*/ void GPS_D1011b_Get(GPS_PLap* Lap,UC* data); /*D906 D1001 D1015*/
int32 GPS_A1006_Get(const char *port, GPS_PCourse **crs, pcb_fn cb); int32 GPS_A1006_Get(const char* port, GPS_PCourse** crs, pcb_fn cb);
int32 GPS_A1006_Send(const char *port, GPS_PCourse *crs, int32 n_crs, int32 GPS_A1006_Send(const char* port, GPS_PCourse* crs, int32 n_crs,
gpsdevh *fd); gpsdevh* fd);
void GPS_D1006_Get(GPS_PCourse *crs, UC *p); void GPS_D1006_Get(GPS_PCourse* crs, UC* p);
void GPS_D1006_Send(UC *data, GPS_PCourse crs, int32 *len); void GPS_D1006_Send(UC* data, GPS_PCourse crs, int32* len);
int32 GPS_A1007_Get(const char *port, GPS_PCourse_Lap **clp, pcb_fn cb); int32 GPS_A1007_Get(const char* port, GPS_PCourse_Lap** clp, pcb_fn cb);
int32 GPS_A1007_Send(const char *port, GPS_PCourse_Lap *clp, int32 n_clp, int32 GPS_A1007_Send(const char* port, GPS_PCourse_Lap* clp, int32 n_clp
gpsdevh *fd); ,
void GPS_D1007_Get(GPS_PCourse_Lap *clp, UC *p); gpsdevh* fd);
void GPS_D1007_Send(UC *data, GPS_PCourse_Lap clp, int32 *len); void GPS_D1007_Get(GPS_PCourse_Lap* clp, UC* p);
void GPS_D1007_Send(UC* data, GPS_PCourse_Lap clp, int32* len);
int32 GPS_A1008_Get(const char *port, GPS_PCourse_Point **cpt, pcb_fn cb);
int32 GPS_A1008_Send(const char *port, GPS_PCourse_Point *cpt, int32 n_cpt int32 GPS_A1008_Get(const char* port, GPS_PCourse_Point** cpt, pcb_fn cb
, );
gpsdevh *fd); int32 GPS_A1008_Send(const char* port, GPS_PCourse_Point* cpt, int32 n_c
void GPS_D1012_Get(GPS_PCourse_Point *cpt, UC *p); pt,
void GPS_D1012_Send(UC *data, GPS_PCourse_Point cpt, int32 *len); gpsdevh* fd);
void GPS_D1012_Get(GPS_PCourse_Point* cpt, UC* p);
int32 GPS_A1009_Get(const char *port, GPS_PCourse_Limits limits); void GPS_D1012_Send(UC* data, GPS_PCourse_Point cpt, int32* len);
void GPS_D1013_Get(GPS_PCourse_Limits limits, UC *p);
int32 GPS_A1009_Get(const char* port, GPS_PCourse_Limits limits);
/* Unhandled documented protocols, as of: void GPS_D1013_Get(GPS_PCourse_Limits limits, UC* p);
Garmin Device Interface Specification, May 19, 2006, Drawing Number: 001-
00063-00 Rev. C /* Unhandled documented protocols, as of:
A650 FlightBook Transfer Protocol Garmin Device Interface Specification, May 19, 2006, Drawing Number: 00
A1000 Run Transfer Protocol 1-00063-00 Rev. C
Capability A1000: D1009 A650 FlightBook Transfer Protocol
D1000 D1010 A1000 Run Transfer Protocol
A1002 Workout Transfer Protocol Capability A1000: D1009
Capability A1002: D1008 D1000 D1010
D1002 A1002 Workout Transfer Protocol
Capability A1003: D1003 Capability A1002: D1008
A1004 Fitness User Profile Transfer Protocol D1002
Capability A1004: D1004 Capability A1003: D1003
A1005 Workout Limits Transfer Protocol A1004 Fitness User Profile Transfer Protocol
Capability A1005: D1005 Capability A1004: D1004
*/ A1005 Workout Limits Transfer Protocol
/* Unimplemted and Undocumented, as listed from the following device/sw: Capability A1005: D1005
GF305 3.70 */
/* Unimplemted and Undocumented, as listed from the following device/sw:
Capability A601: D601 GF305 3.70
Capability A801: D801
Capability A601: D601
Capability A902: Capability A801: D801
Capability A903:
Capability A907: D907 D908 D909 D910 Capability A902:
Capability A918: D918 Capability A903:
Capability A1013: D1014 Capability A907: D907 D908 D909 D910
*/ Capability A918: D918
Capability A1013: D1014
*/
const char * Get_Pkt_Type(US p, US d0, const char **xinfo); const char* Get_Pkt_Type(US p, US d0, const char** xinfo);
void GPS_Prepare_Track_For_Device(GPS_PTrack **trk, int32 *n); void GPS_Prepare_Track_For_Device(GPS_PTrack** trk, int32* n);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 4 change blocks. 
109 lines changed or deleted 111 lines changed or added


 gpscom.h   gpscom.h 
skipping to change at line 12 skipping to change at line 12
extern "C" extern "C"
{ {
#endif #endif
#ifndef gpscom_h #ifndef gpscom_h
#define gpscom_h #define gpscom_h
#include "gps.h" #include "gps.h"
#include <time.h> #include <time.h>
int32 GPS_Command_Off(const char *port); int32 GPS_Command_Off(const char* port);
time_t GPS_Command_Get_Time(const char *port); time_t GPS_Command_Get_Time(const char* port);
int32 GPS_Command_Send_Time(const char *port, time_t Time); int32 GPS_Command_Send_Time(const char* port, time_t Time);
int32 GPS_Command_Get_Position(const char *port, double *lat, double *lon) int32 GPS_Command_Get_Position(const char* port, double* lat, double* lo
; n);
int32 GPS_Command_Send_Position(const char *port, double lat, double lon); int32 GPS_Command_Send_Position(const char* port, double lat, double lon
);
int32 GPS_Command_Pvt_On(const char *port, gpsdevh **fd); int32 GPS_Command_Pvt_On(const char* port, gpsdevh** fd);
int32 GPS_Command_Pvt_Off(const char *port, gpsdevh **fd); int32 GPS_Command_Pvt_Off(const char* port, gpsdevh** fd);
int32 GPS_Command_Pvt_Get(gpsdevh **fd, GPS_PPvt_Data *pvt); int32 GPS_Command_Pvt_Get(gpsdevh** fd, GPS_PPvt_Data* pvt);
int32 GPS_Command_Get_Almanac(const char *port, GPS_PAlmanac **alm); int32 GPS_Command_Get_Almanac(const char* port, GPS_PAlmanac** alm);
int32 GPS_Command_Send_Almanac(const char *port, GPS_PAlmanac *alm, int32 int32 GPS_Command_Send_Almanac(const char* port, GPS_PAlmanac* alm, int3
n); 2 n);
int32 GPS_Command_Get_Track(const char *port, GPS_PTrack **trk, int (*cb)( int32 GPS_Command_Get_Track(const char* port, GPS_PTrack** trk, int (*cb
int, struct GPS_SWay **)); )(int, struct GPS_SWay**));
int32 GPS_Command_Send_Track(const char *port, GPS_PTrack *trk, int32 n, i int32 GPS_Command_Send_Track(const char* port, GPS_PTrack* trk, int32 n,
nt eraset); int eraset);
int32 GPS_Command_Get_Waypoint(const char *port, GPS_PWay **way,int (*cb)( int32 GPS_Command_Get_Waypoint(const char* port, GPS_PWay** way,int (*cb
int, struct GPS_SWay **)); )(int, struct GPS_SWay**));
int32 GPS_Command_Send_Waypoint(const char *port, GPS_PWay *way, int32 n, int32 GPS_Command_Send_Waypoint(const char* port, GPS_PWay* way, int32 n
int (*cb)(struct GPS_SWay **)); , int (*cb)(struct GPS_SWay**));
int32 GPS_Command_Get_Proximity(const char *port, GPS_PWay **way); int32 GPS_Command_Get_Proximity(const char* port, GPS_PWay** way);
int32 GPS_Command_Send_Proximity(const char *port, GPS_PWay *way, int32 n) int32 GPS_Command_Send_Proximity(const char* port, GPS_PWay* way, int32
; n);
int32 GPS_Command_Get_Route(const char *port, GPS_PWay **way); int32 GPS_Command_Get_Route(const char* port, GPS_PWay** way);
int32 GPS_Command_Send_Route(const char *port, GPS_PWay *way, int32 n); int32 GPS_Command_Send_Route(const char* port, GPS_PWay* way, int32 n);
int32 GPS_Command_Get_Lap(const char *port, GPS_PLap **lap, int (*cb)(int, struct GPS_SWay **)); int32 GPS_Command_Get_Lap(const char* port, GPS_PLap** lap, int (*cb)(in t, struct GPS_SWay**));
int32 GPS_Command_Send_Course(const char *port, GPS_PCourse *crs, GPS_PCou int32 GPS_Command_Send_Course(const char* port, GPS_PCourse* crs, GPS_PC
rse_Lap *clp, ourse_Lap* clp,
GPS_PTrack *trk, GPS_PCourse_Point *cpt, GPS_PTrack* trk, GPS_PCourse_Point* cpt,
int32 n_crs, int32 n_clp, int32 n_trk, int32 int32 n_crs, int32 n_clp, int32 n_trk, int
n_cpt); 32 n_cpt);
int32 GPS_Command_Send_Track_As_Course(const char *port, GPS_PTrack *trk, int32 GPS_Command_Send_Track_As_Course(const char* port, GPS_PTrack* trk
int32 n_trk, , int32 n_trk,
GPS_PWay *wpt, int32 n_wpt, int era GPS_PWay* wpt, int32 n_wpt, int e
set); raset);
int32 GPS_Command_Get_Workout(const char *port, void **lap, int (*cb)(int, int32 GPS_Command_Get_Workout(const char* port, void** lap, int (*cb)(in
struct GPS_SWay **)); t, struct GPS_SWay**));
int32 GPS_Command_Get_Fitness_User_Profile(const char *port, void **lap, i int32 GPS_Command_Get_Fitness_User_Profile(const char* port, void** lap,
nt (*cb)(int, struct GPS_SWay **)); int (*cb)(int, struct GPS_SWay**));
int32 GPS_Command_Get_Workout_Limits(const char *port, void **lap, int (*c int32 GPS_Command_Get_Workout_Limits(const char* port, void** lap, int (
b)(int, struct GPS_SWay **)); *cb)(int, struct GPS_SWay**));
int32 GPS_Command_Get_Course_Limits(const char *port, void **lap, int (*cb int32 GPS_Command_Get_Course_Limits(const char* port, void** lap, int (*
)(int, struct GPS_SWay **)); cb)(int, struct GPS_SWay**));
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 12 change blocks. 
43 lines changed or deleted 44 lines changed or added


 gpsdatum.h   gpsdatum.h 
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef gpsdatum_h #ifndef gpsdatum_h
#define gpsdatum_h #define gpsdatum_h
typedef struct GPS_SEllipse typedef struct GPS_SEllipse {
{ char* name;
char *name;
double a; double a;
double invf; double invf;
} GPS_OEllipse, *GPS_PEllipse; } GPS_OEllipse, *GPS_PEllipse;
GPS_OEllipse GPS_Ellipse[]= GPS_OEllipse GPS_Ellipse[]= {
{
{ "Airy 1830", 6377563.396, 299.3249646 }, { "Airy 1830", 6377563.396, 299.3249646 },
{ "Airy 1830 Modified", 6377340.189, 299.3249646 }, { "Airy 1830 Modified", 6377340.189, 299.3249646 },
{ "Australian National", 6378160.000, 298.25 }, { "Australian National", 6378160.000, 298.25 },
{ "Bessel 1841 (Namibia)", 6377483.865, 299.1528128 }, { "Bessel 1841 (Namibia)", 6377483.865, 299.1528128 },
{ "Bessel 1841", 6377397.155, 299.1528128 }, { "Bessel 1841", 6377397.155, 299.1528128 },
{ "Clarke 1866", 6378206.400, 294.9786982 }, { "Clarke 1866", 6378206.400, 294.9786982 },
{ "Clarke 1880", 6378249.145, 293.465 }, { "Clarke 1880", 6378249.145, 293.465 },
{ "Everest (India 1830)", 6377276.345, 300.8017 }, { "Everest (India 1830)", 6377276.345, 300.8017 },
{ "Everest (Sabah Sarawak)", 6377298.556, 300.8017 }, { "Everest (Sabah Sarawak)", 6377298.556, 300.8017 },
{ "Everest (India 1956)", 6377301.243, 300.8017 }, { "Everest (India 1956)", 6377301.243, 300.8017 },
skipping to change at line 46 skipping to change at line 44
{ "Krassovsky 1940", 6378245.000, 298.3 }, { "Krassovsky 1940", 6378245.000, 298.3 },
{ "GRS67", 6378160.000, 6356774.516 }, { "GRS67", 6378160.000, 6356774.516 },
{ "GRS75", 6378140.000, 6356755.288 }, { "GRS75", 6378140.000, 6356755.288 },
{ "GRS80", 6378137.000, 298.257222101 }, { "GRS80", 6378137.000, 298.257222101 },
{ "S. American 1969", 6378160.000, 298.25 }, { "S. American 1969", 6378160.000, 298.25 },
{ "WGS60", 6378165.000, 298.3 }, { "WGS60", 6378165.000, 298.3 },
{ "WGS66", 6378145.000, 298.25 }, { "WGS66", 6378145.000, 298.25 },
{ "WGS72", 6378135.000, 298.26 }, { "WGS72", 6378135.000, 298.26 },
{ "WGS84", 6378137.000, 298.257223563 }, { "WGS84", 6378137.000, 298.257223563 },
{ "Clarke 1880 (Benoit)", 6378300.789, 293.466 }, { "Clarke 1880 (Benoit)", 6378300.789, 293.466 },
}; };
typedef struct GPS_SDatum typedef struct GPS_SDatum {
{ char* name;
char *name;
int ellipse; int ellipse;
double dx; double dx;
double dy; double dy;
double dz; double dz;
} GPS_ODatum, *GPS_PDatum; } GPS_ODatum, *GPS_PDatum;
GPS_ODatum GPS_Datum[]= GPS_ODatum GPS_Datum[]= {
{ /* 000 */ { "Adindan", 6, -166, -15, 204
/* 000 */ { "Adindan", 6, -166, -15, 204 }, },
/* 001 */ { "AFG", 18, -43, -163, 45 }, /* 001 */ { "AFG", 18, -43, -163, 45 },
/* 002 */ { "Ain-El-Abd", 17, -150, -251, -2 }, /* 002 */ { "Ain-El-Abd", 17, -150, -251, -2
/* 003 */ { "Alaska-NAD27", 5, -5, 135, 172 }, },
/* 004 */ { "Alaska-Canada", 6, -9, 151, 185 }, /* 003 */ { "Alaska-NAD27", 5, -5, 135, 172 },
/* 005 */ { "Anna-1-Astro", 2, -491, -22, 435 }, /* 004 */ { "Alaska-Canada", 6, -9, 151, 185 },
/* 006 */ { "ARC 1950 Mean", 6, -143, -90, -294 }, /* 005 */ { "Anna-1-Astro", 2, -491, -22, 435 },
/* 007 */ { "ARC 1960 Mean", 6, -160, -8, -300 }, /* 006 */ { "ARC 1950 Mean", 6, -143, -90, -294 },
/* 008 */ { "Asc Island 58", 17, -207, 107, 52 }, /* 007 */ { "ARC 1960 Mean", 6, -160, -8, -300 },
/* 009 */ { "Astro B4", 17, 114, -116, -333 }, /* 008 */ { "Asc Island 58", 17, -207, 107, 52 },
/* 010 */ { "Astro Beacon E", 17, 145, 75, -272 }, /* 009 */ { "Astro B4", 17, 114, -116, -333 },
/* 011 */ { "Astro pos 71/4", 17, -320, 550, -494 }, /* 010 */ { "Astro Beacon E", 17, 145, 75, -272 },
/* 012 */ { "Astro stn 52", 17, 124, -234, -25 }, /* 011 */ { "Astro pos 71/4", 17, -320, 550, -494 },
/* 013 */ { "Australia Geo 1984", 2, -134, -48, 149 }, /* 012 */ { "Astro stn 52", 17, 124, -234, -25 },
/* 014 */ { "Bahamas NAD27", 6, -4, 154, 178 }, /* 013 */ { "Australia Geo 1984", 2, -134, -48, 149
/* 015 */ { "Bellevue IGN", 17, -127, -769, 472 }, },
/* 016 */ { "Bermuda 1957", 6, -73, 213, 296 }, /* 014 */ { "Bahamas NAD27", 6, -4, 154, 178 },
/* 017 */ { "Bukit Rimpah", 4, -384, 664, -48 /* 015 */ { "Bellevue IGN", 17, -127, -769, 472 },
}, /* 016 */ { "Bermuda 1957", 6, -73, 213, 296 },
/* 018 */ { "Camp_Area_Astro", 17, -104, -129, 239 }, /* 017 */ { "Bukit Rimpah", 4, -384, 664, -48
/* 019 */ { "Campo_Inchauspe", 17, -148, 136, 90 }, },
/* 020 */ { "Canada_Mean(NAD27)", 5, -10, 158, 187 }, /* 018 */ { "Camp_Area_Astro", 17, -104, -129, 239 },
/* 021 */ { "Canal_Zone_(NAD27)", 5, 0, 125, 201 }, /* 019 */ { "Campo_Inchauspe", 17, -148, 136, 90 },
/* 022 */ { "Canton_Island_1966", 17, 298, -304, -375 }, /* 020 */ { "Canada_Mean(NAD27)", 5, -10, 158, 187
/* 023 */ { "Cape", 6, -136, -108, -292 }, },
/* 024 */ { "Cape_Canaveral_mean", 5, -2, 150, 181 }, /* 021 */ { "Canal_Zone_(NAD27)", 5, 0, 125, 201
/* 025 */ { "Carribean NAD27", 5, -7, 152, 178 }, },
/* 026 */ { "Carthage", 6, -263, 6, 431 }, /* 022 */ { "Canton_Island_1966", 17, 298, -304, -375
/* 027 */ { "Cent America NAD27", 5 , 0, 125, 194 }, },
/* 028 */ { "Chatham 1971", 17, 175, -38, 113 }, /* 023 */ { "Cape", 6, -136, -108, -292 },
/* 029 */ { "Chua Astro", 17, -134, 229, -29 }, /* 024 */ { "Cape_Canaveral_mean", 5, -2, 150, 181
/* 030 */ { "Corrego Alegre", 17, -206, 172, -6 }, },
/* 031 */ { "Cuba NAD27", 5, -9, 152, 178 }, /* 025 */ { "Carribean NAD27", 5, -7, 152, 178 },
/* 032 */ { "Cyprus", 17, -104, -101, -140 }, /* 026 */ { "Carthage", 6, -263, 6, 431 },
/* 033 */ { "Djakarta(Batavia)", 4, -377, 681, -50 }, /* 027 */ { "Cent America NAD27", 5 , 0, 125, 194
/* 034 */ { "DOS 1968", 17, 230, -199, -752 }, },
/* 035 */ { "Easter lsland 1967", 17, 211, 147, 111 }, /* 028 */ { "Chatham 1971", 17, 175, -38, 113 },
/* 036 */ { "Egypt", 17, -130, -117, -151 }, /* 029 */ { "Chua Astro", 17, -134, 229, -29 },
/* 037 */ { "European 1950", 17, -87, -96, -120 }, /* 030 */ { "Corrego Alegre", 17, -206, 172, -6 },
/* 038 */ { "European 1950 mean", 17, -87, -98, -121 }, /* 031 */ { "Cuba NAD27", 5, -9, 152, 178
/* 039 */ { "European 1979 mean", 17, -86, -98, -119 }, },
/* 040 */ { "Finnish Nautical", 17, -78, -231, -97 }, /* 032 */ { "Cyprus", 17, -104, -101, -140 },
/* 041 */ { "Gandajika Base", 17, -133, -321, 50 }, /* 033 */ { "Djakarta(Batavia)", 4, -377, 681, -50
/* 042 */ { "Geodetic Datum 49", 17, 84, -22, 209 }, },
/* 043 */ { "Ghana", 26, 0, 0, 0 }, /* 034 */ { "DOS 1968", 17, 230, -199, -752
/* 044 */ { "Greenland NAD27", 5, 11, 114, 195 }, },
/* 045 */ { "Guam 1963", 5, -100, -248, 259 }, /* 035 */ { "Easter lsland 1967", 17, 211, 147, 111
/* 046 */ { "Gunung Segara", 4, -403, 684, 41 }, },
/* 047 */ { "Gunung Serindung 1962", 26, 0, 0, 0 /* 036 */ { "Egypt", 17, -130, -117, -151
}, },
/* 048 */ { "GUX1 Astro", 17, 252, -209, -751 }, /* 037 */ { "European 1950", 17, -87, -96, -120
/* 049 */ { "Herat North", 17, -333, -222, 114 }, },
/* 050 */ { "Hjorsey 1955", 17, -73, 46, 86 }, /* 038 */ { "European 1950 mean", 17, -87, -98, -121
/* 051 */ { "Hong Kong 1963", 17, -156, -271, -189 }, },
/* 052 */ { "Hu-Tzu-Shan", 17, -634, -549, -201 }, /* 039 */ { "European 1979 mean", 17, -86, -98, -119
/* 053 */ { "Indian", 9, 289, 734, 257 }, },
/* 054 */ { "Iran", 17, -117, -132, -164 }, /* 040 */ { "Finnish Nautical", 17, -78, -231, -97
/* 055 */ { "Ireland 1965", 1, 506, -122, 611 }, },
/* 056 */ { "ISTS 073 Astro 69", 17, 208, -435, -229 }, /* 041 */ { "Gandajika Base", 17, -133, -321, 50
/* 057 */ { "Johnston Island 61", 17, 191, -77, -204 }, },
/* 058 */ { "Kandawala", 7, -97, 787, 86 }, /* 042 */ { "Geodetic Datum 49", 17, 84, -22, 209
/* 059 */ { "Kerguelen Island", 17, 145, -187, 103 }, },
/* 060 */ { "Kertau 48", 11, -11, 851, 5 }, /* 043 */ { "Ghana", 26, 0, 0, 0
/* 061 */ { "L.C. 5 Astro", 5, 42, 124, 147 }, },
/* 062 */ { "La Reunion", 17, 94, -948, -1262 }, /* 044 */ { "Greenland NAD27", 5, 11, 114, 195
/* 063 */ { "Liberia 1964", 6, -90, 40, 88 }, },
/* 064 */ { "Luzon", 5, -133, -77, -51 }, /* 045 */ { "Guam 1963", 5, -100, -248, 259
/* 065 */ { "Mahe 1971", 6, 41, -220, -134 }, },
/* 066 */ { "Marco Astro", 17, -289, -124, 60 }, /* 046 */ { "Gunung Segara", 4, -403, 684, 41
/* 067 */ { "Masirah Is. Nahrwan", 6, -247, -148, 369 }, },
/* 068 */ { "Massawa", 4, 639, 405, 60 }, /* 047 */ { "Gunung Serindung 1962", 26, 0, 0, 0
/* 069 */ { "Merchich", 6, 31, 146, 47 }, },
/* 070 */ { "Mexico NAD27", 5, -12, 130, 190 }, /* 048 */ { "GUX1 Astro", 17, 252, -209, -751
/* 071 */ { "Midway Astro 61", 17, 912, -58, 1227 }, },
/* 072 */ { "Mindanao", 5, -133, -79, -72 }, /* 049 */ { "Herat North", 17, -333, -222, 114
/* 073 */ { "Minna", 6, -92, -93, 122 }, },
/* 074 */ { "Montjong Lowe", 26, 0, 0, 0 }, /* 050 */ { "Hjorsey 1955", 17, -73, 46, 86
/* 075 */ { "Nahrwan", 6, -231, -196, 482 }, },
/* 076 */ { "Naparima BWI", 17, -2, 374, 172 }, /* 051 */ { "Hong Kong 1963", 17, -156, -271, -189
/* 077 */ { "North America 83", 21, 0, 0, 0 }, },
/* 078 */ { "N. America 1927 mean", 5, -8, 160, 176 }, /* 052 */ { "Hu-Tzu-Shan", 17, -634, -549, -201
/* 079 */ { "Observatorio 1966", 17, -425, -169, 81 }, },
/* 080 */ { "Old Egyptian", 14, -130, 110, -13 }, /* 053 */ { "Indian", 9, 289, 734, 257
/* 081 */ { "Old Hawaiian_mean", 5, 89, -279, -183 }, },
/* 082 */ { "Old Hawaiian Kauai", 5, 45, -290, -172 }, /* 054 */ { "Iran", 17, -117, -132, -164
/* 083 */ { "Old Hawaiian Maui", 5, 65, -290, -190 }, },
/* 084 */ { "Old Hawaiian Oahu", 5, 56, -284, -181 }, /* 055 */ { "Ireland 1965", 1, 506, -122, 611
/* 085 */ { "Oman", 6, -346, -1, 224 }, },
/* 086 */ { "OSGB36", 0, 375, -111, 431 }, /* 056 */ { "ISTS 073 Astro 69", 17, 208, -435, -229
/* 087 */ { "Pico De Las Nieves", 17, -307, -92, 127 }, },
/* 088 */ { "Pitcairn Astro 67", 17, 185, 165, 42 }, /* 057 */ { "Johnston Island 61", 17, 191, -77, -204
/* 089 */ { "S. Am. 1956 mean(P)", 17, -288, 175, -376 }, },
/* 090 */ { "S. Chilean 1963 (P)", 17, 16, 196, 93 }, /* 058 */ { "Kandawala", 7, -97, 787, 86
/* 091 */ { "Puerto Rico", 5, 11, 72, -101 }, },
/* 092 */ { "Pulkovo 1942", 18, 28, -130, -95 }, /* 059 */ { "Kerguelen Island", 17, 145, -187, 103
/* 093 */ { "Qornoq", 17, 164, 138, -189 }, },
/* 094 */ { "Quatar National", 17, -128, -283, 22 }, /* 060 */ { "Kertau 48", 11, -11, 851, 5
/* 095 */ { "Rome 1940", 17, -225, -65, 9 }, },
/* 096 */ { "S-42(Pulkovo1942)", 18, 28, -121, -77 }, /* 061 */ { "L.C. 5 Astro", 5, 42, 124, 147
/* 097 */ { "S.E.Asia_(Indian)", 7, 173, 750, 264 }, },
/* 098 */ { "SAD-69/Brazil", 22, -60, -2, -41 }, /* 062 */ { "La Reunion", 17, 94, -948, -126
/* 099 */ { "Santa Braz", 17, -203, 141, 53 }, 2 },
/* 100 */ { "Santo (DOS)", 17, 170, 42, 84 }, /* 063 */ { "Liberia 1964", 6, -90, 40, 88
/* 101 */ { "Sapper Hill 43", 17, -355, 16, 74 }, },
/* 102 */ { "Schwarzeck", 3, 616, 97, -251 }, /* 064 */ { "Luzon", 5, -133, -77, -51
/* 103 */ { "Sicily", 17, -97, -88, -135 }, },
/* 104 */ { "Sierra Leone 1960", 26, 0, 0, 0 }, /* 065 */ { "Mahe 1971", 6, 41, -220, -134
/* 105 */ { "S. Am. 1969 mean", 22, -57, 1, -41 }, },
/* 106 */ { "South Asia", 13, 7, -10, -26 }, /* 066 */ { "Marco Astro", 17, -289, -124, 60
/* 107 */ { "Southeast Base", 17, -499, -249, 314 }, },
/* 108 */ { "Southwest Base", 17, -104, 167, -38 }, /* 067 */ { "Masirah Is. Nahrwan", 6, -247, -148, 369
/* 109 */ { "Tananarive Obs 25", 17, -189, -242, -91 }, },
/* 110 */ { "Thai/Viet (Indian)", 7, 214, 836, 303 }, /* 068 */ { "Massawa", 4, 639, 405, 60
/* 111 */ { "Timbalai 1948", 7, -689, 691, -45 }, },
/* 112 */ { "Tokyo mean", 4, -128, 481, 664 }, /* 069 */ { "Merchich", 6, 31, 146, 47
/* 113 */ { "Tristan Astro 1968", 17, -632, 438, -609 }, },
/* 114 */ { "United Arab Emirates", 6, -249, -156, 381 }, /* 070 */ { "Mexico NAD27", 5, -12, 130, 190
/* 115 */ { "Viti Levu 1916", 6, 51, 391, -36 }, },
/* 116 */ { "Wake Eniwetok 60", 15, 101, 52, -39 }, /* 071 */ { "Midway Astro 61", 17, 912, -58, 1227
/* 117 */ { "WGS 72", 25, 0, 0, 5 }, },
/* 118 */ { "WGS 84", 26, 0, 0, 0 }, /* 072 */ { "Mindanao", 5, -133, -79, -72
/* 119 */ { "Yacare", 17, -155, 171, 37 }, },
/* 120 */ { "Zanderij", 17, -265, 120, -358 }, /* 073 */ { "Minna", 6, -92, -93, 122
/* 121 */ { "Sweden", 4, 424.3, -80.5, 613.1 }, },
/* 122 */ { "GDA 94", 21, 0, 0, 0 }, /* 074 */ { "Montjong Lowe", 26, 0, 0, 0
/* 123 */ { "CH-1903", 4, 674, 15, 405 }, },
/* 124 */ { "Palestine 1923", 27, -235, -85, 264 }, /* 075 */ { "Nahrwan", 6, -231, -196, 482
/* 125 */ { "ITM (Israeli New)", 21, -48, 55, -52 }, },
{ NULL, 0, 0, 0, 0 } /* 076 */ { "Naparima BWI", 17, -2, 374, 172
}; },
/* 077 */ { "North America 83", 21, 0, 0, 0
},
/* 078 */ { "N. America 1927 mean", 5, -8, 160, 176
},
/* 079 */ { "Observatorio 1966", 17, -425, -169, 81
},
/* 080 */ { "Old Egyptian", 14, -130, 110, -13
},
/* 081 */ { "Old Hawaiian_mean", 5, 89, -279, -183
},
/* 082 */ { "Old Hawaiian Kauai", 5, 45, -290, -172
},
/* 083 */ { "Old Hawaiian Maui", 5, 65, -290, -190
},
/* 084 */ { "Old Hawaiian Oahu", 5, 56, -284, -181
},
/* 085 */ { "Oman", 6, -346, -1, 224
},
/* 086 */ { "OSGB36", 0, 375, -111, 431
},
/* 087 */ { "Pico De Las Nieves", 17, -307, -92, 127
},
/* 088 */ { "Pitcairn Astro 67", 17, 185, 165, 42
},
/* 089 */ { "S. Am. 1956 mean(P)", 17, -288, 175, -376
},
/* 090 */ { "S. Chilean 1963 (P)", 17, 16, 196, 93
},
/* 091 */ { "Puerto Rico", 5, 11, 72, -101
},
/* 092 */ { "Pulkovo 1942", 18, 28, -130, -95
},
/* 093 */ { "Qornoq", 17, 164, 138, -189
},
/* 094 */ { "Quatar National", 17, -128, -283, 22
},
/* 095 */ { "Rome 1940", 17, -225, -65, 9
},
/* 096 */ { "S-42(Pulkovo1942)", 18, 28, -121, -77
},
/* 097 */ { "S.E.Asia_(Indian)", 7, 173, 750, 264
},
/* 098 */ { "SAD-69/Brazil", 22, -60, -2, -41
},
/* 099 */ { "Santa Braz", 17, -203, 141, 53
},
/* 100 */ { "Santo (DOS)", 17, 170, 42, 84
},
/* 101 */ { "Sapper Hill 43", 17, -355, 16, 74
},
/* 102 */ { "Schwarzeck", 3, 616, 97, -251
},
/* 103 */ { "Sicily", 17, -97, -88, -135
},
/* 104 */ { "Sierra Leone 1960", 26, 0, 0, 0
},
/* 105 */ { "S. Am. 1969 mean", 22, -57, 1, -41
},
/* 106 */ { "South Asia", 13, 7, -10, -26
},
/* 107 */ { "Southeast Base", 17, -499, -249, 314
},
/* 108 */ { "Southwest Base", 17, -104, 167, -38
},
/* 109 */ { "Tananarive Obs 25", 17, -189, -242, -91
},
/* 110 */ { "Thai/Viet (Indian)", 7, 214, 836, 303
},
/* 111 */ { "Timbalai 1948", 7, -689, 691, -45
},
/* 112 */ { "Tokyo mean", 4, -128, 481, 664
},
/* 113 */ { "Tristan Astro 1968", 17, -632, 438, -609
},
/* 114 */ { "United Arab Emirates", 6, -249, -156, 381
},
/* 115 */ { "Viti Levu 1916", 6, 51, 391, -36
},
/* 116 */ { "Wake Eniwetok 60", 15, 101, 52, -39
},
/* 117 */ { "WGS 72", 25, 0, 0, 5
},
/* 118 */ { "WGS 84", 26, 0, 0, 0
},
/* 119 */ { "Yacare", 17, -155, 171, 37
},
/* 120 */ { "Zanderij", 17, -265, 120, -358
},
/* 121 */ { "Sweden", 4, 424.3, -80.5, 613.1 },
/* 122 */ { "GDA 94", 21, 0, 0, 0 },
/* 123 */ { "CH-1903", 4, 674, 15, 405 },
/* 124 */ { "Palestine 1923", 27, -235, -85, 264
},
/* 125 */ { "ITM (Israeli New)", 21, -48, 55, -52
},
{ NULL, 0, 0, 0, 0 }
};
typedef struct GPS_SDatum_Alias typedef struct GPS_SDatum_Alias {
{ char* alias;
char *alias;
const int datum; const int datum;
} GPS_ODatum_Alias, *GPS_PDatum_Alias; } GPS_ODatum_Alias, *GPS_PDatum_Alias;
GPS_ODatum_Alias GPS_DatumAlias[] = GPS_ODatum_Alias GPS_DatumAlias[] = {
{
{ "Australian GDA94", 122 }, { "Australian GDA94", 122 },
{ "Australian Geocentric 1994 (GDA94)", 122}, /* Observed in Ozi */ { "Australian Geocentric 1994 (GDA94)", 122}, /* Observed in Ozi */
{ "GDA94", 122 }, { "GDA94", 122 },
{ "GDA-94", 122 }, { "GDA-94", 122 },
{ "CH1903", 123 }, { "CH1903", 123 },
{ "CH 1903", 123 }, { "CH 1903", 123 },
{ "European 1950 (Spain and Portugal)", 38 }, { "European 1950 (Spain and Portugal)", 38 },
{ "Geodetic Datum 1949", 42 }, { "Geodetic Datum 1949", 42 },
{ "NAD27 Alaska", 3 }, { "NAD27 Alaska", 3 },
{ "NAD27 Bahamas", 14 }, { "NAD27 Bahamas", 14 },
skipping to change at line 227 skipping to change at line 221
{ "OSGB 36", 86 }, { "OSGB 36", 86 },
{ "OSGB-36", 86 }, { "OSGB-36", 86 },
{ "Wake-Eniwetok 1960", 116 }, { "Wake-Eniwetok 1960", 116 },
{ "WGS72", 117 }, { "WGS72", 117 },
{ "WGS-72", 117 }, { "WGS-72", 117 },
{ "WGS84", 118 }, { "WGS84", 118 },
{ "WGS-84", 118 }, { "WGS-84", 118 },
{ "Israeli", 124 }, { "Israeli", 124 },
{ "D_Israel_new", 125 }, { "D_Israel_new", 125 },
{ NULL, -1 } { NULL, -1 }
}; };
/* UK Ordnance Survey Nation Grid Map Codes */ /* UK Ordnance Survey Nation Grid Map Codes */
static char *UKNG[]= static char* UKNG[]= {
{
"SV","SW","SX","SY","SZ","TV","TW","SQ","SR","SS","ST","SU","TQ","TR", "SV","SW","SX","SY","SZ","TV","TW","SQ","SR","SS","ST","SU","TQ","TR",
"SL","SM","SN","SO","SP","TL","TM","SF","SG","SH","SJ","SK","TF","TG", "SL","SM","SN","SO","SP","TL","TM","SF","SG","SH","SJ","SK","TF","TG",
"SA","SB","SC","SD","SE","TA","TB","NV","NW","NX","NY","NZ","OV","OW", "SA","SB","SC","SD","SE","TA","TB","NV","NW","NX","NY","NZ","OV","OW",
"NQ","NR","NS","NT","NU","OQ","OR","NL","NM","NN","NO","NP","OL","OM", "NQ","NR","NS","NT","NU","OQ","OR","NL","NM","NN","NO","NP","OL","OM",
"NF","NG","NH","NJ","NK","OF","OG","NA","NB","NC","ND","NE","OA","OB", "NF","NG","NH","NJ","NK","OF","OG","NA","NB","NC","ND","NE","OA","OB",
"HV","HW","HX","HY","HZ","JV","JW","HQ","HR","HS","HT","HU","JQ","JR", "HV","HW","HX","HY","HZ","JV","JW","HQ","HR","HS","HT","HU","JQ","JR",
"HL","HM","HN","HO","HP","JL","JM","" "HL","HM","HN","HO","HP","JL","JM",""
}; };
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 13 change blocks. 
154 lines changed or deleted 245 lines changed or added


 gpsdevice.h   gpsdevice.h 
skipping to change at line 30 skipping to change at line 30
*/ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef gpsdevice_h #ifndef gpsdevice_h
#define gpsdevice_h #define gpsdevice_h
typedef struct gpsdevh gpsdevh; typedef struct gpsdevh gpsdevh;
#include "gps.h" #include "gps.h"
#define usecDELAY 180000 /* Microseconds before GPS sends A001 */ #define usecDELAY 180000 /* Microseconds before GPS sends A001 */
int32 GPS_Device_Chars_Ready(gpsdevh *fd); int32 GPS_Device_Chars_Ready(gpsdevh* fd);
int32 GPS_Device_On(const char *port, gpsdevh **fd); int32 GPS_Device_On(const char* port, gpsdevh** fd);
int32 GPS_Device_Off(gpsdevh *fd); int32 GPS_Device_Off(gpsdevh* fd);
int32 GPS_Device_Wait(gpsdevh * fd); int32 GPS_Device_Wait(gpsdevh* fd);
int32 GPS_Device_Flush(gpsdevh * fd); int32 GPS_Device_Flush(gpsdevh* fd);
int32 GPS_Device_Read(int32 ignored, void *ibuf, int size); int32 GPS_Device_Read(int32 ignored, void* ibuf, int size);
int32 GPS_Device_Write(int32 ignored, const void *obuf, int size); int32 GPS_Device_Write(int32 ignored, const void* obuf, int size);
void GPS_Device_Error(char *hdr, ...); void GPS_Device_Error(char* hdr, ...);
int32 GPS_Write_Packet(gpsdevh *fd, GPS_PPacket packet); int32 GPS_Write_Packet(gpsdevh* fd, GPS_PPacket packet);
int32 GPS_Send_Ack(gpsdevh *fd, GPS_PPacket *tra, GPS_PPacket *rec); int32 GPS_Send_Ack(gpsdevh* fd, GPS_PPacket* tra, GPS_PPacket* rec);
int32 GPS_Packet_Read(gpsdevh *fd, GPS_PPacket *packet); int32 GPS_Packet_Read(gpsdevh* fd, GPS_PPacket* packet);
int32 GPS_Get_Ack(gpsdevh *fd, GPS_PPacket *tra, GPS_PPacket *rec); int32 GPS_Get_Ack(gpsdevh* fd, GPS_PPacket* tra, GPS_PPacket* rec);
typedef int32 (*gps_device_op)(gpsdevh *); typedef int32(*gps_device_op)(gpsdevh*);
typedef int32 (*gps_device_op5)(const char *, gpsdevh **fd); typedef int32(*gps_device_op5)(const char*, gpsdevh** fd);
typedef int32 (*gps_device_op10)(gpsdevh * fd, GPS_PPacket *tra, GPS_PPack typedef int32(*gps_device_op10)(gpsdevh* fd, GPS_PPacket* tra, GPS_PPack
et *rec); et* rec);
typedef int32 (*gps_device_op12)(gpsdevh * fd, GPS_PPacket packet); typedef int32(*gps_device_op12)(gpsdevh* fd, GPS_PPacket packet);
typedef int32 (*gps_device_op13)(gpsdevh * fd, GPS_PPacket *packet); typedef int32(*gps_device_op13)(gpsdevh* fd, GPS_PPacket* packet);
typedef struct { typedef struct {
gps_device_op5 Device_On; gps_device_op5 Device_On;
gps_device_op Device_Off; gps_device_op Device_Off;
gps_device_op Device_Chars_Ready; gps_device_op Device_Chars_Ready;
gps_device_op Device_Wait; gps_device_op Device_Wait;
gps_device_op Device_Flush; gps_device_op Device_Flush;
gps_device_op10 Send_Ack; gps_device_op10 Send_Ack;
gps_device_op10 Get_Ack; gps_device_op10 Get_Ack;
gps_device_op13 Read_Packet; gps_device_op13 Read_Packet;
gps_device_op12 Write_Packet; gps_device_op12 Write_Packet;
} gps_device_ops; } gps_device_ops;
#endif /* gpsdevice.h */ #endif /* gpsdevice.h */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 2 change blocks. 
31 lines changed or deleted 31 lines changed or added


 gpsfmt.h   gpsfmt.h 
skipping to change at line 13 skipping to change at line 13
{ {
#endif #endif
#ifndef gpsfmt_h #ifndef gpsfmt_h
#define gpsfmt_h #define gpsfmt_h
#include "gps.h" #include "gps.h"
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
void GPS_Fmt_Print_Time(time_t Time, FILE *outf); void GPS_Fmt_Print_Time(time_t Time, FILE* outf);
void GPS_Fmt_Print_Position(double lat, double lon, FILE *outf); void GPS_Fmt_Print_Position(double lat, double lon, FILE* outf);
void GPS_Fmt_Print_Pvt(GPS_PPvt_Data pvt, FILE *outf); void GPS_Fmt_Print_Pvt(GPS_PPvt_Data pvt, FILE* outf);
void GPS_Fmt_Print_Almanac(GPS_PAlmanac *alm, int32 n, FILE *outf); void GPS_Fmt_Print_Almanac(GPS_PAlmanac* alm, int32 n, FILE* outf);
void GPS_Fmt_Print_Track(GPS_PTrack *trk, int32 n, FILE *outf); void GPS_Fmt_Print_Track(GPS_PTrack* trk, int32 n, FILE* outf);
int32 GPS_Fmt_Print_Waypoint(GPS_PWay *way, int32 n, FILE *outf); int32 GPS_Fmt_Print_Waypoint(GPS_PWay* way, int32 n, FILE* outf);
int32 GPS_Fmt_Print_Proximity(GPS_PWay *way, int32 n, FILE *outf); int32 GPS_Fmt_Print_Proximity(GPS_PWay* way, int32 n, FILE* outf);
int32 GPS_Fmt_Print_Route(GPS_PWay *way, int32 n, FILE *outf); int32 GPS_Fmt_Print_Route(GPS_PWay* way, int32 n, FILE* outf);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
8 lines changed or deleted 8 lines changed or added


 gpsinput.h   gpsinput.h 
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef gpsinput_h #ifndef gpsinput_h
#define gpsinput_h #define gpsinput_h
#include "gps.h" #include "gps.h"
int32 GPS_Input_Get_Almanac(GPS_PAlmanac **alm, FILE *inf); int32 GPS_Input_Get_Almanac(GPS_PAlmanac** alm, FILE* inf);
int32 GPS_Input_Get_Waypoint(GPS_PWay **way, FILE *inf); int32 GPS_Input_Get_Waypoint(GPS_PWay** way, FILE* inf);
int32 GPS_Input_Get_Proximity(GPS_PWay **way, FILE *inf); int32 GPS_Input_Get_Proximity(GPS_PWay** way, FILE* inf);
int32 GPS_Input_Get_Track(GPS_PTrack **trk, FILE *inf); int32 GPS_Input_Get_Track(GPS_PTrack** trk, FILE* inf);
int32 GPS_Input_Get_Route(GPS_PWay **way, FILE *inf); int32 GPS_Input_Get_Route(GPS_PWay** way, FILE* inf);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
5 lines changed or deleted 5 lines changed or added


 gpsmath.h   gpsmath.h 
skipping to change at line 15 skipping to change at line 15
#ifndef gpsmath_h #ifndef gpsmath_h
#define gpsmath_h #define gpsmath_h
#include "gps.h" #include "gps.h"
#define GPS_PI 3.141592653589 #define GPS_PI 3.141592653589
#define GPS_FLTMIN 1.75494351E-38 #define GPS_FLTMIN 1.75494351E-38
#define GPS_FLTMAX 3.402823466E+38 #define GPS_FLTMAX 3.402823466E+38
double GPS_Math_Deg_To_Rad(double v); double GPS_Math_Deg_To_Rad(double v);
double GPS_Math_Rad_To_Deg(double v); double GPS_Math_Rad_To_Deg(double v);
double GPS_Math_Metres_To_Feet(double v); double GPS_Math_Metres_To_Feet(double v);
double GPS_Math_Feet_To_Metres(double v); double GPS_Math_Feet_To_Metres(double v);
int32 GPS_Math_Deg_To_Semi(double v); int32 GPS_Math_Deg_To_Semi(double v);
double GPS_Math_Semi_To_Deg(int32 v); double GPS_Math_Semi_To_Deg(int32 v);
time_t GPS_Math_Utime_To_Gtime(time_t v); time_t GPS_Math_Utime_To_Gtime(time_t v);
time_t GPS_Math_Gtime_To_Utime(time_t v); time_t GPS_Math_Gtime_To_Utime(time_t v);
void GPS_Math_Deg_To_DegMin(double v, int32 *d, double *m); void GPS_Math_Deg_To_DegMin(double v, int32* d, double* m);
void GPS_Math_DegMin_To_Deg(int32 d, double m, double *deg); void GPS_Math_DegMin_To_Deg(int32 d, double m, double* deg);
void GPS_Math_Deg_To_DegMinSec(double v, int32 *d, int32 *m, double *s); void GPS_Math_Deg_To_DegMinSec(double v, int32* d, int32* m, double* s)
void GPS_Math_DegMinSec_To_Deg(int32 d, int32 m, double s, double *deg); ;
void GPS_Math_DegMinSec_To_Deg(int32 d, int32 m, double s, double* deg)
void GPS_Math_Airy1830LatLonToNGEN(double phi, double lambda, double *E, ;
double *N);
void GPS_Math_Airy1830M_LatLonToINGEN(double phi, double lambda, double *E, void GPS_Math_Airy1830LatLonToNGEN(double phi, double lambda, double* E,
double *N); double* N);
int32 GPS_Math_EN_To_UKOSNG_Map(double E, double N, double *mE, void GPS_Math_Airy1830M_LatLonToINGEN(double phi, double lambda, double*
double *mN, char *map); E,
int32 GPS_Math_UKOSNG_Map_To_EN(char *map, double mapE, double mapN, double* N);
double *E, double *N); int32 GPS_Math_EN_To_UKOSNG_Map(double E, double N, double* mE,
double* mN, char* map);
void GPS_Math_LatLonH_To_XYZ(double phi, double lambda, double H, int32 GPS_Math_UKOSNG_Map_To_EN(char* map, double mapE, double mapN,
double *x, double *y, double *z, double* E, double* N);
double a, double b);
void GPS_Math_XYZ_To_LatLonH(double *phi, double *lambda, double *H, void GPS_Math_LatLonH_To_XYZ(double phi, double lambda, double H,
double x, double y, double z, double* x, double* y, double* z,
double a, double b); double a, double b);
void GPS_Math_XYZ_To_LatLonH(double* phi, double* lambda, double* H,
void GPS_Math_EN_To_LatLon(double E, double N, double *phi, double x, double y, double z,
double *lambda, double N0, double E0, double a, double b);
double phi0, double lambda0,
double F0, double a, double b); void GPS_Math_EN_To_LatLon(double E, double N, double* phi,
void GPS_Math_LatLon_To_EN(double *E, double *N, double phi, double* lambda, double N0, double E0,
double lambda, double N0, double E0, double phi0, double lambda0,
double phi0, double lambda0, double F0, double a, double b);
double F0, double a, double b); void GPS_Math_LatLon_To_EN(double* E, double* N, double phi,
double lambda, double N0, double E0,
void GPS_Math_NGENToAiry1830LatLon(double E, double N, double *phi, double phi0, double lambda0,
double *lambda); double F0, double a, double b);
void GPS_Math_INGENToAiry1830MLatLon(double E, double N, double *phi,
double *lambda); void GPS_Math_NGENToAiry1830LatLon(double E, double N, double* phi,
double* lambda);
void GPS_Math_Airy1830LatLonH_To_XYZ(double phi, double lambda, double H, void GPS_Math_INGENToAiry1830MLatLon(double E, double N, double* phi,
double *x, double *y, double *z); double* lambda);
void GPS_Math_WGS84LatLonH_To_XYZ(double phi, double lambda, double H,
double *x, double *y, double *z); void GPS_Math_Airy1830LatLonH_To_XYZ(double phi, double lambda, double H,
void GPS_Math_XYZ_To_Airy1830LatLonH(double *phi, double *lambda, double *H double* x, double* y, double* z);
, void GPS_Math_WGS84LatLonH_To_XYZ(double phi, double lambda, double H,
double x, double y, double z); double* x, double* y, double* z);
void GPS_Math_XYZ_To_WGS84LatLonH(double *phi, double *lambda, double *H, void GPS_Math_XYZ_To_Airy1830LatLonH(double* phi, double* lambda, double*
double x, double y, double z); H,
double x, double y, double z);
void GPS_Math_Molodensky(double Sphi, double Slam, double SH, double Sa, void GPS_Math_XYZ_To_WGS84LatLonH(double* phi, double* lambda, double* H,
double Sif, double *Dphi, double *Dlam, double x, double y, double z);
double *DH, double Da, double Dif, double dx,
double dy, double dz); void GPS_Math_Molodensky(double Sphi, double Slam, double SH, double Sa,
void GPS_Math_Known_Datum_To_WGS84_M(double Sphi, double Slam, double SH, double Sif, double* Dphi, double* Dlam,
double *Dphi, double *Dlam, double *DH, double* DH, double Da, double Dif, double dx,
int32 n); double dy, double dz);
void GPS_Math_WGS84_To_Known_Datum_M(double Sphi, double Slam, double SH, void GPS_Math_Known_Datum_To_WGS84_M(double Sphi, double Slam, double SH,
double *Dphi, double *Dlam, double *DH, double* Dphi, double* Dlam, double*
int32 n); DH,
void GPS_Math_Known_Datum_To_WGS84_C(double Sphi, double Slam, double SH, int32 n);
double *Dphi, double *Dlam, double *DH, void GPS_Math_WGS84_To_Known_Datum_M(double Sphi, double Slam, double SH,
int32 n); double* Dphi, double* Dlam, double*
void GPS_Math_WGS84_To_Known_Datum_C(double Sphi, double Slam, double SH, DH,
double *Dphi, double *Dlam, double *DH, int32 n);
int32 n); void GPS_Math_Known_Datum_To_WGS84_C(double Sphi, double Slam, double SH,
double* Dphi, double* Dlam, double*
void GPS_Math_Known_Datum_To_Known_Datum_M(double Sphi, double Slam, double DH,
SH, int32 n);
double *Dphi, double *Dlam, void GPS_Math_WGS84_To_Known_Datum_C(double Sphi, double Slam, double SH,
double *DH, int32 n1, int32 n2); double* Dphi, double* Dlam, double*
void GPS_Math_Known_Datum_To_Known_Datum_C(double Sphi, double Slam, double DH,
SH, int32 n);
double *Dphi, double *Dlam,
double *DH, int32 n1, int32 n2); void GPS_Math_Known_Datum_To_Known_Datum_M(double Sphi, double Slam, doub
le SH,
int32 GPS_Math_WGS84_To_UKOSMap_M(double lat, double lon, double *mE, double* Dphi, double* Dlam,
double *mN, char *map); double* DH, int32 n1, int32 n2);
int32 GPS_Math_UKOSMap_To_WGS84_M(char *map, double mE, double mN, void GPS_Math_Known_Datum_To_Known_Datum_C(double Sphi, double Slam, doub
double *lat, double *lon); le SH,
int32 GPS_Math_WGS84_To_UKOSMap_C(double lat, double lon, double *mE, double* Dphi, double* Dlam,
double *mN, char *map); double* DH, int32 n1, int32 n2);
int32 GPS_Math_UKOSMap_To_WGS84_C(char *map, double mE, double mN,
double *lat, double *lon); int32 GPS_Math_WGS84_To_UKOSMap_M(double lat, double lon, double* mE,
double* mN, char* map);
int32 GPS_Math_NAD83_To_UTM_EN(double lat, double lon, double *E, int32 GPS_Math_UKOSMap_To_WGS84_M(char* map, double mE, double mN,
double *N, int32 *zone, char *zc); double* lat, double* lon);
int32 GPS_Math_WGS84_To_UTM_EN(double lat, double lon, double *E, int32 GPS_Math_WGS84_To_UKOSMap_C(double lat, double lon, double* mE,
double *N, int32 *zone, char *zc); double* mN, char* map);
int32 GPS_Math_UKOSMap_To_WGS84_C(char* map, double mE, double mN,
int32 GPS_Math_UTM_EN_To_WGS84(double *lat, double *lon, double E, double* lat, double* lon);
double N, int32 zone, char zc);
int32 GPS_Math_UTM_EN_To_NAD83(double *lat, double *lon, double E, int32 GPS_Math_NAD83_To_UTM_EN(double lat, double lon, double* E,
double N, int32 zone, char zc); double* N, int32* zone, char* zc);
int32 GPS_Math_WGS84_To_UTM_EN(double lat, double lon, double* E,
int32 GPS_Math_Known_Datum_To_UTM_EN(double lat, double lon, double *E, double* N, int32* zone, char* zc);
double *N, int32 *zone, char *zc, const int n
); int32 GPS_Math_UTM_EN_To_WGS84(double* lat, double* lon, double E,
int32 GPS_Math_UTM_EN_To_Known_Datum(double *lat, double *lon, double E, double N, int32 zone, char zc);
double N, int32 zone, char zc, const int n); int32 GPS_Math_UTM_EN_To_NAD83(double* lat, double* lon, double E,
double N, int32 zone, char zc);
void GPS_Math_Swiss_LatLon_To_EN(double phi, double lambda, double *E,
double *N,double phi0,double lambda0, int32 GPS_Math_Known_Datum_To_UTM_EN(double lat, double lon, double* E,
double E0, double N0, double a, double b); double* N, int32* zone, char* zc, co
void GPS_Math_Swiss_EN_To_LatLon(double E, double N, double *phi, nst int n);
double *lambda, double phi0, double lambda0 int32 GPS_Math_UTM_EN_To_Known_Datum(double* lat, double* lon, double E,
, double N, int32 zone, char zc, const
double E0, double N0, double a, double b); int n);
int32 GPS_Math_WGS84_To_ICS_EN(double lat, double lon, double *E, void GPS_Math_Swiss_LatLon_To_EN(double phi, double lambda, double* E,
double *N); double* N,double phi0,double lambda0,
void GPS_Math_ICS_EN_To_WGS84(double E, double N, double *lat, double *lon) double E0, double N0, double a, double b
; );
void GPS_Math_Swiss_EN_To_LatLon(double E, double N, double* phi,
int32 GPS_Math_WGS84_To_Swiss_EN(double phi, double lambda, double *E, doub double* lambda, double phi0, double lamb
le *N); da0,
void GPS_Math_Swiss_EN_To_WGS84(double E, double N, double *lat, double *lo double E0, double N0, double a, double b
n); );
void GPS_Math_UTM_EN_to_LatLon(int ReferenceEllipsoid, int32 GPS_Math_WGS84_To_ICS_EN(double lat, double lon, double* E,
const double UTMNorthing, const double UTMEas double* N);
ting, void GPS_Math_ICS_EN_To_WGS84(double E, double N, double* lat, double* lo
double *Lat, double *Lon, n);
const double lambda0, const double E0, const
double N0); int32 GPS_Math_WGS84_To_Swiss_EN(double phi, double lambda, double* E, do
uble* N);
void GPS_Math_Swiss_EN_To_WGS84(double E, double N, double* lat, double*
lon);
void GPS_Math_UTM_EN_to_LatLon(int ReferenceEllipsoid,
const double UTMNorthing, const double UTM
Easting,
double* Lat, double* Lon,
const double lambda0, const double E0, con
st double N0);
int32 GPS_Lookup_Datum_Index(const char *n); int32 GPS_Lookup_Datum_Index(const char* n);
char *GPS_Math_Get_Datum_Name(const int datum_index); char* GPS_Math_Get_Datum_Name(const int datum_index);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 5 change blocks. 
131 lines changed or deleted 141 lines changed or added


 gpsmem.h   gpsmem.h 
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef gpsmem_h #ifndef gpsmem_h
#define gpsmem_h #define gpsmem_h
#include "gps.h" #include "gps.h"
GPS_PPacket GPS_Packet_New(void); GPS_PPacket GPS_Packet_New(void);
void GPS_Packet_Del(GPS_PPacket *thys); void GPS_Packet_Del(GPS_PPacket* thys);
GPS_PPvt_Data GPS_Pvt_New(void); GPS_PPvt_Data GPS_Pvt_New(void);
void GPS_Pvt_Del(GPS_PPvt_Data *thys); void GPS_Pvt_Del(GPS_PPvt_Data* thys);
GPS_PAlmanac GPS_Almanac_New(void); GPS_PAlmanac GPS_Almanac_New(void);
void GPS_Almanac_Del(GPS_PAlmanac *thys); void GPS_Almanac_Del(GPS_PAlmanac* thys);
GPS_PTrack GPS_Track_New(void); GPS_PTrack GPS_Track_New(void);
void GPS_Track_Del(GPS_PTrack *thys); void GPS_Track_Del(GPS_PTrack* thys);
GPS_PWay GPS_Way_New(void); GPS_PWay GPS_Way_New(void);
void GPS_Way_Del(GPS_PWay *thys); void GPS_Way_Del(GPS_PWay* thys);
GPS_PLap GPS_Lap_New(void); GPS_PLap GPS_Lap_New(void);
void GPS_Lap_Del(GPS_PLap *thys); void GPS_Lap_Del(GPS_PLap* thys);
GPS_PCourse GPS_Course_New(void); GPS_PCourse GPS_Course_New(void);
void GPS_Course_Del(GPS_PCourse *thys); void GPS_Course_Del(GPS_PCourse* thys);
GPS_PCourse_Lap GPS_Course_Lap_New(void); GPS_PCourse_Lap GPS_Course_Lap_New(void);
void GPS_Course_Lap_Del(GPS_PCourse_Lap *thys); void GPS_Course_Lap_Del(GPS_PCourse_Lap* thys);
GPS_PCourse_Point GPS_Course_Point_New(void); GPS_PCourse_Point GPS_Course_Point_New(void);
void GPS_Course_Point_Del(GPS_PCourse_Point *thys); void GPS_Course_Point_Del(GPS_PCourse_Point* thys);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
18 lines changed or deleted 18 lines changed or added


 gpsproj.h   gpsproj.h 
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef gpsproj_h #ifndef gpsproj_h
#define gpsproj_h #define gpsproj_h
#include "gps.h" #include "gps.h"
void GPS_Math_Albers_LatLon_To_EN(double phi, double lambda, double *E, void GPS_Math_Albers_LatLon_To_EN(double phi, double lambda, double* E,
double *N, double phi1, double phi2, double* N, double phi1, double phi2,
double phi0, double M0, double E0, double phi0, double M0, double E0,
double N0, double a, double b); double N0, double a, double b);
void GPS_Math_Albers_EN_To_LatLon(double E, double N, double *phi, void GPS_Math_Albers_EN_To_LatLon(double E, double N, double* phi,
double *lambda, double phi1, double phi2, double* lambda, double phi1, double phi
double phi0, double M0, double E0, 2,
double N0, double a, double b); double phi0, double M0, double E0,
double N0, double a, double b);
void GPS_Math_LambertCC_LatLon_To_EN(double phi, double lambda, double *E,
double *N, double phi1, double phi2, void GPS_Math_LambertCC_LatLon_To_EN(double phi, double lambda, double* E
double phi0, double M0, double E0, ,
double N0, double a, double b); double* N, double phi1, double phi2,
void GPS_Math_LambertCC_EN_To_LatLon(double E, double N, double *phi, double phi0, double M0, double E0,
double *lambda, double phi1, double phi double N0, double a, double b);
2, void GPS_Math_LambertCC_EN_To_LatLon(double E, double N, double* phi,
double phi0, double M0, double E0, double* lambda, double phi1, double
double N0, double a, double b); phi2,
double phi0, double M0, double E0,
void GPS_Math_Miller_LatLon_To_EN(double phi, double lambda, double *E, double N0, double a, double b);
double *N, double M0, double E0,
double N0, double a, double b); void GPS_Math_Miller_LatLon_To_EN(double phi, double lambda, double* E,
void GPS_Math_Miller_EN_To_LatLon(double E, double N, double *phi, double* N, double M0, double E0,
double *lambda, double M0, double E0, double N0, double a, double b);
double N0, double a, double b); void GPS_Math_Miller_EN_To_LatLon(double E, double N, double* phi,
double* lambda, double M0, double E0,
void GPS_Math_Bonne_LatLon_To_EN(double phi, double lambda, double *E, double N0, double a, double b);
double *N, double phi0, double M0, double E
0, void GPS_Math_Bonne_LatLon_To_EN(double phi, double lambda, double* E,
double N0, double a, double b); double* N, double phi0, double M0, doubl
void GPS_Math_Bonne_EN_To_LatLon(double E, double N, double *phi, e E0,
double *lambda, double phi0, double M0, double N0, double a, double b);
double E0, double N0, double a, double b); void GPS_Math_Bonne_EN_To_LatLon(double E, double N, double* phi,
double* lambda, double phi0, double M0,
void GPS_Math_Cassini_LatLon_To_EN(double phi, double lambda, double *E, double E0, double N0, double a, double b
double *N, double phi0, double M0, );
double E0, double N0, double a, double b)
; void GPS_Math_Cassini_LatLon_To_EN(double phi, double lambda, double* E,
void GPS_Math_Cassini_EN_To_LatLon(double E, double N, double *phi, double* N, double phi0, double M0,
double *lambda, double phi0, double M0, double E0, double N0, double a, double
double E0, double N0, double a, double b) b);
; void GPS_Math_Cassini_EN_To_LatLon(double E, double N, double* phi,
double* lambda, double phi0, double M0
void GPS_Math_Cylea_LatLon_To_EN(double phi, double lambda, double *E, ,
double *N, double phi0, double M0, double E0, double N0, double a, double
double E0, double N0, double a, double b); b);
void GPS_Math_Cylea_EN_To_LatLon(double E, double N, double *phi,
double *lambda, double phi0, double M0, void GPS_Math_Cylea_LatLon_To_EN(double phi, double lambda, double* E,
double E0, double N0, double a, double b); double* N, double phi0, double M0,
double E0, double N0, double a, double b
void GPS_Math_EckertIV_LatLon_To_EN(double phi, double lambda, double *E, );
double *N, double M0, double E0, double void GPS_Math_Cylea_EN_To_LatLon(double E, double N, double* phi,
N0, double* lambda, double phi0, double M0,
double a, double b); double E0, double N0, double a, double b
void GPS_Math_EckertIV_EN_To_LatLon(double E, double N, double *phi, );
double *lambda, double M0, double E0,
double N0, double a, double b); void GPS_Math_EckertIV_LatLon_To_EN(double phi, double lambda, double* E,
double* N, double M0, double E0, doub
void GPS_Math_EckertVI_LatLon_To_EN(double phi, double lambda, double *E, le N0,
double *N, double M0, double E0, double double a, double b);
N0, void GPS_Math_EckertIV_EN_To_LatLon(double E, double N, double* phi,
double a, double b); double* lambda, double M0, double E0,
void GPS_Math_EckertVI_EN_To_LatLon(double E, double N, double *phi, double N0, double a, double b);
double *lambda, double M0, double E0,
double N0, double a, double b); void GPS_Math_EckertVI_LatLon_To_EN(double phi, double lambda, double* E,
double* N, double M0, double E0, doub
void GPS_Math_Cyled_LatLon_To_EN(double phi, double lambda, double *E, le N0,
double *N, double phi0, double M0, double E double a, double b);
0, void GPS_Math_EckertVI_EN_To_LatLon(double E, double N, double* phi,
double N0, double a, double b); double* lambda, double M0, double E0,
void GPS_Math_Cyled_EN_To_LatLon(double E, double N, double *phi, double N0, double a, double b);
double *lambda, double phi0, double M0,
double E0, double N0, double a, double b); void GPS_Math_Cyled_LatLon_To_EN(double phi, double lambda, double* E,
double* N, double phi0, double M0, doubl
void GPS_Math_VderGrinten_LatLon_To_EN(double phi, double lambda, double *E e E0,
, double N0, double a, double b);
double *N, double M0, double E0, void GPS_Math_Cyled_EN_To_LatLon(double E, double N, double* phi,
double N0, double a, double b); double* lambda, double phi0, double M0,
void GPS_Math_VderGrinten_EN_To_LatLon(double E, double N, double *phi, double E0, double N0, double a, double b
double *lambda, double M0, double E0, );
double N0, double a, double b);
void GPS_Math_VderGrinten_LatLon_To_EN(double phi, double lambda, double*
void GPS_Math_PolarSt_LatLon_To_EN(double phi, double lambda, double *E, E,
double *N, double phi1, double lambda1, double* N, double M0, double E0,
double E0, double N0, double a, double b) double N0, double a, double b);
; void GPS_Math_VderGrinten_EN_To_LatLon(double E, double N, double* phi,
void GPS_Math_PolarSt_EN_To_LatLon(double E, double N, double *phi, double* lambda, double M0, double
double *lambda, double phi1, double lambd E0,
a1, double N0, double a, double b);
double E0, double N0, double a, double b)
; void GPS_Math_PolarSt_LatLon_To_EN(double phi, double lambda, double* E,
double* N, double phi1, double lambda1
void GPS_Math_Mollweide_LatLon_To_EN(double phi, double lambda, double *E, ,
double *N, double M0, double E0, double E0, double N0, double a, double
double N0, double a, double b); b);
void GPS_Math_Mollweide_EN_To_LatLon(double E, double N, double *phi, void GPS_Math_PolarSt_EN_To_LatLon(double E, double N, double* phi,
double *lambda, double M0, double E0, double* lambda, double phi1, double la
double N0, double a, double b); mbda1,
double E0, double N0, double a, double
void GPS_Math_Orthog_LatLon_To_EN(double phi, double lambda, double *E, b);
double *N, double phi0, double lambda0,
double E0, double N0, double a, double b); void GPS_Math_Mollweide_LatLon_To_EN(double phi, double lambda, double* E
void GPS_Math_Orthog_EN_To_LatLon(double E, double N, double *phi, ,
double *lambda, double phi0, double lambda double* N, double M0, double E0,
0, double N0, double a, double b);
double E0, double N0, double a, double b); void GPS_Math_Mollweide_EN_To_LatLon(double E, double N, double* phi,
double* lambda, double M0, double E0
void GPS_Math_Polycon_LatLon_To_EN(double phi, double lambda, double *E, ,
double *N, double phi0, double M0, double N0, double a, double b);
double E0, double N0, double a, double b)
; void GPS_Math_Orthog_LatLon_To_EN(double phi, double lambda, double* E,
void GPS_Math_Polycon_EN_To_LatLon(double E, double N, double *phi, double* N, double phi0, double lambda0,
double *lambda, double phi0, double M0, double E0, double N0, double a, double
double E0, double N0, double a, double b) b);
; void GPS_Math_Orthog_EN_To_LatLon(double E, double N, double* phi,
double* lambda, double phi0, double lam
void GPS_Math_Sinusoid_LatLon_To_EN(double phi, double lambda, double *E, bda0,
double *N, double M0, double E0, double E0, double N0, double a, double
double N0, double a, double b); b);
void GPS_Math_Sinusoid_EN_To_LatLon(double E, double N, double *phi,
double *lambda, double M0, double E0, void GPS_Math_Polycon_LatLon_To_EN(double phi, double lambda, double* E,
double N0, double a, double b); double* N, double phi0, double M0,
double E0, double N0, double a, double
void GPS_Math_TCylEA_LatLon_To_EN(double phi, double lambda, double *E, b);
double *N, double phi0, double M0, double void GPS_Math_Polycon_EN_To_LatLon(double E, double N, double* phi,
E0, double* lambda, double phi0, double M0
double N0, double a, double b); ,
void GPS_Math_TCylEA_EN_To_LatLon(double E, double N, double *phi, double E0, double N0, double a, double
double *lambda, double phi0, double M0, b);
double E0, double N0, double a, double b);
void GPS_Math_Sinusoid_LatLon_To_EN(double phi, double lambda, double* E,
void GPS_Math_Mercator_LatLon_To_EN(double phi, double lambda, double *E, double* N, double M0, double E0,
double *N, double phi0, double lambda0, double N0, double a, double b);
double E0, double N0, double a, double b void GPS_Math_Sinusoid_EN_To_LatLon(double E, double N, double* phi,
); double* lambda, double M0, double E0,
void GPS_Math_Mercator_EN_To_LatLon(double E, double N, double *phi, double N0, double a, double b);
double *lambda, double phi0,
double lambda0, double E0, double N0, void GPS_Math_TCylEA_LatLon_To_EN(double phi, double lambda, double* E,
double a, double b); double* N, double phi0, double M0, doub
le E0,
void GPS_Math_TMerc_LatLon_To_EN(double phi, double lambda, double *E, double N0, double a, double b);
double *N, double phi0, double lambda0, void GPS_Math_TCylEA_EN_To_LatLon(double E, double N, double* phi,
double E0, double N0, double F0, double* lambda, double phi0, double M0,
double a, double b); double E0, double N0, double a, double
void GPS_Math_TMerc_EN_To_LatLon(double E, double N, double *phi, b);
double *lambda, double phi0, double lambda0
, void GPS_Math_Mercator_LatLon_To_EN(double phi, double lambda, double* E,
double E0, double N0, double F0, double* N, double phi0, double lambda
double a, double b); 0,
double E0, double N0, double a, doubl
void GPS_Math_Swiss_LatLon_To_EN(double phi, double lambda, double *E, e b);
double *N,double phi0,double lambda0, void GPS_Math_Mercator_EN_To_LatLon(double E, double N, double* phi,
double E0, double N0, double a, double b); double* lambda, double phi0,
void GPS_Math_Swiss_EN_To_LatLon(double E, double N, double *phi, double lambda0, double E0, double N0,
double *lambda, double phi0, double lambda0 double a, double b);
,
double E0, double N0, double a, double b); void GPS_Math_TMerc_LatLon_To_EN(double phi, double lambda, double* E,
double* N, double phi0, double lambda0,
double E0, double N0, double F0,
double a, double b);
void GPS_Math_TMerc_EN_To_LatLon(double E, double N, double* phi,
double* lambda, double phi0, double lamb
da0,
double E0, double N0, double F0,
double a, double b);
void GPS_Math_Swiss_LatLon_To_EN(double phi, double lambda, double* E,
double* N,double phi0,double lambda0,
double E0, double N0, double a, double b
);
void GPS_Math_Swiss_EN_To_LatLon(double E, double N, double* phi,
double* lambda, double phi0, double lamb
da0,
double E0, double N0, double a, double b
);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
157 lines changed or deleted 175 lines changed or added


 gpsprot.h   gpsprot.h 
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef gpsprotocols_h #ifndef gpsprotocols_h
#define gpsprotocols_h #define gpsprotocols_h
#ifndef COMMON
#define COMMON extern
#endif
#include "gps.h" #include "gps.h"
/* /*
* Link protocols * Link protocols
*/ */
struct LINKDATA struct LINKDATA {
{
US Pid_Protocol_Array; US Pid_Protocol_Array;
US Pid_Product_Rqst; US Pid_Product_Rqst;
US Pid_Product_Data; US Pid_Product_Data;
US Pid_Ext_Product_Data; US Pid_Ext_Product_Data;
US Pid_Ack_Byte; US Pid_Ack_Byte;
US Pid_Command_Data; US Pid_Command_Data;
US Pid_Xfer_Cmplt; US Pid_Xfer_Cmplt;
US Pid_Date_Time_Data; US Pid_Date_Time_Data;
US Pid_Position_Data; US Pid_Position_Data;
skipping to change at line 54 skipping to change at line 57
US Pid_Workout_Occurrence; US Pid_Workout_Occurrence;
US Pid_Fitness_User_Profile; US Pid_Fitness_User_Profile;
US Pid_Workout_Limits; US Pid_Workout_Limits;
US Pid_Course; US Pid_Course;
US Pid_Course_Lap; US Pid_Course_Lap;
US Pid_Course_Point; US Pid_Course_Point;
US Pid_Course_Trk_Hdr; US Pid_Course_Trk_Hdr;
US Pid_Course_Trk_Data; US Pid_Course_Trk_Data;
US Pid_Course_Limits; US Pid_Course_Limits;
US Pid_Trk2_Hdr; /*Undocumented*/ US Pid_Trk2_Hdr; /*Undocumented*/
}; };
/* /*
* Command types * Command types
*/ */
#define pA010 10 #define pA010 10
#define pA011 11 #define pA011 11
int32 gps_device_command; COMMON int32 gps_device_command;
struct COMMANDDATA struct COMMANDDATA {
{
US Cmnd_Abort_Transfer; US Cmnd_Abort_Transfer;
US Cmnd_Transfer_Alm; US Cmnd_Transfer_Alm;
US Cmnd_Transfer_Posn; US Cmnd_Transfer_Posn;
US Cmnd_Transfer_Prx; US Cmnd_Transfer_Prx;
US Cmnd_Transfer_Rte; US Cmnd_Transfer_Rte;
US Cmnd_Transfer_Time; US Cmnd_Transfer_Time;
US Cmnd_Transfer_Trk; US Cmnd_Transfer_Trk;
US Cmnd_Transfer_Wpt; US Cmnd_Transfer_Wpt;
US Cmnd_Turn_Off_Pwr; US Cmnd_Turn_Off_Pwr;
US Cmnd_Start_Pvt_Data; US Cmnd_Start_Pvt_Data;
skipping to change at line 91 skipping to change at line 93
US Cmnd_Transfer_Runs; US Cmnd_Transfer_Runs;
US Cmnd_Transfer_Workouts; US Cmnd_Transfer_Workouts;
US Cmnd_Transfer_Workout_Occurrences; US Cmnd_Transfer_Workout_Occurrences;
US Cmnd_Transfer_Fitness_User_Profile; US Cmnd_Transfer_Fitness_User_Profile;
US Cmnd_Transfer_Workout_Limits; US Cmnd_Transfer_Workout_Limits;
US Cmnd_Transfer_Courses; US Cmnd_Transfer_Courses;
US Cmnd_Transfer_Course_Laps; US Cmnd_Transfer_Course_Laps;
US Cmnd_Transfer_Course_Points; US Cmnd_Transfer_Course_Points;
US Cmnd_Transfer_Course_Tracks; US Cmnd_Transfer_Course_Tracks;
US Cmnd_Transfer_Course_Limits; US Cmnd_Transfer_Course_Limits;
} }
; ;
/* /*
* Waypoint Transfer Protocol * Waypoint Transfer Protocol
*/ */
#define pA100 100 #define pA100 100
int32 gps_waypt_transfer; COMMON int32 gps_waypt_transfer;
/* /*
* Waypoint category transfer protocol * Waypoint category transfer protocol
*/ */
#define pA101 101 #define pA101 101
int32 gps_category_transfer; COMMON int32 gps_category_transfer;
/* /*
* Route Transfer Protocol * Route Transfer Protocol
*/ */
#define pA200 200 #define pA200 200
#define pA201 201 #define pA201 201
int32 gps_route_transfer; COMMON int32 gps_route_transfer;
/* /*
* Track Log Transfer Protocol * Track Log Transfer Protocol
*/ */
#define pA300 300 #define pA300 300
#define pA301 301 #define pA301 301
#define pA302 302 #define pA302 302
#define pA304 304 #define pA304 304
int32 gps_trk_transfer; COMMON int32 gps_trk_transfer;
/* /*
* Proximity Waypoint Transfer Protocol * Proximity Waypoint Transfer Protocol
*/ */
#define pA400 400 #define pA400 400
int32 gps_prx_waypt_transfer; COMMON int32 gps_prx_waypt_transfer;
/* /*
* Almanac Transfer Protocol * Almanac Transfer Protocol
*/ */
#define pA500 500 #define pA500 500
int32 gps_almanac_transfer; COMMON int32 gps_almanac_transfer;
/* /*
* Date Time Transfer * Date Time Transfer
*/ */
#define pA600 600 #define pA600 600
int32 gps_date_time_transfer; COMMON int32 gps_date_time_transfer;
/* /*
* FlightBook Transfer Protocol * FlightBook Transfer Protocol
*/ */
#define pA650 650 #define pA650 650
/*Not implemented */ /*Not implemented */
/* /*
* Position * Position
*/ */
#define pA700 700 #define pA700 700
int32 gps_position_transfer; COMMON int32 gps_position_transfer;
/* /*
* Pvt * Pvt
*/ */
#define pA800 800 #define pA800 800
int32 gps_pvt_transfer; COMMON int32 gps_pvt_transfer;
/* /*
* Lap Data Transfer * Lap Data Transfer
*/ */
#define pA906 906 #define pA906 906
int32 gps_lap_transfer; COMMON int32 gps_lap_transfer;
/* /*
* Various fitness related * Various fitness related
*/ */
#define pA1000 1000 #define pA1000 1000
int32 gps_run_transfer; COMMON int32 gps_run_transfer;
#define pA1002 1002 #define pA1002 1002
int32 gps_workout_transfer; COMMON int32 gps_workout_transfer;
#define pA1004 1004 #define pA1004 1004
int32 gps_user_profile_transfer; COMMON int32 gps_user_profile_transfer;
#define pA1005 1005 #define pA1005 1005
int32 gps_workout_limits_transfer; COMMON int32 gps_workout_limits_transfer;
#define pA1006 1006 #define pA1006 1006
int32 gps_course_transfer; COMMON int32 gps_course_transfer;
#define pA1007 1007 #define pA1007 1007
int32 gps_course_lap_transfer; COMMON int32 gps_course_lap_transfer;
#define pA1008 1008 #define pA1008 1008
int32 gps_course_point_transfer; COMMON int32 gps_course_point_transfer;
#define pA1009 1009 #define pA1009 1009
int32 gps_course_limits_transfer; COMMON int32 gps_course_limits_transfer;
#define pA1012 1012 #define pA1012 1012
int32 gps_course_trk_transfer; COMMON int32 gps_course_trk_transfer;
/* /*
* Waypoint D Type * Waypoint D Type
*/ */
#define pD100 100 #define pD100 100
#define pD101 101 #define pD101 101
#define pD102 102 #define pD102 102
#define pD103 103 #define pD103 103
#define pD104 104 #define pD104 104
#define pD105 105 #define pD105 105
#define pD106 106 #define pD106 106
#define pD107 107 #define pD107 107
#define pD108 108 #define pD108 108
#define pD109 109 #define pD109 109
#define pD110 110 #define pD110 110
#define pD150 150 #define pD150 150
#define pD151 151 #define pD151 151
#define pD152 152 #define pD152 152
#define pD154 154 #define pD154 154
#define pD155 155 #define pD155 155
int32 gps_rte_type; COMMON int32 gps_rte_type;
int32 gps_waypt_type; COMMON int32 gps_waypt_type;
/* /*
* Waypoint category types * Waypoint category types
*/ */
#define pD120 120 #define pD120 120
int32 gps_category_type; COMMON int32 gps_category_type;
/* /*
* Rte Header Type * Rte Header Type
*/ */
#define pD200 200 #define pD200 200
#define pD201 201 #define pD201 201
#define pD202 202 #define pD202 202
int32 gps_rte_hdr_type; COMMON int32 gps_rte_hdr_type;
/* /*
* Rte Link Type * Rte Link Type
*/ */
#define pD210 210 #define pD210 210
int32 gps_rte_link_type; COMMON int32 gps_rte_link_type;
/* /*
* Trk Point Type * Trk Point Type
*/ */
#define pD300 300 #define pD300 300
#define pD301 301 #define pD301 301
#define pD302 302 #define pD302 302
#define pD303 303 #define pD303 303
#define pD304 304 #define pD304 304
int32 gps_trk_type; COMMON int32 gps_trk_type;
int32 gps_run_crs_trk_type; COMMON int32 gps_run_crs_trk_type;
/* /*
* Trk Header Type * Trk Header Type
*/ */
#define pD310 310 #define pD310 310
#define pD311 311 #define pD311 311
#define pD312 312 #define pD312 312
int32 gps_trk_hdr_type; COMMON int32 gps_trk_hdr_type;
int32 gps_run_crs_trk_hdr_type; COMMON int32 gps_run_crs_trk_hdr_type;
/* /*
* Prx Wpt Type * Prx Wpt Type
*/ */
#define pD400 400 #define pD400 400
#define pD403 403 #define pD403 403
#define pD450 450 #define pD450 450
int32 gps_prx_waypt_type; COMMON int32 gps_prx_waypt_type;
/* /*
* Almanac Type * Almanac Type
*/ */
#define pD500 500 #define pD500 500
#define pD501 501 #define pD501 501
#define pD550 550 #define pD550 550
#define pD551 551 #define pD551 551
int32 gps_almanac_type; COMMON int32 gps_almanac_type;
/* /*
* Date Time Type * Date Time Type
*/ */
#define pD600 600 #define pD600 600
int32 gps_date_time_type; COMMON int32 gps_date_time_type;
/* /*
* Position Type * Position Type
*/ */
#define pD700 700 #define pD700 700
int32 gps_position_type; COMMON int32 gps_position_type;
/* /*
* Pvt Data Type * Pvt Data Type
*/ */
#define pD800 800 #define pD800 800
int32 gps_pvt_type; COMMON int32 gps_pvt_type;
/* /*
* Lap Data Type * Lap Data Type
*/ */
#define pD906 906 #define pD906 906
#define pD1001 1001 #define pD1001 1001
#define pD1011 1011 #define pD1011 1011
#define pD1015 1015 #define pD1015 1015
int32 gps_lap_type; COMMON int32 gps_lap_type;
/* /*
* Various fitness related * Various fitness related
*/ */
#define pD1000 1000 #define pD1000 1000
#define pD1009 1009 #define pD1009 1009
#define pD1010 1010 #define pD1010 1010
int32 gps_run_type; COMMON int32 gps_run_type;
#define pD1002 1002 #define pD1002 1002
#define pD1008 1008 #define pD1008 1008
int32 gps_workout_type; COMMON int32 gps_workout_type;
#define pD1003 1003 #define pD1003 1003
int32 gps_workout_occurrence_type; COMMON int32 gps_workout_occurrence_type;
#define pD1004 1004 #define pD1004 1004
int32 gps_user_profile_type; COMMON int32 gps_user_profile_type;
#define pD1005 1005 #define pD1005 1005
int32 gps_workout_limits_type; COMMON int32 gps_workout_limits_type;
#define pD1006 1006 #define pD1006 1006
int32 gps_course_type; COMMON int32 gps_course_type;
#define pD1007 1007 #define pD1007 1007
int32 gps_course_lap_type; COMMON int32 gps_course_lap_type;
#define pD1012 1012 #define pD1012 1012
int32 gps_course_point_type; COMMON int32 gps_course_point_type;
#define pD1013 1013 #define pD1013 1013
int32 gps_course_limits_type; COMMON int32 gps_course_limits_type;
/* /*
* Link protocol type * Link protocol type
*/ */
#define pL000 0 #define pL000 0
#define pL001 1 #define pL001 1
#define pL002 2 #define pL002 2
int32 gps_link_type; COMMON int32 gps_link_type;
struct GPS_MODEL_PROTOCOL struct GPS_MODEL_PROTOCOL {
{
US id; US id;
int32 link; int32 link;
int32 command; int32 command;
int32 wayptt; int32 wayptt;
int32 wayptd; int32 wayptd;
int32 rtea; int32 rtea;
int32 rted0; int32 rted0;
int32 rted1; int32 rted1;
int32 trka; int32 trka;
int32 trkd; int32 trkd;
int32 prxa; int32 prxa;
int32 prxd; int32 prxd;
int32 alma; int32 alma;
int32 almd; int32 almd;
} }
; ;
US GPS_Protocol_Version_Change(US id, US version); US GPS_Protocol_Version_Change(US id, US version);
int32 GPS_Protocol_Table_Set(US id); COMMON int32 GPS_Protocol_Table_Set(US id);
void GPS_Protocol_Error(US tag, US data); void GPS_Protocol_Error(US tag, US data);
void GPS_Unknown_Protocol_Print(void); void GPS_Unknown_Protocol_Print(void);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 79 change blocks. 
145 lines changed or deleted 146 lines changed or added


 gpsread.h   gpsread.h 
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef gpsread_h #ifndef gpsread_h
#define gpsread_h #define gpsread_h
#include "gps.h" #include "gps.h"
time_t GPS_Time_Now(void); time_t GPS_Time_Now(void);
int32 GPS_Serial_Packet_Read(gpsdevh *fd, GPS_PPacket *packet); int32 GPS_Serial_Packet_Read(gpsdevh* fd, GPS_PPacket* packet);
int32 GPS_Serial_Get_Ack(gpsdevh *fd, GPS_PPacket *tra, GPS_PPacket *rec); int32 GPS_Serial_Get_Ack(gpsdevh* fd, GPS_PPacket* tra, GPS_PPacket* rec
);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
3 lines changed or deleted 4 lines changed or added


 gpsrqst.h   gpsrqst.h 
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef gpsrqst_h #ifndef gpsrqst_h
#define gpsrqst_h #define gpsrqst_h
#include "gps.h" #include "gps.h"
int32 GPS_Rqst_Send_Time(gpsdevh *fd, time_t Time); int32 GPS_Rqst_Send_Time(gpsdevh* fd, time_t Time);
int32 GPS_Rqst_Send_Position(gpsdevh *fd, double lat, double lon); int32 GPS_Rqst_Send_Position(gpsdevh* fd, double lat, double lon);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added


 gpssend.h   gpssend.h 
skipping to change at line 13 skipping to change at line 13
{ {
#endif #endif
#ifndef gpssend_h #ifndef gpssend_h
#define gpssend_h #define gpssend_h
#include "gps.h" #include "gps.h"
#define GPS_ARB_LEN 1024 #define GPS_ARB_LEN 1024
int32 GPS_Serial_Write_Packet(gpsdevh *fd, GPS_PPacket packet); int32 GPS_Serial_Write_Packet(gpsdevh* fd, GPS_PPacket packet);
int32 GPS_Serial_Send_Ack(gpsdevh *fd, GPS_PPacket *tra, GPS_PPacket *rec) int32 GPS_Serial_Send_Ack(gpsdevh* fd, GPS_PPacket* tra, GPS_PPacket* re
; c);
void GPS_Make_Packet(GPS_PPacket *packet, US type, UC *data, uint32 n); void GPS_Make_Packet(GPS_PPacket* packet, US type, UC* data, uint32 n);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 gpsserial.h   gpsserial.h 
skipping to change at line 13 skipping to change at line 13
{ {
#endif #endif
#ifndef gpsserial_h #ifndef gpsserial_h
#define gpsserial_h #define gpsserial_h
#include "gps.h" #include "gps.h"
#define usecDELAY 180000 /* Microseconds before GPS sends A001 */ #define usecDELAY 180000 /* Microseconds before GPS sends A001 */
int32 GPS_Serial_Chars_Ready(gpsdevh * fd); int32 GPS_Serial_Chars_Ready(gpsdevh* fd);
// int32 GPS_Serial_Close(int32 fd, const char *port); // int32 GPS_Serial_Close(int32 fd, const char *port);
// int32 GPS_Serial_Open(int32 *fd, const char *port); // int32 GPS_Serial_Open(int32 *fd, const char *port);
// int32 GPS_Serial_Open_NMEA(int32 *fd, const char *port); // int32 GPS_Serial_Open_NMEA(int32 *fd, const char *port);
// int32 GPS_Serial_Restoretty(const char *port); // int32 GPS_Serial_Restoretty(const char *port);
// int32 GPS_Serial_Savetty(const char *port); // int32 GPS_Serial_Savetty(const char *port);
int32 GPS_Serial_On(const char *port, gpsdevh **fd); int32 GPS_Serial_On(const char* port, gpsdevh** fd);
int32 GPS_Serial_Off(gpsdevh *fd); int32 GPS_Serial_Off(gpsdevh* fd);
int32 GPS_Serial_Wait(gpsdevh *fd); int32 GPS_Serial_Wait(gpsdevh* fd);
int32 GPS_Serial_Flush(gpsdevh *fd); int32 GPS_Serial_Flush(gpsdevh* fd);
// int32 GPS_Serial_On_NMEA(const char *port, gpsdevh **fd); // int32 GPS_Serial_On_NMEA(const char *port, gpsdevh **fd);
int32 GPS_Serial_Read(gpsdevh *fd, void *ibuf, int size); int32 GPS_Serial_Read(gpsdevh* fd, void* ibuf, int size);
int32 GPS_Serial_Write(gpsdevh *fd, const void *obuf, int size); int32 GPS_Serial_Write(gpsdevh* fd, const void* obuf, int size);
int32 GPS_Serial_Write_Packet(gpsdevh *fd, GPS_PPacket packet); int32 GPS_Serial_Write_Packet(gpsdevh* fd, GPS_PPacket packet);
int32 GPS_Serial_Send_Ack(gpsdevh *fd, GPS_PPacket *tra, GPS_PPacket *rec) int32 GPS_Serial_Send_Ack(gpsdevh* fd, GPS_PPacket* tra, GPS_PPacket* re
; c);
void GPS_Serial_Error(const char *hdr, ...); void GPS_Serial_Error(const char* hdr, ...);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 3 change blocks. 
11 lines changed or deleted 11 lines changed or added


 gpsusbcommon.h   gpsusbcommon.h 
skipping to change at line 26 skipping to change at line 26
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
*/ */
/* /*
* The 'low level ops' are registered by the OS layer (win32, libusb, etc.) * The 'low level ops' are registered by the OS layer (win32, libusb, etc.)
* to provide gruntwork features for the common USB layer. * to provide gruntwork features for the common USB layer.
*/ */
typedef int (*gusb_llop_get)(garmin_usb_packet *ibuf, size_t sz); typedef int (*gusb_llop_get)(garmin_usb_packet* ibuf, size_t sz);
typedef int (*gusb_llop_send)(const garmin_usb_packet *opkt, size_t sz); typedef int (*gusb_llop_send)(const garmin_usb_packet* opkt, size_t sz);
typedef int (*gusb_llop_close) (gpsdevh *dh); typedef int (*gusb_llop_close)(gpsdevh* dh);
typedef struct gusb_llops { typedef struct gusb_llops {
gusb_llop_get llop_get_intr; gusb_llop_get llop_get_intr;
gusb_llop_get llop_get_bulk; gusb_llop_get llop_get_bulk;
gusb_llop_send llop_send; gusb_llop_send llop_send;
gusb_llop_close llop_close; gusb_llop_close llop_close;
int max_tx_size; int max_tx_size;
} gusb_llops_t; } gusb_llops_t;
/* Provided by the common code. */ /* Provided by the common code. */
void gusb_syncup(void); void gusb_syncup(void);
void gusb_register_ll(struct gusb_llops *); void gusb_register_ll(struct gusb_llops*);
void gusb_list_units(void); void gusb_list_units(void);
/* Provided by the OS layers */ /* Provided by the OS layers */
// int gusb_init(const char *portname, gpsdev **dh); // int gusb_init(const char *portname, gpsdev **dh);
 End of changes. 3 change blocks. 
9 lines changed or deleted 9 lines changed or added


 gpsusbint.h   gpsusbint.h 
skipping to change at line 24 skipping to change at line 24
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
*/ */
int32 GPS_Packet_Read_usb(gpsdevh *fd, GPS_PPacket *packet, int eatbulk); int32 GPS_Packet_Read_usb(gpsdevh* fd, GPS_PPacket* packet, int eatbulk);
void GPS_Make_Packet_usb(GPS_PPacket *packet, UC type, UC *data, int16 n); void GPS_Make_Packet_usb(GPS_PPacket* packet, UC type, UC* data, int16 n);
int32 GPS_Write_Packet_usb(gpsdevh *fd, GPS_PPacket packet); int32 GPS_Write_Packet_usb(gpsdevh* fd, GPS_PPacket packet);
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 gpsutil.h   gpsutil.h 
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef gpsutil_h #ifndef gpsutil_h
#define gpsutil_h #define gpsutil_h
#include "gps.h" #include "gps.h"
int32 GPS_Util_Little(void); int32 GPS_Util_Little(void);
US GPS_Util_Get_Short(const UC *s); US GPS_Util_Get_Short(const UC* s);
void GPS_Util_Put_Short(UC *s, const US v); void GPS_Util_Put_Short(UC* s, const US v);
int32 GPS_Util_Get_Int(const UC *s); int32 GPS_Util_Get_Int(const UC* s);
void GPS_Util_Put_Int(UC *s, const int32 v); void GPS_Util_Put_Int(UC* s, const int32 v);
double GPS_Util_Get_Double(const UC *s); double GPS_Util_Get_Double(const UC* s);
void GPS_Util_Put_Double(UC *s, const double v); void GPS_Util_Put_Double(UC* s, const double v);
float GPS_Util_Get_Float(const UC *s); float GPS_Util_Get_Float(const UC* s);
void GPS_Util_Put_Float(UC *s, const float v); void GPS_Util_Put_Float(UC* s, const float v);
void GPS_Util_Canon(int32 state); void GPS_Util_Canon(int32 state);
int32 GPS_Util_Block(int32 fd, int32 state); int32 GPS_Util_Block(int32 fd, int32 state);
void GPS_Util_Put_Uint(UC *s, const uint32 v); void GPS_Util_Put_Uint(UC* s, const uint32 v);
uint32 GPS_Util_Get_Uint(const UC *s); uint32 GPS_Util_Get_Uint(const UC* s);
void GPS_Warning(char *s); void GPS_Warning(char* s);
void GPS_Error(char *fmt, ...); void GPS_Error(char* fmt, ...);
void GPS_Serial_Error(const char *hdr, ...); void GPS_Serial_Error(const char* hdr, ...);
void GPS_Fatal(char *s); void GPS_Fatal(char* s);
void GPS_Enable_Error(void); void GPS_Enable_Error(void);
void GPS_Enable_Warning(void); void GPS_Enable_Warning(void);
void GPS_Disable_Error(void); void GPS_Disable_Error(void);
void GPS_Disable_Warning(void); void GPS_Disable_Warning(void);
void GPS_User(const char *fmt, ...); void GPS_User(const char* fmt, ...);
void GPS_Disable_User(void); void GPS_Disable_User(void);
void GPS_Enable_User(void); void GPS_Enable_User(void);
void GPS_Diagnose(int32 c); void GPS_Diagnose(int32 c);
void GPS_Diag(const char *fmt, ...); void GPS_Diag(const char* fmt, ...);
void GPS_Enable_Diagnose(void); void GPS_Enable_Diagnose(void);
void GPS_Disable_Diagnose(void); void GPS_Disable_Diagnose(void);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 3 change blocks. 
29 lines changed or deleted 29 lines changed or added


 gpx.h   gpx.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: gpx.h,v 1.1 2009/07/05 21:14:56 robertl Exp $ // $Id: gpx.h,v 1.1 2009-07-05 21:14:56 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 grtcirc.h   grtcirc.h 
skipping to change at line 25 skipping to change at line 25
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
*/ */
#ifndef GRTCIRC_H #ifndef GRTCIRC_H
#define GRTCIRC_H #define GRTCIRC_H
double gcdist( double lat1, double lon1, double lat2, double lon2 ); double gcdist(double lat1, double lon1, double lat2, double lon2);
double heading( double lat1, double lon1, double lat2, double lon2 ); double heading(double lat1, double lon1, double lat2, double lon2);
double heading_true_degrees( double lat1, double lon1, double lat2, double double heading_true_degrees(double lat1, double lon1, double lat2, double l
lon2 ); on2);
double linedistprj(double lat1, double lon1,
double lat2, double lon2,
double lat3, double lon3,
double* prjlat, double* prjlon,
double* frac );
double linedist(double lat1, double lon1, double linedist(double lat1, double lon1,
double lat2, double lon2, double lat2, double lon2,
double lat3, double lon3 ); double lat3, double lon3);
double radtometers( double rads ); double radtometers(double rads);
double radtomiles( double rads ); double radtomiles(double rads);
void linepart(double lat1, double lon1, void linepart(double lat1, double lon1,
double lat2, double lon2, double lat2, double lon2,
double frac, double frac,
double *reslat, double *reslon ); double* reslat, double* reslon);
/* Degrees to radians */ /* Degrees to radians */
#define DEG(x) ((x)*180.0/M_PI) #define DEG(x) ((x)*180.0/M_PI)
/* Radians to degrees */ /* Radians to degrees */
#define RAD(x) ((x)*M_PI/180.0) #define RAD(x) ((x)*M_PI/180.0)
#endif #endif
 End of changes. 4 change blocks. 
11 lines changed or deleted 17 lines changed or added


 help.h   help.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: help.h,v 1.4 2009/11/02 20:38:02 robertl Exp $ // $Id: help.h,v 1.4 2009-11-02 20:38:02 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 holux.h   holux.h 
skipping to change at line 21 skipping to change at line 21
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
*/ */
/* header file for the holux gm-100 wpo format */ /* header file for the holux gm-100 wpo format */
#ifndef BYTE #ifndef BYTE
#define BYTE unsigned char #define BYTE unsigned char
#endif #endif
#ifndef WORD #ifndef WORD
#define WORD unsigned short #define WORD unsigned short
#endif #endif
#ifndef DWORD #ifndef DWORD
skipping to change at line 46 skipping to change at line 46
#define GM100_WPO_FILE_SIZE 25600 /* size of a holux gm-100 wpo file used by the GM-100*/ #define GM100_WPO_FILE_SIZE 25600 /* size of a holux gm-100 wpo file used by the GM-100*/
#define ROUTESTART 23600 /* Offset for start of route */ #define ROUTESTART 23600 /* Offset for start of route */
#define MAXWPT 500 /* max number of waypoint */ #define MAXWPT 500 /* max number of waypoint */
#define MAXRTE 20 /* max number of routes */ #define MAXRTE 20 /* max number of routes */
#define MAXWPTINRTE 30 #define MAXWPTINRTE 30
#define WPT_HDR_ID 0x5C38A631 /* waypoint header */ #define WPT_HDR_ID 0x5C38A631 /* waypoint header */
#define RTE_HDR_ID 0xD87F59F0 /* route header */ #define RTE_HDR_ID 0xD87F59F0 /* route header */
/* Offsets */ /* Offsets */
#define OFFS_WPT 0x05E4 /* offet for waypoint table */ #define OFFS_WPT 0x05E4 /* offet for waypoint table */
typedef struct tagWPTHDR typedef struct tagWPTHDR {
{ DWORD id; /* WPT_HDR_ID */
DWORD id; /* WPT_HDR_ID */ short num; /* Current wpt numbe
short num; /* Current wpt numbe r */
r */ short next; /* next wpt number *
short next; /* next wpt number * /
/ short idx[MAXWPT]; /* saving wpt index here for
short idx[MAXWPT]; /* saving wpt index here for each wpt, default was -1*/
each wpt, default was -1*/ BYTE used[MAXWPT]; /* Have the match wpt been used (0xF
BYTE used[MAXWPT]; /* Have the match wpt been u F), Default was 0 */
sed (0xFF), Default was 0 */ } WPTHDR;
}WPTHDR;
typedef struct tagPOINT {
typedef struct tagPOINT signed int iLongitude;
{ signed int iLatitude;
signed int iLongitude; } POINT;
signed int iLatitude;
}POINT; typedef struct tagDATE {
BYTE day;
typedef struct tagDATE BYTE month;
{ short year;
BYTE day; } HX_DATE;
BYTE month;
short year; typedef struct tagWPT {
}HX_DATE; char name[8]; /* wpt name */
char comment[12]; /* comment string */
typedef struct tagWPT POINT pt; /* waypoint location
{ */
char name[8]; /* wpt name */ short vocidx; /* voice index, not used
char comment[12]; /* comment string */ */
POINT pt; /* waypoint location short usecount; /* counter: times used by ro
*/ utes */
short vocidx; /* voice index, HX_DATE date; /* date */
not used */ unsigned time; /* time */
short usecount; /* counter: times us char checked; /* Active or not */
ed by routes */ BYTE dummy[3]; /* fill bytes */
HX_DATE date; /* date */ } WPT;
unsigned time; /* time */
char checked; /* Active or not typedef struct tagRTEHDR {
*/ DWORD id; /* RTE_HDR_ID *
BYTE dummy[3]; /* fill bytes */ /
}WPT; short num; /* Current
route number */
typedef struct tagRTEHDR short next; /* next rou
{ te number */
DWORD id; /* RTE_HDR_ID * signed short idx[MAXRTE]; /* saving route index here for each
/ route, default was -1 */
short num; /* Current BYTE used[MAXRTE]; /* Have the wpt been used (
route number */ 0xFF), Default was 0 */
short next; /* next rou signed short rteno; /* Saving navigatio
te number */ nroute number here */
signed short idx[MAXRTE]; /* saving route index here } RTEHDR;
for each route, default was -1 */
BYTE used[MAXRTE]; /* Have the wpt bee typedef struct tagRTE {
n used (0xFF), Default was 0 */ char name[8]; /* route name */
signed short rteno; /* Saving navigatio char comment[12]; /* comment string */
nroute number here */ short wptnum; /* the total waypoi
}RTEHDR; nt number */
short wptidx[MAXWPTINRTE]; /* the waypoint index in this route
typedef struct tagRTE */
{ short reserved;
char name[8]; /* route name */ int date; /* date */
char comment[12]; /* comment string * int time; /* time */
/ } RTE;
short wptnum; /* the total waypoi
nt number */
short wptidx[MAXWPTINRTE]; /* the waypoint index in th
is route */
short reserved;
int date; /* date */
int time; /* time */
}RTE;
 End of changes. 3 change blocks. 
2 lines changed or deleted 2 lines changed or added


 ibm891.h   ibm891.h 
skipping to change at line 36 skipping to change at line 36
#define cet_cs_name_ibm891 "IBM891" #define cet_cs_name_ibm891 "IBM891"
const char *cet_cs_alias_ibm891[] = const char *cet_cs_alias_ibm891[] =
{ {
"IBM891", "891", "CP891", NULL "IBM891", "891", "CP891", NULL
}; };
#define cet_ucs4_ofs_ibm891 128 #define cet_ucs4_ofs_ibm891 128
#define cet_ucs4_cnt_ibm891 1 #define cet_ucs4_cnt_ibm891 1
const int cet_ucs4_map_ibm891[cet_ucs4_cnt_ibm891]; const int cet_ucs4_map_ibm891[cet_ucs4_cnt_ibm891] = {0};
#define cet_ucs4_to_ibm891_ct 1 #define cet_ucs4_to_ibm891_ct 1
const cet_ucs4_link_t cet_ucs4_to_ibm891_links[cet_ucs4_to_ibm891_ct]; const cet_ucs4_link_t cet_ucs4_to_ibm891_links[cet_ucs4_to_ibm891_ct] = {0} ;
/* /*
#define cet_ucs4_to_ibm891_extra_ct 0 #define cet_ucs4_to_ibm891_extra_ct 0
const cet_ucs4_link_t cet_ucs4_to_ibm891_extra[cet_ucs4_to_ibm891_extra_ct] = {}; const cet_ucs4_link_t cet_ucs4_to_ibm891_extra[cet_ucs4_to_ibm891_extra_ct] = {0};
*/ */
cet_cs_vec_t cet_cs_vec_ibm891 = /* defined in cet.h */ cet_cs_vec_t cet_cs_vec_ibm891 = /* defined in cet.h */
{ {
cet_cs_name_ibm891, /* name of character set */ cet_cs_name_ibm891, /* name of character set */
cet_cs_alias_ibm891, /* alias table */ cet_cs_alias_ibm891, /* alias table */
NULL, /* ... to UCS-4 converter (multi-byt e) */ NULL, /* ... to UCS-4 converter (multi-byt e) */
NULL, /* UCS-4 to ... converter (multi-byt e) */ NULL, /* UCS-4 to ... converter (multi-byt e) */
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 ibm903.h   ibm903.h 
skipping to change at line 36 skipping to change at line 36
#define cet_cs_name_ibm903 "IBM903" #define cet_cs_name_ibm903 "IBM903"
const char *cet_cs_alias_ibm903[] = const char *cet_cs_alias_ibm903[] =
{ {
"IBM903", "903", "CP903", NULL "IBM903", "903", "CP903", NULL
}; };
#define cet_ucs4_ofs_ibm903 128 #define cet_ucs4_ofs_ibm903 128
#define cet_ucs4_cnt_ibm903 1 #define cet_ucs4_cnt_ibm903 1
const int cet_ucs4_map_ibm903[cet_ucs4_cnt_ibm903]; const int cet_ucs4_map_ibm903[cet_ucs4_cnt_ibm903] = {0};
#define cet_ucs4_to_ibm903_ct 1 #define cet_ucs4_to_ibm903_ct 1
const cet_ucs4_link_t cet_ucs4_to_ibm903_links[cet_ucs4_to_ibm903_ct]; const cet_ucs4_link_t cet_ucs4_to_ibm903_links[cet_ucs4_to_ibm903_ct] = {0} ;
/* /*
#define cet_ucs4_to_ibm903_extra_ct 0 #define cet_ucs4_to_ibm903_extra_ct 0
const cet_ucs4_link_t cet_ucs4_to_ibm903_extra[cet_ucs4_to_ibm903_extra_ct] = {}; const cet_ucs4_link_t cet_ucs4_to_ibm903_extra[cet_ucs4_to_ibm903_extra_ct] = {0};
*/ */
cet_cs_vec_t cet_cs_vec_ibm903 = /* defined in cet.h */ cet_cs_vec_t cet_cs_vec_ibm903 = /* defined in cet.h */
{ {
cet_cs_name_ibm903, /* name of character set */ cet_cs_name_ibm903, /* name of character set */
cet_cs_alias_ibm903, /* alias table */ cet_cs_alias_ibm903, /* alias table */
NULL, /* ... to UCS-4 converter (multi-byt e) */ NULL, /* ... to UCS-4 converter (multi-byt e) */
NULL, /* UCS-4 to ... converter (multi-byt e) */ NULL, /* UCS-4 to ... converter (multi-byt e) */
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 inifile.h   inifile.h 
skipping to change at line 26 skipping to change at line 26
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
*/ */
#ifndef HAVE_INIFILE_H #ifndef HAVE_INIFILE_H
#define HAVE_INIFILE_H #define HAVE_INIFILE_H
#include "defs.h" #include "defs.h"
typedef struct inifile_s typedef struct inifile_s {
{ int isecs; /* number of sections */
int isecs; /* number of sections */ queue secs; /* sections */
queue secs; /* sections */ gbuint8 unicode:1;
gbuint8 unicode:1;
} inifile_t; } inifile_t;
/* /*
inifile_init: inifile_init:
reads inifile filename into memory reads inifile filename into memory
myname represents the calling module myname represents the calling module
*/ */
inifile_t * inifile_init(const char *filename, const char *myname); inifile_t* inifile_init(const char* filename, const char* myname);
void inifile_done(inifile_t *inifile); void inifile_done(inifile_t* inifile);
int inifile_has_section(const inifile_t *inifile, const char *section); int inifile_has_section(const inifile_t* inifile, const char* section);
/* /*
inifile_readstr: inifile_readstr:
returns NULL if not found, otherwise a pointer to the value of key . .. returns NULL if not found, otherwise a pointer to the value of key . ..
all key values are valid entities until "inifile_done" all key values are valid entities until "inifile_done"
*/ */
char *inifile_readstr(const inifile_t *inifile, const char *section, const char *key); char* inifile_readstr(const inifile_t* inifile, const char* section, const char* key);
/* /*
inifile_readint: inifile_readint:
on success the value is stored into "*value" and "inifile_readint" r eturns 1, on success the value is stored into "*value" and "inifile_readint" r eturns 1,
otherwise inifile_readint returns 0 otherwise inifile_readint returns 0
*/ */
int inifile_readint(const inifile_t *inifile, const char *section, const ch ar *key, int *value); int inifile_readint(const inifile_t* inifile, const char* section, const ch ar* key, int* value);
/* /*
inifile_readint_def: inifile_readint_def:
if found inifile_readint_def returns value of key, otherwise a defau lt value "def" if found inifile_readint_def returns value of key, otherwise a defau lt value "def"
*/ */
int inifile_readint_def(const inifile_t *inifile, const char *section, cons t char *key, const int def); int inifile_readint_def(const inifile_t* inifile, const char* section, cons t char* key, const int def);
#endif #endif
 End of changes. 6 change blocks. 
11 lines changed or deleted 10 lines changed or added


 iso_8859_1.h   iso_8859_1.h 
skipping to change at line 39 skipping to change at line 39
{ {
"ISO-8859-1", "819", "CP819", "csISOLatin1", "ISO-8859-1", "819", "CP819", "csISOLatin1",
"IBM819", "ISO8859-1", "iso-ir-100", "ISO_8859-1", "IBM819", "ISO8859-1", "iso-ir-100", "ISO_8859-1",
"ISO_8859-1:1987", "l1", "lat1", "latin1", "ISO_8859-1:1987", "l1", "lat1", "latin1",
"Latin-1", NULL "Latin-1", NULL
}; };
#define cet_ucs4_ofs_iso_8859_1 256 #define cet_ucs4_ofs_iso_8859_1 256
#define cet_ucs4_cnt_iso_8859_1 1 #define cet_ucs4_cnt_iso_8859_1 1
const int cet_ucs4_map_iso_8859_1[cet_ucs4_cnt_iso_8859_1]; const int cet_ucs4_map_iso_8859_1[cet_ucs4_cnt_iso_8859_1] = {0};
#define cet_ucs4_to_iso_8859_1_ct 1 #define cet_ucs4_to_iso_8859_1_ct 1
const cet_ucs4_link_t cet_ucs4_to_iso_8859_1_links[cet_ucs4_to_iso_8859_1_c t]; const cet_ucs4_link_t cet_ucs4_to_iso_8859_1_links[cet_ucs4_to_iso_8859_1_c t] = {{0}};
/* /*
#define cet_ucs4_to_iso_8859_1_extra_ct 0 #define cet_ucs4_to_iso_8859_1_extra_ct 0
const cet_ucs4_link_t cet_ucs4_to_iso_8859_1_extra[cet_ucs4_to_iso_8859_1_e xtra_ct] = {}; const cet_ucs4_link_t cet_ucs4_to_iso_8859_1_extra[cet_ucs4_to_iso_8859_1_e xtra_ct] = {};
*/ */
cet_cs_vec_t cet_cs_vec_iso_8859_1 = /* defined in cet.h */ cet_cs_vec_t cet_cs_vec_iso_8859_1 = /* defined in cet.h */
{ {
cet_cs_name_iso_8859_1, /* name of character set */ cet_cs_name_iso_8859_1, /* name of character set */
cet_cs_alias_iso_8859_1, /* alias table */ cet_cs_alias_iso_8859_1, /* alias table */
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 latlng.h   latlng.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: latlng.h,v 1.1 2009/07/05 21:14:56 robertl Exp $ // $Id: latlng.h,v 1.1 2009-07-05 21:14:56 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 magellan.h   magellan.h 
skipping to change at line 27 skipping to change at line 27
*/ */
/* /*
* Table of "interesting" Magellan models. * Table of "interesting" Magellan models.
* Selfishly, if I haven't heard of it, it's not in the table. * Selfishly, if I haven't heard of it, it's not in the table.
* This doesn't mean I actually have TRIED all models listed below. * This doesn't mean I actually have TRIED all models listed below.
* (Donations welcome. :-) * (Donations welcome. :-)
*/ */
typedef enum { typedef enum {
mm_unknown = 0 , mm_unknown = 0 ,
mm_gps315320, mm_gps315320,
mm_map410, mm_map410,
mm_map330, mm_map330,
mm_gps310, mm_gps310,
mm_meridian, mm_meridian,
mm_sportrak mm_sportrak
} meridian_model; } meridian_model;
typedef struct pid_to_model { typedef struct pid_to_model {
meridian_model model; meridian_model model;
int pid; int pid;
const char *model_n; const char* model_n;
} pid_to_model_t; } pid_to_model_t;
typedef struct icon_mapping { typedef struct icon_mapping {
const char *token; const char* token;
const char *icon; const char* icon;
} icon_mapping_t; } icon_mapping_t;
const char * mag_find_descr_from_token(const char *token); const char* mag_find_descr_from_token(const char* token);
const char * mag_find_token_from_descr(const char *icon); const char* mag_find_token_from_descr(const char* icon);
unsigned int mag_checksum(const char *const buf); unsigned int mag_checksum(const char* const buf);
char * m330_cleanse(char *istring); char* m330_cleanse(char* istring);
waypoint * mag_trkparse(char *trkmsg); waypoint* mag_trkparse(char* trkmsg);
void mag_rteparse(char *rtemsg); void mag_rteparse(char* rtemsg);
 End of changes. 6 change blocks. 
16 lines changed or deleted 16 lines changed or added


 mainwindow.h   mainwindow.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: mainwindow.h,v 1.12 2010/06/27 21:12:37 robertl Exp $ // $Id: mainwindow.h,v 1.13 2010-11-01 03:30:42 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
skipping to change at line 31 skipping to change at line 31
// //
#ifndef MAINWINDOW_H #ifndef MAINWINDOW_H
#define MAINWINDOW_H #define MAINWINDOW_H
#include "ui_mainwinui.h" #include "ui_mainwinui.h"
#include "format.h" #include "format.h"
#include "filterdata.h" #include "filterdata.h"
#include "babeldata.h" #include "babeldata.h"
#include "upgrade.h" #include "upgrade.h"
#include <QTranslator>
class MainWindow: public QMainWindow { class MainWindow: public QMainWindow {
Q_OBJECT Q_OBJECT
public: public:
MainWindow(QWidget* parent); MainWindow(QWidget* parent);
~MainWindow(); ~MainWindow();
private: private:
Ui_MainWindow ui; Ui_MainWindow ui;
QList<Format> formatList; QList<Format> formatList;
QString babelVersion; QString babelVersion;
bool is_beta; bool is_beta;
QPixmap lights[4]; QPixmap lights[4];
QStringList charSets; QStringList charSets;
AllFiltersData filterData; AllFiltersData filterData;
BabelData bd; BabelData bd;
bool fmtChgInterlock; bool fmtChgInterlock;
QTranslator translator; // translation for the GUI.
QTranslator translatorCore; // translation for the core application.
QTranslator translatorQt; // translations for Qt.
QString currLang; // currently loaded language.
QString langPath; // Absolute path of language files.
private: private:
void loadFormats(); void loadFormats();
void loadLanguage(const QString& rLanguage);
void switchTranslator(QTranslator&, const QString&);
void createLanguageMenu();
QString filterForFormat(int idx); QString filterForFormat(int idx);
QString ensureExtensionPresent(const QString &nanme, int idx); QString ensureExtensionPresent(const QString &nanme, int idx);
QString findBabelVersion(); QString findBabelVersion();
bool filterForFormatIncludes(int idx, const QString &s); bool filterForFormatIncludes(int idx, const QString &s);
int formatIndexFromName(bool isFile, const QString &); int formatIndexFromName(bool isFile, const QString &);
QList<int>inputFileFormatIndices(); QList<int>inputFileFormatIndices();
QList<int>inputDeviceFormatIndices(); QList<int>inputDeviceFormatIndices();
QList<int>outputFileFormatIndices(); QList<int>outputFileFormatIndices();
QList<int>outputDeviceFormatIndices(); QList<int>outputDeviceFormatIndices();
int currentComboFormatIndex(QComboBox *comboBox); int currentComboFormatIndex(QComboBox *comboBox);
skipping to change at line 91 skipping to change at line 101
void updateFilterStatus(); void updateFilterStatus();
void setWidgetValues(); void setWidgetValues();
void getWidgetValues(); void getWidgetValues();
UpgradeCheck *upgrade; UpgradeCheck *upgrade;
bool allowBetaUpgrades(); bool allowBetaUpgrades();
void osLoadDeviceNameCombos(QComboBox*); void osLoadDeviceNameCombos(QComboBox*);
QString getFormatNameForExtension(QString ext); QString getFormatNameForExtension(QString ext);
protected: protected:
void closeEvent(QCloseEvent*); void closeEvent(QCloseEvent*);
void changeEvent(QEvent*);
private slots: private slots:
void aboutActionX(); void aboutActionX();
void applyActionX(); void applyActionX();
void browseInputFile(); void browseInputFile();
void browseOutputFile(); void browseOutputFile();
void closeActionX(); void closeActionX();
void donateActionX(); void donateActionX();
void dragEnterEvent(QDragEnterEvent *); void dragEnterEvent(QDragEnterEvent *);
void dropEvent(QDropEvent *event); void dropEvent(QDropEvent *event);
void filtersClicked(); void filtersClicked();
void helpActionX(); void helpActionX();
void inputDeviceOptBtnClicked(); void inputDeviceOptBtnClicked();
void inputFileOptBtnClicked(); void inputFileOptBtnClicked();
void inputFormatChanged(int); void inputFormatChanged(int);
void inputOptionButtonClicked(); void inputOptionButtonClicked();
void inputFileNameEdited();
void moreOptionButtonClicked(); void moreOptionButtonClicked();
void outputDeviceOptBtnClicked(); void outputDeviceOptBtnClicked();
void outputFileOptBtnClicked(); void outputFileOptBtnClicked();
void outputFileNameEdited();
void outputFormatChanged(int); void outputFormatChanged(int);
void outputOptionButtonClicked(); void outputOptionButtonClicked();
void preferencesActionX(); void preferencesActionX();
void visitWebsiteActionX(); void visitWebsiteActionX();
void resetFormatDefaults(); void resetFormatDefaults();
void upgradeCheckActionX(); void upgradeCheckActionX();
void slotLanguageChanged(QAction* action);
}; };
#endif #endif
 End of changes. 8 change blocks. 
1 lines changed or deleted 15 lines changed or added


 map.h   map.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: map.h,v 1.1 2009/07/05 21:14:56 robertl Exp $ // $Id: map.h,v 1.1 2009-07-05 21:14:56 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 mapsend.h   mapsend.h 
skipping to change at line 32 skipping to change at line 32
* Mapsend File Format Description Revision 1.1, March 6, 2002 from Thales . * Mapsend File Format Description Revision 1.1, March 6, 2002 from Thales .
* *
* Note this file format was clearly NOT designed for cross-architecture * Note this file format was clearly NOT designed for cross-architecture
* portability. In fact, because of the pascal nature of the 'string' * portability. In fact, because of the pascal nature of the 'string'
* data type described in that document, it's impractical to describe * data type described in that document, it's impractical to describe
* a 'struct waypoint' in C. * a 'struct waypoint' in C.
* *
*/ */
typedef struct { typedef struct {
char ms_length; char ms_length;
char ms_signature[11]; char ms_signature[11];
char ms_version[2]; char ms_version[2];
char ms_type; char ms_type;
char _ms_type[3]; char _ms_type[3];
} mapsend_hdr; } mapsend_hdr;
typedef enum { typedef enum {
ms_type_rgn = 0, ms_type_rgn = 0,
ms_type_wpt = 1, ms_type_wpt = 1,
ms_type_track = 2, ms_type_track = 2,
ms_type_log = 3 ms_type_log = 3
} ms_type; } ms_type;
 End of changes. 2 change blocks. 
9 lines changed or deleted 9 lines changed or added


 navilink.h   navilink.h 
skipping to change at line 32 skipping to change at line 32
#ifndef gpsbabel_navilink_h_included #ifndef gpsbabel_navilink_h_included
#define gpsbabel_navilink_h_included #define gpsbabel_navilink_h_included
#include <time.h> #include <time.h>
#include "defs.h" #include "defs.h"
#define SBP_RECORD_LEN 32 #define SBP_RECORD_LEN 32
/* defined in navilink.c */ /* defined in navilink.c */
waypoint *navilink_decode_logpoint(const unsigned char *buffer); waypoint* navilink_decode_logpoint(const unsigned char* buffer);
unsigned navilink_checksum_packet(const unsigned char *packet, unsigned len unsigned navilink_checksum_packet(const unsigned char* packet, unsigned len
gth); gth);
/* defined in sbn.c */ /* defined in sbn.c */
int locosys_decode_file_id(char *header, size_t len); int locosys_decode_file_id(char* header, size_t len);
#ifdef THIS_IS_ONLY_FOR_REFERENCE #ifdef THIS_IS_ONLY_FOR_REFERENCE
/* Locosys SBP and SBN structures */ /* Locosys SBP and SBN structures */
typedef __packed struct typedef __packed struct {
{
UINT8 HDOP; /* HDOP [0..51] with resolution 0.2 */ UINT8 HDOP; /* HDOP [0..51] with resolution 0.2 */
UINT8 SVIDCnt; /* Number of SVs in solution [0 to 12] */ UINT8 SVIDCnt; /* Number of SVs in solution [0 to 12] */
UINT16 UtcSec; /* UTC Second [0 to 59] in seconds with resolution 0.001 */ UINT16 UtcSec; /* UTC Second [0 to 59] in seconds with resolution 0.001 */
UINT32 date_time_UTC_packed; /* refer to protocol doc*/ UINT32 date_time_UTC_packed; /* refer to protocol doc*/
UINT32 SVIDList; /* SVs in solution: Bit 0=1: SV1, Bit 1=1: SV2, ... , Bit 31=1: SV32 */ UINT32 SVIDList; /* SVs in solution: Bit 0=1: SV1, Bit 1=1: SV2, ... , Bit 31=1: SV32 */
INT32 Lat; /* Latitude [-90 to 90] in degrees with resolution 0.0000001 */ INT32 Lat; /* Latitude [-90 to 90] in degrees with resolution 0.0000001 */
INT32 Lon; /* Longitude [-180 to 180] in degrees with resoluti on 0.0000001 */ INT32 Lon; /* Longitude [-180 to 180] in degrees with resoluti on 0.0000001 */
INT32 AltCM; /* Altitude from Mean Sea Level in centi meters * / INT32 AltCM; /* Altitude from Mean Sea Level in centi meters * /
UINT16 Sog; /* Speed Over Ground in m/sec with resolution 0.01 */ UINT16 Sog; /* Speed Over Ground in m/sec with resolution 0.01 */
UINT16 Cog; /* Course Over Ground [0 to 360] in degrees with r esolution 0.01 */ UINT16 Cog; /* Course Over Ground [0 to 360] in degrees with r esolution 0.01 */
INT16 ClmbRte; /* Climb rate in m/sec with resolution 0.01 */ INT16 ClmbRte; /* Climb rate in m/sec with resolution 0.01 */
UINT8 bitFlags; /* bitFlags, default 0x00, bit 0=1 indicate the fi rst point after power on */ UINT8 bitFlags; /* bitFlags, default 0x00, bit 0=1 indicate the fi rst point after power on */
UINT8 reserved; UINT8 reserved;
} T_SBP; } T_SBP;
typedef struct __packed typedef struct __packed {
{ UINT8 Mid;
UINT8 Mid; UINT16 Valid;
UINT16 Valid; UINT16 Mode; /* Nav Mode: bit map as follows:
UINT16 Mode; /* Nav Mode: bit map as follows:
* Bits 2-0: GPS Fix Type * Bits 2-0: GPS Fix Type
* 000 = No Nav * 000 = No Nav
* 001 = 1 SV solution * 001 = 1 SV solution
* 010 = 2 SV solution * 010 = 2 SV solution
* 011 = 3 SV solution (2D) * 011 = 3 SV solution (2D)
* 100 = 4 or more SV solution (3D) * 100 = 4 or more SV solution (3D)
* 101 = Least Square 2D solution * 101 = Least Square 2D solution
* 110 = Least Square 3D solution * 110 = Least Square 3D solution
* 111 = DR solution (no SV) * 111 = DR solution (no SV)
* Bit 3 : 1 = Trickle Power ON * Bit 3 : 1 = Trickle Power ON
skipping to change at line 95 skipping to change at line 93
* Bit 10 : 1 = Velocity DR Timeout * Bit 10 : 1 = Velocity DR Timeout
* Bit 11 : 1 = Solution edited by UI * Bit 11 : 1 = Solution edited by UI
* Bit 12 : 1 = Velocity invalid * Bit 12 : 1 = Velocity invalid
* Bit 13 : 1 = Altitude Hold disabled * Bit 13 : 1 = Altitude Hold disabled
* Bits 15-14: SiRFDrive DR Status (applicable only when bit 8=0) * Bits 15-14: SiRFDrive DR Status (applicable only when bit 8=0)
* 00 = GPS Only * 00 = GPS Only
* 01 = Calibrating * 01 = Calibrating
* 10 = DR sensor error * 10 = DR sensor error
* 11 = DR Test mode * 11 = DR Test mode
*/ */
UINT16 Week; /* Extended Week Number */ UINT16 Week; /* Extended Week Number */
UINT32 TOW; /* Time of Week [0 to 604800] in seconds with re UINT32 TOW; /* Time of Week [0 to 604800] in seconds with res
solution 0.001 */ olution 0.001 */
UINT16 UtcYr; /* UTC Year [1980 to 3000] */ UINT16 UtcYr; /* UTC Year [1980 to 3000] */
UINT8 UtcMth; /* UTC Month [1 to 12] */ UINT8 UtcMth; /* UTC Month [1 to 12] */
UINT8 UtcDay; /* UTC Day [1 to 31] */ UINT8 UtcDay; /* UTC Day [1 to 31] */
UINT8 UtcHr; /* UTC Hour [0 to 23] */ UINT8 UtcHr; /* UTC Hour [0 to 23] */
UINT8 UtcMin; /* UTC Minute [0 to 59] */ UINT8 UtcMin; /* UTC Minute [0 to 59] */
UINT16 UtcSec; /* UTC Second [0 to 59] in seconds with resoluti UINT16 UtcSec; /* UTC Second [0 to 59] in seconds with resolutio
on 0.001 */ n 0.001 */
UINT32 SVIDList; /* SVs in solution: Bit 0=1: SV1, Bit 1=1: SV2, UINT32 SVIDList; /* SVs in solution: Bit 0=1: SV1, Bit 1=1: SV2,
... , Bit 31=1: SV32 */ ... , Bit 31=1: SV32 */
INT32 Lat; /* Latitude [-90 to 90] in degrees with resoluti INT32 Lat; /* Latitude [-90 to 90] in degrees with resolutio
on 0.0000001 */ n 0.0000001 */
INT32 Lon; /* Longitude [-180 to 180] in degrees with resol INT32 Lon; /* Longitude [-180 to 180] in degrees with resolu
ution 0.0000001 */ tion 0.0000001 */
INT32 AltE; /* Altitude from Ellipsoid in meters with resolu INT32 AltE; /* Altitude from Ellipsoid in meters with resolut
tion 0.01 */ ion 0.01 */
INT32 AltM; /* Altitude from Mean Sea Level in meters with r INT32 AltM; /* Altitude from Mean Sea Level in meters with re
esolution 0.01 */ solution 0.01 */
UINT8 Datum; /* Map datum */ UINT8 Datum; /* Map datum */
UINT16 Sog; /* Speed Over Ground in m/sec with resolution 0. UINT16 Sog; /* Speed Over Ground in m/sec with resolution 0.0
01 */ 1 */
UINT16 Cog; /* Course Over Ground [0 to 360] in degrees with UINT16 Cog; /* Course Over Ground [0 to 360] in degrees with
resolution 0.01 */ resolution 0.01 */
INT16 MagVar; /* Magnetic Variation - Reserved */ INT16 MagVar; /* Magnetic Variation - Reserved */
INT16 ClmbRte; /* Climb rate in m/sec with resolution 0.01 */ INT16 ClmbRte; /* Climb rate in m/sec with resolution 0.01 */
INT16 HdRte; /* Heading Rate in deg/sec with resolution 0.01 INT16 HdRte; /* Heading Rate in deg/sec with resolution 0.01 (
(SiRFDrive only) */ SiRFDrive only) */
UINT32 Ehpe; /* Expected Horizontal Position Error in meters UINT32 Ehpe; /* Expected Horizontal Position Error in meters w
with resolution 0.01 */ ith resolution 0.01 */
UINT32 Evpe; /* Expected Horizontal Vertical Error in meters UINT32 Evpe; /* Expected Horizontal Vertical Error in meters w
with resolution 0.01 */ ith resolution 0.01 */
UINT32 Ete; /* Expected Time Error in meters with resolution UINT32 Ete; /* Expected Time Error in meters with resolution
0.01 (SiRFDrive only) - Reserved */ 0.01 (SiRFDrive only) - Reserved */
UINT16 Ehve; /* Expected Horizontal Velocity Error in m/sec w UINT16 Ehve; /* Expected Horizontal Velocity Error in m/sec wi
ith resolution 0.01 (SiRFDrive only) */ th resolution 0.01 (SiRFDrive only) */
INT32 ClkBias; /* Clock Bias in meters with resolution 0.01 */ INT32 ClkBias; /* Clock Bias in meters with resolution 0.01 */
UINT32 ClkBiasE; /* Clock Bias Error in meters with resolution 0. UINT32 ClkBiasE; /* Clock Bias Error in meters with resolution 0.0
01 (SiRFDrive only) */ 1 (SiRFDrive only) */
INT32 ClkDrift; /* Clock Drift in m/sec with resolution 0.01 */ INT32 ClkDrift; /* Clock Drift in m/sec with resolution 0.01 */
UINT32 ClkDriftE; /* Clock Drift in m/sec with resolution 0.01 (Si UINT32 ClkDriftE; /* Clock Drift in m/sec with resolution 0.01 (SiR
RFDrive only) */ FDrive only) */
UINT32 Trvled; /* Distance Traveled since reset in meters (SiRF UINT32 Trvled; /* Distance Traveled since reset in meters (SiRFD
Drive only) */ rive only) */
UINT16 TrvledE; /* Distance Traveled Error in meters (SiRFDrive UINT16 TrvledE; /* Distance Traveled Error in meters (SiRFDrive o
only) */ nly) */
UINT16 HdE; /* Heading Error [0 to 180] in degrees with reso UINT16 HdE; /* Heading Error [0 to 180] in degrees with resol
lution 0.01 (SiRFDrive only) */ ution 0.01 (SiRFDrive only) */
UINT8 SVIDCnt; /* Number of SVs in solution [0 to 12] */ UINT8 SVIDCnt; /* Number of SVs in solution [0 to 12] */
UINT8 HDOP; /* HDOP [0..51] with resolution 0.2 */ UINT8 HDOP; /* HDOP [0..51] with resolution 0.2 */
UINT8 Reserved; /* Reserved */ UINT8 Reserved; /* Reserved */
UINT16 ufSog; /* Speed Over Ground in m/sec with resolution UINT16 ufSog; /* Speed Over Ground in m/sec with resolution 0
0.01 ,unfiltered*/ .01 ,unfiltered*/
UINT16 ufCog; /* Course Over Ground [0 to 360] in degrees wi UINT16 ufCog; /* Course Over Ground [0 to 360] in degrees wit
th resolution 0.01, unfiltered */ h resolution 0.01, unfiltered */
} T_SBN_REC; } T_SBN_REC;
#endif #endif
#endif /* gpsbabel_navilink_h_included */ #endif /* gpsbabel_navilink_h_included */
 End of changes. 6 change blocks. 
68 lines changed or deleted 66 lines changed or added


 optionsdlg.h   optionsdlg.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: optionsdlg.h,v 1.2 2009/11/02 20:38:02 robertl Exp $ // $Id: optionsdlg.h,v 1.2 2009-11-02 20:38:02 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 pdbfile.h   pdbfile.h 
skipping to change at line 42 skipping to change at line 42
#include "gbtypes.h" #include "gbtypes.h"
#include <time.h> #include <time.h>
#define PDB_DBNAMELEN 32 #define PDB_DBNAMELEN 32
#define PDB_FLAG_RESOURCE 0x0001 #define PDB_FLAG_RESOURCE 0x0001
#define PDB_FLAG_BACKUP 0x0008 #define PDB_FLAG_BACKUP 0x0008
#define EPOCH_1904 2082844800L #define EPOCH_1904 2082844800L
typedef struct pdbrec_s { typedef struct pdbrec_s {
gbuint32 offs; gbuint32 offs;
gbuint32 size; gbuint32 size;
gbuint32 id; gbuint32 id;
gbuint8 category; gbuint8 category;
gbuint8 flags; gbuint8 flags;
char *data; char* data;
struct pdbrec_s *next; struct pdbrec_s* next;
} pdbrec_t; } pdbrec_t;
typedef struct { typedef struct {
gbfile *file; gbfile* file;
char mode; /* file-mode: 1 = read / 2 = write */ char mode; /* file-mode: 1 = read / 2 = write */
char name[PDB_DBNAMELEN + 1]; /* database name */ char name[PDB_DBNAMELEN + 1]; /* database name */
gbuint16 attr; /* attributes */ gbuint16 attr; /* attributes */
gbuint16 version; /* version */ gbuint16 version; /* version */
time_t ctime; /* creation time */ time_t ctime; /* creation time */
time_t mtime; /* modification time */ time_t mtime; /* modification time */
time_t btime; /* backup time */ time_t btime; /* backup time */
gbuint32 revision; gbuint32 revision;
gbuint32 appinfo_offs; /* offset to application info */ gbuint32 appinfo_offs; /* offset to application info */
gbuint32 index_offs; /* offset to sort-index info */ gbuint32 index_offs; /* offset to sort-index info */
gbuint32 creator; gbuint32 creator;
gbuint32 type; gbuint32 type;
gbuint32 uid; gbuint32 uid;
gbuint16 rec_ct; gbuint16 rec_ct;
struct pdbrec_s *rec_list; struct pdbrec_s* rec_list;
struct pdbrec_s *rec_curr; struct pdbrec_s* rec_curr;
void *appinfo; void* appinfo;
int appinfo_len; int appinfo_len;
} pdbfile; } pdbfile;
pdbfile *pdb_open(const char *filename, const char *module); pdbfile* pdb_open(const char* filename, const char* module);
pdbfile *pdb_create(const char *filename, const char *module); pdbfile* pdb_create(const char* filename, const char* module);
void pdb_close(pdbfile *file); void pdb_close(pdbfile* file);
int pdb_eof(pdbfile *fin); int pdb_eof(pdbfile* fin);
void pdb_rewind(pdbfile *fin); void pdb_rewind(pdbfile* fin);
int pdb_read_rec(pdbfile *fin, gbuint8 *flags, gbuint8 *category, gbuint32 int pdb_read_rec(pdbfile* fin, gbuint8* flags, gbuint8* category, gbuint32*
*rec_id, void **data); rec_id, void** data);
int pdb_read_rec_by_id(pdbfile *fin, const gbuint32 rec_id, gbuint8 *flags, int pdb_read_rec_by_id(pdbfile* fin, const gbuint32 rec_id, gbuint8* flags,
gbuint8 *category, void **data); gbuint8* category, void** data);
void pdb_write_rec(pdbfile *fout, const gbuint8 flags, const gbuint8 catego void pdb_write_rec(pdbfile* fout, const gbuint8 flags, const gbuint8 catego
ry, const gbuint32 rec_id, const void *data, const gbuint32 size); ry, const gbuint32 rec_id, const void* data, const gbuint32 size);
#endif #endif
#endif #endif
 End of changes. 3 change blocks. 
37 lines changed or deleted 37 lines changed or added


 processwait.h   processwait.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: processwait.h,v 1.1 2009/07/05 21:14:56 robertl Exp $ // $Id: processwait.h,v 1.1 2009-07-05 21:14:56 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 queue.h   queue.h 
skipping to change at line 23 skipping to change at line 23
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
*/ */
typedef struct queue { typedef struct queue {
struct queue *next; struct queue* next;
struct queue *prev; struct queue* prev;
} queue; } queue;
void enqueue(queue *new_el, queue *old); void enqueue(queue* new_el, queue* old);
queue * dequeue(queue *element); queue* dequeue(queue* element);
void sortqueue (queue *qh, int (*cmp)(const queue *, const queue *)); void sortqueue(queue* qh, int (*cmp)(const queue*, const queue*));
#define QUEUE_INIT(head) (head)->next = ((head)->prev = head) #define QUEUE_INIT(head) (head)->next = ((head)->prev = head)
#define QUEUE_FIRST(head) ((head)->next) #define QUEUE_FIRST(head) ((head)->next)
#define QUEUE_NEXT(element) ((element)->next) #define QUEUE_NEXT(element) ((element)->next)
#define QUEUE_LAST(head) ((head)->prev) #define QUEUE_LAST(head) ((head)->prev)
#define QUEUE_EMPTY(head) ((head)->next == (head)) #define QUEUE_EMPTY(head) ((head)->next == (head))
#define QUEUE_MOVE(newhead,oldhead) \ #define QUEUE_MOVE(newhead,oldhead) \
if ( (oldhead)->next == (oldhead) ) {\ if ( (oldhead)->next == (oldhead) ) {\
(newhead)->next = (newhead)->prev = (newhead); \ (newhead)->next = (newhead)->prev = (newhead); \
} \ } \
 End of changes. 3 change blocks. 
5 lines changed or deleted 5 lines changed or added


 quovadis.h   quovadis.h 
skipping to change at line 34 skipping to change at line 34
#include "defs.h" #include "defs.h"
#include "pdbfile.h" #include "pdbfile.h"
#define MYNAME "QuoVadis" #define MYNAME "QuoVadis"
#define MYTYPE 0x51564D52 /* QVMR */ #define MYTYPE 0x51564D52 /* QVMR */
#define MYCREATOR 0x51554F56 /* QUOV */ #define MYCREATOR 0x51554F56 /* QUOV */
#define MAXCHUNKSIZE 0x10000 /* 64k Chunk max */ #define MAXCHUNKSIZE 0x10000 /* 64k Chunk max */
struct record { struct record {
char name[32]; char name[32];
pdb_32 longitude; /* Scaled. (degrees + 180.0) * 1e6 */ pdb_32 longitude; /* Scaled. (degrees + 180.0) * 1e6 */
pdb_32 latitude; /* Scaled. (degrees + 90.0) * 1e6 */ pdb_32 latitude; /* Scaled. (degrees + 90.0) * 1e6 */
pdb_16 icon_bitmap; /* Valid range: 0 - 47 */ pdb_16 icon_bitmap; /* Valid range: 0 - 47 */
pdb_32 note_id; /* Global ID of note in NotesDB. Not pdb_32 note_id; /* Global ID of note in NotesDB. Not
supported yet */ supported yet */
char name_scale; /* Map scale to display the char name_scale; /* Map scale to display the
name. Valid range 15-26. 15 => name. Valid range 15-26. 15 =>
18.12 miles, 26 => 46 feet */ 18.12 miles, 26 => 46 feet */
char icon_scale; /* As above. */ char icon_scale; /* As above. */
unsigned char reserved[8]; unsigned char reserved[8];
}; };
struct qv_icon_mapping { struct qv_icon_mapping {
const geocache_type gc_type; const geocache_type gc_type;
const int bitmap_id; const int bitmap_id;
}; };
/* Icon Types */ /* Icon Types */
#define QUESTION_ICON 0 #define QUESTION_ICON 0
#define RESTARAUNT_ICON 1 #define RESTARAUNT_ICON 1
#define BAR_ICON 2 #define BAR_ICON 2
#define HOTEL_ICON 3 #define HOTEL_ICON 3
#define PHONE_ICON 4 #define PHONE_ICON 4
#define HOSPITAL_ICON 5 #define HOSPITAL_ICON 5
#define CHURCH_ICON 6 #define CHURCH_ICON 6
 End of changes. 4 change blocks. 
10 lines changed or deleted 10 lines changed or added


 session.h   session.h 
skipping to change at line 26 skipping to change at line 26
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
*/ */
#ifndef SESSION_H #ifndef SESSION_H
#define SESSION_H #define SESSION_H
typedef struct { typedef struct {
queue Q; queue Q;
int id; int id;
char *name; char* name;
} category_t; } category_t;
typedef struct { typedef struct {
queue Q; queue Q;
int nr; int nr;
const char *name; /* in normal case the name of a form const char* name; /* in normal case the name of a format */
at */ char* filename; /* used file within format */
char *filename; /* used file within format */ int category_ct;
int category_ct; int unknown_category_ct; /* added without id */
int unknown_category_ct; /* added without id */ queue category_list;
queue category_list;
} session_t; } session_t;
void session_init(void); void session_init(void);
void session_exit(void); void session_exit(void);
void start_session(const char *name, const char *filename); void start_session(const char* name, const char* filename);
session_t *curr_session(void); session_t* curr_session(void);
/* in work /* in work
int session_add_category(const char *name, const int id); int session_add_category(const char *name, const int id);
*/ */
#endif #endif
 End of changes. 3 change blocks. 
13 lines changed or deleted 12 lines changed or added


 setting.h   setting.h 
// -*- C++ -*- // -*- C++ -*-
// $Id: setting.h,v 1.3 2010/02/15 02:57:00 robertl Exp $ // $Id: setting.h,v 1.3 2010-02-15 02:57:00 robertl Exp $
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// //
// Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>. // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
// //
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as // modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the // published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version. // License, or (at your option) any later version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 shapefil.h   shapefil.h 
#ifndef _SHAPEFILE_H_INCLUDED #ifndef _SHAPEFILE_H_INCLUDED
#define _SHAPEFILE_H_INCLUDED #define _SHAPEFILE_H_INCLUDED
/************************************************************************** **** /************************************************************************** ****
* $Id: shapefil.h,v 1.2 2004/09/27 01:13:58 robertl Exp $ * $Id: shapefil.h,v 1.2 2004-09-27 01:13:58 robertl Exp $
* *
* Project: Shapelib * Project: Shapelib
* Purpose: Primary include file for Shapelib. * Purpose: Primary include file for Shapelib.
* Author: Frank Warmerdam, warmerdam@pobox.com * Author: Frank Warmerdam, warmerdam@pobox.com
* *
************************************************************************** **** ************************************************************************** ****
* Copyright (c) 1999, Frank Warmerdam * Copyright (c) 1999, Frank Warmerdam
* *
* This software is available under the following "MIT Style" license, * This software is available under the following "MIT Style" license,
* or at the option of the licensee under the LGPL (see LICENSE.LGPL). Thi s * or at the option of the licensee under the LGPL (see LICENSE.LGPL). Thi s
skipping to change at line 39 skipping to change at line 39
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILI TY, * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILI TY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTH ER * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTH ER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
************************************************************************** **** ************************************************************************** ****
* *
* $Log: shapefil.h,v $ * $Log: not supported by cvs2svn $
* Revision 1.2 2004/09/27 01:13:58 robertl
* warning fixes in shapelib. From Alexander Stohr.
*
* Revision 1.1 2004/09/20 17:22:55 robertl * Revision 1.1 2004/09/20 17:22:55 robertl
* Bring in shapefil.h. * Bring in shapefil.h.
* *
* Revision 1.26 2002/09/29 00:00:08 warmerda * Revision 1.26 2002/09/29 00:00:08 warmerda
* added FTLogical and logical attribute read/write calls * added FTLogical and logical attribute read/write calls
* *
* Revision 1.25 2002/05/07 13:46:30 warmerda * Revision 1.25 2002/05/07 13:46:30 warmerda
* added DBFWriteAttributeDirectly(). * added DBFWriteAttributeDirectly().
* *
* Revision 1.24 2002/04/10 16:59:54 warmerda * Revision 1.24 2002/04/10 16:59:54 warmerda
 End of changes. 2 change blocks. 
5 lines changed or deleted 2 lines changed or added


 strptime.h   strptime.h 
/* strptime.h /* strptime.h
* *
* $Id: strptime.h,v 1.1 2005/07/16 17:02:10 robertl Exp $ * $Id: strptime.h,v 1.1 2005-07-16 17:02:10 robertl Exp $
* *
* Ethereal - Network traffic analyzer * Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com> * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs * Copyright 1998 Gerald Combs
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
skipping to change at line 30 skipping to change at line 30
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#ifndef __STRPTIME_H__ #ifndef __STRPTIME_H__
#define __STRPTIME_H__ #define __STRPTIME_H__
/* /*
* Version of "strptime()", for the benefit of OSes that don't have it. * Version of "strptime()", for the benefit of OSes that don't have it.
*/ */
extern char *strptime(const char *, const char *, struct tm *); extern char* strptime(const char*, const char*, struct tm*);
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 xmlgeneric.h   xmlgeneric.h 
skipping to change at line 23 skipping to change at line 23
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
*/ */
typedef enum { typedef enum {
cb_start = 1, cb_start = 1,
cb_cdata, cb_cdata,
cb_end, cb_end,
} xg_cb_type; } xg_cb_type;
typedef void (xg_callback) (const char *, const char **); typedef void (xg_callback)(const char*, const char**);
typedef struct xg_tag_mapping { typedef struct xg_tag_mapping {
xg_callback *tag_cb; xg_callback* tag_cb;
xg_cb_type cb_type; xg_cb_type cb_type;
const char *tag_name; const char* tag_name;
} xg_tag_mapping; } xg_tag_mapping;
extern char *xhtml_entities; extern char* xhtml_entities;
void write_xml_entity(gbfile *ofd, const char *indent, void write_xml_entity(gbfile* ofd, const char* indent,
const char *tag, const char *value); const char* tag, const char* value);
void write_xml_entity_begin0(gbfile *ofd, const char *indent, void write_xml_entity_begin0(gbfile* ofd, const char* indent,
const char *tag); const char* tag);
void write_xml_entity_begin1(gbfile *ofd, const char *indent, const char *t void write_xml_entity_begin1(gbfile* ofd, const char* indent, const char* t
ag, ag,
const char *attr1, const char *attrval1); const char* attr1, const char* attrval1);
void write_xml_entity_begin2(gbfile *ofd, const char *indent, const char *t void write_xml_entity_begin2(gbfile* ofd, const char* indent, const char* t
ag, ag,
const char *attr1, const char *attrval1, const char* attr1, const char* attrval1,
const char *attr2, const char *attrval2); const char* attr2, const char* attrval2);
void write_xml_entity_end(gbfile *ofd, const char *indent, const char *tag) void write_xml_entity_end(gbfile* ofd, const char* indent, const char* tag)
; ;
void write_optional_xml_entity(gbfile *ofd, const char *indent, void write_optional_xml_entity(gbfile* ofd, const char* indent,
const char *tag, const char *value); const char* tag, const char* value);
void xml_write_time(gbfile *ofd, const time_t timep, int microseconds, cons void xml_write_time(gbfile* ofd, const time_t timep, int microseconds, cons
t char *elname); t char* elname);
void xml_fill_in_time(char *time_string, const time_t timep, int microsecon void xml_fill_in_time(char* time_string, const time_t timep, int microsecon
ds, ds,
int long_or_short); int long_or_short);
void write_xml_header(gbfile *ofd); void write_xml_header(gbfile* ofd);
void xml_ignore_tags(const char **taglist); void xml_ignore_tags(const char** taglist);
void xml_init(const char *fname, xg_tag_mapping *tbl,const char *encoding); void xml_init(const char* fname, xg_tag_mapping* tbl,const char* encoding);
void xml_init_offset(const char *fname, xg_tag_mapping *tbl, void xml_init_offset(const char* fname, xg_tag_mapping* tbl,
const char *encoding, gbsize_t offset); const char* encoding, gbsize_t offset);
void xml_read(void); void xml_read(void);
void xml_readstring(char *str); void xml_readstring(char* str);
void xml_readprefixstring(char *str); void xml_readprefixstring(char* str);
void xml_deinit(void); void xml_deinit(void);
 End of changes. 6 change blocks. 
37 lines changed or deleted 37 lines changed or added


 zconf.h   zconf.h 
/* zconf.h -- configuration of the zlib compression library /* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-2005 Jean-loup Gailly. * Copyright (C) 1995-2005 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
/* @(#) $Id: zconf.h,v 1.1 2006/07/22 20:34:08 oliskoli Exp $ */ /* @(#) $Id: zconf.h,v 1.1 2006-07-22 20:34:08 oliskoli Exp $ */
#ifndef ZCONF_H #ifndef ZCONF_H
#define ZCONF_H #define ZCONF_H
/* /*
* If you *really* need a unique prefix for all types and library functions , * If you *really* need a unique prefix for all types and library functions ,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
*/ */
#ifdef Z_PREFIX #ifdef Z_PREFIX
# define deflateInit_ z_deflateInit_ # define deflateInit_ z_deflateInit_
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 zconf.in.h   zconf.in.h 
/* zconf.h -- configuration of the zlib compression library /* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-2005 Jean-loup Gailly. * Copyright (C) 1995-2005 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
/* @(#) $Id: zconf.in.h,v 1.1 2006/07/22 20:34:11 oliskoli Exp $ */ /* @(#) $Id: zconf.in.h,v 1.1 2006-07-22 20:34:11 oliskoli Exp $ */
#ifndef ZCONF_H #ifndef ZCONF_H
#define ZCONF_H #define ZCONF_H
/* /*
* If you *really* need a unique prefix for all types and library functions , * If you *really* need a unique prefix for all types and library functions ,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
*/ */
#ifdef Z_PREFIX #ifdef Z_PREFIX
# define deflateInit_ z_deflateInit_ # define deflateInit_ z_deflateInit_
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 zutil.h   zutil.h 
/* zutil.h -- internal interface and configuration of the compression libra ry /* zutil.h -- internal interface and configuration of the compression libra ry
* Copyright (C) 1995-2005 Jean-loup Gailly. * Copyright (C) 1995-2005 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
/* WARNING: this file should *not* be used by applications. It is /* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h. subject to change. Applications should only use zlib.h.
*/ */
/* @(#) $Id: zutil.h,v 1.1 2006/07/22 20:34:11 oliskoli Exp $ */ /* @(#) $Id: zutil.h,v 1.1 2006-07-22 20:34:11 oliskoli Exp $ */
#ifndef ZUTIL_H #ifndef ZUTIL_H
#define ZUTIL_H #define ZUTIL_H
#define ZLIB_INTERNAL #define ZLIB_INTERNAL
#include "zlib.h" #include "zlib.h"
#ifdef STDC #ifdef STDC
# ifndef _WIN32_WCE # ifndef _WIN32_WCE
# include <stddef.h> # include <stddef.h>
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/