diff options
author | jomui <jongmun.woo@samsung.com> | 2017-09-20 17:16:38 +0900 |
---|---|---|
committer | jomui <jongmun.woo@samsung.com> | 2017-09-20 17:46:56 +0900 |
commit | 0b14679c8827bec855c2e3fb9ea737665c2c6156 (patch) | |
tree | 3c6904d10ebfd44efc6569409fa05621ecb97e9b | |
parent | a6fad51212b2a510ff7a77b3401a933887296878 (diff) | |
download | simple-maps-0b14679c8827bec855c2e3fb9ea737665c2c6156.tar.gz simple-maps-0b14679c8827bec855c2e3fb9ea737665c2c6156.tar.bz2 simple-maps-0b14679c8827bec855c2e3fb9ea737665c2c6156.zip |
Signed-off-by: jomui <jongmun.woo@samsung.com>
Change-Id: I7c01280aa7f712ea90b719ddec8bb1e7f8943530
-rw-r--r-- | org.tizen.simple-maps-tv.xml | 2 | ||||
-rw-r--r-- | packaging/org.tizen.simple-maps-tv.spec | 2 | ||||
-rw-r--r-- | src/simple-maps-mapview.c | 8 | ||||
-rw-r--r-- | src/simple-maps.c | 12 | ||||
-rw-r--r-- | src/simple-maps.h | 3 |
5 files changed, 13 insertions, 14 deletions
diff --git a/org.tizen.simple-maps-tv.xml b/org.tizen.simple-maps-tv.xml index 8fd7e3d..bcd291e 100644 --- a/org.tizen.simple-maps-tv.xml +++ b/org.tizen.simple-maps-tv.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.simple-maps-tv" api-version="4.0" version="1.0.1" install-location="internal-only"> +<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.simple-maps-tv" api-version="4.0" version="1.0.2" install-location="internal-only"> <label>simple-maps</label> <author email="cbible.kim@samsung.com" href="www.samsung.com">Seechan Kim</author> <author email="jongmun.woo@samsung.com" href="www.samsung.com">JongMun Woo</author> diff --git a/packaging/org.tizen.simple-maps-tv.spec b/packaging/org.tizen.simple-maps-tv.spec index 71d3a53..786de17 100644 --- a/packaging/org.tizen.simple-maps-tv.spec +++ b/packaging/org.tizen.simple-maps-tv.spec @@ -1,6 +1,6 @@ Name: org.tizen.simple-maps-tv Summary: simple-maps-tv -Version: 1.0.1 +Version: 1.0.2 Release: 1 Group: Applications/Location License: Apache-2.0 diff --git a/src/simple-maps-mapview.c b/src/simple-maps-mapview.c index fed252c..6ec2efe 100644 --- a/src/simple-maps-mapview.c +++ b/src/simple-maps-mapview.c @@ -81,28 +81,28 @@ static bool getAddressfromHandle(simple_maps_app_data *ad, maps_address_h addres dlog_print(DLOG_ERROR, LOG_TAG, "maps_address_get_building_number fail, error = %d", ret); else { strncat(resultAddress, building, strlen(building)); - strcat(resultAddress, " "); + strncat(resultAddress, " ", 1); } ret = maps_address_get_street(address, &street); if (ret != MAPS_ERROR_NONE) dlog_print(DLOG_ERROR, LOG_TAG, "maps_address_get_street fail, error = %d", ret); else { strncat(resultAddress, street, strlen(street)); - strcat(resultAddress, " "); + strncat(resultAddress, " ", 1); } ret = maps_address_get_city(address, &city); if (ret != MAPS_ERROR_NONE) dlog_print(DLOG_ERROR, LOG_TAG, "maps_address_get_city fail, error = %d", ret); else { strncat(resultAddress, city, strlen(city)); - strcat(resultAddress, " "); + strncat(resultAddress, " ", 1); } ret = maps_address_get_state(address, &state); if (ret != MAPS_ERROR_NONE) dlog_print(DLOG_ERROR, LOG_TAG, "maps_address_get_state fail, error = %d", ret); else { strncat(resultAddress, state, strlen(state)); - strcat(resultAddress, " "); + strncat(resultAddress, " ", 1); } ret = maps_address_get_country(address, &country); if (ret != MAPS_ERROR_NONE) diff --git a/src/simple-maps.c b/src/simple-maps.c index 8873c88..6163ec3 100644 --- a/src/simple-maps.c +++ b/src/simple-maps.c @@ -106,7 +106,7 @@ static void _app_control_cb(app_control_h app_control, void *user_data) { simple_maps_app_data *ad = (simple_maps_app_data *) user_data; char *operation = NULL, *uri = NULL, *dataType = NULL, **dataTypes = NULL; - char *ptr = NULL; + char *ptr = NULL, *next = NULL; int ret = 0, dataLength = 0; if (ad->win) { @@ -129,14 +129,14 @@ static void _app_control_cb(app_control_h app_control, void *user_data) app_control_get_uri(app_control, &uri); if (uri != NULL) { dlog_print(DLOG_DEBUG, LOG_TAG, "URI = %s", uri); - ptr = strtok(uri, ":"); - ptr = strtok(NULL, ","); + ptr = strtok_r(uri, ":", &next); + ptr = strtok_r(NULL, ",", &next); ad->latitude = atof(ptr); - ptr = strtok(NULL, "?"); + ptr = strtok_r(NULL, "?", &next); ad->longitude = atof(ptr); - ptr = strtok(NULL, "="); + ptr = strtok_r(NULL, "=", &next); if (ptr != NULL) { - ptr = strtok(NULL, "="); + ptr = strtok_r(NULL, "=", &next); ad->keyword = strdup(ptr); } } diff --git a/src/simple-maps.h b/src/simple-maps.h index b216588..1200431 100644 --- a/src/simple-maps.h +++ b/src/simple-maps.h @@ -69,8 +69,7 @@ typedef enum { SIMPLE_MAPS_PICK, } operation_e; -typedef struct appdata -{ +typedef struct appdata { app_control_h app_control; Evas_Object *win; |