Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/gpsbabel/gpsbabel
Browse files Browse the repository at this point in the history
  • Loading branch information
GPSBabelDeveloper committed Feb 16, 2020
2 parents 8e17c8f + ab8cc82 commit 8083fe4
Show file tree
Hide file tree
Showing 231 changed files with 7,986 additions and 5,493 deletions.
1 change: 0 additions & 1 deletion .codacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ exclude_paths:
- 'shapelib/**'
- 'zlib/**'
- coverity_model.cc
- height.cc # It takes newer cppcheck versions, somewhere > 1.82, an excessive amount of time to analyze heightgrid.h
- strptime.[ch]
- jeeps/gpsproj.cc
- jeeps/gpsproj.h
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/config.log
/config.status
/cscope.out
/debug/
/gpsbabel
/gpsbabel-debug
/gpsbabel_coverage.xml
Expand All @@ -25,6 +26,7 @@
/Makefile
/makelinuxdist.sh
/objects/
/release/
*.swp
/tmp/
/Makefile
Expand Down
30 changes: 18 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,22 @@ matrix:
env:
- BUILD_TYPE="docker"
- DOCKER_IMG=""
- os: linux
dist: bionic
sudo: required
services: docker
compiler: gcc
env:
- BUILD_TYPE="docker"
- DOCKER_IMG="eoan"
- DOCKER_SCRIPT="./tools/build_extra_tests"
- os: linux
dist: xenial
sudo: required
compiler: gcc
env:
- BUILD_TYPE="local"
- QT_VERSION="5.9.8" # 5.12.1 vtesto stmsdf fails with valgrind 3.11.0 which is on xenial
- QT_VERSION="5.9.9" # 5.12.1 vtesto stmsdf fails with valgrind 3.11.0 which is on xenial
addons:
apt:
packages:
Expand All @@ -45,56 +54,53 @@ matrix:
- docbook-xml
- docbook-xsl
- libgl1-mesa-dev
- libxkbcommon-x11-0 # for qt onliner installer 3.2.1
cache:
directories:
- $HOME/Cache
timeout: 600
- os: osx
compiler: clang
env: QT_VERSION="5.9.8"
env: QT_VERSION="5.9.9"
cache:
directories:
- $HOME/Cache
timeout: 600
- os: osx
compiler: clang
env: QT_VERSION="5.12.6"
env: QT_VERSION="5.12.7"
cache:
directories:
- $HOME/Cache
timeout: 600
- os: linux
dist: xenial
dist: bionic
sudo: required
compiler: gcc
env:
- BUILD_TYPE="coverage"
- QT_VERSION="5.9.8"
addons:
apt:
packages:
- libusb-1.0-0-dev
- gcovr
- lcov
cache:
directories:
- $HOME/Cache
- libusb-1.0-0-dev
- qt5-default

install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${BUILD_TYPE}" = "coverage" ]; then ./tools/travis_install_linux_coverage ${QT_VERSION} && source ${HOME}/Cache/qt-${QT_VERSION}.env; fi
- if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${BUILD_TYPE}" = "local" ]; then ./tools/travis_install_linux_local ${QT_VERSION} && source ${HOME}/Cache/qt-${QT_VERSION}.env; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ./tools/travis_install_osx ${QT_VERSION} && source ${HOME}/Cache/qt-${QT_VERSION}.env; fi

script:
- if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${BUILD_TYPE}" = "coverage" ]; then ./tools/travis_script_linux_coverage; fi
- if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${BUILD_TYPE}" = "docker" ]; then ./tools/travis_script_linux_docker ${DOCKER_IMG}; fi
- if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${BUILD_TYPE}" = "docker" ]; then ./tools/travis_script_linux_docker ${DOCKER_IMG} ${DOCKER_SCRIPT}; fi
- if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${BUILD_TYPE}" = "local" ]; then echo $PATH; ./build_and_test; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ./tools/travis_script_osx; fi

after_success:
- cd ${TRAVIS_BUILD_DIR}
# only deploy pushes to master or prs that target master. the prs will go to transfr.sh, the pushes go to github.
- if [ "${TRAVIS_OS_NAME}" = "osx" ] && [ "${QT_VERSION}" = "5.12.6" ] && [ "$TRAVIS_BRANCH" = "master" ]; then bash ./tools/uploadtool/upload.sh gui/GPSBabel-*.dmg; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ] && [ "${QT_VERSION}" = "5.12.7" ] && [ "$TRAVIS_BRANCH" = "master" ]; then bash ./tools/uploadtool/upload.sh gui/GPSBabel-*.dmg; fi

