From: Kaj-Michael Lang Date: Tue, 18 Mar 2008 15:09:05 +0000 (+0200) Subject: Rename write_gpx -> gpx_write and parse_gpx -> gpx_parse X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c705ffdf8bbea76baa33f9631dbcd0e8a5bafd9e;p=mapper Rename write_gpx -> gpx_write and parse_gpx -> gpx_parse --- diff --git a/src/config-gconf.c b/src/config-gconf.c index 9da3346..8d7cfd4 100644 --- a/src/config-gconf.c +++ b/src/config-gconf.c @@ -85,7 +85,7 @@ GnomeVFSHandle *handle; gchar *tfile; tfile=gnome_vfs_uri_make_full_from_relative(config_dir, file); if (GNOME_VFS_OK == gnome_vfs_create(&handle, tfile, GNOME_VFS_OPEN_WRITE, FALSE, 0600)) { - write_gpx(path, handle); + gpx_write(path, handle); gnome_vfs_close(handle); } g_free(tfile); @@ -426,7 +426,7 @@ gint size; pfile = gnome_vfs_uri_make_full_from_relative(config_dir, file); if (GNOME_VFS_OK == gnome_vfs_read_entire_file(pfile, &size, &bytes)) - parse_gpx(path, bytes, size, 0); /* 0 to replace track. */ + gpx_parse(path, bytes, size, 0); /* 0 to replace track. */ g_free(pfile); } diff --git a/src/gpx.c b/src/gpx.c index 82e2b07..2b8ef15 100644 --- a/src/gpx.c +++ b/src/gpx.c @@ -113,7 +113,7 @@ g_snprintf(XML_TZONE, sizeof(XML_TZONE), "%+03ld:%02ld", (time2.tm_gmtoff / 60 / } gboolean -write_gpx(Path *path, GnomeVFSHandle *handle) +gpx_write(Path *path, GnomeVFSHandle *handle) { Point *curr = NULL; WayPoint *wcurr = NULL; @@ -498,7 +498,7 @@ data->state = ERROR; } gboolean -parse_gpx(Path *to_replace, gchar *buffer, gint size, gint policy_old) +gpx_parse(Path *to_replace, gchar *buffer, gint size, gint policy_old) { SaxData data; xmlSAXHandler sax_handler; diff --git a/src/gpx.h b/src/gpx.h index febce87..d6c5e5d 100644 --- a/src/gpx.h +++ b/src/gpx.h @@ -6,7 +6,7 @@ #include "path.h" void gpx_init(void); -gboolean write_gpx(Path *path, GnomeVFSHandle *handle); -gboolean parse_gpx(Path *to_replace, gchar *buffer, gint size, gint policy_old); +gboolean gpx_write(Path *path, GnomeVFSHandle *handle); +gboolean gpx_parse(Path *to_replace, gchar *buffer, gint size, gint policy_old); #endif diff --git a/src/map-download.c b/src/map-download.c index ab98d11..44ded6c 100644 --- a/src/map-download.c +++ b/src/map-download.c @@ -131,7 +131,7 @@ while (_curl_multi && (msg = curl_multi_info_read(_curl_multi, &num_msgs))) { if (msg->easy_handle == _autoroute_data.curl_easy) { /* This is the autoroute download. */ /* Now, parse the autoroute and update the display. */ - if (_autoroute_data.enabled && parse_gpx(&_route, _autoroute_data.rdl_data.bytes, _autoroute_data.rdl_data.bytes_read, 0)) { + if (_autoroute_data.enabled && gpx_parse(&_route, _autoroute_data.rdl_data.bytes, _autoroute_data.rdl_data.bytes_read, 0)) { /* Find the nearest route point, if we're connected. */ route_find_nearest_point(); map_force_redraw(); diff --git a/src/route.c b/src/route.c index db15a84..3571922 100644 --- a/src/route.c +++ b/src/route.c @@ -109,7 +109,7 @@ gint size; if (file_open_get_contents(_route_dir_uri, &buffer, &size)) { /* If auto is enabled, append the route, otherwise replace it. */ - if (parse_gpx(_route, buffer, size, _autoroute_data.enabled ? 0 : 1)) { + if (gpx_parse(_route, buffer, size, _autoroute_data.enabled ? 0 : 1)) { route_cancel_autoroute(FALSE); MACRO_BANNER_SHOW_INFO(_window, _("Route Opened")); @@ -141,7 +141,7 @@ if (_route->head==_route->tail) { } if (file_save(&_route_dir_uri, &_route_dir_uri, &handle)) { - if (write_gpx(_route, handle)) { + if (gpx_write(_route, handle)) { MACRO_BANNER_SHOW_INFO(_window, _("Route Saved")); } else { popup_error(_window, _("Error writing GPX file.")); @@ -453,7 +453,7 @@ while (GTK_RESPONSE_ACCEPT == gtk_dialog_run(GTK_DIALOG(dialog))) { /* Let them try again. */ } /* Else, if GPS is enabled, replace the route, otherwise append it. */ - else if (parse_gpx(_route, rdl_data.bytes, rdl_data.bytes_read, + else if (gpx_parse(_route, rdl_data.bytes, rdl_data.bytes_read, (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(oti.rad_use_gps)) ? 0 : 1))) { GtkTreeIter iter; diff --git a/src/track.c b/src/track.c index 38166b8..b075c2e 100644 --- a/src/track.c +++ b/src/track.c @@ -209,7 +209,7 @@ gint size; gboolean r = FALSE; if (file_open_get_contents(&_track_file_uri, &buffer, &size)) { - if (parse_gpx(_track, buffer, size, -1)) { + if (gpx_parse(_track, buffer, size, -1)) { map_force_redraw(); MACRO_BANNER_SHOW_INFO(_window, _("Track Opened")); r = TRUE; @@ -228,7 +228,7 @@ GnomeVFSHandle *handle; gboolean r = FALSE; if (file_save(&_track_file_uri, &_track_file_uri, &handle)) { - if (write_gpx(_track, handle)) { + if (gpx_write(_track, handle)) { MACRO_BANNER_SHOW_INFO(_window, _("Track Saved")); r = TRUE; track_clear();