[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-user: gaf : glib deprecated symbol



Hello,

This patch remove all glib deprecated symbols in gaf.
I used the list of deprecated symbols found in the documentation of glib 2.24.1

-- 
Kam
diff --git a/gattrib/src/g_rc.c b/gattrib/src/g_rc.c
index f64d93b..dc7abf2 100644
--- a/gattrib/src/g_rc.c
+++ b/gattrib/src/g_rc.c
@@ -65,7 +65,7 @@ SCM g_rc_gattrib_version(SCM version)
   SCM_ASSERT (scm_is_string (version), version,
 	      SCM_ARG1, "gattrib-version");
   
-  if (g_strcasecmp (SCM_STRING_CHARS (version),
+  if (g_ascii_strcasecmp (SCM_STRING_CHARS (version),
                     PACKAGE_DATE_VERSION) != 0) {
     fprintf(stderr,
             "You are running gEDA/gaf version [%s%s.%s],\n",
diff --git a/gschem/src/g_rc.c b/gschem/src/g_rc.c
index cf61190..cf54f21 100644
--- a/gschem/src/g_rc.c
+++ b/gschem/src/g_rc.c
@@ -69,7 +69,7 @@ SCM g_rc_gschem_version(SCM version)
   SCM_ASSERT (scm_is_string (version), version,
               SCM_ARG1, "gschem-version");
 
-  if (g_strcasecmp (SCM_STRING_CHARS (version), PACKAGE_DATE_VERSION) != 0) {
+  if (g_ascii_strcasecmp (SCM_STRING_CHARS (version), PACKAGE_DATE_VERSION) != 0) {
     fprintf(stderr,
             "You are running gEDA/gaf version [%s%s.%s],\n",
             PREPEND_VERSION_STRING, PACKAGE_DOTTED_VERSION,
diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index 507919c..3bec7b3 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -804,12 +804,12 @@ static void line_type_dialog_ok(GtkWidget *w, gpointer data)
     type = -1;
   
   /* convert the options to integers (-1 means unchanged) */
-  width =  g_strcasecmp (width_str,
-                         _("*unchanged*")) ? atoi (width_str)  : -1;
-  length = g_strcasecmp (length_str,
-                         _("*unchanged*")) ? atoi (length_str) : -1;
-  space  = g_strcasecmp (space_str,
-                         _("*unchanged*")) ? atoi (space_str)  : -1;
+  width =  g_utf8_collate (width_str,
+                           _("*unchanged*")) ? atoi (width_str)  : -1;
+  length = g_utf8_collate (length_str,
+                           _("*unchanged*")) ? atoi (length_str) : -1;
+  space  = g_utf8_collate (space_str,
+                           _("*unchanged*")) ? atoi (space_str)  : -1;
 
   for (iter = selection; iter != NULL; iter = g_list_next(iter)) {
     object = (OBJECT *) iter->data;
@@ -1286,16 +1286,16 @@ static void fill_type_dialog_ok(GtkWidget *w, gpointer data)
     type = -1;
 
   /* convert the options to integers (-1 means unchanged) */
-  width  = g_strcasecmp (width_str,
-                         _("*unchanged*")) ? atoi (width_str)  : -1;
-  angle1 = g_strcasecmp (angle1_str,
-                         _("*unchanged*")) ? atoi (angle1_str) : -1;
-  pitch1 = g_strcasecmp (pitch1_str,
-                         _("*unchanged*")) ? atoi (pitch1_str) : -1;
-  angle2 = g_strcasecmp (angle2_str,
-                         _("*unchanged*")) ? atoi (angle2_str) : -1;
-  pitch2 = g_strcasecmp (pitch2_str,
-                         _("*unchanged*")) ? atoi (pitch2_str) : -1;
+  width  = g_utf8_collate (width_str,
+                           _("*unchanged*")) ? atoi (width_str)  : -1;
+  angle1 = g_utf8_collate (angle1_str,
+                           _("*unchanged*")) ? atoi (angle1_str) : -1;
+  pitch1 = g_utf8_collate (pitch1_str,
+                           _("*unchanged*")) ? atoi (pitch1_str) : -1;
+  angle2 = g_utf8_collate (angle2_str,
+                           _("*unchanged*")) ? atoi (angle2_str) : -1;
+  pitch2 = g_utf8_collate (pitch2_str,
+                           _("*unchanged*")) ? atoi (pitch2_str) : -1;
 
   for (iter = selection; iter != NULL; iter = g_list_next(iter)) {
     object = (OBJECT *) iter->data;
diff --git a/gschem/src/x_multiattrib.c b/gschem/src/x_multiattrib.c
index 3b611de..75438ff 100644
--- a/gschem/src/x_multiattrib.c
+++ b/gschem/src/x_multiattrib.c
@@ -1527,7 +1527,7 @@ static void multiattrib_popup_menu(Multiattrib *multiattrib,
   menu = gtk_menu_new();
   for (tmp = item_list; tmp->label != NULL; tmp++) {
     GtkWidget *menuitem;
-    if (g_strcasecmp (tmp->label, "-") == 0) {
+    if (g_ascii_strcasecmp (tmp->label, "-") == 0) {
       menuitem = gtk_separator_menu_item_new ();
     } else {
       menuitem = gtk_menu_item_new_with_label (_(tmp->label));
diff --git a/gschem/src/x_pagesel.c b/gschem/src/x_pagesel.c
index 43331bd..802fdf7 100644
--- a/gschem/src/x_pagesel.c
+++ b/gschem/src/x_pagesel.c
@@ -274,7 +274,7 @@ static void pagesel_popup_menu (Pagesel *pagesel,
   menu = gtk_menu_new();
   for (tmp = menuitems; tmp->label != NULL; tmp++) {
     GtkWidget *menuitem;
-    if (g_strcasecmp (tmp->label, "-") == 0) {
+    if (g_ascii_strcasecmp (tmp->label, "-") == 0) {
       menuitem = gtk_separator_menu_item_new ();
     } else {
       menuitem = gtk_menu_item_new_with_label (_(tmp->label));
diff --git a/gsymcheck/src/g_rc.c b/gsymcheck/src/g_rc.c
index 933b3cb..8558de9 100644
--- a/gsymcheck/src/g_rc.c
+++ b/gsymcheck/src/g_rc.c
@@ -46,7 +46,7 @@ SCM g_rc_gsymcheck_version(SCM version)
   SCM_ASSERT (scm_is_string (version), version,
 	      SCM_ARG1, "gsymcheck-version");
   
-  if (g_strcasecmp (SCM_STRING_CHARS (version), PACKAGE_DATE_VERSION) != 0) {
+  if (g_ascii_strcasecmp(SCM_STRING_CHARS (version), PACKAGE_DATE_VERSION) != 0) {
     fprintf(stderr,
             "You are running gEDA/gaf version [%s%s.%s],\n",
             PREPEND_VERSION_STRING, PACKAGE_DOTTED_VERSION, PACKAGE_DATE_VERSION);
diff --git a/libgeda/src/f_basic.c b/libgeda/src/f_basic.c
index afe83c9..85d261f 100644
--- a/libgeda/src/f_basic.c
+++ b/libgeda/src/f_basic.c
@@ -228,7 +228,7 @@ int f_open_flags(TOPLEVEL *toplevel, const gchar *filename,
 
   /* Before we open the page, let's load the corresponding gafrc. */
   /* First cd into file's directory. */
-  file_directory = g_dirname (full_filename);
+  file_directory = g_path_get_dirname (full_filename);
 
   if (file_directory) { 
     if (chdir (file_directory)) {
diff --git a/libgeda/src/g_rc.c b/libgeda/src/g_rc.c
index f40156e..6e1f84a 100644
--- a/libgeda/src/g_rc.c
+++ b/libgeda/src/g_rc.c
@@ -526,9 +526,9 @@ SCM g_rc_component_library_search(SCM path)
 
   while ((entry = g_dir_read_name (dir))) {
     /* don't do . and .. and special case font */
-    if ((g_strcasecmp (entry, ".")    != 0) && 
-        (g_strcasecmp (entry, "..")   != 0) &&
-        (g_strcasecmp (entry, "font") != 0))
+    if ((g_ascii_strcasecmp (entry, ".")    != 0) && 
+        (g_ascii_strcasecmp (entry, "..")   != 0) &&
+        (g_ascii_strcasecmp (entry, "font") != 0))
     {
       gchar *fullpath = g_build_filename (string, entry, NULL);
 
@@ -640,9 +640,9 @@ SCM g_rc_source_library_search(SCM path)
 
   while ((entry = g_dir_read_name (dir))) {
     /* don't do . and .. and special case font */
-    if ((g_strcasecmp (entry, ".")    != 0) && 
-        (g_strcasecmp (entry, "..")   != 0) &&
-        (g_strcasecmp (entry, "font") != 0))
+    if ((g_ascii_strcasecmp (entry, ".")    != 0) && 
+        (g_ascii_strcasecmp (entry, "..")   != 0) &&
+        (g_ascii_strcasecmp (entry, "font") != 0))
     {
       gchar *fullpath = g_build_filename (string, entry, NULL);
 
diff --git a/libgeda/src/o_picture.c b/libgeda/src/o_picture.c
index 513af00..b00d822 100644
--- a/libgeda/src/o_picture.c
+++ b/libgeda/src/o_picture.c
@@ -132,7 +132,7 @@ OBJECT *o_picture_read (TOPLEVEL *toplevel,
       line = s_textbuffer_next_line(tb);
       if (line == NULL) break;
 
-      if (g_strcasecmp(line, ".\n") != 0) {
+      if (g_ascii_strcasecmp(line, ".\n") != 0) {
         encoded_picture = g_string_append (encoded_picture, line);
       } else {
         finished = 1;
diff --git a/libgeda/src/s_page.c b/libgeda/src/s_page.c
index 3621319..83993e1 100644
--- a/libgeda/src/s_page.c
+++ b/libgeda/src/s_page.c
@@ -392,7 +392,7 @@ void s_page_goto (TOPLEVEL *toplevel, PAGE *p_new)
 
   toplevel->page_current = p_new;
 
-  dirname = g_dirname (p_new->page_filename);
+  dirname = g_path_get_dirname (p_new->page_filename);
   if (chdir (dirname)) {
     /* An error occured with chdir */
 #warning FIXME: What do we do?
@@ -421,7 +421,7 @@ PAGE *s_page_search (TOPLEVEL *toplevel, const gchar *filename)
         iter = g_list_next( iter ) ) {
 
     page = (PAGE *)iter->data;
-    if ( g_strcasecmp( page->page_filename, filename ) == 0 )
+    if ( g_utf8_collate( page->page_filename, filename ) == 0 )
       return page;
   }
   return NULL;
diff --git a/utils/gschlas/g_rc.c b/utils/gschlas/g_rc.c
index 6dfeb03..a1de7ae 100644
--- a/utils/gschlas/g_rc.c
+++ b/utils/gschlas/g_rc.c
@@ -51,7 +51,7 @@ SCM g_rc_gschlas_version(SCM version)
 		SCM_ARG1, "gschlas-version");
 
 
-    if (g_strcasecmp (SCM_STRING_CHARS (version), PACKAGE_DATE_VERSION) != 0) {
+    if (g_ascii_strcasecmp(SCM_STRING_CHARS (version), PACKAGE_DATE_VERSION) != 0) {
       fprintf(stderr,
               "You are running gEDA/gaf version [%s%s.%s],\n",
               PREPEND_VERSION_STRING, PACKAGE_DOTTED_VERSION,

_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user