aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2016-06-06 18:22:14 +0200
committerRobin Krahl <me@robin-krahl.de>2016-06-06 18:22:14 +0200
commit6033e3191516f23c837b3878b00e23f0c90ed09a (patch)
treeb88364e8965b6555dd3a0d8e7eba384517fc26cb
parentc96d948a4b76875c91848518aa2f55f2774a4118 (diff)
downloaddbfp-6033e3191516f23c837b3878b00e23f0c90ed09a.tar.gz
dbfp-6033e3191516f23c837b3878b00e23f0c90ed09a.tar.bz2
dbfp: rename dbfp_query_location_name to dbfp_query_location
-rw-r--r--dbfp.c4
-rw-r--r--dbfp.h8
-rw-r--r--dbfp_check.c8
3 files changed, 10 insertions, 10 deletions
diff --git a/dbfp.c b/dbfp.c
index b2d8074..5c54a3d 100644
--- a/dbfp.c
+++ b/dbfp.c
@@ -123,8 +123,8 @@ void dbfp_location_close(struct dbfp_location *location)
free(location->id);
}
-int dbfp_query_location_name(struct dbfp *dbfp, char *input,
- size_t *n, struct dbfp_location **locations)
+int dbfp_query_location(struct dbfp *dbfp, char *input, size_t *n,
+ struct dbfp_location **locations)
{
int err = 0;
char *input_enc = NULL;
diff --git a/dbfp.h b/dbfp.h
index af74f1d..82d3801 100644
--- a/dbfp.h
+++ b/dbfp.h
@@ -49,12 +49,12 @@ int dbfp_init(struct dbfp *dbfp, char *key);
void dbfp_close(struct dbfp *dbfp);
void dbfp_location_close(struct dbfp_location *location);
-int dbfp_query_location_name(struct dbfp *dbfp, char *input,
- size_t *n, struct dbfp_location **locations);
+int dbfp_query_location(struct dbfp *dbfp, char *input, size_t *n,
+ struct dbfp_location **locations);
void dbfp_departure_close(struct dbfp_departure *departure);
int dbfp_query_departure(struct dbfp *dbfp, struct dbfp_location *location,
- char *location_id, time_t time, size_t *n,
- struct dbfp_departure **departures);
+ char *location_id, time_t time, size_t *n,
+ struct dbfp_departure **departures);
#endif /* DBFP_H_ */
diff --git a/dbfp_check.c b/dbfp_check.c
index bda63e5..b17945b 100644
--- a/dbfp_check.c
+++ b/dbfp_check.c
@@ -43,7 +43,7 @@ START_TEST(test_dbfp_access)
err = dbfp_init(&dbfp, api_key);
ck_assert_int_eq(err, 0);
- err = dbfp_query_location_name(&dbfp, "", &n, &locations);
+ err = dbfp_query_location(&dbfp, "", &n, &locations);
ck_assert_int_eq(err, 0);
free(locations);
@@ -62,7 +62,7 @@ START_TEST(test_dbfp_location_simple)
err = dbfp_init(&dbfp, api_key);
ck_assert_int_eq(err, 0);
- err = dbfp_query_location_name(&dbfp, "freiburg", &n, &locations);
+ err = dbfp_query_location(&dbfp, "freiburg", &n, &locations);
ck_assert_int_eq(err, 0);
assert_location_eq(n, locations, 0, "Freiburg(Breisgau) Hbf",
"008000107", 7.841173f, 47.997696f);
@@ -70,7 +70,7 @@ START_TEST(test_dbfp_location_simple)
dbfp_location_close(&locations[i]);
free(locations);
- err = dbfp_query_location_name(&dbfp, "freib", &n, &locations);
+ err = dbfp_query_location(&dbfp, "freib", &n, &locations);
ck_assert_int_eq(err, 0);
assert_location_eq(n, locations, 0, "Freiburg(Breisgau) Hbf",
"008000107", 7.841173f, 47.997696f);
@@ -78,7 +78,7 @@ START_TEST(test_dbfp_location_simple)
dbfp_location_close(&locations[i]);
free(locations);
- err = dbfp_query_location_name(&dbfp, "freiburg im", &n, &locations);
+ err = dbfp_query_location(&dbfp, "freiburg im", &n, &locations);
ck_assert_int_eq(err, 0);
assert_location_eq(n, locations, 0, "Freiburg(Breisgau) Hbf",
"008000107", 7.841173f, 47.997696f);