summaryrefslogtreecommitdiff
path: root/navit/vehicle
diff options
context:
space:
mode:
Diffstat (limited to 'navit/vehicle')
-rw-r--r--navit/vehicle/android/vehicle_android.c30
-rw-r--r--navit/vehicle/demo/vehicle_demo.c30
-rw-r--r--navit/vehicle/file/vehicle_file.c45
-rw-r--r--navit/vehicle/file/vehicle_pipe.c3
-rw-r--r--navit/vehicle/file/vehicle_serial.c3
-rw-r--r--navit/vehicle/file/vehicle_socket.c3
-rw-r--r--navit/vehicle/gpsd/vehicle_gpsd.c30
-rw-r--r--navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c33
-rw-r--r--navit/vehicle/gypsy/vehicle_gypsy.c65
-rw-r--r--navit/vehicle/iphone/vehicle_iphone.c38
-rw-r--r--navit/vehicle/maemo/vehicle_maemo.c21
-rw-r--r--navit/vehicle/null/vehicle_null.c21
-rw-r--r--navit/vehicle/qt5/vehicle_qt5.cpp18
-rw-r--r--navit/vehicle/webos/bluetooth.c65
-rw-r--r--navit/vehicle/webos/vehicle_webos.c39
-rw-r--r--navit/vehicle/wince/vehicle_wince.c48
16 files changed, 187 insertions, 305 deletions
diff --git a/navit/vehicle/android/vehicle_android.c b/navit/vehicle/android/vehicle_android.c
index 5eb9a24b7..4d3137bd8 100644
--- a/navit/vehicle/android/vehicle_android.c
+++ b/navit/vehicle/android/vehicle_android.c
@@ -70,8 +70,7 @@ struct vehicle_priv {
* @param priv vehicle_priv structure for the vehicle
* @returns nothing
*/
-static void
-vehicle_android_destroy(struct vehicle_priv *priv) {
+static void vehicle_android_destroy(struct vehicle_priv *priv) {
dbg(lvl_debug,"enter");
g_free(priv);
}
@@ -84,9 +83,8 @@ vehicle_android_destroy(struct vehicle_priv *priv) {
* @param attr Points to an attr structure that will receive the attribute data
* @returns True for success, false for failure
*/
-static int
-vehicle_android_position_attr_get(struct vehicle_priv *priv,
- enum attr_type type, struct attr *attr) {
+static int vehicle_android_position_attr_get(struct vehicle_priv *priv,
+ enum attr_type type, struct attr *attr) {
dbg(lvl_debug,"enter %s",attr_to_name(type));
switch (type) {
case attr_position_fix_type:
@@ -142,8 +140,7 @@ struct vehicle_methods vehicle_android_methods = {
* @param v The {@code struct_vehicle_priv} for the vehicle
* @param location A {@code Location} object describing the new position
*/
-static void
-vehicle_android_position_callback(struct vehicle_priv *v, jobject location) {
+static void vehicle_android_position_callback(struct vehicle_priv *v, jobject location) {
time_t tnow;
struct tm *tm;
dbg(lvl_debug,"enter");
@@ -179,8 +176,7 @@ vehicle_android_position_callback(struct vehicle_priv *v, jobject location) {
* @param sats_in_view The number of satellites in view
* @param sats_used The number of satellites currently used to determine the position
*/
-static void
-vehicle_android_status_callback(struct vehicle_priv *v, int sats_in_view, int sats_used) {
+static void vehicle_android_status_callback(struct vehicle_priv *v, int sats_in_view, int sats_used) {
if (v->sats != sats_in_view) {
v->sats = sats_in_view;
callback_list_call_attr_0(v->cbl, attr_position_qual);
@@ -199,8 +195,7 @@ vehicle_android_status_callback(struct vehicle_priv *v, int sats_in_view, int sa
* @param v The {@code struct_vehicle_priv} for the vehicle
* @param fix_type The fix type (1 = valid, 0 = invalid)
*/
-static void
-vehicle_android_fix_callback(struct vehicle_priv *v, int fix_type) {
+static void vehicle_android_fix_callback(struct vehicle_priv *v, int fix_type) {
if (v->fix_type != fix_type) {
v->fix_type = fix_type;
callback_list_call_attr_0(v->cbl, attr_position_fix_type);
@@ -216,8 +211,7 @@ vehicle_android_fix_callback(struct vehicle_priv *v, int fix_type) {
*
* @return True on success, false on failure
*/
-static int
-vehicle_android_init(struct vehicle_priv *ret) {
+static int vehicle_android_init(struct vehicle_priv *ret) {
jmethodID cid;
if (!android_find_class_global("android/location/Location", &ret->LocationClass))
@@ -264,10 +258,9 @@ vehicle_android_init(struct vehicle_priv *ret) {
* @param attrs
* @returns vehicle_priv
*/
-static struct vehicle_priv *
-vehicle_android_new_android(struct vehicle_methods *meth,
- struct callback_list *cbl,
- struct attr **attrs) {
+static struct vehicle_priv *vehicle_android_new_android(struct vehicle_methods *meth,
+ struct callback_list *cbl,
+ struct attr **attrs) {
struct vehicle_priv *ret;
dbg(lvl_debug, "enter");
@@ -290,8 +283,7 @@ vehicle_android_new_android(struct vehicle_methods *meth,
*
* @returns nothing
*/
-void
-plugin_init(void) {
+void plugin_init(void) {
dbg(lvl_debug, "enter");
plugin_register_category_vehicle("android", vehicle_android_new_android);
}
diff --git a/navit/vehicle/demo/vehicle_demo.c b/navit/vehicle/demo/vehicle_demo.c
index 54e243381..06ab2117a 100644
--- a/navit/vehicle/demo/vehicle_demo.c
+++ b/navit/vehicle/demo/vehicle_demo.c
@@ -60,8 +60,7 @@ struct vehicle_priv {
};
-static void
-vehicle_demo_destroy(struct vehicle_priv *priv) {
+static void vehicle_demo_destroy(struct vehicle_priv *priv) {
if (priv->timer)
event_remove_timeout(priv->timer);
callback_destroy(priv->timer_callback);
@@ -69,8 +68,7 @@ vehicle_demo_destroy(struct vehicle_priv *priv) {
g_free(priv);
}
-static void
-nmea_chksum(char *nmea) {
+static void nmea_chksum(char *nmea) {
int i;
if (nmea && strlen(nmea) > 3) {
unsigned char csum=0;
@@ -80,9 +78,8 @@ nmea_chksum(char *nmea) {
}
}
-static int
-vehicle_demo_position_attr_get(struct vehicle_priv *priv,
- enum attr_type type, struct attr *attr) {
+static int vehicle_demo_position_attr_get(struct vehicle_priv *priv,
+ enum attr_type type, struct attr *attr) {
char ns='N',ew='E',*timep,*rmc,*gga;
int hr,min,sec,year,mon,day;
double lat,lng;
@@ -144,8 +141,7 @@ vehicle_demo_position_attr_get(struct vehicle_priv *priv,
return 1;
}
-static int
-vehicle_demo_set_attr_do(struct vehicle_priv *priv, struct attr *attr) {
+static int vehicle_demo_set_attr_do(struct vehicle_priv *priv, struct attr *attr) {
switch(attr->type) {
case attr_navit:
priv->navit = attr->u.navit;
@@ -185,8 +181,7 @@ vehicle_demo_set_attr_do(struct vehicle_priv *priv, struct attr *attr) {
return 1;
}
-static int
-vehicle_demo_set_attr(struct vehicle_priv *priv, struct attr *attr) {
+static int vehicle_demo_set_attr(struct vehicle_priv *priv, struct attr *attr) {
return vehicle_demo_set_attr_do(priv, attr);
}
@@ -196,8 +191,7 @@ struct vehicle_methods vehicle_demo_methods = {
vehicle_demo_set_attr,
};
-static void
-vehicle_demo_timer(struct vehicle_priv *priv) {
+static void vehicle_demo_timer(struct vehicle_priv *priv) {
struct coord c, c2, pos, ci;
int slen, len, dx, dy;
struct route *route=NULL;
@@ -278,10 +272,9 @@ vehicle_demo_timer(struct vehicle_priv *priv) {
-static struct vehicle_priv *
-vehicle_demo_new(struct vehicle_methods
- *meth, struct callback_list
- *cbl, struct attr **attrs) {
+static struct vehicle_priv *vehicle_demo_new(struct vehicle_methods
+ *meth, struct callback_list
+ *cbl, struct attr **attrs) {
struct vehicle_priv *ret;
dbg(lvl_debug, "enter");
@@ -299,8 +292,7 @@ vehicle_demo_new(struct vehicle_methods
return ret;
}
-void
-plugin_init(void) {
+void plugin_init(void) {
dbg(lvl_debug, "enter");
plugin_register_category_vehicle("demo", vehicle_demo_new);
}
diff --git a/navit/vehicle/file/vehicle_file.c b/navit/vehicle/file/vehicle_file.c
index 572902553..807d4998d 100644
--- a/navit/vehicle/file/vehicle_file.c
+++ b/navit/vehicle/file/vehicle_file.c
@@ -212,8 +212,7 @@ static int vehicle_win32_serial_track(struct vehicle_priv *priv) {
*
* @return 1 if ok, 0 if error
*/
-static int
-vehicle_file_open(struct vehicle_priv *priv) {
+static int vehicle_file_open(struct vehicle_priv *priv) {
char *name;
#ifndef _WIN32
struct termios tio;
@@ -319,8 +318,7 @@ vehicle_file_open(struct vehicle_priv *priv) {
*
* @param priv Pointer on the private data of the plugin
*/
-static void
-vehicle_file_close(struct vehicle_priv *priv) {
+static void vehicle_file_close(struct vehicle_priv *priv) {
dbg(lvl_debug, "enter, priv->fd='%d'", priv->fd);
vehicle_file_disable_watch(priv);
#ifdef _WIN32
@@ -352,8 +350,7 @@ vehicle_file_close(struct vehicle_priv *priv) {
*
* @return Always 0
*/
-static int
-vehicle_file_enable_watch_timer(struct vehicle_priv *priv) {
+static int vehicle_file_enable_watch_timer(struct vehicle_priv *priv) {
dbg(lvl_debug, "enter");
vehicle_file_enable_watch(priv);
@@ -367,8 +364,7 @@ vehicle_file_enable_watch_timer(struct vehicle_priv *priv) {
*
* @param priv Pointer on the private data of the plugin
*/
-static void
-vehicle_file_fix_timeout_cb(struct vehicle_priv *priv) {
+static void vehicle_file_fix_timeout_cb(struct vehicle_priv *priv) {
priv->valid = attr_position_valid_invalid;
priv->ev_fix_timeout = NULL;
callback_list_call_attr_0(priv->cbl, attr_position_coord_geo);
@@ -380,8 +376,7 @@ vehicle_file_fix_timeout_cb(struct vehicle_priv *priv) {
*
* @param priv Pointer on the private data of the plugin
*/
-static void
-vehicle_file_restart_fix_timeout(struct vehicle_priv *priv) {
+static void vehicle_file_restart_fix_timeout(struct vehicle_priv *priv) {
if (priv->ev_fix_timeout != NULL)
event_remove_timeout(priv->ev_fix_timeout);
priv->ev_fix_timeout = event_add_timeout(10000, 0, priv->cb_fix_timeout);
@@ -397,8 +392,7 @@ vehicle_file_restart_fix_timeout(struct vehicle_priv *priv) {
* @return 1 if new coords were received (fixtime changed) or changed to invalid,
* 0 if not found
*/
-static int
-vehicle_file_parse(struct vehicle_priv *priv, char *buffer) {
+static int vehicle_file_parse(struct vehicle_priv *priv, char *buffer) {
char *nmea_data_buf, *p, *item[32];
double lat, lng;
int i, j, bcsum;
@@ -666,8 +660,7 @@ vehicle_file_parse(struct vehicle_priv *priv, char *buffer) {
*
* @param priv Pointer on the private data of the plugin
*/
-static void
-vehicle_file_io(struct vehicle_priv *priv) {
+static void vehicle_file_io(struct vehicle_priv *priv) {
int size, rc = 0;
char *str, *tok;
dbg(lvl_debug, "vehicle_file_io : enter");
@@ -735,8 +728,7 @@ vehicle_file_io(struct vehicle_priv *priv) {
*
* @param priv Pointer on the private data of the plugin
*/
-static void
-vehicle_file_enable_watch(struct vehicle_priv *priv) {
+static void vehicle_file_enable_watch(struct vehicle_priv *priv) {
dbg(lvl_debug, "enter");
#ifdef _WIN32
// add an event : don't use glib timers and g_timeout_add
@@ -758,8 +750,7 @@ vehicle_file_enable_watch(struct vehicle_priv *priv) {
*
* @param priv Pointer on the private data of the plugin
*/
-static void
-vehicle_file_disable_watch(struct vehicle_priv *priv) {
+static void vehicle_file_disable_watch(struct vehicle_priv *priv) {
dbg(lvl_debug, "vehicle_file_disable_watch : enter");
#ifdef _WIN32
if(priv->file_type == file_type_serial) {
@@ -783,8 +774,7 @@ vehicle_file_disable_watch(struct vehicle_priv *priv) {
*
* @remarks private data is freed by this function (g_free)
*/
-static void
-vehicle_file_destroy(struct vehicle_priv *priv) {
+static void vehicle_file_destroy(struct vehicle_priv *priv) {
if (priv->statefile && priv->nmea_data) {
struct attr readwrite= {attr_readwrite};
struct attr create= {attr_create};
@@ -820,9 +810,8 @@ vehicle_file_destroy(struct vehicle_priv *priv) {
*
* @return 1 if ok, 0 for unknown or invalid attribute
*/
-static int
-vehicle_file_position_attr_get(struct vehicle_priv *priv,
- enum attr_type type, struct attr *attr) {
+static int vehicle_file_position_attr_get(struct vehicle_priv *priv,
+ enum attr_type type, struct attr *attr) {
switch (type) {
case attr_position_fix_type:
attr->u.num = priv->status;
@@ -897,8 +886,7 @@ vehicle_file_position_attr_get(struct vehicle_priv *priv,
*
* @return 1 if ok, 0 for unknown attribute
*/
-static int
-vehicle_file_sat_attr_get(void *priv_data, enum attr_type type, struct attr *attr) {
+static int vehicle_file_sat_attr_get(void *priv_data, enum attr_type type, struct attr *attr) {
struct gps_sat *sat;
struct vehicle_priv *priv=priv_data;
if (priv->sat_item.id_lo < 1)
@@ -949,10 +937,9 @@ static struct vehicle_methods vehicle_file_methods = {
*
* @remarks Private data is allocated by this function (g_new0)
*/
-static struct vehicle_priv *
-vehicle_file_new_file(struct vehicle_methods
- *meth, struct callback_list
- *cbl, struct attr **attrs) {
+static struct vehicle_priv *vehicle_file_new_file(struct vehicle_methods
+ *meth, struct callback_list
+ *cbl, struct attr **attrs) {
struct vehicle_priv *ret;
struct attr *source;
struct attr *time;
diff --git a/navit/vehicle/file/vehicle_pipe.c b/navit/vehicle/file/vehicle_pipe.c
index 8da12f4e8..2f9f6c227 100644
--- a/navit/vehicle/file/vehicle_pipe.c
+++ b/navit/vehicle/file/vehicle_pipe.c
@@ -20,7 +20,6 @@
#include "config.h"
#include "plugin.h"
-void
-plugin_init(void) {
+void plugin_init(void) {
plugin_get_category_vehicle("file");
}
diff --git a/navit/vehicle/file/vehicle_serial.c b/navit/vehicle/file/vehicle_serial.c
index 8da12f4e8..2f9f6c227 100644
--- a/navit/vehicle/file/vehicle_serial.c
+++ b/navit/vehicle/file/vehicle_serial.c
@@ -20,7 +20,6 @@
#include "config.h"
#include "plugin.h"
-void
-plugin_init(void) {
+void plugin_init(void) {
plugin_get_category_vehicle("file");
}
diff --git a/navit/vehicle/file/vehicle_socket.c b/navit/vehicle/file/vehicle_socket.c
index 8da12f4e8..2f9f6c227 100644
--- a/navit/vehicle/file/vehicle_socket.c
+++ b/navit/vehicle/file/vehicle_socket.c
@@ -20,7 +20,6 @@
#include "config.h"
#include "plugin.h"
-void
-plugin_init(void) {
+void plugin_init(void) {
plugin_get_category_vehicle("file");
}
diff --git a/navit/vehicle/gpsd/vehicle_gpsd.c b/navit/vehicle/gpsd/vehicle_gpsd.c
index fa8df9c74..95324f324 100644
--- a/navit/vehicle/gpsd/vehicle_gpsd.c
+++ b/navit/vehicle/gpsd/vehicle_gpsd.c
@@ -210,8 +210,7 @@ vehicle_gpsd_callback(struct gps_data_t *data, const char *buf, size_t len,
* Return FALSE if retry not required
* Return TRUE to try again
*/
-static int
-vehicle_gpsd_try_open(struct vehicle_priv *priv) {
+static int vehicle_gpsd_try_open(struct vehicle_priv *priv) {
char *source = g_strdup(priv->source);
char *colon = index(source + 7, ':');
char *port=NULL;
@@ -262,8 +261,7 @@ vehicle_gpsd_try_open(struct vehicle_priv *priv) {
/**
* Open a connection to gpsd. Will re-try the connection if it fails
*/
-static void
-vehicle_gpsd_open(struct vehicle_priv *priv) {
+static void vehicle_gpsd_open(struct vehicle_priv *priv) {
#ifdef HAVE_GPSBT
char errstr[256] = "";
/* We need to start gpsd (via gpsbt) first. */
@@ -282,8 +280,7 @@ vehicle_gpsd_open(struct vehicle_priv *priv) {
priv->retry_timer2=event_add_timeout(priv->retry_interval*1000, 1, priv->cbt);
}
-static void
-vehicle_gpsd_close(struct vehicle_priv *priv) {
+static void vehicle_gpsd_close(struct vehicle_priv *priv) {
#ifdef HAVE_GPSBT
int err;
#endif
@@ -320,8 +317,7 @@ vehicle_gpsd_close(struct vehicle_priv *priv) {
#endif
}
-static void
-vehicle_gpsd_io(struct vehicle_priv *priv) {
+static void vehicle_gpsd_io(struct vehicle_priv *priv) {
dbg(lvl_debug, "enter");
if (priv->gps) {
vehicle_last = priv;
@@ -349,8 +345,7 @@ vehicle_gpsd_io(struct vehicle_priv *priv) {
}
}
-static void
-vehicle_gpsd_destroy(struct vehicle_priv *priv) {
+static void vehicle_gpsd_destroy(struct vehicle_priv *priv) {
vehicle_gpsd_close(priv);
if (priv->source)
g_free(priv->source);
@@ -362,9 +357,8 @@ vehicle_gpsd_destroy(struct vehicle_priv *priv) {
g_free(priv);
}
-static int
-vehicle_gpsd_position_attr_get(struct vehicle_priv *priv,
- enum attr_type type, struct attr *attr) {
+static int vehicle_gpsd_position_attr_get(struct vehicle_priv *priv,
+ enum attr_type type, struct attr *attr) {
struct attr * active=NULL;
switch (type) {
case attr_position_fix_type:
@@ -431,10 +425,9 @@ static struct vehicle_methods vehicle_gpsd_methods = {
vehicle_gpsd_position_attr_get,
};
-static struct vehicle_priv *
-vehicle_gpsd_new_gpsd(struct vehicle_methods
- *meth, struct callback_list
- *cbl, struct attr **attrs) {
+static struct vehicle_priv *vehicle_gpsd_new_gpsd(struct vehicle_methods
+ *meth, struct callback_list
+ *cbl, struct attr **attrs) {
struct vehicle_priv *ret;
struct attr *source, *query, *retry_int;
@@ -470,8 +463,7 @@ vehicle_gpsd_new_gpsd(struct vehicle_methods
return ret;
}
-void
-plugin_init(void) {
+void plugin_init(void) {
dbg(lvl_debug, "enter");
plugin_register_category_vehicle("gpsd", vehicle_gpsd_new_gpsd);
}
diff --git a/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c b/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c
index eb5805ea3..0ce18a1d3 100644
--- a/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c
+++ b/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c
@@ -57,15 +57,13 @@ struct vehicle_priv {
char fixiso8601[128];
};
-static void
-vehicle_gpsd_dbus_close(struct vehicle_priv *priv) {
+static void vehicle_gpsd_dbus_close(struct vehicle_priv *priv) {
if (priv->connection)
dbus_connection_unref(priv->connection);
priv->connection=NULL;
}
-static DBusHandlerResult
-vehicle_gpsd_dbus_filter(DBusConnection *connection, DBusMessage *message, void *user_data) {
+static DBusHandlerResult vehicle_gpsd_dbus_filter(DBusConnection *connection, DBusMessage *message, void *user_data) {
struct vehicle_priv *priv=user_data;
double time,ept,latitude,longitude,eph,altitude,epv,track,epd,speed,eps,climb,epc;
int mode;
@@ -108,8 +106,7 @@ vehicle_gpsd_dbus_filter(DBusConnection *connection, DBusMessage *message, void
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
-static int
-vehicle_gpsd_dbus_open(struct vehicle_priv *priv) {
+static int vehicle_gpsd_dbus_open(struct vehicle_priv *priv) {
DBusError error;
dbus_error_init(&error);
@@ -140,17 +137,15 @@ vehicle_gpsd_dbus_open(struct vehicle_priv *priv) {
}
-static void
-vehicle_gpsd_dbus_destroy(struct vehicle_priv *priv) {
+static void vehicle_gpsd_dbus_destroy(struct vehicle_priv *priv) {
vehicle_gpsd_dbus_close(priv);
if (priv->source)
g_free(priv->source);
g_free(priv);
}
-static int
-vehicle_gpsd_dbus_position_attr_get(struct vehicle_priv *priv,
- enum attr_type type, struct attr *attr) {
+static int vehicle_gpsd_dbus_position_attr_get(struct vehicle_priv *priv,
+ enum attr_type type, struct attr *attr) {
switch (type) {
case attr_position_height:
attr->u.numd = &priv->altitude;
@@ -183,8 +178,7 @@ vehicle_gpsd_dbus_position_attr_get(struct vehicle_priv *priv,
return 1;
}
-static int
-vehicle_gpsd_dbus_set_attr_do(struct vehicle_priv *priv, struct attr *attr, int init) {
+static int vehicle_gpsd_dbus_set_attr_do(struct vehicle_priv *priv, struct attr *attr, int init) {
switch (attr->type) {
case attr_source:
if (strncmp(vehicle_gpsd_dbus_prefix,attr->u.str,strlen(vehicle_gpsd_dbus_prefix))) {
@@ -209,8 +203,7 @@ vehicle_gpsd_dbus_set_attr_do(struct vehicle_priv *priv, struct attr *attr, int
}
}
-static int
-vehicle_gpsd_dbus_set_attr(struct vehicle_priv *priv, struct attr *attr) {
+static int vehicle_gpsd_dbus_set_attr(struct vehicle_priv *priv, struct attr *attr) {
return vehicle_gpsd_dbus_set_attr_do(priv, attr, 0);
}
@@ -220,10 +213,9 @@ static struct vehicle_methods vehicle_gpsd_methods = {
vehicle_gpsd_dbus_set_attr,
};
-static struct vehicle_priv *
-vehicle_gpsd_dbus_new(struct vehicle_methods
- *meth, struct callback_list
- *cbl, struct attr **attrs) {
+static struct vehicle_priv *vehicle_gpsd_dbus_new(struct vehicle_methods
+ *meth, struct callback_list
+ *cbl, struct attr **attrs) {
struct vehicle_priv *ret;
@@ -239,8 +231,7 @@ vehicle_gpsd_dbus_new(struct vehicle_methods
return ret;
}
-void
-plugin_init(void) {
+void plugin_init(void) {
dbg(lvl_debug, "enter");
plugin_register_category_vehicle("gpsd_dbus", vehicle_gpsd_dbus_new);
}
diff --git a/navit/vehicle/gypsy/vehicle_gypsy.c b/navit/vehicle/gypsy/vehicle_gypsy.c
index b8dc8f2cc..077f219a1 100644
--- a/navit/vehicle/gypsy/vehicle_gypsy.c
+++ b/navit/vehicle/gypsy/vehicle_gypsy.c
@@ -97,10 +97,9 @@ static struct vehicle_priv {
* @param userdata
* @returns nothing
*/
-static void
-vehicle_gypsy_fixstatus_changed(GypsyDevice *device,
- gint fixstatus,
- gpointer userdata) {
+static void vehicle_gypsy_fixstatus_changed(GypsyDevice *device,
+ gint fixstatus,
+ gpointer userdata) {
struct vehicle_priv *priv = vehicle_last;
if (fixstatus==GYPSY_DEVICE_FIX_STATUS_3D)
@@ -134,11 +133,10 @@ vehicle_gypsy_fixstatus_changed(GypsyDevice *device,
* @param userdata
* @returns nothing
*/
-static void
-vehicle_gypsy_position_changed(GypsyPosition *position,
- GypsyPositionFields fields_set, int timestamp,
- double latitude, double longitude, double altitude,
- gpointer userdata) {
+static void vehicle_gypsy_position_changed(GypsyPosition *position,
+ GypsyPositionFields fields_set, int timestamp,
+ double latitude, double longitude, double altitude,
+ gpointer userdata) {
struct vehicle_priv *priv = vehicle_last;
int cb = FALSE;
@@ -177,10 +175,9 @@ vehicle_gypsy_position_changed(GypsyPosition *position,
* @param userdata
* @returns nothing
*/
-static void
-vehicle_gypsy_satellite_changed(GypsySatellite *satellite,
- GPtrArray *satellites,
- gpointer userdata) {
+static void vehicle_gypsy_satellite_changed(GypsySatellite *satellite,
+ GPtrArray *satellites,
+ gpointer userdata) {
struct vehicle_priv *priv = vehicle_last;
int i, sats, used=0;
@@ -215,14 +212,13 @@ vehicle_gypsy_satellite_changed(GypsySatellite *satellite,
* @param userdata
* @returns nothing
*/
-static void
-vehicle_gypsy_course_changed (GypsyCourse *course,
- GypsyCourseFields fields,
- int timestamp,
- double speed,
- double direction,
- double climb,
- gpointer userdata) {
+static void vehicle_gypsy_course_changed (GypsyCourse *course,
+ GypsyCourseFields fields,
+ int timestamp,
+ double speed,
+ double direction,
+ double climb,
+ gpointer userdata) {
struct vehicle_priv *priv = vehicle_last;
int cb = FALSE;
@@ -247,8 +243,7 @@ vehicle_gypsy_course_changed (GypsyCourse *course,
* @param data
* @returns TRUE to try again; FALSE if retry not required
*/
-static gboolean
-vehicle_gypsy_try_open(gpointer *data) {
+static gboolean vehicle_gypsy_try_open(gpointer *data) {
struct vehicle_priv *priv = (struct vehicle_priv *)data;
char *source = g_strdup(priv->source);
@@ -292,8 +287,7 @@ vehicle_gypsy_try_open(gpointer *data) {
* @param priv
* @returns nothing
*/
-static void
-vehicle_gypsy_open(struct vehicle_priv *priv) {
+static void vehicle_gypsy_open(struct vehicle_priv *priv) {
priv->retry_timer=0;
if (vehicle_gypsy_try_open((gpointer *)priv)) {
priv->retry_timer = g_timeout_add(priv->retry_interval*1000, (GSourceFunc)vehicle_gypsy_try_open, (gpointer *)priv);
@@ -306,8 +300,7 @@ vehicle_gypsy_open(struct vehicle_priv *priv) {
* @param priv
* @returns nothing
*/
-static void
-vehicle_gypsy_close(struct vehicle_priv *priv) {
+static void vehicle_gypsy_close(struct vehicle_priv *priv) {
if (priv->retry_timer) {
g_source_remove(priv->retry_timer);
priv->retry_timer=0;
@@ -337,8 +330,7 @@ vehicle_gypsy_close(struct vehicle_priv *priv) {
* @param priv
* @returns nothing
*/
-static void
-vehicle_gypsy_destroy(struct vehicle_priv *priv) {
+static void vehicle_gypsy_destroy(struct vehicle_priv *priv) {
vehicle_gypsy_close(priv);
if (priv->source)
g_free(priv->source);
@@ -353,9 +345,8 @@ vehicle_gypsy_destroy(struct vehicle_priv *priv) {
* @param attr
* @returns true/false
*/
-static int
-vehicle_gypsy_position_attr_get(struct vehicle_priv *priv,
- enum attr_type type, struct attr *attr) {
+static int vehicle_gypsy_position_attr_get(struct vehicle_priv *priv,
+ enum attr_type type, struct attr *attr) {
struct attr * active=NULL;
switch (type) {
case attr_position_fix_type:
@@ -420,10 +411,9 @@ struct vehicle_methods vehicle_gypsy_methods = {
* @param attrs
* @returns vehicle_priv
*/
-static struct vehicle_priv *
-vehicle_gypsy_new_gypsy(struct vehicle_methods *meth,
- struct callback_list *cbl,
- struct attr **attrs) {
+static struct vehicle_priv *vehicle_gypsy_new_gypsy(struct vehicle_methods *meth,
+ struct callback_list *cbl,
+ struct attr **attrs) {
struct vehicle_priv *ret;
struct attr *source, *retry_int;
@@ -478,8 +468,7 @@ vehicle_gypsy_new_gypsy(struct vehicle_methods *meth,
*
* @returns nothing
*/
-void
-plugin_init(void) {
+void plugin_init(void) {
dbg(lvl_debug, "enter");
plugin_register_category_vehicle("gypsy", vehicle_gypsy_new_gypsy);
}
diff --git a/navit/vehicle/iphone/vehicle_iphone.c b/navit/vehicle/iphone/vehicle_iphone.c
index 74429a954..790166238 100644
--- a/navit/vehicle/iphone/vehicle_iphone.c
+++ b/navit/vehicle/iphone/vehicle_iphone.c
@@ -57,15 +57,13 @@ struct vehicle_priv {
char str_time[200];
};
-static void
-vehicle_iphone_destroy(struct vehicle_priv *priv) {
+static void vehicle_iphone_destroy(struct vehicle_priv *priv) {
corelocation_exit();
g_free(priv);
}
-static int
-vehicle_iphone_position_attr_get(struct vehicle_priv *priv,
- enum attr_type type, struct attr *attr) {
+static int vehicle_iphone_position_attr_get(struct vehicle_priv *priv,
+ enum attr_type type, struct attr *attr) {
switch (type) {
case attr_position_speed:
attr->u.numd = &priv->speed;
@@ -91,8 +89,7 @@ vehicle_iphone_position_attr_get(struct vehicle_priv *priv,
return 1;
}
-static int
-vehicle_iphone_set_attr(struct vehicle_priv *priv, struct attr *attr) {
+static int vehicle_iphone_set_attr(struct vehicle_priv *priv, struct attr *attr) {
if (attr->type == attr_navit) {
priv->navit = attr->u.navit;
return 1;
@@ -106,15 +103,14 @@ struct vehicle_methods vehicle_iphone_methods = {
vehicle_iphone_set_attr,
};
-void
-vehicle_iphone_update(void *arg,
- double lat,
- double lng,
- double dir,
- double spd,
- char * str_time,
- double radius
- ) {
+void vehicle_iphone_update(void *arg,
+ double lat,
+ double lng,
+ double dir,
+ double spd,
+ char * str_time,
+ double radius
+ ) {
struct vehicle_priv * priv = arg;
priv->geo.lat = lat;
priv->geo.lng = lng;
@@ -130,10 +126,9 @@ vehicle_iphone_update(void *arg,
-static struct vehicle_priv *
-vehicle_iphone_new(struct vehicle_methods
- *meth, struct callback_list
- *cbl, struct attr **attrs) {
+static struct vehicle_priv *vehicle_iphone_new(struct vehicle_methods
+ *meth, struct callback_list
+ *cbl, struct attr **attrs) {
struct vehicle_priv *ret;
struct attr *interval,*speed,*position_coord_geo;
@@ -161,8 +156,7 @@ vehicle_iphone_new(struct vehicle_methods
return ret;
}
-void
-plugin_init(void) {
+void plugin_init(void) {
dbg(lvl_debug, "enter");
plugin_register_category_vehicle("iphone", vehicle_iphone_new);
}
diff --git a/navit/vehicle/maemo/vehicle_maemo.c b/navit/vehicle/maemo/vehicle_maemo.c
index badbde9c5..4717deb04 100644
--- a/navit/vehicle/maemo/vehicle_maemo.c
+++ b/navit/vehicle/maemo/vehicle_maemo.c
@@ -143,8 +143,7 @@ static void vehicle_maemo_error(LocationGPSDControl *control, LocationGPSDContro
/**
* Instantiate liblocation objects
*/
-static void
-vehicle_maemo_open(struct vehicle_priv *priv) {
+static void vehicle_maemo_open(struct vehicle_priv *priv) {
priv->control = location_gpsd_control_get_default();
priv->device = g_object_new(LOCATION_TYPE_GPS_DEVICE, NULL);
@@ -210,8 +209,7 @@ vehicle_maemo_open(struct vehicle_priv *priv) {
return;
}
-static void
-vehicle_maemo_destroy(struct vehicle_priv *priv) {
+static void vehicle_maemo_destroy(struct vehicle_priv *priv) {
location_gpsd_control_stop(priv->control);
g_object_unref(priv->device);
@@ -220,9 +218,8 @@ vehicle_maemo_destroy(struct vehicle_priv *priv) {
return;
}
-static int
-vehicle_maemo_position_attr_get(struct vehicle_priv *priv,
- enum attr_type type, struct attr *attr) {
+static int vehicle_maemo_position_attr_get(struct vehicle_priv *priv,
+ enum attr_type type, struct attr *attr) {
struct attr * active=NULL;
switch (type) {
case attr_position_fix_type:
@@ -291,10 +288,9 @@ struct vehicle_methods vehicle_maemo_methods = {
vehicle_maemo_position_attr_get,
};
-static struct vehicle_priv *
-vehicle_maemo_new_maemo(struct vehicle_methods
- *meth, struct callback_list
- *cbl, struct attr **attrs) {
+static struct vehicle_priv *vehicle_maemo_new_maemo(struct vehicle_methods
+ *meth, struct callback_list
+ *cbl, struct attr **attrs) {
struct vehicle_priv *ret;
struct attr *source, *retry_int;
@@ -321,8 +317,7 @@ vehicle_maemo_new_maemo(struct vehicle_methods
return ret;
}
-void
-plugin_init(void) {
+void plugin_init(void) {
dbg(lvl_debug, "enter");
plugin_register_category_vehicle("maemo", vehicle_maemo_new_maemo);
}
diff --git a/navit/vehicle/null/vehicle_null.c b/navit/vehicle/null/vehicle_null.c
index 1d67a6a1a..61dd7123a 100644
--- a/navit/vehicle/null/vehicle_null.c
+++ b/navit/vehicle/null/vehicle_null.c
@@ -64,8 +64,7 @@ struct vehicle_priv {
* @param priv
* @returns nothing
*/
-static void
-vehicle_null_destroy(struct vehicle_priv *priv) {
+static void vehicle_null_destroy(struct vehicle_priv *priv) {
dbg(lvl_debug,"enter");
g_free(priv);
}
@@ -78,9 +77,8 @@ vehicle_null_destroy(struct vehicle_priv *priv) {
* @param attr
* @returns true/false
*/
-static int
-vehicle_null_position_attr_get(struct vehicle_priv *priv,
- enum attr_type type, struct attr *attr) {
+static int vehicle_null_position_attr_get(struct vehicle_priv *priv,
+ enum attr_type type, struct attr *attr) {
dbg(lvl_debug,"enter %s",attr_to_name(type));
switch (type) {
case attr_position_height:
@@ -111,8 +109,7 @@ vehicle_null_position_attr_get(struct vehicle_priv *priv,
return 1;
}
-static int
-vehicle_null_set_attr(struct vehicle_priv *priv, struct attr *attr) {
+static int vehicle_null_set_attr(struct vehicle_priv *priv, struct attr *attr) {
switch (attr->type) {
case attr_position_speed:
priv->speed=*attr->u.numd;
@@ -146,10 +143,9 @@ struct vehicle_methods vehicle_null_methods = {
* @param attrs
* @returns vehicle_priv
*/
-static struct vehicle_priv *
-vehicle_null_new_null(struct vehicle_methods *meth,
- struct callback_list *cbl,
- struct attr **attrs) {
+static struct vehicle_priv *vehicle_null_new_null(struct vehicle_methods *meth,
+ struct callback_list *cbl,
+ struct attr **attrs) {
struct vehicle_priv *ret;
dbg(lvl_debug, "enter");
@@ -165,8 +161,7 @@ vehicle_null_new_null(struct vehicle_methods *meth,
*
* @returns nothing
*/
-void
-plugin_init(void) {
+void plugin_init(void) {
dbg(lvl_debug, "enter");
plugin_register_category_vehicle("null", vehicle_null_new_null);
}
diff --git a/navit/vehicle/qt5/vehicle_qt5.cpp b/navit/vehicle/qt5/vehicle_qt5.cpp
index 9f0ad7cbc..5771f1da7 100644
--- a/navit/vehicle/qt5/vehicle_qt5.cpp
+++ b/navit/vehicle/qt5/vehicle_qt5.cpp
@@ -137,8 +137,7 @@ void QNavitGeoReceiver::positionUpdated(const QGeoPositionInfo& info) {
* @param priv
* @returns nothing
*/
-static void
-vehicle_qt5_destroy(struct vehicle_priv* priv) {
+static void vehicle_qt5_destroy(struct vehicle_priv* priv) {
dbg(lvl_debug, "enter");
if (priv->receiver != NULL)
delete priv->receiver;
@@ -155,9 +154,8 @@ vehicle_qt5_destroy(struct vehicle_priv* priv) {
* @param attr
* @returns true/false
*/
-static int
-vehicle_qt5_position_attr_get(struct vehicle_priv* priv,
- enum attr_type type, struct attr* attr) {
+static int vehicle_qt5_position_attr_get(struct vehicle_priv* priv,
+ enum attr_type type, struct attr* attr) {
struct attr* active = NULL;
dbg(lvl_debug, "enter %s", attr_to_name(type));
switch (type) {
@@ -225,8 +223,7 @@ vehicle_qt5_position_attr_get(struct vehicle_priv* priv,
return 1;
}
-static int
-vehicle_qt5_set_attr(struct vehicle_priv* priv, struct attr* attr) {
+static int vehicle_qt5_set_attr(struct vehicle_priv* priv, struct attr* attr) {
switch (attr->type) {
case attr_position_speed:
priv->speed = *attr->u.numd;
@@ -259,10 +256,9 @@ struct vehicle_methods vehicle_null_methods = {
* @param attrs
* @returns vehicle_priv
*/
-static struct vehicle_priv*
-vehicle_qt5_new_qt5(struct vehicle_methods* meth,
- struct callback_list* cbl,
- struct attr** attrs) {
+static struct vehicle_priv* vehicle_qt5_new_qt5(struct vehicle_methods* meth,
+ struct callback_list* cbl,
+ struct attr** attrs) {
struct vehicle_priv* ret;
dbg(lvl_debug, "enter");
diff --git a/navit/vehicle/webos/bluetooth.c b/navit/vehicle/webos/bluetooth.c
index 707478f7d..9bb94364c 100644
--- a/navit/vehicle/webos/bluetooth.c
+++ b/navit/vehicle/webos/bluetooth.c
@@ -21,8 +21,8 @@ static void vehicle_webos_spp_init_read(struct vehicle_priv *priv, unsigned int
/********************************************************************/
-static void
-mlPDL_ServiceCall_callback(struct callback_list *cbl, char *service, char *parameters/*, struct callback *fail_cb*/) {
+static void mlPDL_ServiceCall_callback(struct callback_list *cbl, char *service,
+ char *parameters/*, struct callback *fail_cb*/) {
PDL_Err err;
dbg(lvl_debug,"PDL_ServiceCall(%s) parameters(%s)",service,parameters);
err = PDL_ServiceCall(service, parameters);
@@ -35,8 +35,7 @@ mlPDL_ServiceCall_callback(struct callback_list *cbl, char *service, char *param
g_free(parameters);
}
-static void
-mlPDL_ServiceCall(const char *service, const char *parameters/*, struct callback *fail_cb = NULL*/) {
+static void mlPDL_ServiceCall(const char *service, const char *parameters/*, struct callback *fail_cb = NULL*/) {
struct callback *cb = NULL;
struct callback_list *cbl = NULL;
@@ -54,13 +53,12 @@ mlPDL_ServiceCall(const char *service, const char *parameters/*, struct callback
/********************************************************************/
-static void
-mlPDL_ServiceCallWithCallback_callback(struct callback_list *cbl,
- char *service,
- char *parameters,
- PDL_ServiceCallbackFunc callback,
- void *user,
- PDL_bool removeAfterResponse) {
+static void mlPDL_ServiceCallWithCallback_callback(struct callback_list *cbl,
+ char *service,
+ char *parameters,
+ PDL_ServiceCallbackFunc callback,
+ void *user,
+ PDL_bool removeAfterResponse) {
PDL_Err err;
dbg(lvl_debug,"PDL_ServiceCallWithCallback(%s) parameters(%s)",service,parameters);
err = PDL_ServiceCallWithCallback(service, parameters, callback, user, removeAfterResponse);
@@ -74,12 +72,11 @@ mlPDL_ServiceCallWithCallback_callback(struct callback_list *cbl,
g_free(parameters);
}
-static void
-mlPDL_ServiceCallWithCallback(const char *service,
- const char *parameters,
- PDL_ServiceCallbackFunc callback,
- void *user,
- PDL_bool removeAfterResponse) {
+static void mlPDL_ServiceCallWithCallback(const char *service,
+ const char *parameters,
+ PDL_ServiceCallbackFunc callback,
+ void *user,
+ PDL_bool removeAfterResponse) {
struct callback *cb = NULL;
struct callback_list *cbl = NULL;
@@ -98,8 +95,8 @@ mlPDL_ServiceCallWithCallback(const char *service,
/********************************************************************/
-static void
-vehicle_webos_init_pdl_locationtracking_callback(struct vehicle_priv *priv, struct callback_list *cbl, int param) {
+static void vehicle_webos_init_pdl_locationtracking_callback(struct vehicle_priv *priv, struct callback_list *cbl,
+ int param) {
PDL_Err err;
priv->gps_type = param ? GPS_TYPE_INT: GPS_TYPE_NONE;
@@ -116,8 +113,7 @@ vehicle_webos_init_pdl_locationtracking_callback(struct vehicle_priv *priv, stru
callback_list_destroy(cbl);
}
-static void
-vehicle_webos_init_pdl_locationtracking(struct vehicle_priv *priv, int param) {
+static void vehicle_webos_init_pdl_locationtracking(struct vehicle_priv *priv, int param) {
struct callback *cb = NULL;
struct callback_list *cbl = NULL;
@@ -131,8 +127,7 @@ vehicle_webos_init_pdl_locationtracking(struct vehicle_priv *priv, int param) {
/********************************************************************/
-static int
-vehicle_webos_parse_nmea(struct vehicle_priv *priv, char *buffer) {
+static int vehicle_webos_parse_nmea(struct vehicle_priv *priv, char *buffer) {
char *nmea_data_buf, *p, *item[32];
double lat, lng;
int i, bcsum;
@@ -327,8 +322,7 @@ vehicle_webos_parse_nmea(struct vehicle_priv *priv, char *buffer) {
return ret;
}
-static void
-vehicle_webos_spp_handle_read(PDL_ServiceParameters *params, void *user) {
+static void vehicle_webos_spp_handle_read(PDL_ServiceParameters *params, void *user) {
struct vehicle_priv *priv = user;
int size, rc = 0;
char *str, *tok;
@@ -391,8 +385,7 @@ vehicle_webos_spp_handle_read(PDL_ServiceParameters *params, void *user) {
vehicle_webos_spp_init_read(priv, buffer_size - priv->buffer_pos - 1);
}
-static void
-vehicle_webos_spp_init_read(struct vehicle_priv *priv, unsigned int length) {
+static void vehicle_webos_spp_init_read(struct vehicle_priv *priv, unsigned int length) {
//PDL_Err err;
char parameters[128];
@@ -405,8 +398,7 @@ vehicle_webos_spp_init_read(struct vehicle_priv *priv, unsigned int length) {
);
}
-static void
-vehicle_webos_spp_handle_open(PDL_ServiceParameters *params, void *user) {
+static void vehicle_webos_spp_handle_open(PDL_ServiceParameters *params, void *user) {
struct vehicle_priv *priv = (struct vehicle_priv *)user;
if (!priv->buffer)
@@ -419,8 +411,7 @@ vehicle_webos_spp_handle_open(PDL_ServiceParameters *params, void *user) {
vehicle_webos_spp_init_read(priv, buffer_size-1);
}
-static void
-vehicle_webos_spp_notify(PDL_ServiceParameters *params, void *user) {
+static void vehicle_webos_spp_notify(PDL_ServiceParameters *params, void *user) {
struct vehicle_priv *priv = user;
char notification[128];
@@ -485,8 +476,7 @@ vehicle_webos_spp_notify(PDL_ServiceParameters *params, void *user) {
}
-static void
-vehicle_webos_init_bt_gps(struct vehicle_priv *priv, char *addr) {
+static void vehicle_webos_init_bt_gps(struct vehicle_priv *priv, char *addr) {
char parameters[128];
dbg(lvl_debug,"subscribeNotifications");
@@ -502,8 +492,7 @@ vehicle_webos_init_bt_gps(struct vehicle_priv *priv, char *addr) {
priv->spp_address = addr;
}
-static void
-vehicle_webos_bt_gap_callback(PDL_ServiceParameters *params, void *param) {
+static void vehicle_webos_bt_gap_callback(PDL_ServiceParameters *params, void *param) {
const char *params_json;
struct vehicle_priv *priv = (struct vehicle_priv *)param;
char *device_addr = NULL;
@@ -555,8 +544,7 @@ vehicle_webos_bt_gap_callback(PDL_ServiceParameters *params, void *param) {
g_free(device_addr);
}
-int
-vehicle_webos_bt_open(struct vehicle_priv *priv) {
+int vehicle_webos_bt_open(struct vehicle_priv *priv) {
// Try to connect to BT GPS, or use PDL method
dbg(lvl_debug,"enter");
@@ -575,8 +563,7 @@ vehicle_webos_bt_open(struct vehicle_priv *priv) {
return 1;
}
-void
-vehicle_webos_bt_close(struct vehicle_priv *priv) {
+void vehicle_webos_bt_close(struct vehicle_priv *priv) {
dbg(lvl_debug,"XXX");
char parameters[128];
if (priv->spp_instance_id) {
diff --git a/navit/vehicle/webos/vehicle_webos.c b/navit/vehicle/webos/vehicle_webos.c
index 31f4b6cda..04dc90ae2 100644
--- a/navit/vehicle/webos/vehicle_webos.c
+++ b/navit/vehicle/webos/vehicle_webos.c
@@ -49,8 +49,7 @@ static char *vehicle_webos_prefix="webos:";
/*******************************************************************/
-static void
-vehicle_webos_callback(PDL_ServiceParameters *params, void *priv) {
+static void vehicle_webos_callback(PDL_ServiceParameters *params, void *priv) {
PDL_Location *location;
SDL_Event event;
SDL_UserEvent userevent;
@@ -84,8 +83,7 @@ vehicle_webos_callback(PDL_ServiceParameters *params, void *priv) {
return /*PDL_NOERROR*/;
}
-static void
-vehicle_webos_gps_update(struct vehicle_priv *priv, PDL_Location *location) {
+static void vehicle_webos_gps_update(struct vehicle_priv *priv, PDL_Location *location) {
if(location) { // location may be NULL if called by bluetooth-code. priv is already prefilled there
struct timeval tv;
gettimeofday(&tv,NULL);
@@ -122,8 +120,7 @@ vehicle_webos_gps_update(struct vehicle_priv *priv, PDL_Location *location) {
callback_list_call_attr_0(priv->cbl, attr_position_coord_geo);
}
-static void
-vehicle_webos_timeout_callback(struct vehicle_priv *priv) {
+static void vehicle_webos_timeout_callback(struct vehicle_priv *priv) {
struct timeval tv;
gettimeofday(&tv,NULL);
@@ -140,8 +137,7 @@ vehicle_webos_timeout_callback(struct vehicle_priv *priv) {
}
}
-void
-vehicle_webos_close(struct vehicle_priv *priv) {
+void vehicle_webos_close(struct vehicle_priv *priv) {
event_remove_timeout(priv->ev_timeout);
priv->ev_timeout = NULL;
@@ -155,8 +151,7 @@ vehicle_webos_close(struct vehicle_priv *priv) {
}
}
-static int
-vehicle_webos_open(struct vehicle_priv *priv) {
+static int vehicle_webos_open(struct vehicle_priv *priv) {
PDL_Err err;
priv->pdk_version = PDL_GetPDKVersion();
@@ -193,17 +188,15 @@ vehicle_webos_open(struct vehicle_priv *priv) {
return 1;
}
-static void
-vehicle_webos_destroy(struct vehicle_priv *priv) {
+static void vehicle_webos_destroy(struct vehicle_priv *priv) {
vehicle_webos_close(priv);
if (priv->source)
g_free(priv->source);
g_free(priv);
}
-static int
-vehicle_webos_position_attr_get(struct vehicle_priv *priv,
- enum attr_type type, struct attr *attr) {
+static int vehicle_webos_position_attr_get(struct vehicle_priv *priv,
+ enum attr_type type, struct attr *attr) {
switch (type) {
case attr_position_height:
dbg(lvl_info,"Altitude: %f", priv->altitude);
@@ -310,8 +303,7 @@ vehicle_webos_position_attr_get(struct vehicle_priv *priv,
return 1;
}
-static int
-vehicle_webos_set_attr_do(struct vehicle_priv *priv, struct attr *attr, int init) {
+static int vehicle_webos_set_attr_do(struct vehicle_priv *priv, struct attr *attr, int init) {
switch (attr->type) {
case attr_source:
if (strncmp(vehicle_webos_prefix,attr->u.str,strlen(vehicle_webos_prefix))) {
@@ -338,8 +330,7 @@ vehicle_webos_set_attr_do(struct vehicle_priv *priv, struct attr *attr, int init
}
}
-static int
-vehicle_webos_set_attr(struct vehicle_priv *priv, struct attr *attr) {
+static int vehicle_webos_set_attr(struct vehicle_priv *priv, struct attr *attr) {
return vehicle_webos_set_attr_do(priv, attr, 0);
}
@@ -349,10 +340,9 @@ struct vehicle_methods vehicle_webos_methods = {
vehicle_webos_set_attr,
};
-static struct vehicle_priv *
-vehicle_webos_new(struct vehicle_methods
- *meth, struct callback_list
- *cbl, struct attr **attrs) {
+static struct vehicle_priv *vehicle_webos_new(struct vehicle_methods
+ *meth, struct callback_list
+ *cbl, struct attr **attrs) {
struct vehicle_priv *priv;
priv = g_new0(struct vehicle_priv, 1);
@@ -372,8 +362,7 @@ vehicle_webos_new(struct vehicle_methods
return priv;
}
-void
-plugin_init(void) {
+void plugin_init(void) {
dbg(lvl_debug, "enter");
plugin_register_category_vehicle("webos", vehicle_webos_new);
}
diff --git a/navit/vehicle/wince/vehicle_wince.c b/navit/vehicle/wince/vehicle_wince.c
index 6d615c0fb..4d2afa0e9 100644
--- a/navit/vehicle/wince/vehicle_wince.c
+++ b/navit/vehicle/wince/vehicle_wince.c
@@ -314,8 +314,7 @@ static DWORD WINAPI wince_reader_thread (LPVOID lParam) {
return TRUE;
}
-static int
-vehicle_wince_available_ports(void) {
+static int vehicle_wince_available_ports(void) {
HKEY hkResult;
HKEY hkSubResult;
wchar_t keyname[20];
@@ -353,8 +352,7 @@ vehicle_wince_available_ports(void) {
*
* @param priv Pointer on the private data of the plugin
*/
-static void
-vehicle_wince_fix_timeout_cb(struct vehicle_priv *priv) {
+static void vehicle_wince_fix_timeout_cb(struct vehicle_priv *priv) {
priv->valid = attr_position_valid_invalid;
priv->ev_fix_timeout = NULL;
callback_list_call_attr_0(priv->cbl, attr_position_coord_geo);
@@ -366,8 +364,7 @@ vehicle_wince_fix_timeout_cb(struct vehicle_priv *priv) {
*
* @param priv Pointer on the private data of the plugin
*/
-static void
-vehicle_wince_restart_fix_timeout(struct vehicle_priv *priv) {
+static void vehicle_wince_restart_fix_timeout(struct vehicle_priv *priv) {
if (priv->ev_fix_timeout != NULL)
event_remove_timeout(priv->ev_fix_timeout);
priv->ev_fix_timeout = event_add_timeout(10000, 0, priv->cb_fix_timeout);
@@ -375,8 +372,7 @@ vehicle_wince_restart_fix_timeout(struct vehicle_priv *priv) {
-static int
-vehicle_wince_open(struct vehicle_priv *priv) {
+static int vehicle_wince_open(struct vehicle_priv *priv) {
char* raw_setting_str;
char* strport;
char* strsettings;
@@ -407,13 +403,11 @@ vehicle_wince_open(struct vehicle_priv *priv) {
return 1;
}
-static void
-vehicle_wince_close(struct vehicle_priv *priv) {
+static void vehicle_wince_close(struct vehicle_priv *priv) {
dbg(lvl_debug,"enter");
}
-static int
-vehicle_wince_parse(struct vehicle_priv *priv, char *buffer) {
+static int vehicle_wince_parse(struct vehicle_priv *priv, char *buffer) {
char *nmea_data_buf, *p, *item[32];
double lat, lng;
int i, j, bcsum;
@@ -669,8 +663,7 @@ vehicle_wince_parse(struct vehicle_priv *priv, char *buffer) {
return ret;
}
-static void
-vehicle_wince_io(struct vehicle_priv *priv) {
+static void vehicle_wince_io(struct vehicle_priv *priv) {
int size, rc = 0;
char *str, *tok;
@@ -722,8 +715,7 @@ vehicle_wince_io(struct vehicle_priv *priv) {
callback_list_call_attr_0(priv->cbl, attr_position_coord_geo);
}
-static void
-vehicle_wince_enable_watch(struct vehicle_priv *priv) {
+static void vehicle_wince_enable_watch(struct vehicle_priv *priv) {
dbg(lvl_debug, "enter");
vehicle_wince_disable_watch(priv);
priv->is_running = 1;
@@ -740,8 +732,7 @@ vehicle_wince_enable_watch(struct vehicle_priv *priv) {
}
}
-static void
-vehicle_wince_disable_watch(struct vehicle_priv *priv) {
+static void vehicle_wince_disable_watch(struct vehicle_priv *priv) {
int wait = 5000;
dbg(lvl_debug, "enter");
@@ -762,8 +753,7 @@ vehicle_wince_disable_watch(struct vehicle_priv *priv) {
*
* @param priv vehicle_priv structure for the vehicle
*/
-static void
-vehicle_wince_destroy(struct vehicle_priv *priv) {
+static void vehicle_wince_destroy(struct vehicle_priv *priv) {
vehicle_wince_disable_watch(priv);
vehicle_wince_close(priv);
if (priv->BthSetMode) {
@@ -788,9 +778,8 @@ vehicle_wince_destroy(struct vehicle_priv *priv) {
*
* @return True for success, false for failure
*/
-static int
-vehicle_wince_position_attr_get(struct vehicle_priv *priv,
- enum attr_type type, struct attr *attr) {
+static int vehicle_wince_position_attr_get(struct vehicle_priv *priv,
+ enum attr_type type, struct attr *attr) {
switch (type) {
case attr_position_fix_type:
attr->u.num = priv->status;
@@ -856,8 +845,7 @@ vehicle_wince_position_attr_get(struct vehicle_priv *priv,
return 1;
}
-static int
-vehicle_wince_sat_attr_get(void *priv_data, enum attr_type type, struct attr *attr) {
+static int vehicle_wince_sat_attr_get(void *priv_data, enum attr_type type, struct attr *attr) {
struct vehicle_priv *priv=priv_data;
struct gps_sat *sat;
@@ -912,10 +900,9 @@ struct vehicle_methods vehicle_wince_methods = {
*
* @return vehicle_priv
*/
-static struct vehicle_priv *
-vehicle_wince_new(struct vehicle_methods
- *meth, struct callback_list
- *cbl, struct attr **attrs) {
+static struct vehicle_priv *vehicle_wince_new(struct vehicle_methods
+ *meth, struct callback_list
+ *cbl, struct attr **attrs) {
struct vehicle_priv *ret;
struct attr *source;
struct attr *time;
@@ -990,8 +977,7 @@ vehicle_wince_new(struct vehicle_methods
/**
* @brief Registers the vehicle_wince plugin
*/
-void
-plugin_init(void) {
+void plugin_init(void) {
dbg(lvl_debug, "enter");
plugin_register_category_vehicle("wince", vehicle_wince_new);
plugin_register_category_vehicle("file", vehicle_wince_new);