branches:
except:
Expand Down
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ set(SUPPORT
set(HEADERS
an1sym.h
cet.h
cet/ansi_x3_4_1968.h
cet/cp1252.h
cet/iso_8859_8.h
cet_util.h
csv_util.h
defs.h
Expand Down Expand Up @@ -150,6 +147,7 @@ set(HEADERS
legacyformat.h
magellan.h
mapsend.h
mynav.h
navilink.h
session.h
shapelib/shapefil.h
Expand Down
4 changes: 1 addition & 3 deletions GPSBabel.pro
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ SUPPORT = route.cc waypt.cc filter_vecs.cc util.cc vecs.cc mkshort.cc \
HEADERS = \
an1sym.h \
cet.h \
cet/ansi_x3_4_1968.h \
cet/cp1252.h \
cet/iso_8859_8.h \
cet_util.h \
csv_util.h \
defs.h \
Expand Down Expand Up @@ -138,6 +135,7 @@ HEADERS = \
legacyformat.h \
magellan.h \
mapsend.h \
mynav.h \
navilink.h \
session.h \
shapelib/shapefil.h \
Expand Down
19 changes: 9 additions & 10 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,7 @@ cet.o: cet.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h inifile.h \
gbfile.h session.h src/core/datetime.h src/core/optional.h
cet_util.o: cet_util.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \
cet_util.h src/core/logging.h cet/ansi_x3_4_1968.h cet/cp1252.h \
cet/iso_8859_8.h
cet_util.h src/core/logging.h
compegps.o: compegps.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \
cet_util.h csv_util.h jeeps/gpsmath.h jeeps/gpsport.h
Expand All @@ -465,7 +464,7 @@ delgpl.o: delgpl.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h
destinator.o: destinator.cc defs.h config.h zlib/zlib.h zlib/zconf.h \
cet.h inifile.h gbfile.h session.h src/core/datetime.h \
src/core/optional.h cet_util.h garmin_fs.h jeeps/gps.h jeeps/../defs.h \
src/core/optional.h garmin_fs.h jeeps/gps.h jeeps/../defs.h \
jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h \
jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h \
jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \
Expand Down Expand Up @@ -547,8 +546,8 @@ garmin_gpi.o: garmin_gpi.cc defs.h config.h zlib/zlib.h zlib/zconf.h \
jeeps/gpsrqst.h
garmin_tables.o: garmin_tables.cc defs.h config.h zlib/zlib.h \
zlib/zconf.h cet.h inifile.h gbfile.h session.h src/core/datetime.h \
src/core/optional.h garmin_tables.h garmin_icon_tables.h \
jeeps/gpsmath.h jeeps/gpsport.h src/core/logging.h
src/core/optional.h garmin_tables.h jeeps/gpsmath.h jeeps/gpsport.h \
src/core/logging.h garmin_icon_tables.h
garmin_txt.o: garmin_txt.cc defs.h config.h zlib/zlib.h zlib/zconf.h \
cet.h inifile.h gbfile.h session.h src/core/datetime.h \
src/core/optional.h csv_util.h garmin_fs.h jeeps/gps.h jeeps/../defs.h \
Expand Down Expand Up @@ -650,7 +649,7 @@ ignrando.o: ignrando.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \
xmlgeneric.h
igo8.o: igo8.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h inifile.h \
gbfile.h session.h src/core/datetime.h src/core/optional.h cet_util.h
gbfile.h session.h src/core/datetime.h src/core/optional.h
ik3d.o: ik3d.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h inifile.h \
gbfile.h session.h src/core/datetime.h src/core/optional.h \
xmlgeneric.h
Expand Down Expand Up @@ -822,8 +821,7 @@ mapsource.o: mapsource.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \
garmin_tables.h jeeps/gpsmath.h jeeps/gpsport.h
mkshort.o: mkshort.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \
cet_util.h
inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h
mmo.o: mmo.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h inifile.h \
gbfile.h session.h src/core/datetime.h src/core/optional.h
mtk_locus.o: mtk_locus.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
Expand All @@ -833,7 +831,8 @@ mtk_logger.o: mtk_logger.cc defs.h config.h zlib/zlib.h zlib/zconf.h \
cet.h inifile.h gbfile.h session.h src/core/datetime.h \
src/core/optional.h gbser.h
mynav.o: mynav.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h
inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \
mynav.h format.h
navicache.o: navicache.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \
cet_util.h src/core/file.h
Expand Down Expand Up @@ -1010,7 +1009,7 @@ vecs.o: vecs.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h inifile.h \
gbfile.h session.h src/core/datetime.h src/core/optional.h vecs.h \
format.h gpx.h src/core/file.h src/core/xmlstreamwriter.h \
src/core/xmltag.h legacyformat.h gbversion.h src/core/logging.h xcsv.h \
ggv_bin.h
ggv_bin.h mynav.h
vidaone.o: vidaone.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h
vitosmt.o: vitosmt.cc defs.h config.h zlib/zlib.h zlib/zconf.h cet.h \
Expand Down
22 changes: 11 additions & 11 deletions alan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,30 +197,30 @@ static unsigned int byte_order()
{
unsigned long test = BYTEORDER_TEST;

unsigned char* ptr = (unsigned char*)(&test);
auto* ptr = (unsigned char*)(&test);
unsigned int order = (ptr[0] << 12) | (ptr[1] << 8) | (ptr[2] << 4) | ptr[3];

return order;
}

static void sw_bytes(void* word)
{
uint8_t* p = (uint8_t*) word;
uint16_t* r = (uint16_t*) word;
auto* p = (uint8_t*) word;
auto* r = (uint16_t*) word;

*r = (uint16_t)(p[1] << 8 | p[0]);
}
static void sw_words(void* dword)
{
uint16_t* p = (uint16_t*) dword;
uint32_t* r = (uint32_t*) dword;
auto* p = (uint16_t*) dword;
auto* r = (uint32_t*) dword;

*r = (uint32_t)(p[0] << 16 | p[1]);
}
static void rev_bytes(void* dword)
{
uint8_t* p = (uint8_t*) dword;
uint32_t* r = (uint32_t*) dword;
auto* p = (uint8_t*) dword;
auto* r = (uint32_t*) dword;

*r = (uint32_t)(p[3] << 24 | p[2] << 16 | p[1] << 8 | p[0]);
}
Expand Down Expand Up @@ -484,7 +484,7 @@ static Waypoint* get_wpt(struct wprdata* wprdata, unsigned n)
}
struct wpt* wpt = &(wprdata->wpt[idx]);

Waypoint* WP = new Waypoint;
auto* WP = new Waypoint;
WP->latitude = -pt2deg(wpt->pt.y);
WP->longitude = pt2deg(wpt->pt.x);
WP->SetCreationTime(unpack_time(wpt->date, wpt->time));
Expand Down Expand Up @@ -537,7 +537,7 @@ static void wpr_read()
}
struct rte* rte = &(wprdata.rte[idx]);

route_head* RT = route_head_alloc();
auto* RT = new route_head;
RT->rte_num = i;
for (j=RTE_NAME_LEN-1; j >= 0 && rte->name[j] == ' '; j--) {}
char *s = xstrndup(rte->name,j+1);
Expand Down Expand Up @@ -590,7 +590,7 @@ static void trl_read()
if (trkhdr->occupied == TRK_UNUSED) {
continue;
}
route_head* TL = route_head_alloc();
auto* TL = new route_head;
for (j=TRK_NAME_LEN-1;
j >= 0 && (trkhdr->name[j] == ' ' || trkhdr->name[j] == '\0');
j--) {}
Expand All @@ -612,7 +612,7 @@ static void trl_read()
/* track points */
struct trklog* trklog = &(trldata.trklog[i]);
for (j=0; j<trkhdr->totalpt; j++) {
Waypoint* WP = new Waypoint;
auto* WP = new Waypoint;
WP->latitude = -pt2deg(trklog->pt[j].y);
WP->longitude = pt2deg(trklog->pt[j].x);
WP->altitude = hgt2m(trklog->sh[j].height);
Expand Down
Loading

0 comments on commit 8083fe4

Please sign in to comment.