| 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 | |
|
| 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 | |
|
| 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(¤t_tag, strlen(current_tag.mem) + 2 + strlen(el)); | |
| vmem_realloc(¤t_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(¤t_tag); | | vmem_free(¤t_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 (�-) which makes | | * characters as entities (�-) 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_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 | |
|
| 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 | |
|
| 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 | |
|