From 027cd9cd9e490d32f5d42012dc236316043af35d Mon Sep 17 00:00:00 2001 From: Alexandru Csete Date: Tue, 14 Oct 2014 12:25:33 +0200 Subject: [PATCH] Use __func__ instead of __FUNCTION__ __func__ is defined in standard whereas __FUNCTION__ is a pre-standard gcc extension. --- src/first-time.c | 76 ++++++++++++++-------------- src/gpredict-help.c | 10 ++-- src/gpredict-utils.c | 28 +++++------ src/gtk-event-list.c | 8 +-- src/gtk-polar-plot.c | 2 +- src/gtk-polar-view.c | 12 ++--- src/gtk-rig-ctrl.c | 92 +++++++++++++++++----------------- src/gtk-rot-ctrl.c | 30 +++++------ src/gtk-sat-data.c | 12 ++--- src/gtk-sat-list.c | 8 +-- src/gtk-sat-map-ground-track.c | 18 +++---- src/gtk-sat-map.c | 10 ++-- src/gtk-sat-module-popup.c | 2 +- src/gtk-sat-module-tmg.c | 14 +++--- src/gtk-sat-module.c | 62 +++++++++++------------ src/gtk-sat-selector.c | 24 ++++----- src/gtk-sat-tree.c | 8 +-- src/gtk-single-sat.c | 4 +- src/gtk-sky-glance.c | 10 ++-- src/loc-tree.c | 16 +++--- src/main.c | 26 +++++----- src/menubar.c | 20 ++++---- src/mod-cfg-get-param.c | 14 +++--- src/mod-cfg.c | 24 ++++----- src/mod-mgr.c | 38 +++++++------- src/pass-popup-menu.c | 4 +- src/predict-tools.c | 8 +-- src/print-pass.c | 4 +- src/qth-data.c | 44 ++++++++-------- src/qth-editor.c | 4 +- src/radio-conf.c | 24 ++++----- src/rotor-conf.c | 18 +++---- src/sat-cfg.c | 48 +++++++++--------- src/sat-log.c | 4 +- src/sat-pass-dialogs.c | 4 +- src/sat-pref-polar-view.c | 2 +- src/sat-pref-qth-editor.c | 4 +- src/sat-pref-rig.c | 6 +-- src/sat-pref-rot-editor.c | 2 +- src/sat-pref-rot.c | 6 +-- src/save-pass.c | 10 ++-- src/tle-tools.c | 4 +- src/tle-update.c | 72 +++++++++++++------------- src/trsp-conf.c | 18 +++---- 44 files changed, 427 insertions(+), 427 deletions(-) diff --git a/src/first-time.c b/src/first-time.c index b60d104..4cde807 100644 --- a/src/first-time.c +++ b/src/first-time.c @@ -191,7 +191,7 @@ first_time_check_step_02 (guint *error) if (!dir) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not open %s."), - __FUNCTION__, dirname); + __func__, dirname); /* no reason to continue */ *error |= FTC_ERROR_STEP_02; @@ -215,7 +215,7 @@ first_time_check_step_02 (guint *error) if (foundqth) { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Found at least one .qth file."), - __FUNCTION__); + __func__); } else { /* try to see if there are any .qth file in pre-1.1 configuration */ @@ -257,14 +257,14 @@ first_time_check_step_02 (guint *error) if (gpredict_file_copy (filename, target)) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to copy sample.qth"), - __FUNCTION__); + __func__); *error |= FTC_ERROR_STEP_02; } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Copied sample.qth to %s/"), - __FUNCTION__, dirname); + __func__, dirname); } g_free (target); @@ -305,13 +305,13 @@ first_time_check_step_03 (guint *error) if (g_file_test (confdir, G_FILE_TEST_IS_DIR)) { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Check successful."), - __FUNCTION__); + __func__); } else { /* try to create directory */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Check failed. Creating %s"), - __FUNCTION__, + __func__, confdir); status = g_mkdir_with_parents (confdir, 0755); @@ -322,12 +322,12 @@ first_time_check_step_03 (guint *error) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to create %s"), - __FUNCTION__, confdir); + __func__, confdir); } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Created %s."), - __FUNCTION__, confdir); + __func__, confdir); /* try to see if there are any .mod file in pre-1.1 configuration */ @@ -371,14 +371,14 @@ first_time_check_step_03 (guint *error) if (gpredict_file_copy (filename, target)) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to copy Amateur.mod"), - __FUNCTION__); + __func__); *error |= FTC_ERROR_STEP_02; } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Copied amateur.mod to %s/"), - __FUNCTION__, dir); + __func__, dir); } g_free (target); @@ -409,13 +409,13 @@ first_time_check_step_04 (guint *error) if (g_file_test (dir, G_FILE_TEST_IS_DIR)) { sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s: Check successful."), __FUNCTION__); + _("%s: Check successful."), __func__); } else { /* try to create directory */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Check failed. Creating %s"), - __FUNCTION__, dir); + __func__, dir); status = g_mkdir_with_parents (dir, 0755); @@ -424,12 +424,12 @@ first_time_check_step_04 (guint *error) *error |= FTC_ERROR_STEP_04; sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to create %s"), - __FUNCTION__, dir); + __func__, dir); } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Created %s."), - __FUNCTION__, dir); + __func__, dir); } } @@ -477,7 +477,7 @@ first_time_check_step_05 (guint *error) /* an error occurred */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to load data from %s (%s)"), - __FUNCTION__, satfilename, err->message); + __func__, satfilename, err->message); g_clear_error (&err); *error |= FTC_ERROR_STEP_05; @@ -486,7 +486,7 @@ first_time_check_step_05 (guint *error) satellites = g_key_file_get_groups (satfile, &num); sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Found %d satellites in %s"), - __FUNCTION__, num, satfilename); + __func__, num, satfilename); for (i = 0; i < num; i++) { /* first, check if this satellite already has a .sat file */ @@ -494,7 +494,7 @@ first_time_check_step_05 (guint *error) if (g_file_test (targetfilename, G_FILE_TEST_EXISTS)) { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: %s.sat already exists. Skipped."), - __FUNCTION__, satellites[i]); + __func__, satellites[i]); } else { /* read data for this satellite */ @@ -536,7 +536,7 @@ first_time_check_step_05 (guint *error) g_strfreev (satellites); sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Written %d new satellite to user config"), - __FUNCTION__, newsats); + __func__, newsats); } g_key_file_free (satfile); @@ -553,7 +553,7 @@ first_time_check_step_05 (guint *error) if (!srcdir) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not open %s (%s)."), - __FUNCTION__, srcdirname, err->message); + __func__, srcdirname, err->message); /* no reason to continue */ g_clear_error (&err); @@ -578,12 +578,12 @@ first_time_check_step_05 (guint *error) if (gpredict_file_copy (source, catfilename)) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to copy %s"), - __FUNCTION__, filename); + __func__, filename); } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Successfully copied %s"), - __FUNCTION__, filename); + __func__, filename); } g_free (source); } @@ -617,13 +617,13 @@ first_time_check_step_06 (guint *error) if (g_file_test (dir, G_FILE_TEST_IS_DIR)) { sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s: Check successful."), __FUNCTION__); + _("%s: Check successful."), __func__); } else { /* try to create directory */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Check failed. Creating %s"), - __FUNCTION__, dir); + __func__, dir); status = g_mkdir_with_parents (dir, 0755); @@ -632,12 +632,12 @@ first_time_check_step_06 (guint *error) *error |= FTC_ERROR_STEP_06; sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to create %s"), - __FUNCTION__, dir); + __func__, dir); } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Created %s."), - __FUNCTION__, dir); + __func__, dir); } } @@ -669,13 +669,13 @@ static void first_time_check_step_07 (guint *error) if (g_file_test (confdir, G_FILE_TEST_IS_DIR)) { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Check successful."), - __FUNCTION__); + __func__); } else { /* try to create directory */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Check failed. Creating %s"), - __FUNCTION__, + __func__, confdir); status = g_mkdir_with_parents (confdir, 0755); @@ -686,12 +686,12 @@ static void first_time_check_step_07 (guint *error) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to create %s"), - __FUNCTION__, confdir); + __func__, confdir); } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Created %s."), - __FUNCTION__, confdir); + __func__, confdir); /* try to see if there are any .rig or .rot file in pre-1.1 configuration */ @@ -744,13 +744,13 @@ static void first_time_check_step_08 (guint *error) if (g_file_test (dir, G_FILE_TEST_IS_DIR)) { sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s: Check successful."), __FUNCTION__); + _("%s: Check successful."), __func__); } else { /* try to create directory */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Check failed. Creating %s"), - __FUNCTION__, dir); + __func__, dir); status = g_mkdir_with_parents (dir, 0755); @@ -759,12 +759,12 @@ static void first_time_check_step_08 (guint *error) *error |= FTC_ERROR_STEP_08; sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to create %s"), - __FUNCTION__, dir); + __func__, dir); } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Created %s."), - __FUNCTION__, dir); + __func__, dir); } } @@ -796,7 +796,7 @@ static void first_time_check_step_09 (guint *error) if (!targetdir) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not open %s."), - __FUNCTION__, targetdirname); + __func__, targetdirname); /* no reason to continue */ *error |= FTC_ERROR_STEP_09; @@ -822,14 +822,14 @@ static void first_time_check_step_09 (guint *error) if (!g_file_test (destfile, G_FILE_TEST_EXISTS)) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: %s does not appear to be in user conf dir; adding."), - __FUNCTION__, filename); + __func__, filename); /* copy new .trsp file to user dir */ srcfile = g_strconcat (datadirname, G_DIR_SEPARATOR_S, filename,NULL); if (gpredict_file_copy (srcfile, destfile)) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to copy %s"), - __FUNCTION__, filename); + __func__, filename); *error |= FTC_ERROR_STEP_09; } @@ -838,7 +838,7 @@ static void first_time_check_step_09 (guint *error) else { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: %s already in user conf dir."), - __FUNCTION__, filename); + __func__, filename); } g_free (destfile); @@ -848,7 +848,7 @@ static void first_time_check_step_09 (guint *error) } else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: %s directory does not exist. Incomplete installation."), - __FUNCTION__, datadirname); + __func__, datadirname); } g_free (datadirname); } diff --git a/src/gpredict-help.c b/src/gpredict-help.c index eeee09c..a2d800f 100644 --- a/src/gpredict-help.c +++ b/src/gpredict-help.c @@ -66,14 +66,14 @@ gpredict_help_launch (gpredict_help_type_t type) if (idx == BROWSER_TYPE_NONE) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Help browser is not set up yet."), - __FUNCTION__); + __func__); resp = config_help (); if (resp == GTK_RESPONSE_CANCEL) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Configure help browser cancelled."), - __FUNCTION__); + __func__); return; } @@ -89,7 +89,7 @@ gpredict_help_launch (gpredict_help_type_t type) /* launch help browser */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Launching help browser %s."), - __FUNCTION__, sat_help[idx].type); + __func__, sat_help[idx].type); g_print ("FIXME: FINSH IMPELMTATION\n"); } @@ -192,7 +192,7 @@ gpredict_help_show_txt (const gchar *filename) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to load %s (%s)"), - __FUNCTION__, fname, error->message); + __func__, fname, error->message); g_free (fname); g_clear_error (&error); @@ -203,7 +203,7 @@ gpredict_help_show_txt (const gchar *filename) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading %s (%s)"), - __FUNCTION__, fname, error->message); + __func__, fname, error->message); g_free (buff); g_clear_error (&error); diff --git a/src/gpredict-utils.c b/src/gpredict-utils.c index d4b5ff5..ec26e1f 100644 --- a/src/gpredict-utils.c +++ b/src/gpredict-utils.c @@ -206,7 +206,7 @@ gpredict_file_copy (const gchar *in, const gchar *out) /* read source file */ if (!g_file_get_contents (in, &contents, &ulen, &err)) { - sat_log_log (SAT_LOG_LEVEL_ERROR, "%s: %s", __FUNCTION__, err->message); + sat_log_log (SAT_LOG_LEVEL_ERROR, "%s: %s", __func__, err->message); g_clear_error (&err); status = 1; @@ -218,7 +218,7 @@ gpredict_file_copy (const gchar *in, const gchar *out) if (!g_file_set_contents (out, contents, slen, &err)) { - sat_log_log (SAT_LOG_LEVEL_ERROR, "%s: %s", __FUNCTION__, err->message); + sat_log_log (SAT_LOG_LEVEL_ERROR, "%s: %s", __func__, err->message); g_clear_error (&err); status = 1; @@ -272,7 +272,7 @@ rgb2gdk (guint rgb, GdkColor *color) if (color == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: %s called with color = NULL"), - __FILE__, __LINE__, __FUNCTION__); + __FILE__, __LINE__, __func__); return; } @@ -311,13 +311,13 @@ rgba2gdk (guint rgba, GdkColor *color, guint16 *alpha) if (color == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: %s called with color = NULL"), - __FILE__, __LINE__, __FUNCTION__); + __FILE__, __LINE__, __func__); return; } if (alpha == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: %s called with alpha = NULL"), - __FILE__, __LINE__, __FUNCTION__); + __FILE__, __LINE__, __func__); return; } @@ -358,13 +358,13 @@ gdk2rgb (const GdkColor *color, guint *rgb) if (color == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: %s called with color = NULL"), - __FILE__, __LINE__, __FUNCTION__); + __FILE__, __LINE__, __func__); return; } if (rgb == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: %s called with rgb = NULL"), - __FILE__, __LINE__, __FUNCTION__); + __FILE__, __LINE__, __func__); return; } @@ -400,13 +400,13 @@ gdk2rgba (const GdkColor *color, guint16 alpha, guint *rgba) if (color == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: %s called with color = NULL"), - __FILE__, __LINE__, __FUNCTION__); + __FILE__, __LINE__, __func__); return; } if (rgba == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: %s called with rgba = NULL"), - __FILE__, __LINE__, __FUNCTION__); + __FILE__, __LINE__, __func__); return; } @@ -527,7 +527,7 @@ gboolean gpredict_save_key_file (GKeyFile *cfgdata, const char *filename) { if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not create config data (%s)."), - __FUNCTION__, error->message); + __func__, error->message); g_clear_error (&error); @@ -538,7 +538,7 @@ gboolean gpredict_save_key_file (GKeyFile *cfgdata, const char *filename) { if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not create config file (%s)."), - __FUNCTION__, error->message); + __func__, error->message); g_clear_error (&error); @@ -557,7 +557,7 @@ gboolean gpredict_save_key_file (GKeyFile *cfgdata, const char *filename) { if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error writing config data (%s)."), - __FUNCTION__, error->message); + __func__, error->message); g_clear_error (&error); @@ -566,14 +566,14 @@ gboolean gpredict_save_key_file (GKeyFile *cfgdata, const char *filename) { else if (length != written) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Wrote only %d out of %d chars."), - __FUNCTION__, written, length); + __func__, written, length); err = 1; } else { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Configuration saved for %s."), - __FUNCTION__, filename); + __func__, filename); err = 0; } diff --git a/src/gtk-event-list.c b/src/gtk-event-list.c index 16f3abf..c055294 100644 --- a/src/gtk-event-list.c +++ b/src/gtk-event-list.c @@ -437,7 +437,7 @@ void gtk_event_list_update (GtkWidget *widget) if ((evlist == NULL) || !IS_GTK_EVENT_LIST (evlist)) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Invalid GtkEventList!"), - __FUNCTION__); + __func__); } /* get and tranverse the model */ @@ -498,13 +498,13 @@ static gboolean event_list_update_sats (GtkTreeModel *model, /* satellite not tracked anymore => remove */ sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Failed to get data for #%d."), - __FUNCTION__, *catnum); + __func__, *catnum); gtk_list_store_remove (GTK_LIST_STORE (model), iter); sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Satellite #%d removed from list."), - __FUNCTION__, *catnum); + __func__, *catnum); } else { @@ -944,7 +944,7 @@ void gtk_event_list_select_sat (GtkWidget *widget, gint catnum) else { sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: GtkEventList has not child with index %d"), - __FUNCTION__, i); + __func__, i); } } diff --git a/src/gtk-polar-plot.c b/src/gtk-polar-plot.c index e80cc0c..a4d2e08 100644 --- a/src/gtk-polar-plot.c +++ b/src/gtk-polar-plot.c @@ -580,7 +580,7 @@ void gtk_polar_plot_show_time_ticks(GtkPolarPlot * plot, gboolean show) { (void)plot; /* avoid unused parameter compiler warning */ (void)show; /* avoid unused parameter compiler warning */ - g_print("NOT IMPLEMENTED %s\n", __FUNCTION__); + g_print("NOT IMPLEMENTED %s\n", __func__); } diff --git a/src/gtk-polar-view.c b/src/gtk-polar-view.c index a73526c..898fe37 100644 --- a/src/gtk-polar-view.c +++ b/src/gtk-polar-view.c @@ -727,7 +727,7 @@ void gtk_polar_view_update(GtkWidget * widget) { sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Can not find NEXT satellite."), - __FUNCTION__); + __func__); g_object_set(polv->next, "text", _("Next: ERR"), NULL); } } @@ -895,7 +895,7 @@ static void update_sat(gpointer key, gpointer value, gpointer data) { sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s:%s: Updating satellite pass SAT:%d Q:%d T:%d\n"), - __FILE__, __FUNCTION__, *catnum, qth_upd, time_upd); + __FILE__, __func__, *catnum, qth_upd, time_upd); root = goo_canvas_get_root_item_model(GOO_CANVAS(polv->canvas)); @@ -994,7 +994,7 @@ static void update_sat(gpointer key, gpointer value, gpointer data) sat_log_log(SAT_LOG_LEVEL_ERROR, _ ("%s: marker added to polarview not showing %d."), - __FUNCTION__, *catnum); + __func__, *catnum); if (goo_canvas_item_model_find_child(root, obj->label) != -1) goo_canvas_item_model_raise(obj->label, NULL); @@ -1002,7 +1002,7 @@ static void update_sat(gpointer key, gpointer value, gpointer data) sat_log_log(SAT_LOG_LEVEL_ERROR, _ ("%s: label added to polarview not showing %d."), - __FUNCTION__, *catnum); + __func__, *catnum); g_object_set_data(G_OBJECT(obj->marker), "catnum", GINT_TO_POINTER(*catnum)); @@ -1025,7 +1025,7 @@ static void update_sat(gpointer key, gpointer value, gpointer data) /* obj == NULL */ sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Cannot allocate memory for satellite %d."), - __FUNCTION__, sat->tle.catnr); + __func__, sat->tle.catnr); return; } @@ -1727,7 +1727,7 @@ void gtk_polar_view_select_sat(GtkWidget * widget, gint catnum) { sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s Requested satellite (%d) is not within range"), - __FUNCTION__, catnum); + __func__, catnum); } else { diff --git a/src/gtk-rig-ctrl.c b/src/gtk-rig-ctrl.c index 0acdb17..dd38836 100644 --- a/src/gtk-rig-ctrl.c +++ b/src/gtk-rig-ctrl.c @@ -872,7 +872,7 @@ static void sat_selected_cb (GtkComboBox *satsel, gpointer data) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Invalid satellite selection: %d"), - __FILE__, __FUNCTION__, i); + __FILE__, __func__, i); /* clear pass just in case... */ if (ctrl->pass != NULL) { @@ -909,7 +909,7 @@ static void trsp_selected_cb (GtkComboBox *box, gpointer data) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Inconsistency detected in internal transponder data (%d,%d)"), - __FUNCTION__, i, n); + __func__, i, n); } } @@ -1040,7 +1040,7 @@ static void primary_rig_selected_cb (GtkComboBox *box, gpointer data) sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: Primary device selected: %d"), - __FILE__, __FUNCTION__, gtk_combo_box_get_active (box)); + __FILE__, __func__, gtk_combo_box_get_active (box)); /* free previous configuration */ @@ -1063,7 +1063,7 @@ static void primary_rig_selected_cb (GtkComboBox *box, gpointer data) if (radio_conf_read (ctrl->conf)) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s:%s: Loaded new radio configuration %s"), - __FILE__, __FUNCTION__, ctrl->conf->name); + __FILE__, __func__, ctrl->conf->name); /* update LO widgets */ buff = g_strdup_printf (_("%.0f MHz"), ctrl->conf->lo/1.0e6); gtk_label_set_text (GTK_LABEL (ctrl->LoDown), buff); @@ -1078,7 +1078,7 @@ static void primary_rig_selected_cb (GtkComboBox *box, gpointer data) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Failed to load radio configuration %s"), - __FILE__, __FUNCTION__, ctrl->conf->name); + __FILE__, __func__, ctrl->conf->name); g_free (ctrl->conf->name); if (ctrl->conf->host) @@ -1106,7 +1106,7 @@ static void secondary_rig_selected_cb (GtkComboBox *box, gpointer data) sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: Secondary device selected: %d"), - __FILE__, __FUNCTION__, gtk_combo_box_get_active (box)); + __FILE__, __func__, gtk_combo_box_get_active (box)); /* free previous configuration */ if (ctrl->conf2 != NULL) { @@ -1154,7 +1154,7 @@ static void secondary_rig_selected_cb (GtkComboBox *box, gpointer data) if (ctrl->conf2 == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Failed to allocate memory for radio config"), - __FILE__, __FUNCTION__); + __FILE__, __func__); return; } @@ -1163,7 +1163,7 @@ static void secondary_rig_selected_cb (GtkComboBox *box, gpointer data) if (radio_conf_read (ctrl->conf2)) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s:%s: Loaded new radio configuration %s"), - __FILE__, __FUNCTION__, ctrl->conf2->name); + __FILE__, __func__, ctrl->conf2->name); /* update LO widgets */ buff = g_strdup_printf (_("%.0f MHz"), ctrl->conf2->loup/1.0e6); gtk_label_set_text (GTK_LABEL (ctrl->LoUp), buff); @@ -1172,7 +1172,7 @@ static void secondary_rig_selected_cb (GtkComboBox *box, gpointer data) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Failed to load radio configuration %s"), - __FILE__, __FUNCTION__, ctrl->conf->name); + __FILE__, __func__, ctrl->conf->name); g_free (ctrl->conf2->name); if (ctrl->conf2->host) @@ -1199,7 +1199,7 @@ static void rig_engaged_cb (GtkToggleButton *button, gpointer data) /* we don't have a working configuration */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Controller does not have a valid configuration"), - __FUNCTION__); + __func__); return; } @@ -1313,7 +1313,7 @@ static gboolean setup_split(GtkRigCtrl *ctrl) default: sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s called but TX VFO is %d."), __FUNCTION__, ctrl->conf->vfoUp); + _("%s called but TX VFO is %d."), __func__, ctrl->conf->vfoUp); return FALSE; } @@ -1321,7 +1321,7 @@ static gboolean setup_split(GtkRigCtrl *ctrl) g_free(buff); - return(check_set_response(buffback, retcode, __FUNCTION__)); + return(check_set_response(buffback, retcode, __func__)); } @@ -1372,14 +1372,14 @@ static gboolean rig_ctrl_timeout_cb (gpointer data) if (ctrl->conf == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Controller does not have a valid configuration"), - __FUNCTION__); + __func__); return (TRUE); } if (g_mutex_trylock(&(ctrl->busy)) == FALSE) { - sat_log_log (SAT_LOG_LEVEL_ERROR,_("%s missed the deadline"),__FUNCTION__); + sat_log_log (SAT_LOG_LEVEL_ERROR,_("%s missed the deadline"),__func__); return TRUE; } @@ -1415,7 +1415,7 @@ static gboolean rig_ctrl_timeout_cb (gpointer data) /* invalid mode */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Invalid radio type %d. Setting type to RIG_TYPE_RX"), - __FUNCTION__, ctrl->conf->type); + __func__, ctrl->conf->type); ctrl->conf->type = RIG_TYPE_RX; } @@ -1429,7 +1429,7 @@ static gboolean rig_ctrl_timeout_cb (gpointer data) ctrl->errcnt = 0; sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: MAX_ERROR_COUNT (%d) reached. Disengaging device!"), - __FUNCTION__, MAX_ERROR_COUNT); + __func__, MAX_ERROR_COUNT); //g_print ("ERROR. WROPS = %d\n", ctrl->wrops); } @@ -2158,7 +2158,7 @@ static gboolean set_ptt (GtkRigCtrl *ctrl, gint sock, gboolean ptt) retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); g_free (buff); - return(check_set_response(buffback,retcode,__FUNCTION__)); + return(check_set_response(buffback,retcode,__func__)); } @@ -2185,7 +2185,7 @@ static gboolean set_freq_simplex (GtkRigCtrl *ctrl, gint sock, gdouble freq) retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); g_free(buff); - return(check_set_response(buffback,retcode,__FUNCTION__)); + return(check_set_response(buffback,retcode,__func__)); } @@ -2214,7 +2214,7 @@ static gboolean set_freq_toggle (GtkRigCtrl *ctrl, gint sock, gdouble freq) g_free(buff); - return(check_set_response(buffback,retcode,__FUNCTION__)); + return(check_set_response(buffback,retcode,__func__)); } @@ -2236,7 +2236,7 @@ static gboolean set_toggle (GtkRigCtrl *ctrl, gint sock) retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); g_free(buff); - return(check_set_response(buffback,retcode,__FUNCTION__)); + return(check_set_response(buffback,retcode,__func__)); } @@ -2260,7 +2260,7 @@ static gboolean unset_toggle (GtkRigCtrl *ctrl, gint sock) g_free(buff); - return(check_set_response(buffback,retcode,__FUNCTION__)); + return(check_set_response(buffback,retcode,__func__)); } @@ -2284,7 +2284,7 @@ static gboolean get_freq_simplex (GtkRigCtrl *ctrl, gint sock, gdouble *freq) buff = g_strdup_printf ("f\x0a"); retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); - retcode=check_get_response(buffback,retcode,__FUNCTION__); + retcode=check_get_response(buffback,retcode,__func__); if (retcode) { vbuff = g_strsplit (buffback, "\n", 3); if (vbuff[0]) @@ -2323,7 +2323,7 @@ static gboolean get_freq_toggle (GtkRigCtrl *ctrl, gint sock, gdouble *freq) buff = g_strdup_printf ("i\x0a"); retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); - retcode=check_get_response(buffback,retcode,__FUNCTION__); + retcode=check_get_response(buffback,retcode,__func__); if (retcode) { vbuff = g_strsplit (buffback, "\n", 3); if (vbuff[0]) @@ -2371,7 +2371,7 @@ static gboolean set_vfo (GtkRigCtrl *ctrl, vfo_t vfo) default: sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Invalid VFO argument. Using VFOA."), - __FUNCTION__); + __func__); buff = g_strdup_printf ("V VFOA\x0a"); break; } @@ -2380,7 +2380,7 @@ static gboolean set_vfo (GtkRigCtrl *ctrl, vfo_t vfo) g_free(buff); - return(check_set_response(buffback,retcode,__FUNCTION__)); + return(check_set_response(buffback,retcode,__func__)); } #endif @@ -2470,7 +2470,7 @@ static void load_trsp_list (GtkRigCtrl *ctrl) if G_UNLIKELY (ctrl->target == NULL) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s:%s: GtkSatModule has no target satellite."), - __FILE__, __FUNCTION__); + __FILE__, __func__); return; } @@ -2482,7 +2482,7 @@ static void load_trsp_list (GtkRigCtrl *ctrl) sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: Satellite %d has %d transponder modes."), - __FILE__, __FUNCTION__, ctrl->target->tle.catnr, n); + __FILE__, __func__, ctrl->target->tle.catnr, n); if (n == 0) return; @@ -2493,7 +2493,7 @@ static void load_trsp_list (GtkRigCtrl *ctrl) sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:&s: Read transponder '%s' for satellite %d"), - __FILE__, __FUNCTION__, trsp->name, ctrl->target->tle.catnr); + __FILE__, __func__, trsp->name, ctrl->target->tle.catnr); } /* make an initial selection */ @@ -2654,18 +2654,18 @@ gboolean send_rigctld_command(GtkRigCtrl *ctrl, gint sock, gchar *buff, gchar *b sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: sending %d bytes to rigctld as \"%s\""), - __FILE__, __FUNCTION__, size, buff); + __FILE__, __func__, size, buff); /* send command */ written = send(sock, buff, strlen(buff), 0); if (written != size) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: SIZE ERROR %d / %d"), - __FUNCTION__, written, size); + __func__, written, size); } if (written == -1) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: rigctld port closed"), - __FUNCTION__); + __func__); return FALSE; } /* try to read answer */ @@ -2673,7 +2673,7 @@ gboolean send_rigctld_command(GtkRigCtrl *ctrl, gint sock, gchar *buff, gchar *b if (size == -1) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: rigctld port closed"), - __FUNCTION__); + __func__); return FALSE; } @@ -2681,12 +2681,12 @@ gboolean send_rigctld_command(GtkRigCtrl *ctrl, gint sock, gchar *buff, gchar *b if (size == 0) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Got 0 bytes from rigctld"), - __FILE__, __FUNCTION__); + __FILE__, __func__); } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: Read %d bytes from rigctld"), - __FILE__, __FUNCTION__, size); + __FILE__, __func__, size); } ctrl->wrops++; @@ -2720,7 +2720,7 @@ static gboolean key_press_cb (GtkWidget *widget, GdkEventKey *pKey, gpointer dat case GDK_space: sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Detected SPACEBAR pressed event"), - __FUNCTION__); + __func__); /* manage PTT event but only if rig is of type TOGGLE_MAN */ if (ctrl->conf->type == RIG_TYPE_TOGGLE_MAN) { @@ -2733,7 +2733,7 @@ static gboolean key_press_cb (GtkWidget *widget, GdkEventKey *pKey, gpointer dat default: sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: Keypress value %i not managed by this function"), - __FILE__, __FUNCTION__, pKey->keyval); + __FILE__, __func__, pKey->keyval); break; } @@ -2780,12 +2780,12 @@ static void manage_ptt_event (GtkRigCtrl *ctrl) /* timeout did not expire, we've got the controller lock */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Acquired controller lock"), - __FUNCTION__); + __func__); if (ctrl->engaged == FALSE) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Controller not engaged; PTT event ignored (Hint: Enable the Engage button)"), - __FUNCTION__); + __func__); } else { @@ -2795,7 +2795,7 @@ static void manage_ptt_event (GtkRigCtrl *ctrl) /* PTT is OFF => set TX freq then set PTT to ON */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: PTT is OFF => Set TX freq and PTT=ON"), - __FUNCTION__); + __func__); exec_toggle_tx_cycle (ctrl); set_ptt(ctrl, ctrl->sock, TRUE); @@ -2804,7 +2804,7 @@ static void manage_ptt_event (GtkRigCtrl *ctrl) /* PTT is ON => set to OFF */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: PTT is ON = Set PTT=OFF"), - __FUNCTION__); + __func__); set_ptt(ctrl, ctrl->sock, FALSE); } @@ -2816,7 +2816,7 @@ static void manage_ptt_event (GtkRigCtrl *ctrl) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to acquire controller lock; PTT event not handled"), - __FUNCTION__); + __func__); } } @@ -2831,14 +2831,14 @@ static gboolean open_rigctld_socket (radio_conf_t *conf, gint *sock) { if (*sock < 0) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to create socket"), - __FUNCTION__); + __func__); *sock = 0; return FALSE; } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Network socket created successfully"), - __FUNCTION__); + __func__); } memset(&ServAddr, 0, sizeof(ServAddr)); /* Zero out structure */ @@ -2852,14 +2852,14 @@ static gboolean open_rigctld_socket (radio_conf_t *conf, gint *sock) { if (status < 0) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to connect to %s:%d"), - __FUNCTION__, conf->host, conf->port); + __func__, conf->host, conf->port); *sock = 0; return FALSE; } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Connection opened to %s:%d"), - __FUNCTION__, conf->host, conf->port); + __func__, conf->host, conf->port); } return TRUE; @@ -2872,7 +2872,7 @@ static gboolean close_rigctld_socket (gint *sock) { if (written != 2) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Sent 2 bytes but sent %d."), - __FILE__, __FUNCTION__, written); + __FILE__, __func__, written); } #ifndef WIN32 shutdown (*sock, SHUT_RDWR); diff --git a/src/gtk-rot-ctrl.c b/src/gtk-rot-ctrl.c index 766edf7..8dda439 100644 --- a/src/gtk-rot-ctrl.c +++ b/src/gtk-rot-ctrl.c @@ -715,7 +715,7 @@ static void else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Invalid satellite selection: %d"), - __FILE__, __FUNCTION__, i); + __FILE__, __func__, i); /* clear pass just in case... */ if (ctrl->pass != NULL) { @@ -862,7 +862,7 @@ static void /* we don't have a working configuration */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Controller does not have a valid configuration"), - __FUNCTION__); + __func__); return; } gtk_widget_set_sensitive (ctrl->DevSel, FALSE); @@ -893,7 +893,7 @@ static gboolean if (g_mutex_trylock(&(ctrl->busy)) == FALSE) { - sat_log_log (SAT_LOG_LEVEL_ERROR,_("%s missed the deadline"),__FUNCTION__); + sat_log_log (SAT_LOG_LEVEL_ERROR,_("%s missed the deadline"),__func__); return TRUE; } @@ -1066,7 +1066,7 @@ static gboolean ctrl->engaged = FALSE; sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: MAX_ERROR_COUNT (%d) reached. Disengaging device!"), - __FUNCTION__, MAX_ERROR_COUNT); + __func__, MAX_ERROR_COUNT); ctrl->errcnt = 0; //g_print ("ERROR. WROPS: %d RDOPS: %d\n", ctrl->wrops, ctrl->rdops); } @@ -1314,14 +1314,14 @@ static gboolean open_rotctld_socket (GtkRotCtrl * ctrl) { if (ctrl->sock < 0) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to create socket"), - __FUNCTION__); + __func__); ctrl->sock = 0; return FALSE; } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Network socket created successfully"), - __FUNCTION__); + __func__); } memset(&ServAddr, 0, sizeof(ServAddr)); /* Zero out structure */ @@ -1335,14 +1335,14 @@ static gboolean open_rotctld_socket (GtkRotCtrl * ctrl) { if (status < 0) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to connect to %s:%d"), - __FUNCTION__, ctrl->conf->host, ctrl->conf->port); + __func__, ctrl->conf->host, ctrl->conf->port); ctrl->sock = 0; return FALSE; } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Connection opened to %s:%d"), - __FUNCTION__, ctrl->conf->host, ctrl->conf->port); + __func__, ctrl->conf->host, ctrl->conf->port); } return TRUE; @@ -1357,7 +1357,7 @@ static gboolean close_rotctld_socket (gint *sock) { if (written != 2) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Sent 2 bytes but sent %d."), - __FILE__, __FUNCTION__, written); + __FILE__, __func__, written); } #ifndef WIN32 shutdown (*sock, SHUT_RDWR); @@ -1385,7 +1385,7 @@ gboolean send_rotctld_command(GtkRotCtrl *ctrl, gchar *buff, gchar *buffout, gin //sat_log_log (SAT_LOG_LEVEL_DEBUG, // _("%s:%s: Sending %d bytes as %s."), - // __FILE__, __FUNCTION__, size, buff); + // __FILE__, __func__, size, buff); /* send command */ @@ -1393,12 +1393,12 @@ gboolean send_rotctld_command(GtkRotCtrl *ctrl, gchar *buff, gchar *buffout, gin if (written != size) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: SIZE ERROR %d / %d"), - __FUNCTION__, written, size); + __func__, written, size); } if (written == -1) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: rotctld Socket Down"), - __FUNCTION__); + __func__); return FALSE; } @@ -1408,7 +1408,7 @@ gboolean send_rotctld_command(GtkRotCtrl *ctrl, gchar *buff, gchar *buffout, gin if (size == -1) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: rotctld Socket Down"), - __FUNCTION__); + __func__); return FALSE; } @@ -1416,12 +1416,12 @@ gboolean send_rotctld_command(GtkRotCtrl *ctrl, gchar *buff, gchar *buffout, gin if (size == 0) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Got 0 bytes from rotctld"), - __FILE__, __FUNCTION__); + __FILE__, __func__); } else { //sat_log_log (SAT_LOG_LEVEL_DEBUG, // _("%s:%s: Read %d bytes as %s from rotctld"), - // __FILE__, __FUNCTION__, size, buffout); + // __FILE__, __func__, size, buffout); } diff --git a/src/gtk-sat-data.c b/src/gtk-sat-data.c index 7148e4d..ad4af37 100644 --- a/src/gtk-sat-data.c +++ b/src/gtk-sat-data.c @@ -71,7 +71,7 @@ gtk_sat_data_read_sat (gint catnum, sat_t *sat) /* an error occurred */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to load data from %s (%s)"), - __FUNCTION__, path, error->message); + __func__, path, error->message); g_clear_error (&error); @@ -83,7 +83,7 @@ gtk_sat_data_read_sat (gint catnum, sat_t *sat) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading NAME from %s (%s)"), - __FUNCTION__, path, error->message); + __func__, path, error->message); g_clear_error (&error); sat->name = g_strdup ("Error"); } @@ -91,7 +91,7 @@ gtk_sat_data_read_sat (gint catnum, sat_t *sat) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Satellite %d has no NICKNAME"), - __FUNCTION__, catnum); + __func__, catnum); g_clear_error (&error); sat->nickname = g_strdup (sat->name); } @@ -103,14 +103,14 @@ gtk_sat_data_read_sat (gint catnum, sat_t *sat) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading TLE line 1 from %s (%s)"), - __FUNCTION__, path, error->message); + __func__, path, error->message); g_clear_error (&error); } tlestr2 = g_key_file_get_string (data, "Satellite", "TLE2", NULL); if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading TLE line 2 from %s (%s)"), - __FUNCTION__, path, error->message); + __func__, path, error->message); g_clear_error (&error); } @@ -119,7 +119,7 @@ gtk_sat_data_read_sat (gint catnum, sat_t *sat) if (!Good_Elements (rawtle)) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: TLE data for %d appears to be bad"), - __FUNCTION__, catnum); + __func__, catnum); errorcode = 2; } else { Convert_Satellite_Data (rawtle, &sat->tle); diff --git a/src/gtk-sat-list.c b/src/gtk-sat-list.c index d052e14..9febd3a 100644 --- a/src/gtk-sat-list.c +++ b/src/gtk-sat-list.c @@ -516,7 +516,7 @@ void gtk_sat_list_update(GtkWidget * widget) /* first, do some sanity checks */ if ((satlist == NULL) || !IS_GTK_SAT_LIST(satlist)) { - sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Invalid GtkSatList!"), __FUNCTION__); + sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Invalid GtkSatList!"), __func__); } /* check refresh rate */ @@ -586,12 +586,12 @@ static gboolean sat_list_update_sats(GtkTreeModel * model, GtkTreePath * path, { /* satellite not tracked anymore => remove */ sat_log_log(SAT_LOG_LEVEL_INFO, - _("%s: Failed to get data for #%d."), __FUNCTION__, *catnum); + _("%s: Failed to get data for #%d."), __func__, *catnum); gtk_list_store_remove(GTK_LIST_STORE(model), iter); sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s: Satellite #%d removed from list."), __FUNCTION__, *catnum); + _("%s: Satellite #%d removed from list."), __func__, *catnum); } else { @@ -1380,7 +1380,7 @@ void gtk_sat_list_select_sat(GtkWidget * satlist, gint catnum) else { sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s: GtkSatList has not child with index %d"), __FUNCTION__, i); + _("%s: GtkSatList has not child with index %d"), __func__, i); } } } diff --git a/src/gtk-sat-map-ground-track.c b/src/gtk-sat-map-ground-track.c index a01c192..9da5866 100644 --- a/src/gtk-sat-map-ground-track.c +++ b/src/gtk-sat-map-ground-track.c @@ -80,7 +80,7 @@ ground_track_create (GtkSatMap *satmap, sat_t *sat, qth_t *qth, sat_map_obj_t *o sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Creating ground track for %s"), - __FUNCTION__, sat->nickname); + __func__, sat->nickname); /* just to be safe... if empty GSList is not NULL => segfault */ obj->track_data.latlon = NULL; @@ -95,10 +95,10 @@ ground_track_create (GtkSatMap *satmap, sat_t *sat, qth_t *qth, sat_map_obj_t *o sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Start orbit: %d"), - __FUNCTION__, this_orbit); + __func__, this_orbit); sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: End orbit %d"), - __FUNCTION__, max_orbit); + __func__, max_orbit); /* find the time when the current orbit started */ @@ -124,7 +124,7 @@ ground_track_create (GtkSatMap *satmap, sat_t *sat, qth_t *qth, sat_map_obj_t *o sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: T0: %f (%d)"), - __FUNCTION__, t0, sat->orbit); + __func__, t0, sat->orbit); /* calculate (lat,lon) for the required orbits */ @@ -149,7 +149,7 @@ ground_track_create (GtkSatMap *satmap, sat_t *sat, qth_t *qth, sat_map_obj_t *o if (this_ssp == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: MAYDAY: Insufficient memory for ground track!"), - __FUNCTION__); + __func__); return; } @@ -162,7 +162,7 @@ ground_track_create (GtkSatMap *satmap, sat_t *sat, qth_t *qth, sat_map_obj_t *o if (sat->orbit != (max_orbit+1)) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Problem computing ground track for %s"), - __FUNCTION__, sat->nickname); + __func__, sat->nickname); return; } @@ -208,7 +208,7 @@ ground_track_update (GtkSatMap *satmap, sat_t *sat, qth_t *qth, sat_map_obj_t *o { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Updating ground track for %s"), - __FUNCTION__, sat->nickname); + __func__, sat->nickname); if (decayed(sat)) { ground_track_delete (satmap, sat, qth, obj, TRUE); @@ -246,7 +246,7 @@ ground_track_delete (GtkSatMap *satmap, sat_t *sat, qth_t *qth, sat_map_obj_t *o sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Deleting ground track for %s"), - __FUNCTION__, sat->nickname); + __func__, sat->nickname); root = goo_canvas_get_root_item_model (GOO_CANVAS (satmap->canvas)); @@ -264,7 +264,7 @@ ground_track_delete (GtkSatMap *satmap, sat_t *sat, qth_t *qth, sat_map_obj_t *o if (j == -1) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not find part %d of ground track"), - __FUNCTION__, j); + __func__, j); } else { goo_canvas_item_model_remove_child (root, j); diff --git a/src/gtk-sat-map.c b/src/gtk-sat-map.c index ce1fe03..a9cadc1 100644 --- a/src/gtk-sat-map.c +++ b/src/gtk-sat-map.c @@ -795,7 +795,7 @@ gtk_sat_map_update (GtkWidget *widget) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Can not find NEXT satellite."), - __FUNCTION__); + __func__); g_object_set (satmap->next, "text", _("Next: ERR"), NULL); @@ -1144,7 +1144,7 @@ void gtk_sat_map_select_sat (GtkWidget *satmap, gint catnum) if (obj == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Can not find clicked object (%d) in hash table"), - __FUNCTION__, catnum); + __func__, catnum); } else { obj->selected = TRUE; @@ -1337,7 +1337,7 @@ north_pole_is_covered (sat_t *sat) if (ret1 != RIG_OK) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Bad data measuring distance to North Pole %f %f."), - __FUNCTION__, sat->ssplon, sat->ssplat); + __func__, sat->ssplon, sat->ssplat); } if (qrb1 <= 0.5*sat->footprint) { return TRUE; @@ -1356,7 +1356,7 @@ south_pole_is_covered (sat_t *sat) if (ret1 != RIG_OK) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Bad data measuring distance to South Pole %f %f."), - __FUNCTION__, sat->ssplon, sat->ssplat); + __func__, sat->ssplon, sat->ssplat); } if (qrb1 <= 0.5*sat->footprint) { return TRUE; @@ -1905,7 +1905,7 @@ plot_sat (gpointer key, gpointer value, gpointer data) if ( obj == NULL ) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Cannot allocate memory for satellite %d."), - __FUNCTION__, sat->tle.catnr); + __func__, sat->tle.catnr); return; } diff --git a/src/gtk-sat-module-popup.c b/src/gtk-sat-module-popup.c index ca22c0d..3adbd09 100644 --- a/src/gtk-sat-module-popup.c +++ b/src/gtk-sat-module-popup.c @@ -95,7 +95,7 @@ void gtk_sat_module_popup (GtkSatModule *module) if ((module == NULL) || !IS_GTK_SAT_MODULE (module)) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%d: %s called with NULL parameter!"), - __FILE__, __LINE__, __FUNCTION__); + __FILE__, __LINE__, __func__); return; } diff --git a/src/gtk-sat-module-tmg.c b/src/gtk-sat-module-tmg.c index 222fbb8..06fc06f 100644 --- a/src/gtk-sat-module-tmg.c +++ b/src/gtk-sat-module-tmg.c @@ -72,7 +72,7 @@ void tmg_create (GtkSatModule *mod) if (mod->tmgActive) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Time Controller for %s is already active"), - __FUNCTION__, mod->name); + __func__, mod->name); /* try to make window visible in case it is covered by something else */ @@ -292,7 +292,7 @@ void tmg_create (GtkSatModule *mod) sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Time Controller for %s launched"), - __FUNCTION__, mod->name); + __func__, mod->name); } @@ -326,7 +326,7 @@ static void tmg_destroy (GtkWidget *tmg, gpointer data) sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Time Controller for %s closed. Time reset."), - __FUNCTION__, mod->name); + __func__, mod->name); } @@ -345,7 +345,7 @@ static void tmg_stop (GtkWidget *widget, gpointer data) if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { - sat_log_log (SAT_LOG_LEVEL_DEBUG, __FUNCTION__); + sat_log_log (SAT_LOG_LEVEL_DEBUG, __func__); /* set throttle to 0 */ mod->throttle = 0; @@ -370,7 +370,7 @@ static void tmg_fwd (GtkWidget *widget, gpointer data) if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { - sat_log_log (SAT_LOG_LEVEL_DEBUG, __FUNCTION__); + sat_log_log (SAT_LOG_LEVEL_DEBUG, __func__); /* set throttle */ mod->throttle = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (mod->tmgFactor)); @@ -394,7 +394,7 @@ static void tmg_bwd (GtkWidget *widget, gpointer data) if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { - sat_log_log (SAT_LOG_LEVEL_DEBUG, __FUNCTION__); + sat_log_log (SAT_LOG_LEVEL_DEBUG, __func__); /* set throttle to -1 */ mod->throttle = -gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (mod->tmgFactor));; @@ -797,7 +797,7 @@ static gdouble calculate_time(GtkSatModule *mod) sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: %d/%d/%d %d:%d:%d.%d"), - __FUNCTION__, + __func__, tim.tm_year, tim.tm_mon, tim.tm_mday, tim.tm_hour, tim.tm_min, tim.tm_sec, msec); diff --git a/src/gtk-sat-module.c b/src/gtk-sat-module.c index df267ce..6002756 100644 --- a/src/gtk-sat-module.c +++ b/src/gtk-sat-module.c @@ -278,7 +278,7 @@ gtk_sat_module_new (const gchar *cfgfile) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module %s is not valid."), - __FUNCTION__, cfgfile); + __func__, cfgfile); return NULL; } @@ -296,7 +296,7 @@ gtk_sat_module_new (const gchar *cfgfile) if (GTK_SAT_MODULE(widget)->cfgdata==NULL){ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module %s has problems."), - __FUNCTION__, cfgfile); + __func__, cfgfile); return NULL; } @@ -407,7 +407,7 @@ create_module_layout (GtkSatModule *module) get_grid_size (module, &rows, &cols); sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Layout has %d columns and %d rows."), - __FUNCTION__, cols, rows); + __func__, cols, rows); table = gtk_table_new (rows, cols, TRUE); @@ -520,7 +520,7 @@ gtk_sat_module_read_cfg_data (GtkSatModule *module, const gchar *cfgfile) module->cfgdata=NULL; sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not load config data from %s (%s)."), - __FUNCTION__, cfgfile, error->message); + __func__, cfgfile, error->message); g_clear_error (&error); @@ -530,7 +530,7 @@ gtk_sat_module_read_cfg_data (GtkSatModule *module, const gchar *cfgfile) /* debug message */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Reading configuration from %s"), - __FUNCTION__, cfgfile); + __func__, cfgfile); /* set module name */ buffer = g_path_get_basename (cfgfile); @@ -572,7 +572,7 @@ gtk_sat_module_read_cfg_data (GtkSatModule *module, const gchar *cfgfile) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Can not load default QTH file %s; using built-in defaults"), - __FUNCTION__, buffer); + __func__, buffer); /* settings are really screwed up; we need some safe values here */ qth_safe(module->qth); @@ -603,7 +603,7 @@ gtk_sat_module_read_cfg_data (GtkSatModule *module, const gchar *cfgfile) /* the grid configuration is bogus; override with global default */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module layout is invalid: %s. Using default."), - __FUNCTION__, buffer); + __func__, buffer); g_free (buffer); g_strfreev (buffv); @@ -615,7 +615,7 @@ gtk_sat_module_read_cfg_data (GtkSatModule *module, const gchar *cfgfile) /* make a debug log entry */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: GRID(%d): %s"), - __FUNCTION__, length, buffer); + __func__, length, buffer); g_free (buffer); /* number of views: we have five numbers per view (type,left,right,top,bottom) */ @@ -633,7 +633,7 @@ gtk_sat_module_read_cfg_data (GtkSatModule *module, const gchar *cfgfile) module->nviews = 0; sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unable to allocate memory for grid."), - __FUNCTION__); + __func__); } g_strfreev (buffv); @@ -666,7 +666,7 @@ gtk_sat_module_load_sats (GtkSatModule *module) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to get list of satellites (%s)"), - __FUNCTION__, error->message); + __func__, error->message); g_clear_error (&error); @@ -688,7 +688,7 @@ gtk_sat_module_load_sats (GtkSatModule *module) /* the satellite could not be read */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading data for #%d"), - __FUNCTION__, sats[i]); + __func__, sats[i]); g_free (sat); } @@ -712,14 +712,14 @@ gtk_sat_module_load_sats (GtkSatModule *module) sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Read data for #%d"), - __FUNCTION__, sats[i]); + __func__, sats[i]); } else { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Sat #%d already in list"), - __FUNCTION__, sats[i]); + __func__, sats[i]); /* it is not needed in this case */ g_free (sat); @@ -730,7 +730,7 @@ gtk_sat_module_load_sats (GtkSatModule *module) sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Read %d out of %d satellites"), - __FUNCTION__, + __func__, succ, length); @@ -792,7 +792,7 @@ gtk_sat_module_timeout_cb (gpointer module) sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Previous cycle missed it's deadline."), - __FUNCTION__); + __func__); return TRUE; @@ -1079,7 +1079,7 @@ gtk_sat_module_close_cb (GtkWidget *button, gpointer data) sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Module %s received CLOSE signal."), - __FUNCTION__, name); + __func__, name); /* save configuration to ensure that dynamic data like state is stored */ mod_cfg_save (module->name, module->cfgdata); @@ -1089,7 +1089,7 @@ gtk_sat_module_close_cb (GtkWidget *button, gpointer data) case GTK_SAT_MOD_STATE_DOCKED: sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Module %s is in DOCKED state."), - __FUNCTION__, name); + __func__, name); retcode = mod_mgr_remove_module (GTK_WIDGET (module)); @@ -1097,7 +1097,7 @@ gtk_sat_module_close_cb (GtkWidget *button, gpointer data) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module %s was not found in mod-mgr (%d)\n"\ "Internal state is corrupt?"), - __FUNCTION__, name, retcode); + __func__, name, retcode); } break; @@ -1105,7 +1105,7 @@ gtk_sat_module_close_cb (GtkWidget *button, gpointer data) case GTK_SAT_MOD_STATE_WINDOW: sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Module %s is in WINDOW state."), - __FUNCTION__, name); + __func__, name); retcode = mod_mgr_remove_module (GTK_WIDGET (module)); @@ -1113,7 +1113,7 @@ gtk_sat_module_close_cb (GtkWidget *button, gpointer data) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module %s was not found in mod-mgr (%d)\n"\ "Internal state is corrupt?"), - __FUNCTION__, name, retcode); + __func__, name, retcode); } /* increase referene count */ @@ -1133,7 +1133,7 @@ gtk_sat_module_close_cb (GtkWidget *button, gpointer data) case GTK_SAT_MOD_STATE_FULLSCREEN: sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Module %s is in FULLSCREEN state."), - __FUNCTION__, name); + __func__, name); retcode = mod_mgr_remove_module (GTK_WIDGET (module)); @@ -1141,7 +1141,7 @@ gtk_sat_module_close_cb (GtkWidget *button, gpointer data) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module %s was not found in mod-mgr (%d)\n"\ "Internal state is corrupt?"), - __FUNCTION__, name, retcode); + __func__, name, retcode); } @@ -1162,7 +1162,7 @@ gtk_sat_module_close_cb (GtkWidget *button, gpointer data) default: sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module %s has unknown state: %d"), - __FUNCTION__, name, module->state); + __func__, name, module->state); break; } @@ -1173,7 +1173,7 @@ gtk_sat_module_close_cb (GtkWidget *button, gpointer data) sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Module %s closed."), - __FUNCTION__, name); + __func__, name); g_free (name); @@ -1215,7 +1215,7 @@ gtk_sat_module_config_cb (GtkWidget *button, gpointer data) sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Module %s received CONFIG signal."), - __FUNCTION__, name); + __func__, name); /* stop timeout */ if (!g_source_remove (module->timerid)) { @@ -1225,7 +1225,7 @@ gtk_sat_module_config_cb (GtkWidget *button, gpointer data) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not stop timeout callback\n"\ "%s: Source ID %d seems invalid."), - __FUNCTION__, __FUNCTION__, module->timerid); + __func__, __func__, module->timerid); } else { @@ -1242,7 +1242,7 @@ gtk_sat_module_config_cb (GtkWidget *button, gpointer data) /**** FIXME: dialog */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module configuration failed for some reason."), - __FUNCTION__); + __func__); /* don't try to reload config since it may be invalid; keep original @@ -1326,7 +1326,7 @@ gtk_sat_module_config_cb (GtkWidget *button, gpointer data) default: sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module %s has unknown state: %d"), - __FUNCTION__, name, module->state); + __func__, name, module->state); break; } @@ -1415,7 +1415,7 @@ gtk_sat_module_reload_sats (GtkSatModule *module) sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Reloading satellites for module %s"), - __FUNCTION__, module->name); + __func__, module->name); /* remove each element from the hash table, but keep the hash table */ g_hash_table_foreach_remove (module->satellites, empty, NULL); @@ -1500,7 +1500,7 @@ void gtk_sat_module_select_sat (GtkSatModule *module, gint catnum) gtk_polar_view_select_sat(child, catnum); } else { - sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Unknown child type"), __FUNCTION__); + sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Unknown child type"), __func__); } } @@ -1580,7 +1580,7 @@ static void update_skg (GtkSatModule *module) sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Updating GtkSkyGlance for %s"), - __FUNCTION__, module->name); + __func__, module->name); gtk_container_remove (GTK_CONTAINER (module->skgwin), module->skg); module->skg = gtk_sky_glance_new (module->satellites, module->qth, module->tmgCdnum); diff --git a/src/gtk-sat-selector.c b/src/gtk-sat-selector.c index 9c9f9c9..c207252 100644 --- a/src/gtk-sat-selector.c +++ b/src/gtk-sat-selector.c @@ -105,21 +105,21 @@ gboolean gtk_sat_selector_search_equal_func (GtkTreeModel *model, gtk_tree_model_get(model, iter, GTK_SAT_SELECTOR_COL_NAME, &name, -1); /* sat_log_log(SAT_LOG_LEVEL_INFO, "%s: key %s, name %s", */ - /* __FUNCTION__, */ + /* __func__, */ /* key, */ /* (name==NULL) ? NULLSTR : name); */ if (name == NULL){ - sat_log_log(SAT_LOG_LEVEL_INFO, "%s:%s: name is NULL", __FILE__, __FUNCTION__); + sat_log_log(SAT_LOG_LEVEL_INFO, "%s:%s: name is NULL", __FILE__, __func__); return TRUE; } match = strstr(name, key); if (match == NULL) { - //sat_log_log(SAT_LOG_LEVEL_ERROR, "%s: no match", __FUNCTION__); + //sat_log_log(SAT_LOG_LEVEL_ERROR, "%s: no match", __func__); return TRUE; } else { - //sat_log_log(SAT_LOG_LEVEL_ERROR, "%s: MATCH at %s", __FUNCTION__, match); + //sat_log_log(SAT_LOG_LEVEL_ERROR, "%s: MATCH at %s", __func__, match); return FALSE; } } @@ -423,7 +423,7 @@ static void create_and_fill_models (GtkSatSelector *selector) if (!dir) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Failed to open satdata directory %s."), - __FILE__, __FUNCTION__, dirname); + __FILE__, __func__, dirname); g_free (dirname); @@ -465,7 +465,7 @@ static void create_and_fill_models (GtkSatSelector *selector) } sat_log_log (SAT_LOG_LEVEL_INFO, _("%s:%s: Read %d satellites into MAIN group."), - __FILE__, __FUNCTION__, num); + __FILE__, __func__, num); /* load satellites from each .cat file into selector->models[i] */ g_dir_rewind (dir); @@ -521,7 +521,7 @@ static void load_cat_file (GtkSatSelector *selector, const gchar *fname) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Failed to open %s: %s"), - __FILE__, __FUNCTION__, fname, error->message); + __FILE__, __func__, fname, error->message); g_clear_error (&error); } else { @@ -559,7 +559,7 @@ static void load_cat_file (GtkSatSelector *selector, const gchar *fname) /* error */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Error reading satellite %d."), - __FILE__, __FUNCTION__, catnum); + __FILE__, __func__, catnum); } else { /* insert satellite into liststore */ @@ -579,12 +579,12 @@ static void load_cat_file (GtkSatSelector *selector, const gchar *fname) } sat_log_log (SAT_LOG_LEVEL_INFO, _("%s:%s: Read %d satellites from %s"), - __FILE__, __FUNCTION__, num, fname); + __FILE__, __func__, num, fname); } else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Failed to read %s"), - __FILE__, __FUNCTION__, fname); + __FILE__, __func__, fname); } } @@ -859,7 +859,7 @@ gdouble gtk_sat_selector_get_latest_epoch (GtkSatSelector *selector) } else { sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Error getting %dth satellite"), __FUNCTION__, i); + _("%s: Error getting %dth satellite"), __func__, i); } } @@ -890,7 +890,7 @@ static gchar *load_cat_file_cat (const gchar *fname) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Failed to open %s: %s"), - __FILE__, __FUNCTION__, fname, error->message); + __FILE__, __func__, fname, error->message); g_clear_error (&error); } else { diff --git a/src/gtk-sat-tree.c b/src/gtk-sat-tree.c index fc5c98e..9941e91 100644 --- a/src/gtk-sat-tree.c +++ b/src/gtk-sat-tree.c @@ -578,7 +578,7 @@ void sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Invalid GtkSatTree!"), - __FUNCTION__); + __func__); return; } @@ -600,7 +600,7 @@ void /* else do nothing since the sat is already selected */ sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Satellite %d already selected; skip..."), - __FUNCTION__, catnum); + __func__, catnum); } } @@ -733,7 +733,7 @@ guint * sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Invalid GtkSatTree!"), - __FUNCTION__); + __func__); return NULL; } @@ -744,7 +744,7 @@ guint * if (s < 1) { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: There are no satellites selected => NULL."), - __FUNCTION__); + __func__); *size = 0; diff --git a/src/gtk-single-sat.c b/src/gtk-single-sat.c index 9f7071c..e1d68d0 100644 --- a/src/gtk-single-sat.c +++ b/src/gtk-single-sat.c @@ -367,7 +367,7 @@ void gtk_single_sat_select_sat (GtkWidget *single_sat, gint catnum) if (!foundsat) { sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Could not find satellite with catalog number %d"), - __FUNCTION__, catnum); + __func__, catnum); return; } title = g_markup_printf_escaped("%s", sat->nickname); @@ -390,7 +390,7 @@ gtk_single_sat_update (GtkWidget *widget) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Invalid GtkSingleSat!"), - __FUNCTION__); + __func__); } diff --git a/src/gtk-sky-glance.c b/src/gtk-sky-glance.c index 0e1a6e1..0bc4094 100644 --- a/src/gtk-sky-glance.c +++ b/src/gtk-sky-glance.c @@ -735,7 +735,7 @@ on_button_press(GooCanvasItem * item, default: sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s::%s: Button %d has no function..."), - __FILE__, __FUNCTION__, event->button); + __FILE__, __func__, event->button); break; } @@ -778,7 +778,7 @@ on_button_release(GooCanvasItem * item, { sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s::%s: Could not retrieve pass_t object"), - __FILE__, __FUNCTION__); + __FILE__, __func__); return TRUE; } @@ -792,7 +792,7 @@ on_button_release(GooCanvasItem * item, sat_log_log(SAT_LOG_LEVEL_ERROR, _ ("%s::%s: Showing pass details for %s - we may have a memory leak here"), - __FILE__, __FUNCTION__, pass->satname); + __FILE__, __func__, pass->satname); /* show the pass details */ show_pass(pass->satname, skg->qth, new_pass, NULL); @@ -802,7 +802,7 @@ on_button_release(GooCanvasItem * item, default: sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s::%s: Button %d has no function..."), - __FILE__, __FUNCTION__, event->button); + __FILE__, __func__, event->button); break; } @@ -838,7 +838,7 @@ static gboolean on_mouse_enter(GooCanvasItem * item, { sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s::%s: Could not retrieve pass_t object"), - __FILE__, __FUNCTION__); + __FILE__, __func__); return TRUE; } diff --git a/src/loc-tree.c b/src/loc-tree.c index d4ab2bf..7ca36ee 100644 --- a/src/loc-tree.c +++ b/src/loc-tree.c @@ -291,7 +291,7 @@ loc_tree_create (const gchar *fname, /* send debug message */ sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Selected %s"), - __FUNCTION__, *loc); + __func__, *loc); return TRUE; break; @@ -302,7 +302,7 @@ loc_tree_create (const gchar *fname, /* send debug message */ sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: No location selected"), - __FUNCTION__); + __func__); return FALSE; @@ -352,7 +352,7 @@ loc_tree_create_and_fill_model (const gchar *fname) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: %s does not exist!"), - __FUNCTION__, fname); + __func__, fname); g_free(continent); g_free(country); @@ -445,7 +445,7 @@ loc_tree_create_and_fill_model (const gchar *fname) sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Read %d cities."), - __FUNCTION__, i); + __func__, i); if (continent) g_free (continent); @@ -463,7 +463,7 @@ loc_tree_create_and_fill_model (const gchar *fname) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to open locfile (%s)"), - __FUNCTION__, error->message); + __func__, error->message); g_clear_error (&error); } @@ -524,7 +524,7 @@ loc_tree_float_cell_data_function (GtkTreeViewColumn *col, else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Invalid column: %d"), - __FUNCTION__, coli); + __func__, coli); hmf = '?'; } } @@ -677,7 +677,7 @@ loc_tree_get_selection (GtkWidget *view, */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to get parent for %s."), - __FUNCTION__, city); + __func__, city); *loc = g_strdup (city); g_free (city); @@ -691,6 +691,6 @@ loc_tree_get_selection (GtkWidget *view, */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: No selection found!"), - __FUNCTION__); + __func__); } } diff --git a/src/main.c b/src/main.c index 305d12a..f39c7e3 100644 --- a/src/main.c +++ b/src/main.c @@ -158,7 +158,7 @@ int main (int argc, char *argv[]) _("%s: User config check failed (code %d). This is fatal.\n"\ "A possible solution would be to remove the .config/Gpredict data dir\n"\ "in your home directory"), - __FUNCTION__, error); + __func__, error); return 1; } @@ -457,7 +457,7 @@ static gboolean tle_mon_task(gpointer data) GError *err = NULL; if (data != NULL) { - sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Passed a non-null pointer which should never happen.\n"), __FUNCTION__); + sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Passed a non-null pointer which should never happen.\n"), __func__); } /* get time of last update */ @@ -492,13 +492,13 @@ static gboolean tle_mon_task(gpointer data) /* too early */ /* sat_log_log (SAT_LOG_LEVEL_DEBUG, */ /* _("%s: Threshold has not been passed yet."), */ - /* __FUNCTION__, last, now, thrld); */ + /* __func__, last, now, thrld); */ } else { /* time to update */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Time threshold has been passed."), - __FUNCTION__); + __func__); /* find out what to do */ if (sat_cfg_get_int (SAT_CFG_INT_TLE_AUTO_UPD_ACTION) == TLE_AUTO_UPDATE_GOAHEAD) { @@ -506,7 +506,7 @@ static gboolean tle_mon_task(gpointer data) /* start update process in separate thread */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Starting new update thread."), - __FUNCTION__); + __func__); /** FIXME: store thread and destroy on exit? **/ g_thread_try_new(_("gpredict_tle_update"), update_tle_thread, NULL, &err); @@ -514,7 +514,7 @@ static gboolean tle_mon_task(gpointer data) if (err != NULL) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to create TLE update thread (%s)"), - __FUNCTION__, err->message); + __func__, err->message); } else if (!tle_upd_note_sent) { @@ -555,7 +555,7 @@ tle_mon_stop () if (!retcode) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not find TLE monitoring task (ID = %d)"), - __FUNCTION__, tle_mon_id); + __func__, tle_mon_id); } @@ -600,7 +600,7 @@ static void clean_tle (void) targetdir = g_dir_open (targetdirname, 0, NULL); sat_log_log (SAT_LOG_LEVEL_INFO, - _("%s: Cleaning TLE data in %s"), __FUNCTION__, targetdirname); + _("%s: Cleaning TLE data in %s"), __func__, targetdirname); while ((filename = g_dir_read_name (targetdir))) { @@ -609,11 +609,11 @@ static void clean_tle (void) path = sat_file_name (filename); if G_UNLIKELY(g_unlink (path)) { sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Failed to delete %s"), __FUNCTION__, filename); + _("%s: Failed to delete %s"), __func__, filename); } else { sat_log_log (SAT_LOG_LEVEL_INFO, - _("%s: Removed %s"), __FUNCTION__, filename); + _("%s: Removed %s"), __func__, filename); } g_free (path); } @@ -641,7 +641,7 @@ static void clean_trsp (void) targetdir = g_dir_open (targetdirname, 0, NULL); sat_log_log (SAT_LOG_LEVEL_INFO, - _("%s: Cleaning transponder data in %s"), __FUNCTION__, targetdirname); + _("%s: Cleaning transponder data in %s"), __func__, targetdirname); while ((filename = g_dir_read_name (targetdir))) { @@ -650,11 +650,11 @@ static void clean_trsp (void) path = trsp_file_name (filename); if G_UNLIKELY(g_unlink (path)) { sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Failed to delete %s"), __FUNCTION__, filename); + _("%s: Failed to delete %s"), __func__, filename); } else { sat_log_log (SAT_LOG_LEVEL_INFO, - _("%s: Removed %s"), __FUNCTION__, filename); + _("%s: Removed %s"), __func__, filename); } g_free (path); } diff --git a/src/menubar.c b/src/menubar.c index 256b89c..83d2ec5 100644 --- a/src/menubar.c +++ b/src/menubar.c @@ -267,13 +267,13 @@ static void menubar_new_mod_cb(GtkWidget * widget, gpointer data) (void)widget; /* avoid unused parameter compiler warning */ (void)data; /* avoid unused parameter compiler warning */ - sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: Starting new module configurator..."), __FUNCTION__); + sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: Starting new module configurator..."), __func__); modnam = mod_cfg_new(); if (modnam) { - sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: New module name is %s."), __FUNCTION__, modnam); + sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: New module name is %s."), __func__, modnam); confdir = get_modules_dir(); modfile = g_strconcat(confdir, G_DIR_SEPARATOR_S, modnam, ".mod", NULL); @@ -308,7 +308,7 @@ static void menubar_new_mod_cb(GtkWidget * widget, gpointer data) } else { - sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: New module config cancelled."), __FUNCTION__); + sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: New module config cancelled."), __func__); } } @@ -323,13 +323,13 @@ static void menubar_open_mod_cb(GtkWidget * widget, gpointer data) (void)widget; /* avoid unused parameter compiler warning */ (void)data; /* avoid unused parameter compiler warning */ - sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: Open existing module..."), __FUNCTION__); + sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: Open existing module..."), __func__); modnam = select_module(); if (modnam) { - sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: Open module %s."), __FUNCTION__, modnam); + sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: Open module %s."), __func__, modnam); confdir = get_modules_dir(); modfile = g_strconcat(confdir, G_DIR_SEPARATOR_S, modnam, ".mod", NULL); @@ -378,7 +378,7 @@ static void menubar_open_mod_cb(GtkWidget * widget, gpointer data) } else { - sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: Open module cancelled."), __FUNCTION__); + sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: Open module cancelled."), __func__); } } @@ -588,7 +588,7 @@ static void menubar_tle_local_cb(GtkWidget * widget, gpointer data) if (doupdate) { - sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: Running TLE update from %s"), __FUNCTION__, dir); + sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: Running TLE update from %s"), __func__, dir); /* store last used TLE dir */ sat_cfg_set_str(SAT_CFG_STR_TLE_FILE_DIR, dir); @@ -807,7 +807,7 @@ static gchar *select_module() { sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s:%s: Scanning directory %s for modules."), - __FILE__, __FUNCTION__, dirname); + __FILE__, __func__, dirname); while ((filename = g_dir_read_name(dir))) { @@ -908,12 +908,12 @@ static gchar *select_module() gtk_tree_model_get(selmod, &item, 0, &dirname, -1); sat_log_log(SAT_LOG_LEVEL_DEBUG, - _("%s:%s: Selected module is: %s"), __FILE__, __FUNCTION__, dirname); + _("%s:%s: Selected module is: %s"), __FILE__, __func__, dirname); } else { sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s:%s: No selection is list of modules."), __FILE__, __FUNCTION__); + _("%s:%s: No selection is list of modules."), __FILE__, __func__); dirname = NULL; } diff --git a/src/mod-cfg-get-param.c b/src/mod-cfg-get-param.c index c9096a2..8465c54 100644 --- a/src/mod-cfg-get-param.c +++ b/src/mod-cfg-get-param.c @@ -69,7 +69,7 @@ mod_cfg_get_bool (GKeyFile *f, const gchar *sec, const gchar *key, sat_cfg_bool_ sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Failed to read boolean (%s)"), - __FUNCTION__, error->message); + __func__, error->message); g_clear_error (&error); @@ -83,7 +83,7 @@ mod_cfg_get_bool (GKeyFile *f, const gchar *sec, const gchar *key, sat_cfg_bool_ /* sat_log_log (SAT_LOG_LEVEL_DEBUG, */ /* _("%s: Boolean value not found, using default (%d)"), */ -/* __FUNCTION__, param); */ +/* __func__, param); */ } return param; @@ -105,7 +105,7 @@ mod_cfg_get_int (GKeyFile *f, const gchar *sec, const gchar *key, sat_cfg_int_e sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Failed to read integer (%s)"), - __FUNCTION__, error->message); + __func__, error->message); g_clear_error (&error); @@ -119,7 +119,7 @@ mod_cfg_get_int (GKeyFile *f, const gchar *sec, const gchar *key, sat_cfg_int_e /* sat_log_log (SAT_LOG_LEVEL_DEBUG, */ /* _("%s: Integer value not found, using default (%d)"), */ -/* __FUNCTION__, param); */ +/* __func__, param); */ } return param; @@ -141,7 +141,7 @@ mod_cfg_get_str (GKeyFile *f, const gchar *sec, const gchar *key, sat_cfg_str_e sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Failed to read string (%s)"), - __FUNCTION__, error->message); + __func__, error->message); g_clear_error (&error); @@ -155,7 +155,7 @@ mod_cfg_get_str (GKeyFile *f, const gchar *sec, const gchar *key, sat_cfg_str_e /* sat_log_log (SAT_LOG_LEVEL_DEBUG, */ /* _("%s: String not found, using default (%s)"), */ -/* __FUNCTION__, param); */ +/* __func__, param); */ } return param; @@ -183,7 +183,7 @@ void mod_cfg_get_integer_list_boolean(GKeyFile *cfgdata, const gchar* section, if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Failed to get integer list: %s"), - __FUNCTION__, error->message); + __func__, error->message); g_clear_error (&error); diff --git a/src/mod-cfg.c b/src/mod-cfg.c index 2071bc9..37ea0be 100644 --- a/src/mod-cfg.c +++ b/src/mod-cfg.c @@ -132,7 +132,7 @@ gchar *mod_cfg_new () sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Already have module %s. Ask user to confirm..."), - __FUNCTION__, gtk_entry_get_text (GTK_ENTRY (namew))); + __func__, gtk_entry_get_text (GTK_ENTRY (namew))); warn = gtk_message_dialog_new (//NULL, GTK_WINDOW (app), @@ -167,7 +167,7 @@ gchar *mod_cfg_new () /* send an error message */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error while saving module data (%d)."), - __FUNCTION__, status); + __func__, status); } finished = TRUE; @@ -176,7 +176,7 @@ gchar *mod_cfg_new () else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: User tried to create module with no sats."), - __FUNCTION__); + __func__); /* tell user to behave nicely */ GtkWidget *errdialog; @@ -262,7 +262,7 @@ mod_cfg_status_t mod_cfg_edit (gchar *modname, GKeyFile *cfgdata, GtkWidget *t else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: User tried to create module with no sats."), - __FUNCTION__); + __func__); /* tell user not to do that */ GtkWidget *errdialog; @@ -318,14 +318,14 @@ mod_cfg_status_t mod_cfg_save (gchar *modname, GKeyFile *cfgdata) if (!modname) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Attempt to save data to empty file name."), - __FUNCTION__); + __func__); return MOD_CFG_ERROR; } if (!cfgdata) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Attempt to save NULL data."), - __FUNCTION__); + __func__); return MOD_CFG_ERROR; } @@ -613,7 +613,7 @@ static GtkWidget *create_selected_sats_list (GKeyFile *cfgdata, gboolean new, Gt if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to get list of satellites (%s)"), - __FUNCTION__, error->message); + __func__, error->message); g_clear_error (&error); @@ -672,7 +672,7 @@ static void add_selected_sat (GtkListStore *store, gint catnum) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Could not fetch entry %d in satellite list"), - __FILE__, __FUNCTION__, i); + __FILE__, __func__, i); } } @@ -687,7 +687,7 @@ static void add_selected_sat (GtkListStore *store, gint catnum) /* error */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Error reading satellite %d."), - __FILE__, __FUNCTION__, catnum); + __FILE__, __func__, catnum); } else { /* insert satellite into liststore */ @@ -799,7 +799,7 @@ static GtkWidget *create_loc_selector (GKeyFile *cfgdata) else { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Module has no QTH; use default."), - __FUNCTION__); + __func__); defqth = g_strdup (_("** DEFAULT **")); defqthshort = g_strdup(defqth); @@ -945,7 +945,7 @@ static void mod_cfg_apply (GKeyFile *cfgdata) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Could not fetch entry %d in satellite list"), - __FILE__, __FUNCTION__, i); + __FILE__, __func__, i); } } @@ -959,7 +959,7 @@ static void mod_cfg_apply (GKeyFile *cfgdata) sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Applied changes to %s."), - __FUNCTION__, gtk_entry_get_text (GTK_ENTRY (namew))); + __func__, gtk_entry_get_text (GTK_ENTRY (namew))); } diff --git a/src/mod-mgr.c b/src/mod-mgr.c index f7adba6..d4832f1 100644 --- a/src/mod-mgr.c +++ b/src/mod-mgr.c @@ -148,7 +148,7 @@ mod_mgr_create (void) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to restore %s"), - __FUNCTION__, mods[i]); + __func__, mods[i]); /* try to smartly handle disappearing modules */ page--; @@ -177,7 +177,7 @@ mod_mgr_create (void) else { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: No modules have to be restored."), - __FUNCTION__); + __func__); } return nbook; @@ -220,20 +220,20 @@ mod_mgr_add_module (GtkWidget *module, gboolean dock) /* send message to logger */ sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Added %s to module manager (page %d)."), - __FUNCTION__, GTK_SAT_MODULE (module)->name, page); + __func__, GTK_SAT_MODULE (module)->name, page); } else { /* send message to logger */ sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Added %s to module manager (NOT DOCKED)."), - __FUNCTION__, GTK_SAT_MODULE (module)->name); + __func__, GTK_SAT_MODULE (module)->name); } retcode = 0; } else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module %s seems to be NULL"), - __FUNCTION__, GTK_SAT_MODULE (module)->name); + __func__, GTK_SAT_MODULE (module)->name); retcode = 1; } @@ -274,7 +274,7 @@ mod_mgr_remove_module (GtkWidget *module) /* this is some kind of bug (inconsistency between internal states) */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not find child in notebook. This may hurt..."), - __FUNCTION__); + __func__); retcode = 1; } @@ -283,7 +283,7 @@ mod_mgr_remove_module (GtkWidget *module) sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Removed child from notebook page %d."), - __FUNCTION__, page); + __func__, page); retcode = 0; } @@ -335,7 +335,7 @@ mod_mgr_save_state () if (!nbook) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Attempt to save state but mod-mgr is NULL?"), - __FUNCTION__); + __func__); return; } @@ -344,7 +344,7 @@ mod_mgr_save_state () if (num == 0) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: No modules need to save state."), - __FUNCTION__); + __func__); sat_cfg_set_str (SAT_CFG_STR_OPEN_MODULES, NULL); @@ -369,7 +369,7 @@ mod_mgr_save_state () g_free (buff); sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Stored %s"), - __FUNCTION__, GTK_SAT_MODULE (module)->name); + __func__, GTK_SAT_MODULE (module)->name); } @@ -377,7 +377,7 @@ mod_mgr_save_state () page = gtk_notebook_get_current_page (GTK_NOTEBOOK (nbook)); sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Saved states for %d modules."), - __FUNCTION__, num); + __func__, num); sat_cfg_set_str (SAT_CFG_STR_OPEN_MODULES, mods); sat_cfg_set_int (SAT_CFG_INT_MODULE_CURRENT_PAGE, page); @@ -442,7 +442,7 @@ mod_mgr_dock_module (GtkWidget *module) if (!g_slist_find (modules, module)) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module %s not found in list. Trying to recover."), - __FUNCTION__, GTK_SAT_MODULE (module)->name); + __func__, GTK_SAT_MODULE (module)->name); modules = g_slist_append (modules, module); } @@ -450,7 +450,7 @@ mod_mgr_dock_module (GtkWidget *module) if (page != -1) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module %s already in notebook!"), - __FUNCTION__, GTK_SAT_MODULE (module)->name); + __func__, GTK_SAT_MODULE (module)->name); retcode = 1; } else { @@ -461,7 +461,7 @@ mod_mgr_dock_module (GtkWidget *module) sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Docked %s into notebook (page %d)"), - __FUNCTION__, GTK_SAT_MODULE (module)->name, page); + __func__, GTK_SAT_MODULE (module)->name, page); retcode = 0; } @@ -508,7 +508,7 @@ mod_mgr_undock_module (GtkWidget *module) if (!g_slist_find (modules, module)) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module %s not found in list. Trying to recover."), - __FUNCTION__, GTK_SAT_MODULE (module)->name); + __func__, GTK_SAT_MODULE (module)->name); modules = g_slist_append (modules, module); } @@ -516,7 +516,7 @@ mod_mgr_undock_module (GtkWidget *module) if (page == -1) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module %s does not seem to be docked!"), - __FUNCTION__, GTK_SAT_MODULE (module)->name); + __func__, GTK_SAT_MODULE (module)->name); retcode = 1; } else { @@ -525,7 +525,7 @@ mod_mgr_undock_module (GtkWidget *module) sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Removed %s from notebook page %d."), - __FUNCTION__, GTK_SAT_MODULE (module)->name, page); + __func__, GTK_SAT_MODULE (module)->name, page); retcode = 0; } @@ -602,7 +602,7 @@ mod_mgr_reload_sats () if (!nbook) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Attempt to reload sats but mod-mgr is NULL?"), - __FUNCTION__); + __func__); return; } @@ -611,7 +611,7 @@ mod_mgr_reload_sats () if (num == 0) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: No modules need to reload sats."), - __FUNCTION__); + __func__); return; } diff --git a/src/pass-popup-menu.c b/src/pass-popup-menu.c index a5404e8..4753402 100644 --- a/src/pass-popup-menu.c +++ b/src/pass-popup-menu.c @@ -154,7 +154,7 @@ polar_plot_pass_details (GtkWidget *menuitem, gpointer data) (void) menuitem; /* avoid unused parameter compiler warning */ (void) data; /* avoid unused parameter compiler warning */ - g_print ("FIXME: %s:%s not implemented!\n", __FILE__, __FUNCTION__); + g_print ("FIXME: %s:%s not implemented!\n", __FILE__, __func__); } @@ -165,6 +165,6 @@ azel_plot_pass_details (GtkWidget *menuitem, gpointer data) (void) menuitem; /* avoid unused parameter compiler warning */ (void) data; /* avoid unused parameter compiler warning */ - g_print ("FIXME: %s:%s not implemented!\n", __FILE__, __FUNCTION__); + g_print ("FIXME: %s:%s not implemented!\n", __FILE__, __func__); } diff --git a/src/predict-tools.c b/src/predict-tools.c index c4aa0ff..28b82dc 100644 --- a/src/predict-tools.c +++ b/src/predict-tools.c @@ -505,7 +505,7 @@ get_pass_engine (sat_t *sat_in, qth_t *qth, gdouble start, gdouble maxdt, gdou aos = find_aos (sat, qth, t0, start + maxdt - t0); /* sat_log_log(SAT_LOG_LEVEL_INFO, "%s:%s:%d: found aos %f and los %f for t0=%f", */ /* __FILE__, */ - /* __FUNCTION__, */ + /* __func__, */ /* __LINE__, */ /* aos, */ /* los, */ @@ -716,7 +716,7 @@ get_passes (sat_t *sat, qth_t *qth, gdouble start, gdouble maxdt, guint num) sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Found %d passes for %s in time window [%f;%f]"), - __FUNCTION__, g_slist_length (passes), sat->nickname, start, start+maxdt); + __func__, g_slist_length (passes), sat->nickname, start, start+maxdt); return passes; } @@ -952,12 +952,12 @@ get_current_pass (sat_t *sat_in, qth_t *qth, gdouble start) if (pass->aos > t0) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Returning a pass for %s that starts after the seeded time."), - __FUNCTION__,sat->nickname); + __func__,sat->nickname); if (pass->los < t0) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Returning a pass for %s that ends before the seeded time."), - __FUNCTION__,sat->nickname); + __func__,sat->nickname); } } return pass; diff --git a/src/print-pass.c b/src/print-pass.c index 2b62ea6..386a516 100644 --- a/src/print-pass.c +++ b/src/print-pass.c @@ -147,7 +147,7 @@ void print_pass (pass_t *pass, qth_t *qth, GtkWindow *parent) if (error) { sat_log_log (SAT_LOG_LEVEL_ERROR, - "%s: %s", __FUNCTION__, error->message); + "%s: %s", __func__, error->message); GtkWidget *dialog; @@ -177,7 +177,7 @@ void print_passes (GSList *passes) { (void) passes; /* avoid unused parameter compiler warning */ - sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Not implemented!"), __FUNCTION__); + sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Not implemented!"), __func__); } diff --git a/src/qth-data.c b/src/qth-data.c index 628884c..2d08b44 100644 --- a/src/qth-data.c +++ b/src/qth-data.c @@ -73,13 +73,13 @@ gint qth_data_read(const gchar *filename, qth_t *qth) sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Could not load data from %s (%s)"), - __FUNCTION__, filename, error->message); + __func__, filename, error->message); return FALSE; } /* send a debug message, then read data */ - sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: QTH data: %s"), __FUNCTION__, filename); + sat_log_log(SAT_LOG_LEVEL_DEBUG, _("%s: QTH data: %s"), __func__, filename); /*** FIXME: should check that strings are UTF-8? */ /* QTH Name */ @@ -96,7 +96,7 @@ gint qth_data_read(const gchar *filename, qth_t *qth) if (error != NULL) { sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s: Error reading QTH name (%s)."), __FUNCTION__, error->message); + _("%s: Error reading QTH name (%s)."), __func__, error->message); qth->name = g_strdup(_("ERROR")); g_clear_error(&error); @@ -107,7 +107,7 @@ gint qth_data_read(const gchar *filename, qth_t *qth) if (error != NULL) { sat_log_log(SAT_LOG_LEVEL_INFO, - _("%s: QTH has no location (%s)."), __FUNCTION__, error->message); + _("%s: QTH has no location (%s)."), __func__, error->message); qth->loc = g_strdup(""); g_clear_error(&error); @@ -117,7 +117,7 @@ gint qth_data_read(const gchar *filename, qth_t *qth) qth->desc = g_key_file_get_string(qth->data, QTH_CFG_MAIN_SECTION, QTH_CFG_DESC_KEY, &error); if ((qth->desc == NULL) || (error != NULL)) { - sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: QTH has no description."), __FUNCTION__); + sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: QTH has no description."), __func__); qth->desc = g_strdup(""); g_clear_error(&error); @@ -127,7 +127,7 @@ gint qth_data_read(const gchar *filename, qth_t *qth) qth->wx = g_key_file_get_string(qth->data, QTH_CFG_MAIN_SECTION, QTH_CFG_WX_KEY, &error); if ((qth->wx == NULL) || (error != NULL)) { - sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: QTH has no weather station."), __FUNCTION__); + sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: QTH has no weather station."), __func__); qth->wx = g_strdup(""); g_clear_error(&error); @@ -138,7 +138,7 @@ gint qth_data_read(const gchar *filename, qth_t *qth) if (error != NULL) { sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s: Error reading QTH latitude (%s)."), __FUNCTION__, error->message); + _("%s: Error reading QTH latitude (%s)."), __func__, error->message); g_clear_error(&error); @@ -158,7 +158,7 @@ gint qth_data_read(const gchar *filename, qth_t *qth) if (error != NULL) { sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s: Error reading QTH longitude (%s)."), __FUNCTION__, error->message); + _("%s: Error reading QTH longitude (%s)."), __func__, error->message); g_clear_error(&error); @@ -178,7 +178,7 @@ gint qth_data_read(const gchar *filename, qth_t *qth) if (error != NULL) { sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s: Error reading QTH altitude (%s)."), __FUNCTION__, error->message); + _("%s: Error reading QTH altitude (%s)."), __func__, error->message); g_clear_error(&error); @@ -197,7 +197,7 @@ gint qth_data_read(const gchar *filename, qth_t *qth) if (error != NULL) { sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s: Error reading QTH type (%s)."), __FUNCTION__, error->message); + _("%s: Error reading QTH type (%s)."), __func__, error->message); g_clear_error(&error); @@ -211,7 +211,7 @@ gint qth_data_read(const gchar *filename, qth_t *qth) if (error != NULL) { sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s: Error reading QTH type (%s)."), __FUNCTION__, error->message); + _("%s: Error reading QTH type (%s)."), __func__, error->message); g_clear_error(&error); @@ -224,7 +224,7 @@ gint qth_data_read(const gchar *filename, qth_t *qth) QTH_CFG_MAIN_SECTION, QTH_CFG_GPSD_SERVER_KEY, &error); if ((qth->gpsd_server == NULL) || (error != NULL)) { - sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: QTH has no GPSD Server."), __FUNCTION__); + sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: QTH has no GPSD Server."), __func__); qth->gpsd_server = g_strdup(""); g_clear_error(&error); @@ -235,7 +235,7 @@ gint qth_data_read(const gchar *filename, qth_t *qth) { sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Could not set QRA for %s at %f, %f."), - __FUNCTION__, qth->name, qth->lon, qth->lat); + __func__, qth->name, qth->lon, qth->lat); } qth_validate(qth); @@ -243,7 +243,7 @@ gint qth_data_read(const gchar *filename, qth_t *qth) /* Now, send debug message and return */ sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: QTH data: %s, %.4f, %.4f, %d"), - __FUNCTION__, qth->name, qth->lat, qth->lon, qth->alt); + __func__, qth->name, qth->lat, qth->lon, qth->alt); return TRUE; } @@ -538,7 +538,7 @@ gboolean qth_data_update(qth_t * qth, gdouble t) { sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Could not set QRA for %s at %f, %f."), - __FUNCTION__, qth->name, qth->lon, qth->lat); + __func__, qth->name, qth->lon, qth->lat); } return retval; @@ -579,7 +579,7 @@ gboolean qth_data_update_init(qth_t * qth) qth->gps_data = NULL; sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Could not open gpsd at %s:%d"), - __FUNCTION__, qth->gpsd_server, qth->gpsd_port); + __func__, qth->gpsd_server, qth->gpsd_port); retval = FALSE; } else @@ -602,7 +602,7 @@ gboolean qth_data_update_init(qth_t * qth) qth->gps_data = NULL; sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Could not open gpsd at %s:%d"), - __FUNCTION__, qth->gpsd_server, qth->gpsd_port); + __func__, qth->gpsd_server, qth->gpsd_port); retval = FALSE; } else @@ -616,7 +616,7 @@ gboolean qth_data_update_init(qth_t * qth) default: sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: Unsupported gpsd api major version (%d)"), - __FUNCTION__, GPSD_API_MAJOR_VERSION); + __func__, GPSD_API_MAJOR_VERSION); return FALSE; @@ -728,20 +728,20 @@ void qth_validate(qth_t * qth) if (!isnormal(qth->lat) && (qth->lat != 0)) { sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s: QTH data had bogus lat %f"), __FUNCTION__, qth->lat); + _("%s: QTH data had bogus lat %f"), __func__, qth->lat); qth->lat = 0.0; } if (!isnormal(qth->lon) && (qth->lon != 0)) { sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s: QTH data had bogus lon %f"), __FUNCTION__, qth->lon); + _("%s: QTH data had bogus lon %f"), __func__, qth->lon); qth->lon = 0.0; } if (!isnormal(qth->alt) && (qth->alt != 0)) { sat_log_log(SAT_LOG_LEVEL_ERROR, - _("%s: QTH data had bogus alt %f"), __FUNCTION__, qth->alt); + _("%s: QTH data had bogus alt %f"), __func__, qth->alt); qth->alt = 0.0; } @@ -751,7 +751,7 @@ void qth_validate(qth_t * qth) { sat_log_log(SAT_LOG_LEVEL_ERROR, _("%s: File contained bogus QTH data. Correcting: %s, %.4f, %.4f, %d"), - __FUNCTION__, qth->name, qth->lat, qth->lon, qth->alt); + __func__, qth->name, qth->lat, qth->lon, qth->alt); qth->lat = fmod(qth->lat, 360.0); while ((qth->lat) > 180.0) diff --git a/src/qth-editor.c b/src/qth-editor.c index bf166cb..ad66dff 100644 --- a/src/qth-editor.c +++ b/src/qth-editor.c @@ -779,7 +779,7 @@ static void /* debug message */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: %.2f %.2f => %s"), - __FILE__, __FUNCTION__, + __FILE__, __func__, gtk_spin_button_get_value (GTK_SPIN_BUTTON (lon)), gtk_spin_button_get_value (GTK_SPIN_BUTTON (lat)), locator); @@ -825,7 +825,7 @@ static void /* debug message */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: %s => %.2f %.2f"), - __FILE__, __FUNCTION__, + __FILE__, __func__, gtk_entry_get_text (GTK_ENTRY (qra)), lonf, latf); diff --git a/src/radio-conf.c b/src/radio-conf.c index b686cff..041b03e 100644 --- a/src/radio-conf.c +++ b/src/radio-conf.c @@ -67,7 +67,7 @@ gboolean radio_conf_read (radio_conf_t *conf) if (conf->name == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: NULL configuration name!"), - __FUNCTION__); + __func__); return FALSE; } @@ -83,7 +83,7 @@ gboolean radio_conf_read (radio_conf_t *conf) if (cfg == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not load file %s\n"), - __FUNCTION__, fname); + __func__, fname); g_free (fname); return FALSE; @@ -96,7 +96,7 @@ gboolean radio_conf_read (radio_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading radio conf from %s (%s)."), - __FUNCTION__, conf->name, error->message); + __func__, conf->name, error->message); g_clear_error (&error); g_key_file_free (cfg); return FALSE; @@ -106,7 +106,7 @@ gboolean radio_conf_read (radio_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading radio conf from %s (%s)."), - __FUNCTION__, conf->name, error->message); + __func__, conf->name, error->message); g_clear_error (&error); g_key_file_free (cfg); return FALSE; @@ -118,7 +118,7 @@ gboolean radio_conf_read (radio_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading radio conf from %s (%s)."), - __FUNCTION__, conf->name, error->message); + __func__, conf->name, error->message); g_clear_error (&error); g_key_file_free (cfg); return FALSE; @@ -134,7 +134,7 @@ gboolean radio_conf_read (radio_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading radio conf from %s (%s)."), - __FUNCTION__, conf->name, error->message); + __func__, conf->name, error->message); g_clear_error (&error); g_key_file_free (cfg); return FALSE; @@ -149,7 +149,7 @@ gboolean radio_conf_read (radio_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading radio conf from %s (%s)."), - __FUNCTION__, conf->name, error->message); + __func__, conf->name, error->message); g_clear_error (&error); g_key_file_free (cfg); return FALSE; @@ -160,7 +160,7 @@ gboolean radio_conf_read (radio_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading radio conf from %s (%s)."), - __FUNCTION__, conf->name, error->message); + __func__, conf->name, error->message); g_clear_error (&error); g_key_file_free (cfg); return FALSE; @@ -175,7 +175,7 @@ gboolean radio_conf_read (radio_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading radio conf from %s (%s)."), - __FUNCTION__, conf->name, error->message); + __func__, conf->name, error->message); g_clear_error (&error); conf->vfoDown = VFO_SUB; } @@ -187,7 +187,7 @@ gboolean radio_conf_read (radio_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading radio conf from %s (%s)."), - __FUNCTION__, conf->name, error->message); + __func__, conf->name, error->message); g_clear_error (&error); conf->vfoUp = VFO_MAIN; } @@ -199,7 +199,7 @@ gboolean radio_conf_read (radio_conf_t *conf) sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Read radio configuration %s"), - __FUNCTION__, conf->name); + __func__, conf->name); return TRUE; } @@ -221,7 +221,7 @@ void radio_conf_save (radio_conf_t *conf) if (conf->name == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: NULL configuration name!"), - __FUNCTION__); + __func__); return; } diff --git a/src/rotor-conf.c b/src/rotor-conf.c index 1f2fe84..347bd75 100644 --- a/src/rotor-conf.c +++ b/src/rotor-conf.c @@ -64,7 +64,7 @@ gboolean rotor_conf_read (rotor_conf_t *conf) if (conf->name == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: NULL configuration name!"), - __FUNCTION__); + __func__); return FALSE; } @@ -80,7 +80,7 @@ gboolean rotor_conf_read (rotor_conf_t *conf) if (cfg == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not load file %s\n"), - __FUNCTION__, fname); + __func__, fname); g_free (fname); return FALSE; @@ -93,7 +93,7 @@ gboolean rotor_conf_read (rotor_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading rotor conf from %s (%s)."), - __FUNCTION__, conf->name, error->message); + __func__, conf->name, error->message); g_clear_error (&error); g_key_file_free (cfg); return FALSE; @@ -103,7 +103,7 @@ gboolean rotor_conf_read (rotor_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading rotor conf from %s (%s)."), - __FUNCTION__, conf->name, error->message); + __func__, conf->name, error->message); g_clear_error (&error); g_key_file_free (cfg); return FALSE; @@ -113,7 +113,7 @@ gboolean rotor_conf_read (rotor_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Az type not defined for %s. Assuming 0..360\302\260"), - __FUNCTION__, conf->name); + __func__, conf->name); g_clear_error (&error); conf->aztype = ROT_AZ_TYPE_360; @@ -123,7 +123,7 @@ gboolean rotor_conf_read (rotor_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: MinAz not defined for %s. Assuming 0\302\260."), - __FUNCTION__, conf->name); + __func__, conf->name); g_clear_error (&error); conf->minaz = 0.0; } @@ -132,7 +132,7 @@ gboolean rotor_conf_read (rotor_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: MaxAz not defined for %s. Assuming 360\302\260."), - __FUNCTION__, conf->name); + __func__, conf->name); g_clear_error (&error); conf->maxaz = 360.0; } @@ -141,7 +141,7 @@ gboolean rotor_conf_read (rotor_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: MinEl not defined for %s. Assuming 0\302\260."), - __FUNCTION__, conf->name); + __func__, conf->name); g_clear_error (&error); conf->minel = 0.0; } @@ -150,7 +150,7 @@ gboolean rotor_conf_read (rotor_conf_t *conf) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: MaxEl not defined for %s. Assuming 90\302\260."), - __FUNCTION__, conf->name); + __func__, conf->name); g_clear_error (&error); conf->maxel = 90.0; } diff --git a/src/sat-cfg.c b/src/sat-cfg.c index 8056b07..7abb62a 100644 --- a/src/sat-cfg.c +++ b/src/sat-cfg.c @@ -277,11 +277,11 @@ guint sat_cfg_load () sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Error reading config file (%s)"), - __FUNCTION__, error->message); + __func__, error->message); sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Using built-in defaults"), - __FUNCTION__); + __func__); g_clear_error (&error); @@ -289,7 +289,7 @@ guint sat_cfg_load () } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s: Everything OK."), __FUNCTION__); + _("%s: Everything OK."), __func__); } /* if config version is < 1.1; reset SAT_CFG_STR_TLE_FILES */ @@ -358,7 +358,7 @@ gboolean if (config == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module not initialised\n"), - __FUNCTION__); + __func__); /* return default value */ value = sat_cfg_bool[param].defval; @@ -381,7 +381,7 @@ gboolean else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unknown BOOL param index (%d)\n"), - __FUNCTION__, param); + __func__, param); } return value; @@ -398,7 +398,7 @@ gboolean sat_cfg_get_bool_def (sat_cfg_bool_e param) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unknown BOOL param index (%d)\n"), - __FUNCTION__, param); + __func__, param); } return value; @@ -419,7 +419,7 @@ void sat_cfg_set_bool (sat_cfg_bool_e param, gboolean value) if (config == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module not initialised\n"), - __FUNCTION__); + __func__); } else { g_key_file_set_boolean (config, @@ -432,7 +432,7 @@ void sat_cfg_set_bool (sat_cfg_bool_e param, gboolean value) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unknown BOOL param index (%d)\n"), - __FUNCTION__, param); + __func__, param); } } @@ -445,7 +445,7 @@ void if (config == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module not initialised\n"), - __FUNCTION__); + __func__); } else { g_key_file_remove_key (config, @@ -458,7 +458,7 @@ void else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unknown BOOL param index (%d)\n"), - __FUNCTION__, param); + __func__, param); } } @@ -477,7 +477,7 @@ gchar *sat_cfg_get_str (sat_cfg_str_e param) if (config == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module not initialised\n"), - __FUNCTION__); + __func__); /* return default value */ value = g_strdup (sat_cfg_str[param].defval); @@ -500,7 +500,7 @@ gchar *sat_cfg_get_str (sat_cfg_str_e param) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unknown STR param index (%d)\n"), - __FUNCTION__, param); + __func__, param); value = g_strdup ("ERROR"); } @@ -522,7 +522,7 @@ gchar *sat_cfg_get_str_def (sat_cfg_str_e param) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unknown STR param index (%d)\n"), - __FUNCTION__, param); + __func__, param); value = g_strdup ("ERROR"); } @@ -540,7 +540,7 @@ void sat_cfg_set_str (sat_cfg_str_e param, const gchar *value) if (config == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module not initialised\n"), - __FUNCTION__); + __func__); } else { if (value) { @@ -562,7 +562,7 @@ void sat_cfg_set_str (sat_cfg_str_e param, const gchar *value) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unknown STR param index (%d)\n"), - __FUNCTION__, param); + __func__, param); } } @@ -575,7 +575,7 @@ void sat_cfg_reset_str (sat_cfg_str_e param) if (config == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module not initialised\n"), - __FUNCTION__); + __func__); } else { g_key_file_remove_key (config, @@ -588,7 +588,7 @@ void sat_cfg_reset_str (sat_cfg_str_e param) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unknown STR param index (%d)\n"), - __FUNCTION__, param); + __func__, param); } } @@ -602,7 +602,7 @@ gint sat_cfg_get_int (sat_cfg_int_e param) if (config == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module not initialised\n"), - __FUNCTION__); + __func__); /* return default value */ value = sat_cfg_int[param].defval; @@ -625,7 +625,7 @@ gint sat_cfg_get_int (sat_cfg_int_e param) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unknown INT param index (%d)\n"), - __FUNCTION__, param); + __func__, param); } return value; @@ -642,7 +642,7 @@ gint sat_cfg_get_int_def (sat_cfg_int_e param) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unknown INT param index (%d)\n"), - __FUNCTION__, param); + __func__, param); } return value; @@ -656,7 +656,7 @@ void sat_cfg_set_int (sat_cfg_int_e param, gint value) if (config == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module not initialised\n"), - __FUNCTION__); + __func__); } else { g_key_file_set_integer (config, @@ -669,7 +669,7 @@ void sat_cfg_set_int (sat_cfg_int_e param, gint value) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unknown INT param index (%d)\n"), - __FUNCTION__, param); + __func__, param); } } @@ -681,7 +681,7 @@ void sat_cfg_reset_int (sat_cfg_int_e param) if (config == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Module not initialised\n"), - __FUNCTION__); + __func__); } else { g_key_file_remove_key (config, @@ -694,7 +694,7 @@ void sat_cfg_reset_int (sat_cfg_int_e param) else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Unknown INT param index (%d)\n"), - __FUNCTION__, param); + __func__, param); } } diff --git a/src/sat-log.c b/src/sat-log.c index d9c4979..506c751 100644 --- a/src/sat-log.c +++ b/src/sat-log.c @@ -133,7 +133,7 @@ void sat_log_init() if (!err) { initialised = TRUE; - sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: Session started"), __FUNCTION__); + sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: Session started"), __func__); } } @@ -144,7 +144,7 @@ void sat_log_close() { if (initialised) { - sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: Session ended"), __FUNCTION__); + sat_log_log(SAT_LOG_LEVEL_INFO, _("%s: Session ended"), __func__); g_io_channel_shutdown(logfile, TRUE, NULL); g_io_channel_unref(logfile); logfile = NULL; diff --git a/src/sat-pass-dialogs.c b/src/sat-pass-dialogs.c index c033ada..f3b5a4c 100644 --- a/src/sat-pass-dialogs.c +++ b/src/sat-pass-dialogs.c @@ -548,7 +548,7 @@ static void single_pass_response (GtkWidget *dialog, gint response, gpointer dat case RESPONSE_PRINT: sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: PRINT not implemented"), - __FUNCTION__); + __func__); pass_t *pass = (pass_t *) g_object_get_data (G_OBJECT (dialog), "pass"); qth_t *qth = (qth_t *) g_object_get_data (G_OBJECT (dialog), "qth"); @@ -1155,7 +1155,7 @@ static void multi_pass_response (GtkWidget *dialog, gint response, gpointer data case RESPONSE_PRINT: sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: PRINT not implemented"), - __FUNCTION__); + __func__); break; case RESPONSE_SAVE: diff --git a/src/sat-pref-polar-view.c b/src/sat-pref-polar-view.c index ecbfe50..9feb07e 100644 --- a/src/sat-pref-polar-view.c +++ b/src/sat-pref-polar-view.c @@ -817,7 +817,7 @@ static void reset_cb (GtkWidget *button, gpointer cfg) default: sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Invalid chart orientation %d (using N/E/S/W)"), - __FILE__, __FUNCTION__, orient); + __FILE__, __func__, orient); orient = POLAR_VIEW_NESW; gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nesw), TRUE); break; diff --git a/src/sat-pref-qth-editor.c b/src/sat-pref-qth-editor.c index 0fc0b3f..cbf33c3 100644 --- a/src/sat-pref-qth-editor.c +++ b/src/sat-pref-qth-editor.c @@ -809,7 +809,7 @@ latlon_changed (GtkWidget *widget, gpointer data) /* debug message */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: %.2f %.2f => %s"), - __FILE__, __FUNCTION__, + __FILE__, __func__, gtk_spin_button_get_value (GTK_SPIN_BUTTON (lon)), gtk_spin_button_get_value (GTK_SPIN_BUTTON (lat)), locator); @@ -855,7 +855,7 @@ qra_changed (GtkEntry *entry, gpointer data) /* debug message */ sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: %s => %.2f %.2f"), - __FILE__, __FUNCTION__, + __FILE__, __func__, gtk_entry_get_text (GTK_ENTRY (qra)), lonf, latf); diff --git a/src/sat-pref-rig.c b/src/sat-pref-rig.c index 36f8b9e..bf756ff 100644 --- a/src/sat-pref-rig.c +++ b/src/sat-pref-rig.c @@ -447,7 +447,7 @@ void sat_pref_rig_ok () else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to get RIG %s"), - __FUNCTION__, i); + __func__, i); } } @@ -545,7 +545,7 @@ static void edit_cb (GtkWidget *button, gpointer data) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Edit button should have been disabled."), - __FILE__, __FUNCTION__); + __FILE__, __func__); //gtk_widget_set_sensitive (button, FALSE); return; @@ -633,7 +633,7 @@ static void delete_cb (GtkWidget *button, gpointer data) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Delete button should have been disabled."), - __FILE__, __FUNCTION__); + __FILE__, __func__); //gtk_widget_set_sensitive (button, FALSE); return; diff --git a/src/sat-pref-rot-editor.c b/src/sat-pref-rot-editor.c index d11a5da..7b2cf7c 100644 --- a/src/sat-pref-rot-editor.c +++ b/src/sat-pref-rot-editor.c @@ -432,7 +432,7 @@ static void aztype_changed_cb (GtkComboBox *box, gpointer data) default: sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Invalid AZ rotator type."), - __FILE__, __FUNCTION__); + __FILE__, __func__); break; } diff --git a/src/sat-pref-rot.c b/src/sat-pref-rot.c index ed6e103..8219d83 100644 --- a/src/sat-pref-rot.c +++ b/src/sat-pref-rot.c @@ -410,7 +410,7 @@ void sat_pref_rot_ok () else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to get ROT %s"), - __FUNCTION__, i); + __func__, i); } } @@ -504,7 +504,7 @@ static void edit_cb (GtkWidget *button, gpointer data) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Edit button should have been disabled."), - __FILE__, __FUNCTION__); + __FILE__, __func__); //gtk_widget_set_sensitive (button, FALSE); return; @@ -591,7 +591,7 @@ static void delete_cb (GtkWidget *button, gpointer data) sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Delete button should have been disabled."), - __FILE__, __FUNCTION__); + __FILE__, __func__); //gtk_widget_set_sensitive (button, FALSE); return; diff --git a/src/save-pass.c b/src/save-pass.c index df9b90b..7896b6f 100644 --- a/src/save-pass.c +++ b/src/save-pass.c @@ -536,7 +536,7 @@ static void save_passes_exec (GtkWidget *parent, default: sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Invalid file format: %d"), - __FUNCTION__, format); + __func__, format); break; } @@ -637,7 +637,7 @@ static void save_pass_exec (GtkWidget *parent, default: sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Invalid file format: %d"), - __FUNCTION__, format); + __func__, format); break; } @@ -659,7 +659,7 @@ static void save_to_file (GtkWidget *parent, const gchar *fname, const gchar *da if (err != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not create file %s (%s)"), - __FUNCTION__, fname, err->message); + __func__, fname, err->message); /* error dialog */ dialog = gtk_message_dialog_new (GTK_WINDOW (parent), @@ -683,7 +683,7 @@ static void save_to_file (GtkWidget *parent, const gchar *fname, const gchar *da if (err != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: An error occurred while saving data to %s (%s)"), - __FUNCTION__, fname, err->message); + __func__, fname, err->message); dialog = gtk_message_dialog_new (GTK_WINDOW (parent), GTK_DIALOG_MODAL | @@ -699,7 +699,7 @@ static void save_to_file (GtkWidget *parent, const gchar *fname, const gchar *da else { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s: Written %d characters to %s"), - __FUNCTION__, count, fname); + __func__, count, fname); } /* close file, we don't care about errors here */ diff --git a/src/tle-tools.c b/src/tle-tools.c index f89e0a8..dd7f779 100644 --- a/src/tle-tools.c +++ b/src/tle-tools.c @@ -70,12 +70,12 @@ twoline2tle (gchar *line1, gchar *line2, gchar *line3, /* check function parameters */ if G_UNLIKELY((line1 == NULL) || (line2 == NULL) || (line3 == NULL)) { sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: NULL input data!"), __FUNCTION__); + _("%s: NULL input data!"), __func__); return TLE_CONV_ERROR; } if G_UNLIKELY(tle == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: NULL output storage!"), __FUNCTION__); + _("%s: NULL output storage!"), __func__); return TLE_CONV_ERROR; } diff --git a/src/tle-update.c b/src/tle-update.c index 29ecadc..881712a 100644 --- a/src/tle-update.c +++ b/src/tle-update.c @@ -119,7 +119,7 @@ void tle_update_from_files (const gchar *dir, const gchar *filter, { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: A TLE update process is already running. Aborting."), - __FUNCTION__); + __func__); return; } @@ -135,7 +135,7 @@ void tle_update_from_files (const gchar *dir, const gchar *filter, /* send an error message */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error opening directory %s (%s)"), - __FUNCTION__, dir, err->message); + __func__, dir, err->message); /* insert error message into the status string, too */ if (!silent && (label1 != NULL)) { @@ -182,12 +182,12 @@ void tle_update_from_files (const gchar *dir, const gchar *filter, if (num < 1) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: No valid TLE data found in %s"), - __FUNCTION__, fnam); + __func__, fnam); } else { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Read %d sats from %s into memory"), - __FUNCTION__, num, fnam); + __func__, num, fnam); } } @@ -207,7 +207,7 @@ void tle_update_from_files (const gchar *dir, const gchar *filter, /* send an error message */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error opening directory %s (%s)"), - __FUNCTION__, dir, err->message); + __func__, dir, err->message); /* insert error message into the status string, too */ if (!silent && (label1 != NULL)) { @@ -357,7 +357,7 @@ void tle_update_from_files (const gchar *dir, const gchar *filter, sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Added %d new satellites to local database"), - __FUNCTION__, newsats); + __func__, newsats); } /* store time of update if we have updated something */ @@ -374,7 +374,7 @@ void tle_update_from_files (const gchar *dir, const gchar *filter, sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: TLE elements updated."), - __FUNCTION__); + __func__); } /* destroy hash tables */ @@ -440,7 +440,7 @@ static void check_and_add_sat (gpointer key, gpointer value, gpointer user_data) if (err != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not open category file file %s (%s)."), - __FUNCTION__, cfgfile, err->message); + __func__, cfgfile, err->message); g_clear_error (&err); } else { @@ -462,13 +462,13 @@ static void check_and_add_sat (gpointer key, gpointer value, gpointer user_data) if (err != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error adding %d to %s (%s)."), - __FUNCTION__, ntle->catnum, cfgfile, err->message); + __func__, ntle->catnum, cfgfile, err->message); g_clear_error (&err); } else { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Added satellite %d to %s."), - __FUNCTION__, ntle->catnum, cfgfile); + __func__, ntle->catnum, cfgfile); } } @@ -529,7 +529,7 @@ void tle_update_from_network (gboolean silent, { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: A TLE update process is already running. Aborting."), - __FUNCTION__); + __func__); return; } @@ -544,7 +544,7 @@ void tle_update_from_network (gboolean silent, if (numfiles < 1) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: No files to fetch from network."), - __FUNCTION__); + __func__); /* set activity string, so user knows why nothing happens */ if (!silent && (label1 != NULL)) { @@ -604,12 +604,12 @@ void tle_update_from_network (gboolean silent, if (res != CURLE_OK) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error fetching %s (%s)"), - __FUNCTION__, curfile, curl_easy_strerror (res)); + __func__, curfile, curl_easy_strerror (res)); } else { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Successfully fetched %s"), - __FUNCTION__, curfile); + __func__, curfile); success++; } fclose (outfile); @@ -617,7 +617,7 @@ void tle_update_from_network (gboolean silent, } else { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Failed to open %s preventing update"), - __FUNCTION__, locfile); + __func__, locfile); } /* update progress indicator */ if (!silent && (progress != NULL)) { @@ -645,7 +645,7 @@ void tle_update_from_network (gboolean silent, if (success > 0) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Fetched %d files from network; updating..."), - __FUNCTION__, success); + __func__, success); /* call update_from_files */ cache = sat_file_name ("cache"); tle_update_from_files (cache, NULL, silent, progress, label1, label2); @@ -655,7 +655,7 @@ void tle_update_from_network (gboolean silent, else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Could not fetch any new TLE files from network; aborting..."), - __FUNCTION__); + __func__); } } @@ -675,7 +675,7 @@ void tle_update_from_network (gboolean silent, /* send an error message */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error opening %s (%s)"), - __FUNCTION__, dir, err->message); + __func__, dir, err->message); g_clear_error (&err); } else { @@ -813,7 +813,7 @@ static gint read_fresh_tle (const gchar *dir, const gchar *fnam, GHashTable *dat if (b == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: There is no category in %s"), - __FILE__, __FUNCTION__, catpath); + __FILE__, __func__, catpath); } fclose (catfile); catsync = TRUE; @@ -822,7 +822,7 @@ static gint read_fresh_tle (const gchar *dir, const gchar *fnam, GHashTable *dat /* There is no category with this name (could be update from custom file) */ sat_log_log (SAT_LOG_LEVEL_INFO, _("%s:%s: There is no category called %s"), - __FILE__, __FUNCTION__, fnam); + __FILE__, __func__, fnam); } /* reopen a new catfile and write category name */ @@ -835,7 +835,7 @@ static gint read_fresh_tle (const gchar *dir, const gchar *fnam, GHashTable *dat catsync = FALSE; sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Could not reopen .cat file while reading TLE from %s"), - __FILE__, __FUNCTION__, fnam); + __FILE__, __func__, fnam); } /* .cat file now contains the category name; @@ -885,7 +885,7 @@ static gint read_fresh_tle (const gchar *dir, const gchar *fnam, GHashTable *dat default: sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Something wrote linesneeded to an illegal value %d"), - __FILE__, __FUNCTION__, linesneeded); + __FILE__, __func__, linesneeded); break; } /* b can only be null if there is only one line in the buffer*/ @@ -911,7 +911,7 @@ static gint read_fresh_tle (const gchar *dir, const gchar *fnam, GHashTable *dat Checksum_Good(tle_working[2])) { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: Processing a three line TLE"), - __FILE__, __FUNCTION__); + __FILE__, __func__); /* it appears that the first line may be a name followed by a tle */ strncpy(tle_str[0],tle_working[0],80); @@ -926,7 +926,7 @@ static gint read_fresh_tle (const gchar *dir, const gchar *fnam, GHashTable *dat Checksum_Good(tle_working[1])) { sat_log_log (SAT_LOG_LEVEL_DEBUG, _("%s:%s: Processing a bare two line TLE"), - __FILE__, __FUNCTION__); + __FILE__, __func__); /* first line appears to belong to the start of bare TLE */ /* put in a dummy name of form yyyy-nnaa base on international id */ @@ -975,7 +975,7 @@ static gint read_fresh_tle (const gchar *dir, const gchar *fnam, GHashTable *dat /* TLE data not good */ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Invalid data for %d"), - __FILE__, __FUNCTION__, catnr); + __FILE__, __func__, catnr); } else { @@ -1020,7 +1020,7 @@ static gint read_fresh_tle (const gchar *dir, const gchar *fnam, GHashTable *dat /* log if there is something funny about the data coming in */ sat_log_log (SAT_LOG_LEVEL_WARN, _("%s:%s: Two different statuses for %d (%s) at the same time."), - __FILE__, __FUNCTION__, ntle->catnum, ntle->satname); + __FILE__, __func__, ntle->catnum, ntle->satname); if ( tle.status != OP_STAT_UNKNOWN ) ntle->status = tle.status; } @@ -1072,7 +1072,7 @@ static gint read_fresh_tle (const gchar *dir, const gchar *fnam, GHashTable *dat else { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Failed to open %s"), - __FILE__, __FUNCTION__, path); + __FILE__, __func__, path); } g_free (path); @@ -1142,7 +1142,7 @@ static void update_tle_in_file (const gchar *ldname, /**** FIXME: This is dangereous, so we omit it */ sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: No new TLE data found for %d. Satellite might be obsolete."), - __FUNCTION__, catnr); + __func__, catnr); } else { /* open input file (file containing old tle) */ @@ -1151,7 +1151,7 @@ static void update_tle_in_file (const gchar *ldname, if (!g_key_file_load_from_file (satdata, path, G_KEY_FILE_KEEP_COMMENTS, &error)) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error loading %s (%s)"), - __FUNCTION__, path, error->message); + __func__, path, error->message); g_clear_error (&error); skipped++; @@ -1166,14 +1166,14 @@ static void update_tle_in_file (const gchar *ldname, if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading TLE line 2 from %s (%s)"), - __FUNCTION__, path, error->message); + __func__, path, error->message); g_clear_error (&error); } tlestr2 = g_key_file_get_string (satdata, "Satellite", "TLE2", NULL); if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Error reading TLE line 2 from %s (%s)"), - __FUNCTION__, path, error->message); + __func__, path, error->message); g_clear_error (&error); } @@ -1194,7 +1194,7 @@ static void update_tle_in_file (const gchar *ldname, if (!Good_Elements (rawtle)) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Current TLE data for %d appears to be bad"), - __FUNCTION__, catnr); + __func__, catnr); /* set epoch to zero so it gets overwritten */ tle.epoch = 0; } else { @@ -1215,7 +1215,7 @@ static void update_tle_in_file (const gchar *ldname, if (is_computer_generated_name (satname)) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Data for %d updated for name."), - __FUNCTION__, catnr); + __func__, catnr); g_key_file_set_string (satdata, "Satellite", "NAME", ntle->satname); updateddata = TRUE; } @@ -1227,7 +1227,7 @@ static void update_tle_in_file (const gchar *ldname, if ( is_computer_generated_name (satnickname) ) { sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Data for %d updated for nickname."), - __FUNCTION__, catnr); + __func__, catnr); g_key_file_set_string (satdata, "Satellite", "NICKNAME", ntle->satname); updateddata = TRUE; } @@ -1242,7 +1242,7 @@ static void update_tle_in_file (const gchar *ldname, /* store new data */ sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Data for %d updated for tle."), - __FUNCTION__, catnr); + __func__, catnr); g_key_file_set_string (satdata, "Satellite", "TLE1", ntle->line1); g_key_file_set_string (satdata, "Satellite", "TLE2", ntle->line2); g_key_file_set_integer (satdata, "Satellite", "STATUS", ntle->status); @@ -1252,7 +1252,7 @@ static void update_tle_in_file (const gchar *ldname, if ((status != ntle->status) && (ntle->status != OP_STAT_UNKNOWN)){ sat_log_log (SAT_LOG_LEVEL_INFO, _("%s: Data for %d updated for operational status."), - __FUNCTION__, catnr); + __func__, catnr); g_key_file_set_integer (satdata, "Satellite", "STATUS", ntle->status); updateddata = TRUE; } diff --git a/src/trsp-conf.c b/src/trsp-conf.c index a19decb..17b8cae 100644 --- a/src/trsp-conf.c +++ b/src/trsp-conf.c @@ -78,7 +78,7 @@ GSList *read_transponders (guint catnum) if (numgrp == 0) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: %s contains 0 transponders"), - __FUNCTION__, fname); + __func__, fname); } else { for (i = 0; i < numgrp; i++) { @@ -86,7 +86,7 @@ GSList *read_transponders (guint catnum) if G_UNLIKELY(trsp == NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to allocate memory for transponder data :-("), - __FUNCTION__); + __func__); } else { /* read transponder data */ @@ -96,7 +96,7 @@ GSList *read_transponders (guint catnum) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Error reading %s:%s from %s. Using default."), - __FUNCTION__, groups[i], KEY_UP_LOW, name); + __func__, groups[i], KEY_UP_LOW, name); g_clear_error (&error); trsp->uplow = 0.0; } @@ -105,7 +105,7 @@ GSList *read_transponders (guint catnum) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Error reading %s:%s from %s. Using default."), - __FUNCTION__, groups[i], KEY_UP_HIGH, name); + __func__, groups[i], KEY_UP_HIGH, name); g_clear_error (&error); trsp->uphigh = trsp->uplow; } @@ -114,7 +114,7 @@ GSList *read_transponders (guint catnum) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Error reading %s:%s from %s. Using default."), - __FUNCTION__, groups[i], KEY_DOWN_LOW, name); + __func__, groups[i], KEY_DOWN_LOW, name); g_clear_error (&error); trsp->downlow = 0.0; } @@ -123,7 +123,7 @@ GSList *read_transponders (guint catnum) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Error reading %s:%s from %s. Using default."), - __FUNCTION__, groups[i], KEY_DOWN_HIGH, name); + __func__, groups[i], KEY_DOWN_HIGH, name); g_clear_error (&error); trsp->downhigh = trsp->downlow; } @@ -132,7 +132,7 @@ GSList *read_transponders (guint catnum) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Error reading %s:%s from %s. Assume non-inverting."), - __FUNCTION__, groups[i], KEY_INVERT, name); + __func__, groups[i], KEY_INVERT, name); g_clear_error (&error); trsp->invert = FALSE; } @@ -141,7 +141,7 @@ GSList *read_transponders (guint catnum) if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: Error reading %s:%s from %s"), - __FUNCTION__, groups[i], KEY_MODE, name); + __func__, groups[i], KEY_MODE, name); g_clear_error (&error); } @@ -171,7 +171,7 @@ void write_transponders (guint catnum, GSList *trsplist) // FIXME (void) catnum; /* avoid unused parameter compiler warning */ (void) trsplist; /* avoid unused parameter compiler warning */ - sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Not implemented!"), __FUNCTION__); + sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Not implemented!"), __func__); } /** \brief Free transponder list.