From 4258f4e221ef2abaa1e078e44abd630da49729be Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 20 Feb 2008 15:10:29 +0000 Subject: [PATCH] Remove trailing '\n' in g_message calls Unneeded as g_message are in charge of formatting messages and annoying for translators. --- src/dem.c | 4 ++-- src/download.c | 2 +- src/file.c | 2 +- src/google.c | 8 ++++---- src/googlesearch.c | 4 ++-- src/vikdemlayer.c | 2 +- src/vikmapslayer.c | 2 +- src/viktrack.c | 2 +- src/viktrwlayer.c | 2 +- src/vikwindow.c | 6 +++--- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/dem.c b/src/dem.c index e8a7698..3f29bce 100644 --- a/src/dem.c +++ b/src/dem.c @@ -266,7 +266,7 @@ static void *unzip_hgt_file(gchar *zip_file, gulong *unzip_size) local_file_header = (struct _lfh *) zip_file; if (local_file_header->sig != 0x04034b50) { - g_warning("%s(): wrong format\n", __PRETTY_FUNCTION__); + g_warning("%s(): wrong format", __PRETTY_FUNCTION__); g_free(unzip_data); goto end; } @@ -345,7 +345,7 @@ static VikDEM *vik_dem_read_srtm_hgt(FILE *f, const gchar *basename, gboolean zi else if (file_size == (num_rows_1sec * num_rows_1sec * sizeof(gint16))) arcsec = 1; else { - g_warning("%s(): file %s does not have right size\n", __PRETTY_FUNCTION__, basename); + g_warning("%s(): file %s does not have right size", __PRETTY_FUNCTION__, basename); munmap(dem_file, file_size); g_ptr_array_free(dem->columns, TRUE); g_free(dem); diff --git a/src/download.c b/src/download.c index 0716ecf..2120d1d 100644 --- a/src/download.c +++ b/src/download.c @@ -142,7 +142,7 @@ static int download( const char *hostname, const char *uri, const char *fn, Down if (ret == -1 || ret == 1 || ret == -2 || check_map_file(f)) { - g_warning(_("Download error: %s\n"), fn); + g_warning(_("Download error: %s"), fn); fclose ( f ); remove ( tmpfilename ); g_free ( tmpfilename ); diff --git a/src/file.c b/src/file.c index d7cc89d..4a95715 100644 --- a/src/file.c +++ b/src/file.c @@ -316,7 +316,7 @@ static void file_read ( VikAggregateLayer *top, FILE *f, VikViewport *vp ) push(&stack); if ( type == -1 ) { - g_warning ( "Line %ld: Unknown type %s\n", line_num, line+6 ); + g_warning ( "Line %ld: Unknown type %s", line_num, line+6 ); stack->data = NULL; } else if (parent_type == VIK_LAYER_GPS) diff --git a/src/google.c b/src/google.c index 203e67d..f74b0ce 100644 --- a/src/google.c +++ b/src/google.c @@ -127,7 +127,7 @@ static const gchar *google_version_number(MapCoord *mapcoord, GoogleType google_ first = FALSE; gvers = tvers = kvers = terrvers = NULL; if ((tmp_fd = g_file_open_tmp ("vikgvers.XXXXXX", &tmpname, NULL)) == -1) { - g_critical(_("couldn't open temp file %s\n"), tmpname); + g_critical(_("couldn't open temp file %s"), tmpname); exit(1); } @@ -136,17 +136,17 @@ static const gchar *google_version_number(MapCoord *mapcoord, GoogleType google_ tmp_file = fdopen(tmp_fd, "r+"); if (curl_download_uri(uri, tmp_file, &dl_options)) { /* error */ - g_warning(_("Failed downloading %s\n"), tmpname); + g_warning(_("Failed downloading %s"), tmpname); } else { if ((mf = g_mapped_file_new(tmpname, FALSE, NULL)) == NULL) { - g_critical(_("couldn't map temp file\n")); + g_critical(_("couldn't map temp file")); exit(1); } len = g_mapped_file_get_length(mf); text = g_mapped_file_get_contents(mf); if ((beg = g_strstr_len(text, len, "GLoadApi")) == NULL) { - g_warning(_("Failed fetching Google numbers (\"GLoadApi\" not found)\n")); + g_warning(_("Failed fetching Google numbers (\"GLoadApi\" not found)")); goto failed; } diff --git a/src/googlesearch.c b/src/googlesearch.c index 3448200..7f2060a 100644 --- a/src/googlesearch.c +++ b/src/googlesearch.c @@ -120,7 +120,7 @@ static gboolean parse_file_for_latlon(gchar *file_name, struct LatLon *ll) lat_buf[0] = lon_buf[0] = '\0'; if ((mf = g_mapped_file_new(file_name, FALSE, NULL)) == NULL) { - g_critical(_("couldn't map temp file\n")); + g_critical(_("couldn't map temp file")); exit(1); } len = g_mapped_file_get_length(mf); @@ -209,7 +209,7 @@ static int google_search_get_coord(VikWindow *vw, VikViewport *vvp, gchar *srch_ escaped_srch_str = uri_escape(srch_str); if ((tmp_fd = g_file_open_tmp ("vikgsearch.XXXXXX", &tmpname, NULL)) == -1) { - g_critical(_("couldn't open temp file\n")); + g_critical(_("couldn't open temp file")); exit(1); } diff --git a/src/vikdemlayer.c b/src/vikdemlayer.c index 5a2b07a..27ff356 100644 --- a/src/vikdemlayer.c +++ b/src/vikdemlayer.c @@ -743,7 +743,7 @@ static void srtm_dem_download_thread ( DEMDownloadParams *p, gpointer threaddata continent_dir = srtm_continent_dir(intlat, intlon); if (!continent_dir) { - g_warning(N_("No SRTM data available for %f, %f\n"), p->lat, p->lon); + g_warning(N_("No SRTM data available for %f, %f"), p->lat, p->lon); return; } diff --git a/src/vikmapslayer.c b/src/vikmapslayer.c index c5e0691..2b95c3e 100644 --- a/src/vikmapslayer.c +++ b/src/vikmapslayer.c @@ -952,7 +952,7 @@ void maps_layer_download_section_without_redraw( VikMapsLayer *vml, VikViewport if (!map_type->coord_to_mapcoord(ul, zoom, zoom, &ulm) || !map_type->coord_to_mapcoord(br, zoom, zoom, &brm)) { - g_warning("%s() coord_to_mapcoord() failed\n", __PRETTY_FUNCTION__); + g_warning("%s() coord_to_mapcoord() failed", __PRETTY_FUNCTION__); return; } diff --git a/src/viktrack.c b/src/viktrack.c index f2cc1f6..627ab94 100644 --- a/src/viktrack.c +++ b/src/viktrack.c @@ -498,7 +498,7 @@ gdouble *vik_track_make_speed_map ( const VikTrack *tr, guint16 num_chunks ) return NULL; if (duration < 0) { - g_warning("negative duration: unsorted trackpoint timestamps?\n"); + g_warning("negative duration: unsorted trackpoint timestamps?"); return NULL; } pt_count = vik_track_get_tp_count(tr); diff --git a/src/viktrwlayer.c b/src/viktrwlayer.c index 1627da0..9a37d51 100644 --- a/src/viktrwlayer.c +++ b/src/viktrwlayer.c @@ -704,7 +704,7 @@ static VikTrwLayer *trw_layer_unmarshall( gpointer data, gint len, VikViewport * data += pl; if (!(f = fdopen(g_file_open_tmp (NULL, &tmpname, NULL), "r+"))) { - g_critical("couldn't open temp file\n"); + g_critical("couldn't open temp file"); exit(1); } fwrite(data, len - pl - sizeof(pl), 1, f); diff --git a/src/vikwindow.c b/src/vikwindow.c index 3e9824c..126c5e2 100644 --- a/src/vikwindow.c +++ b/src/vikwindow.c @@ -975,7 +975,7 @@ void draw_goto_cb ( GtkAction *a, VikWindow *vw ) return; } else { - g_critical("Houston we have a problem\n"); + g_critical("Houston we have a problem"); return; } @@ -1254,7 +1254,7 @@ static void load_file ( GtkAction *a, VikWindow *vw ) newwindow = FALSE; } else { - g_critical("Houston we got a problem\n"); + g_critical("Houston we got a problem"); return; } @@ -1723,7 +1723,7 @@ static void window_change_coord_mode_cb ( GtkAction *old_a, GtkAction *a, VikWin drawmode = VIK_VIEWPORT_DRAWMODE_MERCATOR; } else { - g_critical("Houston, we got a problem!\n"); + g_critical("Houston, we got a problem!"); return; } -- 2.11.4.GIT